api.go 854 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package wafv2
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opAssociateWebACL = "AssociateWebACL"
  13. // AssociateWebACLRequest generates a "aws/request.Request" representing the
  14. // client's request for the AssociateWebACL operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See AssociateWebACL for more information on using the AssociateWebACL
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. // // Example sending a request using the AssociateWebACLRequest method.
  28. // req, resp := client.AssociateWebACLRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/AssociateWebACL
  36. func (c *WAFV2) AssociateWebACLRequest(input *AssociateWebACLInput) (req *request.Request, output *AssociateWebACLOutput) {
  37. op := &request.Operation{
  38. Name: opAssociateWebACL,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &AssociateWebACLInput{}
  44. }
  45. output = &AssociateWebACLOutput{}
  46. req = c.newRequest(op, input, output)
  47. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  48. return
  49. }
  50. // AssociateWebACL API operation for AWS WAFV2.
  51. //
  52. // Associates a web ACL with a regional application resource, to protect the
  53. // resource. A regional application can be an Application Load Balancer (ALB),
  54. // an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito
  55. // user pool.
  56. //
  57. // For Amazon CloudFront, don't use this call. Instead, use your CloudFront
  58. // distribution configuration. To associate a web ACL, in the CloudFront call
  59. // UpdateDistribution, set the web ACL ID to the Amazon Resource Name (ARN)
  60. // of the web ACL. For information, see UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html).
  61. //
  62. // When you make changes to web ACLs or web ACL components, like rules and rule
  63. // groups, WAF propagates the changes everywhere that the web ACL and its components
  64. // are stored and used. Your changes are applied within seconds, but there might
  65. // be a brief period of inconsistency when the changes have arrived in some
  66. // places and not in others. So, for example, if you change a rule action setting,
  67. // the action might be the old action in one area and the new action in another
  68. // area. Or if you add an IP address to an IP set used in a blocking rule, the
  69. // new address might briefly be blocked in one area while still allowed in another.
  70. // This temporary inconsistency can occur when you first associate a web ACL
  71. // with an Amazon Web Services resource and when you change a web ACL that is
  72. // already associated with a resource. Generally, any inconsistencies of this
  73. // type last only a few seconds.
  74. //
  75. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  76. // with awserr.Error's Code and Message methods to get detailed information about
  77. // the error.
  78. //
  79. // See the AWS API reference guide for AWS WAFV2's
  80. // API operation AssociateWebACL for usage and error information.
  81. //
  82. // Returned Error Types:
  83. //
  84. // - WAFInternalErrorException
  85. // Your request is valid, but WAF couldn’t perform the operation because of
  86. // a system problem. Retry your request.
  87. //
  88. // - WAFInvalidParameterException
  89. // The operation failed because WAF didn't recognize a parameter in the request.
  90. // For example:
  91. //
  92. // - You specified a parameter name or value that isn't valid.
  93. //
  94. // - Your nested statement isn't valid. You might have tried to nest a statement
  95. // that can’t be nested.
  96. //
  97. // - You tried to update a WebACL with a DefaultAction that isn't among the
  98. // types available at DefaultAction.
  99. //
  100. // - Your request references an ARN that is malformed, or corresponds to
  101. // a resource with which a web ACL can't be associated.
  102. //
  103. // - WAFNonexistentItemException
  104. // WAF couldn’t perform the operation because your resource doesn't exist.
  105. // If you've just created a resource that you're using in this operation, you
  106. // might just need to wait a few minutes. It can take from a few seconds to
  107. // a number of minutes for changes to propagate.
  108. //
  109. // - WAFUnavailableEntityException
  110. // WAF couldn’t retrieve a resource that you specified for this operation.
  111. // If you've just created a resource that you're using in this operation, you
  112. // might just need to wait a few minutes. It can take from a few seconds to
  113. // a number of minutes for changes to propagate. Verify the resources that you
  114. // are specifying in your request parameters and then retry the operation.
  115. //
  116. // - WAFInvalidOperationException
  117. // The operation isn't valid.
  118. //
  119. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/AssociateWebACL
  120. func (c *WAFV2) AssociateWebACL(input *AssociateWebACLInput) (*AssociateWebACLOutput, error) {
  121. req, out := c.AssociateWebACLRequest(input)
  122. return out, req.Send()
  123. }
  124. // AssociateWebACLWithContext is the same as AssociateWebACL with the addition of
  125. // the ability to pass a context and additional request options.
  126. //
  127. // See AssociateWebACL for details on how to use this API operation.
  128. //
  129. // The context must be non-nil and will be used for request cancellation. If
  130. // the context is nil a panic will occur. In the future the SDK may create
  131. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  132. // for more information on using Contexts.
  133. func (c *WAFV2) AssociateWebACLWithContext(ctx aws.Context, input *AssociateWebACLInput, opts ...request.Option) (*AssociateWebACLOutput, error) {
  134. req, out := c.AssociateWebACLRequest(input)
  135. req.SetContext(ctx)
  136. req.ApplyOptions(opts...)
  137. return out, req.Send()
  138. }
  139. const opCheckCapacity = "CheckCapacity"
  140. // CheckCapacityRequest generates a "aws/request.Request" representing the
  141. // client's request for the CheckCapacity operation. The "output" return
  142. // value will be populated with the request's response once the request completes
  143. // successfully.
  144. //
  145. // Use "Send" method on the returned Request to send the API call to the service.
  146. // the "output" return value is not valid until after Send returns without error.
  147. //
  148. // See CheckCapacity for more information on using the CheckCapacity
  149. // API call, and error handling.
  150. //
  151. // This method is useful when you want to inject custom logic or configuration
  152. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  153. //
  154. // // Example sending a request using the CheckCapacityRequest method.
  155. // req, resp := client.CheckCapacityRequest(params)
  156. //
  157. // err := req.Send()
  158. // if err == nil { // resp is now filled
  159. // fmt.Println(resp)
  160. // }
  161. //
  162. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CheckCapacity
  163. func (c *WAFV2) CheckCapacityRequest(input *CheckCapacityInput) (req *request.Request, output *CheckCapacityOutput) {
  164. op := &request.Operation{
  165. Name: opCheckCapacity,
  166. HTTPMethod: "POST",
  167. HTTPPath: "/",
  168. }
  169. if input == nil {
  170. input = &CheckCapacityInput{}
  171. }
  172. output = &CheckCapacityOutput{}
  173. req = c.newRequest(op, input, output)
  174. return
  175. }
  176. // CheckCapacity API operation for AWS WAFV2.
  177. //
  178. // Returns the web ACL capacity unit (WCU) requirements for a specified scope
  179. // and set of rules. You can use this to check the capacity requirements for
  180. // the rules you want to use in a RuleGroup or WebACL.
  181. //
  182. // WAF uses WCUs to calculate and control the operating resources that are used
  183. // to run your rules, rule groups, and web ACLs. WAF calculates capacity differently
  184. // for each rule type, to reflect the relative cost of each rule. Simple rules
  185. // that cost little to run use fewer WCUs than more complex rules that use more
  186. // processing power. Rule group capacity is fixed at creation, which helps users
  187. // plan their web ACL WCU usage when they use a rule group. The WCU limit for
  188. // web ACLs is 1,500.
  189. //
  190. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  191. // with awserr.Error's Code and Message methods to get detailed information about
  192. // the error.
  193. //
  194. // See the AWS API reference guide for AWS WAFV2's
  195. // API operation CheckCapacity for usage and error information.
  196. //
  197. // Returned Error Types:
  198. //
  199. // - WAFInternalErrorException
  200. // Your request is valid, but WAF couldn’t perform the operation because of
  201. // a system problem. Retry your request.
  202. //
  203. // - WAFInvalidParameterException
  204. // The operation failed because WAF didn't recognize a parameter in the request.
  205. // For example:
  206. //
  207. // - You specified a parameter name or value that isn't valid.
  208. //
  209. // - Your nested statement isn't valid. You might have tried to nest a statement
  210. // that can’t be nested.
  211. //
  212. // - You tried to update a WebACL with a DefaultAction that isn't among the
  213. // types available at DefaultAction.
  214. //
  215. // - Your request references an ARN that is malformed, or corresponds to
  216. // a resource with which a web ACL can't be associated.
  217. //
  218. // - WAFNonexistentItemException
  219. // WAF couldn’t perform the operation because your resource doesn't exist.
  220. // If you've just created a resource that you're using in this operation, you
  221. // might just need to wait a few minutes. It can take from a few seconds to
  222. // a number of minutes for changes to propagate.
  223. //
  224. // - WAFLimitsExceededException
  225. // WAF couldn’t perform the operation because you exceeded your resource limit.
  226. // For example, the maximum number of WebACL objects that you can create for
  227. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  228. // in the WAF Developer Guide.
  229. //
  230. // - WAFInvalidResourceException
  231. // WAF couldn’t perform the operation because the resource that you requested
  232. // isn’t valid. Check the resource, and try again.
  233. //
  234. // - WAFUnavailableEntityException
  235. // WAF couldn’t retrieve a resource that you specified for this operation.
  236. // If you've just created a resource that you're using in this operation, you
  237. // might just need to wait a few minutes. It can take from a few seconds to
  238. // a number of minutes for changes to propagate. Verify the resources that you
  239. // are specifying in your request parameters and then retry the operation.
  240. //
  241. // - WAFSubscriptionNotFoundException
  242. // You tried to use a managed rule group that's available by subscription, but
  243. // you aren't subscribed to it yet.
  244. //
  245. // - WAFExpiredManagedRuleGroupVersionException
  246. // The operation failed because the specified version for the managed rule group
  247. // has expired. You can retrieve the available versions for the managed rule
  248. // group by calling ListAvailableManagedRuleGroupVersions.
  249. //
  250. // - WAFInvalidOperationException
  251. // The operation isn't valid.
  252. //
  253. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CheckCapacity
  254. func (c *WAFV2) CheckCapacity(input *CheckCapacityInput) (*CheckCapacityOutput, error) {
  255. req, out := c.CheckCapacityRequest(input)
  256. return out, req.Send()
  257. }
  258. // CheckCapacityWithContext is the same as CheckCapacity with the addition of
  259. // the ability to pass a context and additional request options.
  260. //
  261. // See CheckCapacity for details on how to use this API operation.
  262. //
  263. // The context must be non-nil and will be used for request cancellation. If
  264. // the context is nil a panic will occur. In the future the SDK may create
  265. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  266. // for more information on using Contexts.
  267. func (c *WAFV2) CheckCapacityWithContext(ctx aws.Context, input *CheckCapacityInput, opts ...request.Option) (*CheckCapacityOutput, error) {
  268. req, out := c.CheckCapacityRequest(input)
  269. req.SetContext(ctx)
  270. req.ApplyOptions(opts...)
  271. return out, req.Send()
  272. }
  273. const opCreateIPSet = "CreateIPSet"
  274. // CreateIPSetRequest generates a "aws/request.Request" representing the
  275. // client's request for the CreateIPSet operation. The "output" return
  276. // value will be populated with the request's response once the request completes
  277. // successfully.
  278. //
  279. // Use "Send" method on the returned Request to send the API call to the service.
  280. // the "output" return value is not valid until after Send returns without error.
  281. //
  282. // See CreateIPSet for more information on using the CreateIPSet
  283. // API call, and error handling.
  284. //
  285. // This method is useful when you want to inject custom logic or configuration
  286. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  287. //
  288. // // Example sending a request using the CreateIPSetRequest method.
  289. // req, resp := client.CreateIPSetRequest(params)
  290. //
  291. // err := req.Send()
  292. // if err == nil { // resp is now filled
  293. // fmt.Println(resp)
  294. // }
  295. //
  296. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateIPSet
  297. func (c *WAFV2) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) {
  298. op := &request.Operation{
  299. Name: opCreateIPSet,
  300. HTTPMethod: "POST",
  301. HTTPPath: "/",
  302. }
  303. if input == nil {
  304. input = &CreateIPSetInput{}
  305. }
  306. output = &CreateIPSetOutput{}
  307. req = c.newRequest(op, input, output)
  308. return
  309. }
  310. // CreateIPSet API operation for AWS WAFV2.
  311. //
  312. // Creates an IPSet, which you use to identify web requests that originate from
  313. // specific IP addresses or ranges of IP addresses. For example, if you're receiving
  314. // a lot of requests from a ranges of IP addresses, you can configure WAF to
  315. // block them using an IPSet that lists those IP addresses.
  316. //
  317. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  318. // with awserr.Error's Code and Message methods to get detailed information about
  319. // the error.
  320. //
  321. // See the AWS API reference guide for AWS WAFV2's
  322. // API operation CreateIPSet for usage and error information.
  323. //
  324. // Returned Error Types:
  325. //
  326. // - WAFInternalErrorException
  327. // Your request is valid, but WAF couldn’t perform the operation because of
  328. // a system problem. Retry your request.
  329. //
  330. // - WAFInvalidParameterException
  331. // The operation failed because WAF didn't recognize a parameter in the request.
  332. // For example:
  333. //
  334. // - You specified a parameter name or value that isn't valid.
  335. //
  336. // - Your nested statement isn't valid. You might have tried to nest a statement
  337. // that can’t be nested.
  338. //
  339. // - You tried to update a WebACL with a DefaultAction that isn't among the
  340. // types available at DefaultAction.
  341. //
  342. // - Your request references an ARN that is malformed, or corresponds to
  343. // a resource with which a web ACL can't be associated.
  344. //
  345. // - WAFDuplicateItemException
  346. // WAF couldn’t perform the operation because the resource that you tried
  347. // to save is a duplicate of an existing one.
  348. //
  349. // - WAFOptimisticLockException
  350. // WAF couldn’t save your changes because you tried to update or delete a
  351. // resource that has changed since you last retrieved it. Get the resource again,
  352. // make any changes you need to make to the new copy, and retry your operation.
  353. //
  354. // - WAFLimitsExceededException
  355. // WAF couldn’t perform the operation because you exceeded your resource limit.
  356. // For example, the maximum number of WebACL objects that you can create for
  357. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  358. // in the WAF Developer Guide.
  359. //
  360. // - WAFTagOperationException
  361. // An error occurred during the tagging operation. Retry your request.
  362. //
  363. // - WAFTagOperationInternalErrorException
  364. // WAF couldn’t perform your tagging operation because of an internal error.
  365. // Retry your request.
  366. //
  367. // - WAFInvalidOperationException
  368. // The operation isn't valid.
  369. //
  370. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateIPSet
  371. func (c *WAFV2) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) {
  372. req, out := c.CreateIPSetRequest(input)
  373. return out, req.Send()
  374. }
  375. // CreateIPSetWithContext is the same as CreateIPSet with the addition of
  376. // the ability to pass a context and additional request options.
  377. //
  378. // See CreateIPSet for details on how to use this API operation.
  379. //
  380. // The context must be non-nil and will be used for request cancellation. If
  381. // the context is nil a panic will occur. In the future the SDK may create
  382. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  383. // for more information on using Contexts.
  384. func (c *WAFV2) CreateIPSetWithContext(ctx aws.Context, input *CreateIPSetInput, opts ...request.Option) (*CreateIPSetOutput, error) {
  385. req, out := c.CreateIPSetRequest(input)
  386. req.SetContext(ctx)
  387. req.ApplyOptions(opts...)
  388. return out, req.Send()
  389. }
  390. const opCreateRegexPatternSet = "CreateRegexPatternSet"
  391. // CreateRegexPatternSetRequest generates a "aws/request.Request" representing the
  392. // client's request for the CreateRegexPatternSet operation. The "output" return
  393. // value will be populated with the request's response once the request completes
  394. // successfully.
  395. //
  396. // Use "Send" method on the returned Request to send the API call to the service.
  397. // the "output" return value is not valid until after Send returns without error.
  398. //
  399. // See CreateRegexPatternSet for more information on using the CreateRegexPatternSet
  400. // API call, and error handling.
  401. //
  402. // This method is useful when you want to inject custom logic or configuration
  403. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  404. //
  405. // // Example sending a request using the CreateRegexPatternSetRequest method.
  406. // req, resp := client.CreateRegexPatternSetRequest(params)
  407. //
  408. // err := req.Send()
  409. // if err == nil { // resp is now filled
  410. // fmt.Println(resp)
  411. // }
  412. //
  413. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRegexPatternSet
  414. func (c *WAFV2) CreateRegexPatternSetRequest(input *CreateRegexPatternSetInput) (req *request.Request, output *CreateRegexPatternSetOutput) {
  415. op := &request.Operation{
  416. Name: opCreateRegexPatternSet,
  417. HTTPMethod: "POST",
  418. HTTPPath: "/",
  419. }
  420. if input == nil {
  421. input = &CreateRegexPatternSetInput{}
  422. }
  423. output = &CreateRegexPatternSetOutput{}
  424. req = c.newRequest(op, input, output)
  425. return
  426. }
  427. // CreateRegexPatternSet API operation for AWS WAFV2.
  428. //
  429. // Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement,
  430. // to have WAF inspect a web request component for the specified patterns.
  431. //
  432. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  433. // with awserr.Error's Code and Message methods to get detailed information about
  434. // the error.
  435. //
  436. // See the AWS API reference guide for AWS WAFV2's
  437. // API operation CreateRegexPatternSet for usage and error information.
  438. //
  439. // Returned Error Types:
  440. //
  441. // - WAFInternalErrorException
  442. // Your request is valid, but WAF couldn’t perform the operation because of
  443. // a system problem. Retry your request.
  444. //
  445. // - WAFInvalidParameterException
  446. // The operation failed because WAF didn't recognize a parameter in the request.
  447. // For example:
  448. //
  449. // - You specified a parameter name or value that isn't valid.
  450. //
  451. // - Your nested statement isn't valid. You might have tried to nest a statement
  452. // that can’t be nested.
  453. //
  454. // - You tried to update a WebACL with a DefaultAction that isn't among the
  455. // types available at DefaultAction.
  456. //
  457. // - Your request references an ARN that is malformed, or corresponds to
  458. // a resource with which a web ACL can't be associated.
  459. //
  460. // - WAFDuplicateItemException
  461. // WAF couldn’t perform the operation because the resource that you tried
  462. // to save is a duplicate of an existing one.
  463. //
  464. // - WAFOptimisticLockException
  465. // WAF couldn’t save your changes because you tried to update or delete a
  466. // resource that has changed since you last retrieved it. Get the resource again,
  467. // make any changes you need to make to the new copy, and retry your operation.
  468. //
  469. // - WAFLimitsExceededException
  470. // WAF couldn’t perform the operation because you exceeded your resource limit.
  471. // For example, the maximum number of WebACL objects that you can create for
  472. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  473. // in the WAF Developer Guide.
  474. //
  475. // - WAFTagOperationException
  476. // An error occurred during the tagging operation. Retry your request.
  477. //
  478. // - WAFTagOperationInternalErrorException
  479. // WAF couldn’t perform your tagging operation because of an internal error.
  480. // Retry your request.
  481. //
  482. // - WAFInvalidOperationException
  483. // The operation isn't valid.
  484. //
  485. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRegexPatternSet
  486. func (c *WAFV2) CreateRegexPatternSet(input *CreateRegexPatternSetInput) (*CreateRegexPatternSetOutput, error) {
  487. req, out := c.CreateRegexPatternSetRequest(input)
  488. return out, req.Send()
  489. }
  490. // CreateRegexPatternSetWithContext is the same as CreateRegexPatternSet with the addition of
  491. // the ability to pass a context and additional request options.
  492. //
  493. // See CreateRegexPatternSet for details on how to use this API operation.
  494. //
  495. // The context must be non-nil and will be used for request cancellation. If
  496. // the context is nil a panic will occur. In the future the SDK may create
  497. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  498. // for more information on using Contexts.
  499. func (c *WAFV2) CreateRegexPatternSetWithContext(ctx aws.Context, input *CreateRegexPatternSetInput, opts ...request.Option) (*CreateRegexPatternSetOutput, error) {
  500. req, out := c.CreateRegexPatternSetRequest(input)
  501. req.SetContext(ctx)
  502. req.ApplyOptions(opts...)
  503. return out, req.Send()
  504. }
  505. const opCreateRuleGroup = "CreateRuleGroup"
  506. // CreateRuleGroupRequest generates a "aws/request.Request" representing the
  507. // client's request for the CreateRuleGroup operation. The "output" return
  508. // value will be populated with the request's response once the request completes
  509. // successfully.
  510. //
  511. // Use "Send" method on the returned Request to send the API call to the service.
  512. // the "output" return value is not valid until after Send returns without error.
  513. //
  514. // See CreateRuleGroup for more information on using the CreateRuleGroup
  515. // API call, and error handling.
  516. //
  517. // This method is useful when you want to inject custom logic or configuration
  518. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  519. //
  520. // // Example sending a request using the CreateRuleGroupRequest method.
  521. // req, resp := client.CreateRuleGroupRequest(params)
  522. //
  523. // err := req.Send()
  524. // if err == nil { // resp is now filled
  525. // fmt.Println(resp)
  526. // }
  527. //
  528. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup
  529. func (c *WAFV2) CreateRuleGroupRequest(input *CreateRuleGroupInput) (req *request.Request, output *CreateRuleGroupOutput) {
  530. op := &request.Operation{
  531. Name: opCreateRuleGroup,
  532. HTTPMethod: "POST",
  533. HTTPPath: "/",
  534. }
  535. if input == nil {
  536. input = &CreateRuleGroupInput{}
  537. }
  538. output = &CreateRuleGroupOutput{}
  539. req = c.newRequest(op, input, output)
  540. return
  541. }
  542. // CreateRuleGroup API operation for AWS WAFV2.
  543. //
  544. // Creates a RuleGroup per the specifications provided.
  545. //
  546. // A rule group defines a collection of rules to inspect and control web requests
  547. // that you can use in a WebACL. When you create a rule group, you define an
  548. // immutable capacity limit. If you update a rule group, you must stay within
  549. // the capacity. This allows others to reuse the rule group with confidence
  550. // in its capacity requirements.
  551. //
  552. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  553. // with awserr.Error's Code and Message methods to get detailed information about
  554. // the error.
  555. //
  556. // See the AWS API reference guide for AWS WAFV2's
  557. // API operation CreateRuleGroup for usage and error information.
  558. //
  559. // Returned Error Types:
  560. //
  561. // - WAFInternalErrorException
  562. // Your request is valid, but WAF couldn’t perform the operation because of
  563. // a system problem. Retry your request.
  564. //
  565. // - WAFInvalidParameterException
  566. // The operation failed because WAF didn't recognize a parameter in the request.
  567. // For example:
  568. //
  569. // - You specified a parameter name or value that isn't valid.
  570. //
  571. // - Your nested statement isn't valid. You might have tried to nest a statement
  572. // that can’t be nested.
  573. //
  574. // - You tried to update a WebACL with a DefaultAction that isn't among the
  575. // types available at DefaultAction.
  576. //
  577. // - Your request references an ARN that is malformed, or corresponds to
  578. // a resource with which a web ACL can't be associated.
  579. //
  580. // - WAFDuplicateItemException
  581. // WAF couldn’t perform the operation because the resource that you tried
  582. // to save is a duplicate of an existing one.
  583. //
  584. // - WAFOptimisticLockException
  585. // WAF couldn’t save your changes because you tried to update or delete a
  586. // resource that has changed since you last retrieved it. Get the resource again,
  587. // make any changes you need to make to the new copy, and retry your operation.
  588. //
  589. // - WAFLimitsExceededException
  590. // WAF couldn’t perform the operation because you exceeded your resource limit.
  591. // For example, the maximum number of WebACL objects that you can create for
  592. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  593. // in the WAF Developer Guide.
  594. //
  595. // - WAFUnavailableEntityException
  596. // WAF couldn’t retrieve a resource that you specified for this operation.
  597. // If you've just created a resource that you're using in this operation, you
  598. // might just need to wait a few minutes. It can take from a few seconds to
  599. // a number of minutes for changes to propagate. Verify the resources that you
  600. // are specifying in your request parameters and then retry the operation.
  601. //
  602. // - WAFTagOperationException
  603. // An error occurred during the tagging operation. Retry your request.
  604. //
  605. // - WAFTagOperationInternalErrorException
  606. // WAF couldn’t perform your tagging operation because of an internal error.
  607. // Retry your request.
  608. //
  609. // - WAFSubscriptionNotFoundException
  610. // You tried to use a managed rule group that's available by subscription, but
  611. // you aren't subscribed to it yet.
  612. //
  613. // - WAFNonexistentItemException
  614. // WAF couldn’t perform the operation because your resource doesn't exist.
  615. // If you've just created a resource that you're using in this operation, you
  616. // might just need to wait a few minutes. It can take from a few seconds to
  617. // a number of minutes for changes to propagate.
  618. //
  619. // - WAFInvalidOperationException
  620. // The operation isn't valid.
  621. //
  622. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup
  623. func (c *WAFV2) CreateRuleGroup(input *CreateRuleGroupInput) (*CreateRuleGroupOutput, error) {
  624. req, out := c.CreateRuleGroupRequest(input)
  625. return out, req.Send()
  626. }
  627. // CreateRuleGroupWithContext is the same as CreateRuleGroup with the addition of
  628. // the ability to pass a context and additional request options.
  629. //
  630. // See CreateRuleGroup for details on how to use this API operation.
  631. //
  632. // The context must be non-nil and will be used for request cancellation. If
  633. // the context is nil a panic will occur. In the future the SDK may create
  634. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  635. // for more information on using Contexts.
  636. func (c *WAFV2) CreateRuleGroupWithContext(ctx aws.Context, input *CreateRuleGroupInput, opts ...request.Option) (*CreateRuleGroupOutput, error) {
  637. req, out := c.CreateRuleGroupRequest(input)
  638. req.SetContext(ctx)
  639. req.ApplyOptions(opts...)
  640. return out, req.Send()
  641. }
  642. const opCreateWebACL = "CreateWebACL"
  643. // CreateWebACLRequest generates a "aws/request.Request" representing the
  644. // client's request for the CreateWebACL operation. The "output" return
  645. // value will be populated with the request's response once the request completes
  646. // successfully.
  647. //
  648. // Use "Send" method on the returned Request to send the API call to the service.
  649. // the "output" return value is not valid until after Send returns without error.
  650. //
  651. // See CreateWebACL for more information on using the CreateWebACL
  652. // API call, and error handling.
  653. //
  654. // This method is useful when you want to inject custom logic or configuration
  655. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  656. //
  657. // // Example sending a request using the CreateWebACLRequest method.
  658. // req, resp := client.CreateWebACLRequest(params)
  659. //
  660. // err := req.Send()
  661. // if err == nil { // resp is now filled
  662. // fmt.Println(resp)
  663. // }
  664. //
  665. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL
  666. func (c *WAFV2) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Request, output *CreateWebACLOutput) {
  667. op := &request.Operation{
  668. Name: opCreateWebACL,
  669. HTTPMethod: "POST",
  670. HTTPPath: "/",
  671. }
  672. if input == nil {
  673. input = &CreateWebACLInput{}
  674. }
  675. output = &CreateWebACLOutput{}
  676. req = c.newRequest(op, input, output)
  677. return
  678. }
  679. // CreateWebACL API operation for AWS WAFV2.
  680. //
  681. // Creates a WebACL per the specifications provided.
  682. //
  683. // A web ACL defines a collection of rules to use to inspect and control web
  684. // requests. Each rule has an action defined (allow, block, or count) for requests
  685. // that match the statement of the rule. In the web ACL, you assign a default
  686. // action to take (allow, block) for any request that does not match any of
  687. // the rules. The rules in a web ACL can be a combination of the types Rule,
  688. // RuleGroup, and managed rule group. You can associate a web ACL with one or
  689. // more Amazon Web Services resources to protect. The resources can be an Amazon
  690. // CloudFront distribution, an Amazon API Gateway REST API, an Application Load
  691. // Balancer, an AppSync GraphQL API, or an Amazon Cognito user pool.
  692. //
  693. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  694. // with awserr.Error's Code and Message methods to get detailed information about
  695. // the error.
  696. //
  697. // See the AWS API reference guide for AWS WAFV2's
  698. // API operation CreateWebACL for usage and error information.
  699. //
  700. // Returned Error Types:
  701. //
  702. // - WAFInternalErrorException
  703. // Your request is valid, but WAF couldn’t perform the operation because of
  704. // a system problem. Retry your request.
  705. //
  706. // - WAFInvalidParameterException
  707. // The operation failed because WAF didn't recognize a parameter in the request.
  708. // For example:
  709. //
  710. // - You specified a parameter name or value that isn't valid.
  711. //
  712. // - Your nested statement isn't valid. You might have tried to nest a statement
  713. // that can’t be nested.
  714. //
  715. // - You tried to update a WebACL with a DefaultAction that isn't among the
  716. // types available at DefaultAction.
  717. //
  718. // - Your request references an ARN that is malformed, or corresponds to
  719. // a resource with which a web ACL can't be associated.
  720. //
  721. // - WAFDuplicateItemException
  722. // WAF couldn’t perform the operation because the resource that you tried
  723. // to save is a duplicate of an existing one.
  724. //
  725. // - WAFOptimisticLockException
  726. // WAF couldn’t save your changes because you tried to update or delete a
  727. // resource that has changed since you last retrieved it. Get the resource again,
  728. // make any changes you need to make to the new copy, and retry your operation.
  729. //
  730. // - WAFLimitsExceededException
  731. // WAF couldn’t perform the operation because you exceeded your resource limit.
  732. // For example, the maximum number of WebACL objects that you can create for
  733. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  734. // in the WAF Developer Guide.
  735. //
  736. // - WAFInvalidResourceException
  737. // WAF couldn’t perform the operation because the resource that you requested
  738. // isn’t valid. Check the resource, and try again.
  739. //
  740. // - WAFUnavailableEntityException
  741. // WAF couldn’t retrieve a resource that you specified for this operation.
  742. // If you've just created a resource that you're using in this operation, you
  743. // might just need to wait a few minutes. It can take from a few seconds to
  744. // a number of minutes for changes to propagate. Verify the resources that you
  745. // are specifying in your request parameters and then retry the operation.
  746. //
  747. // - WAFNonexistentItemException
  748. // WAF couldn’t perform the operation because your resource doesn't exist.
  749. // If you've just created a resource that you're using in this operation, you
  750. // might just need to wait a few minutes. It can take from a few seconds to
  751. // a number of minutes for changes to propagate.
  752. //
  753. // - WAFTagOperationException
  754. // An error occurred during the tagging operation. Retry your request.
  755. //
  756. // - WAFTagOperationInternalErrorException
  757. // WAF couldn’t perform your tagging operation because of an internal error.
  758. // Retry your request.
  759. //
  760. // - WAFSubscriptionNotFoundException
  761. // You tried to use a managed rule group that's available by subscription, but
  762. // you aren't subscribed to it yet.
  763. //
  764. // - WAFInvalidOperationException
  765. // The operation isn't valid.
  766. //
  767. // - WAFConfigurationWarningException
  768. // The operation failed because you are inspecting the web request body, headers,
  769. // or cookies without specifying how to handle oversize components. Rules that
  770. // inspect the body must either provide an OversizeHandling configuration or
  771. // they must be preceded by a SizeConstraintStatement that blocks the body content
  772. // from being too large. Rules that inspect the headers or cookies must provide
  773. // an OversizeHandling configuration.
  774. //
  775. // Provide the handling configuration and retry your operation.
  776. //
  777. // Alternately, you can suppress this warning by adding the following tag to
  778. // the resource that you provide to this operation: Tag (key:WAF:OversizeFieldsHandlingConstraintOptOut,
  779. // value:true).
  780. //
  781. // - WAFExpiredManagedRuleGroupVersionException
  782. // The operation failed because the specified version for the managed rule group
  783. // has expired. You can retrieve the available versions for the managed rule
  784. // group by calling ListAvailableManagedRuleGroupVersions.
  785. //
  786. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL
  787. func (c *WAFV2) CreateWebACL(input *CreateWebACLInput) (*CreateWebACLOutput, error) {
  788. req, out := c.CreateWebACLRequest(input)
  789. return out, req.Send()
  790. }
  791. // CreateWebACLWithContext is the same as CreateWebACL with the addition of
  792. // the ability to pass a context and additional request options.
  793. //
  794. // See CreateWebACL for details on how to use this API operation.
  795. //
  796. // The context must be non-nil and will be used for request cancellation. If
  797. // the context is nil a panic will occur. In the future the SDK may create
  798. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  799. // for more information on using Contexts.
  800. func (c *WAFV2) CreateWebACLWithContext(ctx aws.Context, input *CreateWebACLInput, opts ...request.Option) (*CreateWebACLOutput, error) {
  801. req, out := c.CreateWebACLRequest(input)
  802. req.SetContext(ctx)
  803. req.ApplyOptions(opts...)
  804. return out, req.Send()
  805. }
  806. const opDeleteFirewallManagerRuleGroups = "DeleteFirewallManagerRuleGroups"
  807. // DeleteFirewallManagerRuleGroupsRequest generates a "aws/request.Request" representing the
  808. // client's request for the DeleteFirewallManagerRuleGroups operation. The "output" return
  809. // value will be populated with the request's response once the request completes
  810. // successfully.
  811. //
  812. // Use "Send" method on the returned Request to send the API call to the service.
  813. // the "output" return value is not valid until after Send returns without error.
  814. //
  815. // See DeleteFirewallManagerRuleGroups for more information on using the DeleteFirewallManagerRuleGroups
  816. // API call, and error handling.
  817. //
  818. // This method is useful when you want to inject custom logic or configuration
  819. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  820. //
  821. // // Example sending a request using the DeleteFirewallManagerRuleGroupsRequest method.
  822. // req, resp := client.DeleteFirewallManagerRuleGroupsRequest(params)
  823. //
  824. // err := req.Send()
  825. // if err == nil { // resp is now filled
  826. // fmt.Println(resp)
  827. // }
  828. //
  829. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteFirewallManagerRuleGroups
  830. func (c *WAFV2) DeleteFirewallManagerRuleGroupsRequest(input *DeleteFirewallManagerRuleGroupsInput) (req *request.Request, output *DeleteFirewallManagerRuleGroupsOutput) {
  831. op := &request.Operation{
  832. Name: opDeleteFirewallManagerRuleGroups,
  833. HTTPMethod: "POST",
  834. HTTPPath: "/",
  835. }
  836. if input == nil {
  837. input = &DeleteFirewallManagerRuleGroupsInput{}
  838. }
  839. output = &DeleteFirewallManagerRuleGroupsOutput{}
  840. req = c.newRequest(op, input, output)
  841. return
  842. }
  843. // DeleteFirewallManagerRuleGroups API operation for AWS WAFV2.
  844. //
  845. // Deletes all rule groups that are managed by Firewall Manager for the specified
  846. // web ACL.
  847. //
  848. // You can only use this if ManagedByFirewallManager is false in the specified
  849. // WebACL.
  850. //
  851. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  852. // with awserr.Error's Code and Message methods to get detailed information about
  853. // the error.
  854. //
  855. // See the AWS API reference guide for AWS WAFV2's
  856. // API operation DeleteFirewallManagerRuleGroups for usage and error information.
  857. //
  858. // Returned Error Types:
  859. //
  860. // - WAFInternalErrorException
  861. // Your request is valid, but WAF couldn’t perform the operation because of
  862. // a system problem. Retry your request.
  863. //
  864. // - WAFInvalidParameterException
  865. // The operation failed because WAF didn't recognize a parameter in the request.
  866. // For example:
  867. //
  868. // - You specified a parameter name or value that isn't valid.
  869. //
  870. // - Your nested statement isn't valid. You might have tried to nest a statement
  871. // that can’t be nested.
  872. //
  873. // - You tried to update a WebACL with a DefaultAction that isn't among the
  874. // types available at DefaultAction.
  875. //
  876. // - Your request references an ARN that is malformed, or corresponds to
  877. // a resource with which a web ACL can't be associated.
  878. //
  879. // - WAFNonexistentItemException
  880. // WAF couldn’t perform the operation because your resource doesn't exist.
  881. // If you've just created a resource that you're using in this operation, you
  882. // might just need to wait a few minutes. It can take from a few seconds to
  883. // a number of minutes for changes to propagate.
  884. //
  885. // - WAFOptimisticLockException
  886. // WAF couldn’t save your changes because you tried to update or delete a
  887. // resource that has changed since you last retrieved it. Get the resource again,
  888. // make any changes you need to make to the new copy, and retry your operation.
  889. //
  890. // - WAFInvalidOperationException
  891. // The operation isn't valid.
  892. //
  893. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteFirewallManagerRuleGroups
  894. func (c *WAFV2) DeleteFirewallManagerRuleGroups(input *DeleteFirewallManagerRuleGroupsInput) (*DeleteFirewallManagerRuleGroupsOutput, error) {
  895. req, out := c.DeleteFirewallManagerRuleGroupsRequest(input)
  896. return out, req.Send()
  897. }
  898. // DeleteFirewallManagerRuleGroupsWithContext is the same as DeleteFirewallManagerRuleGroups with the addition of
  899. // the ability to pass a context and additional request options.
  900. //
  901. // See DeleteFirewallManagerRuleGroups for details on how to use this API operation.
  902. //
  903. // The context must be non-nil and will be used for request cancellation. If
  904. // the context is nil a panic will occur. In the future the SDK may create
  905. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  906. // for more information on using Contexts.
  907. func (c *WAFV2) DeleteFirewallManagerRuleGroupsWithContext(ctx aws.Context, input *DeleteFirewallManagerRuleGroupsInput, opts ...request.Option) (*DeleteFirewallManagerRuleGroupsOutput, error) {
  908. req, out := c.DeleteFirewallManagerRuleGroupsRequest(input)
  909. req.SetContext(ctx)
  910. req.ApplyOptions(opts...)
  911. return out, req.Send()
  912. }
  913. const opDeleteIPSet = "DeleteIPSet"
  914. // DeleteIPSetRequest generates a "aws/request.Request" representing the
  915. // client's request for the DeleteIPSet operation. The "output" return
  916. // value will be populated with the request's response once the request completes
  917. // successfully.
  918. //
  919. // Use "Send" method on the returned Request to send the API call to the service.
  920. // the "output" return value is not valid until after Send returns without error.
  921. //
  922. // See DeleteIPSet for more information on using the DeleteIPSet
  923. // API call, and error handling.
  924. //
  925. // This method is useful when you want to inject custom logic or configuration
  926. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  927. //
  928. // // Example sending a request using the DeleteIPSetRequest method.
  929. // req, resp := client.DeleteIPSetRequest(params)
  930. //
  931. // err := req.Send()
  932. // if err == nil { // resp is now filled
  933. // fmt.Println(resp)
  934. // }
  935. //
  936. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteIPSet
  937. func (c *WAFV2) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) {
  938. op := &request.Operation{
  939. Name: opDeleteIPSet,
  940. HTTPMethod: "POST",
  941. HTTPPath: "/",
  942. }
  943. if input == nil {
  944. input = &DeleteIPSetInput{}
  945. }
  946. output = &DeleteIPSetOutput{}
  947. req = c.newRequest(op, input, output)
  948. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  949. return
  950. }
  951. // DeleteIPSet API operation for AWS WAFV2.
  952. //
  953. // Deletes the specified IPSet.
  954. //
  955. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  956. // with awserr.Error's Code and Message methods to get detailed information about
  957. // the error.
  958. //
  959. // See the AWS API reference guide for AWS WAFV2's
  960. // API operation DeleteIPSet for usage and error information.
  961. //
  962. // Returned Error Types:
  963. //
  964. // - WAFInternalErrorException
  965. // Your request is valid, but WAF couldn’t perform the operation because of
  966. // a system problem. Retry your request.
  967. //
  968. // - WAFInvalidParameterException
  969. // The operation failed because WAF didn't recognize a parameter in the request.
  970. // For example:
  971. //
  972. // - You specified a parameter name or value that isn't valid.
  973. //
  974. // - Your nested statement isn't valid. You might have tried to nest a statement
  975. // that can’t be nested.
  976. //
  977. // - You tried to update a WebACL with a DefaultAction that isn't among the
  978. // types available at DefaultAction.
  979. //
  980. // - Your request references an ARN that is malformed, or corresponds to
  981. // a resource with which a web ACL can't be associated.
  982. //
  983. // - WAFNonexistentItemException
  984. // WAF couldn’t perform the operation because your resource doesn't exist.
  985. // If you've just created a resource that you're using in this operation, you
  986. // might just need to wait a few minutes. It can take from a few seconds to
  987. // a number of minutes for changes to propagate.
  988. //
  989. // - WAFOptimisticLockException
  990. // WAF couldn’t save your changes because you tried to update or delete a
  991. // resource that has changed since you last retrieved it. Get the resource again,
  992. // make any changes you need to make to the new copy, and retry your operation.
  993. //
  994. // - WAFAssociatedItemException
  995. // WAF couldn’t perform the operation because your resource is being used
  996. // by another resource or it’s associated with another resource.
  997. //
  998. // - WAFTagOperationException
  999. // An error occurred during the tagging operation. Retry your request.
  1000. //
  1001. // - WAFTagOperationInternalErrorException
  1002. // WAF couldn’t perform your tagging operation because of an internal error.
  1003. // Retry your request.
  1004. //
  1005. // - WAFInvalidOperationException
  1006. // The operation isn't valid.
  1007. //
  1008. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteIPSet
  1009. func (c *WAFV2) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) {
  1010. req, out := c.DeleteIPSetRequest(input)
  1011. return out, req.Send()
  1012. }
  1013. // DeleteIPSetWithContext is the same as DeleteIPSet with the addition of
  1014. // the ability to pass a context and additional request options.
  1015. //
  1016. // See DeleteIPSet for details on how to use this API operation.
  1017. //
  1018. // The context must be non-nil and will be used for request cancellation. If
  1019. // the context is nil a panic will occur. In the future the SDK may create
  1020. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1021. // for more information on using Contexts.
  1022. func (c *WAFV2) DeleteIPSetWithContext(ctx aws.Context, input *DeleteIPSetInput, opts ...request.Option) (*DeleteIPSetOutput, error) {
  1023. req, out := c.DeleteIPSetRequest(input)
  1024. req.SetContext(ctx)
  1025. req.ApplyOptions(opts...)
  1026. return out, req.Send()
  1027. }
  1028. const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration"
  1029. // DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the
  1030. // client's request for the DeleteLoggingConfiguration operation. The "output" return
  1031. // value will be populated with the request's response once the request completes
  1032. // successfully.
  1033. //
  1034. // Use "Send" method on the returned Request to send the API call to the service.
  1035. // the "output" return value is not valid until after Send returns without error.
  1036. //
  1037. // See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration
  1038. // API call, and error handling.
  1039. //
  1040. // This method is useful when you want to inject custom logic or configuration
  1041. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1042. //
  1043. // // Example sending a request using the DeleteLoggingConfigurationRequest method.
  1044. // req, resp := client.DeleteLoggingConfigurationRequest(params)
  1045. //
  1046. // err := req.Send()
  1047. // if err == nil { // resp is now filled
  1048. // fmt.Println(resp)
  1049. // }
  1050. //
  1051. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteLoggingConfiguration
  1052. func (c *WAFV2) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfigurationInput) (req *request.Request, output *DeleteLoggingConfigurationOutput) {
  1053. op := &request.Operation{
  1054. Name: opDeleteLoggingConfiguration,
  1055. HTTPMethod: "POST",
  1056. HTTPPath: "/",
  1057. }
  1058. if input == nil {
  1059. input = &DeleteLoggingConfigurationInput{}
  1060. }
  1061. output = &DeleteLoggingConfigurationOutput{}
  1062. req = c.newRequest(op, input, output)
  1063. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1064. return
  1065. }
  1066. // DeleteLoggingConfiguration API operation for AWS WAFV2.
  1067. //
  1068. // Deletes the LoggingConfiguration from the specified web ACL.
  1069. //
  1070. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1071. // with awserr.Error's Code and Message methods to get detailed information about
  1072. // the error.
  1073. //
  1074. // See the AWS API reference guide for AWS WAFV2's
  1075. // API operation DeleteLoggingConfiguration for usage and error information.
  1076. //
  1077. // Returned Error Types:
  1078. //
  1079. // - WAFInternalErrorException
  1080. // Your request is valid, but WAF couldn’t perform the operation because of
  1081. // a system problem. Retry your request.
  1082. //
  1083. // - WAFNonexistentItemException
  1084. // WAF couldn’t perform the operation because your resource doesn't exist.
  1085. // If you've just created a resource that you're using in this operation, you
  1086. // might just need to wait a few minutes. It can take from a few seconds to
  1087. // a number of minutes for changes to propagate.
  1088. //
  1089. // - WAFOptimisticLockException
  1090. // WAF couldn’t save your changes because you tried to update or delete a
  1091. // resource that has changed since you last retrieved it. Get the resource again,
  1092. // make any changes you need to make to the new copy, and retry your operation.
  1093. //
  1094. // - WAFInvalidParameterException
  1095. // The operation failed because WAF didn't recognize a parameter in the request.
  1096. // For example:
  1097. //
  1098. // - You specified a parameter name or value that isn't valid.
  1099. //
  1100. // - Your nested statement isn't valid. You might have tried to nest a statement
  1101. // that can’t be nested.
  1102. //
  1103. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1104. // types available at DefaultAction.
  1105. //
  1106. // - Your request references an ARN that is malformed, or corresponds to
  1107. // a resource with which a web ACL can't be associated.
  1108. //
  1109. // - WAFInvalidOperationException
  1110. // The operation isn't valid.
  1111. //
  1112. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteLoggingConfiguration
  1113. func (c *WAFV2) DeleteLoggingConfiguration(input *DeleteLoggingConfigurationInput) (*DeleteLoggingConfigurationOutput, error) {
  1114. req, out := c.DeleteLoggingConfigurationRequest(input)
  1115. return out, req.Send()
  1116. }
  1117. // DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of
  1118. // the ability to pass a context and additional request options.
  1119. //
  1120. // See DeleteLoggingConfiguration for details on how to use this API operation.
  1121. //
  1122. // The context must be non-nil and will be used for request cancellation. If
  1123. // the context is nil a panic will occur. In the future the SDK may create
  1124. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1125. // for more information on using Contexts.
  1126. func (c *WAFV2) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *DeleteLoggingConfigurationInput, opts ...request.Option) (*DeleteLoggingConfigurationOutput, error) {
  1127. req, out := c.DeleteLoggingConfigurationRequest(input)
  1128. req.SetContext(ctx)
  1129. req.ApplyOptions(opts...)
  1130. return out, req.Send()
  1131. }
  1132. const opDeletePermissionPolicy = "DeletePermissionPolicy"
  1133. // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the
  1134. // client's request for the DeletePermissionPolicy operation. The "output" return
  1135. // value will be populated with the request's response once the request completes
  1136. // successfully.
  1137. //
  1138. // Use "Send" method on the returned Request to send the API call to the service.
  1139. // the "output" return value is not valid until after Send returns without error.
  1140. //
  1141. // See DeletePermissionPolicy for more information on using the DeletePermissionPolicy
  1142. // API call, and error handling.
  1143. //
  1144. // This method is useful when you want to inject custom logic or configuration
  1145. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1146. //
  1147. // // Example sending a request using the DeletePermissionPolicyRequest method.
  1148. // req, resp := client.DeletePermissionPolicyRequest(params)
  1149. //
  1150. // err := req.Send()
  1151. // if err == nil { // resp is now filled
  1152. // fmt.Println(resp)
  1153. // }
  1154. //
  1155. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeletePermissionPolicy
  1156. func (c *WAFV2) DeletePermissionPolicyRequest(input *DeletePermissionPolicyInput) (req *request.Request, output *DeletePermissionPolicyOutput) {
  1157. op := &request.Operation{
  1158. Name: opDeletePermissionPolicy,
  1159. HTTPMethod: "POST",
  1160. HTTPPath: "/",
  1161. }
  1162. if input == nil {
  1163. input = &DeletePermissionPolicyInput{}
  1164. }
  1165. output = &DeletePermissionPolicyOutput{}
  1166. req = c.newRequest(op, input, output)
  1167. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1168. return
  1169. }
  1170. // DeletePermissionPolicy API operation for AWS WAFV2.
  1171. //
  1172. // Permanently deletes an IAM policy from the specified rule group.
  1173. //
  1174. // You must be the owner of the rule group to perform this operation.
  1175. //
  1176. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1177. // with awserr.Error's Code and Message methods to get detailed information about
  1178. // the error.
  1179. //
  1180. // See the AWS API reference guide for AWS WAFV2's
  1181. // API operation DeletePermissionPolicy for usage and error information.
  1182. //
  1183. // Returned Error Types:
  1184. //
  1185. // - WAFNonexistentItemException
  1186. // WAF couldn’t perform the operation because your resource doesn't exist.
  1187. // If you've just created a resource that you're using in this operation, you
  1188. // might just need to wait a few minutes. It can take from a few seconds to
  1189. // a number of minutes for changes to propagate.
  1190. //
  1191. // - WAFInternalErrorException
  1192. // Your request is valid, but WAF couldn’t perform the operation because of
  1193. // a system problem. Retry your request.
  1194. //
  1195. // - WAFInvalidParameterException
  1196. // The operation failed because WAF didn't recognize a parameter in the request.
  1197. // For example:
  1198. //
  1199. // - You specified a parameter name or value that isn't valid.
  1200. //
  1201. // - Your nested statement isn't valid. You might have tried to nest a statement
  1202. // that can’t be nested.
  1203. //
  1204. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1205. // types available at DefaultAction.
  1206. //
  1207. // - Your request references an ARN that is malformed, or corresponds to
  1208. // a resource with which a web ACL can't be associated.
  1209. //
  1210. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeletePermissionPolicy
  1211. func (c *WAFV2) DeletePermissionPolicy(input *DeletePermissionPolicyInput) (*DeletePermissionPolicyOutput, error) {
  1212. req, out := c.DeletePermissionPolicyRequest(input)
  1213. return out, req.Send()
  1214. }
  1215. // DeletePermissionPolicyWithContext is the same as DeletePermissionPolicy with the addition of
  1216. // the ability to pass a context and additional request options.
  1217. //
  1218. // See DeletePermissionPolicy for details on how to use this API operation.
  1219. //
  1220. // The context must be non-nil and will be used for request cancellation. If
  1221. // the context is nil a panic will occur. In the future the SDK may create
  1222. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1223. // for more information on using Contexts.
  1224. func (c *WAFV2) DeletePermissionPolicyWithContext(ctx aws.Context, input *DeletePermissionPolicyInput, opts ...request.Option) (*DeletePermissionPolicyOutput, error) {
  1225. req, out := c.DeletePermissionPolicyRequest(input)
  1226. req.SetContext(ctx)
  1227. req.ApplyOptions(opts...)
  1228. return out, req.Send()
  1229. }
  1230. const opDeleteRegexPatternSet = "DeleteRegexPatternSet"
  1231. // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the
  1232. // client's request for the DeleteRegexPatternSet operation. The "output" return
  1233. // value will be populated with the request's response once the request completes
  1234. // successfully.
  1235. //
  1236. // Use "Send" method on the returned Request to send the API call to the service.
  1237. // the "output" return value is not valid until after Send returns without error.
  1238. //
  1239. // See DeleteRegexPatternSet for more information on using the DeleteRegexPatternSet
  1240. // API call, and error handling.
  1241. //
  1242. // This method is useful when you want to inject custom logic or configuration
  1243. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1244. //
  1245. // // Example sending a request using the DeleteRegexPatternSetRequest method.
  1246. // req, resp := client.DeleteRegexPatternSetRequest(params)
  1247. //
  1248. // err := req.Send()
  1249. // if err == nil { // resp is now filled
  1250. // fmt.Println(resp)
  1251. // }
  1252. //
  1253. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRegexPatternSet
  1254. func (c *WAFV2) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) (req *request.Request, output *DeleteRegexPatternSetOutput) {
  1255. op := &request.Operation{
  1256. Name: opDeleteRegexPatternSet,
  1257. HTTPMethod: "POST",
  1258. HTTPPath: "/",
  1259. }
  1260. if input == nil {
  1261. input = &DeleteRegexPatternSetInput{}
  1262. }
  1263. output = &DeleteRegexPatternSetOutput{}
  1264. req = c.newRequest(op, input, output)
  1265. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1266. return
  1267. }
  1268. // DeleteRegexPatternSet API operation for AWS WAFV2.
  1269. //
  1270. // Deletes the specified RegexPatternSet.
  1271. //
  1272. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1273. // with awserr.Error's Code and Message methods to get detailed information about
  1274. // the error.
  1275. //
  1276. // See the AWS API reference guide for AWS WAFV2's
  1277. // API operation DeleteRegexPatternSet for usage and error information.
  1278. //
  1279. // Returned Error Types:
  1280. //
  1281. // - WAFInternalErrorException
  1282. // Your request is valid, but WAF couldn’t perform the operation because of
  1283. // a system problem. Retry your request.
  1284. //
  1285. // - WAFInvalidParameterException
  1286. // The operation failed because WAF didn't recognize a parameter in the request.
  1287. // For example:
  1288. //
  1289. // - You specified a parameter name or value that isn't valid.
  1290. //
  1291. // - Your nested statement isn't valid. You might have tried to nest a statement
  1292. // that can’t be nested.
  1293. //
  1294. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1295. // types available at DefaultAction.
  1296. //
  1297. // - Your request references an ARN that is malformed, or corresponds to
  1298. // a resource with which a web ACL can't be associated.
  1299. //
  1300. // - WAFNonexistentItemException
  1301. // WAF couldn’t perform the operation because your resource doesn't exist.
  1302. // If you've just created a resource that you're using in this operation, you
  1303. // might just need to wait a few minutes. It can take from a few seconds to
  1304. // a number of minutes for changes to propagate.
  1305. //
  1306. // - WAFOptimisticLockException
  1307. // WAF couldn’t save your changes because you tried to update or delete a
  1308. // resource that has changed since you last retrieved it. Get the resource again,
  1309. // make any changes you need to make to the new copy, and retry your operation.
  1310. //
  1311. // - WAFAssociatedItemException
  1312. // WAF couldn’t perform the operation because your resource is being used
  1313. // by another resource or it’s associated with another resource.
  1314. //
  1315. // - WAFTagOperationException
  1316. // An error occurred during the tagging operation. Retry your request.
  1317. //
  1318. // - WAFTagOperationInternalErrorException
  1319. // WAF couldn’t perform your tagging operation because of an internal error.
  1320. // Retry your request.
  1321. //
  1322. // - WAFInvalidOperationException
  1323. // The operation isn't valid.
  1324. //
  1325. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRegexPatternSet
  1326. func (c *WAFV2) DeleteRegexPatternSet(input *DeleteRegexPatternSetInput) (*DeleteRegexPatternSetOutput, error) {
  1327. req, out := c.DeleteRegexPatternSetRequest(input)
  1328. return out, req.Send()
  1329. }
  1330. // DeleteRegexPatternSetWithContext is the same as DeleteRegexPatternSet with the addition of
  1331. // the ability to pass a context and additional request options.
  1332. //
  1333. // See DeleteRegexPatternSet for details on how to use this API operation.
  1334. //
  1335. // The context must be non-nil and will be used for request cancellation. If
  1336. // the context is nil a panic will occur. In the future the SDK may create
  1337. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1338. // for more information on using Contexts.
  1339. func (c *WAFV2) DeleteRegexPatternSetWithContext(ctx aws.Context, input *DeleteRegexPatternSetInput, opts ...request.Option) (*DeleteRegexPatternSetOutput, error) {
  1340. req, out := c.DeleteRegexPatternSetRequest(input)
  1341. req.SetContext(ctx)
  1342. req.ApplyOptions(opts...)
  1343. return out, req.Send()
  1344. }
  1345. const opDeleteRuleGroup = "DeleteRuleGroup"
  1346. // DeleteRuleGroupRequest generates a "aws/request.Request" representing the
  1347. // client's request for the DeleteRuleGroup operation. The "output" return
  1348. // value will be populated with the request's response once the request completes
  1349. // successfully.
  1350. //
  1351. // Use "Send" method on the returned Request to send the API call to the service.
  1352. // the "output" return value is not valid until after Send returns without error.
  1353. //
  1354. // See DeleteRuleGroup for more information on using the DeleteRuleGroup
  1355. // API call, and error handling.
  1356. //
  1357. // This method is useful when you want to inject custom logic or configuration
  1358. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1359. //
  1360. // // Example sending a request using the DeleteRuleGroupRequest method.
  1361. // req, resp := client.DeleteRuleGroupRequest(params)
  1362. //
  1363. // err := req.Send()
  1364. // if err == nil { // resp is now filled
  1365. // fmt.Println(resp)
  1366. // }
  1367. //
  1368. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRuleGroup
  1369. func (c *WAFV2) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request.Request, output *DeleteRuleGroupOutput) {
  1370. op := &request.Operation{
  1371. Name: opDeleteRuleGroup,
  1372. HTTPMethod: "POST",
  1373. HTTPPath: "/",
  1374. }
  1375. if input == nil {
  1376. input = &DeleteRuleGroupInput{}
  1377. }
  1378. output = &DeleteRuleGroupOutput{}
  1379. req = c.newRequest(op, input, output)
  1380. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1381. return
  1382. }
  1383. // DeleteRuleGroup API operation for AWS WAFV2.
  1384. //
  1385. // Deletes the specified RuleGroup.
  1386. //
  1387. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1388. // with awserr.Error's Code and Message methods to get detailed information about
  1389. // the error.
  1390. //
  1391. // See the AWS API reference guide for AWS WAFV2's
  1392. // API operation DeleteRuleGroup for usage and error information.
  1393. //
  1394. // Returned Error Types:
  1395. //
  1396. // - WAFInternalErrorException
  1397. // Your request is valid, but WAF couldn’t perform the operation because of
  1398. // a system problem. Retry your request.
  1399. //
  1400. // - WAFInvalidParameterException
  1401. // The operation failed because WAF didn't recognize a parameter in the request.
  1402. // For example:
  1403. //
  1404. // - You specified a parameter name or value that isn't valid.
  1405. //
  1406. // - Your nested statement isn't valid. You might have tried to nest a statement
  1407. // that can’t be nested.
  1408. //
  1409. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1410. // types available at DefaultAction.
  1411. //
  1412. // - Your request references an ARN that is malformed, or corresponds to
  1413. // a resource with which a web ACL can't be associated.
  1414. //
  1415. // - WAFNonexistentItemException
  1416. // WAF couldn’t perform the operation because your resource doesn't exist.
  1417. // If you've just created a resource that you're using in this operation, you
  1418. // might just need to wait a few minutes. It can take from a few seconds to
  1419. // a number of minutes for changes to propagate.
  1420. //
  1421. // - WAFOptimisticLockException
  1422. // WAF couldn’t save your changes because you tried to update or delete a
  1423. // resource that has changed since you last retrieved it. Get the resource again,
  1424. // make any changes you need to make to the new copy, and retry your operation.
  1425. //
  1426. // - WAFAssociatedItemException
  1427. // WAF couldn’t perform the operation because your resource is being used
  1428. // by another resource or it’s associated with another resource.
  1429. //
  1430. // - WAFTagOperationException
  1431. // An error occurred during the tagging operation. Retry your request.
  1432. //
  1433. // - WAFTagOperationInternalErrorException
  1434. // WAF couldn’t perform your tagging operation because of an internal error.
  1435. // Retry your request.
  1436. //
  1437. // - WAFInvalidOperationException
  1438. // The operation isn't valid.
  1439. //
  1440. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRuleGroup
  1441. func (c *WAFV2) DeleteRuleGroup(input *DeleteRuleGroupInput) (*DeleteRuleGroupOutput, error) {
  1442. req, out := c.DeleteRuleGroupRequest(input)
  1443. return out, req.Send()
  1444. }
  1445. // DeleteRuleGroupWithContext is the same as DeleteRuleGroup with the addition of
  1446. // the ability to pass a context and additional request options.
  1447. //
  1448. // See DeleteRuleGroup for details on how to use this API operation.
  1449. //
  1450. // The context must be non-nil and will be used for request cancellation. If
  1451. // the context is nil a panic will occur. In the future the SDK may create
  1452. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1453. // for more information on using Contexts.
  1454. func (c *WAFV2) DeleteRuleGroupWithContext(ctx aws.Context, input *DeleteRuleGroupInput, opts ...request.Option) (*DeleteRuleGroupOutput, error) {
  1455. req, out := c.DeleteRuleGroupRequest(input)
  1456. req.SetContext(ctx)
  1457. req.ApplyOptions(opts...)
  1458. return out, req.Send()
  1459. }
  1460. const opDeleteWebACL = "DeleteWebACL"
  1461. // DeleteWebACLRequest generates a "aws/request.Request" representing the
  1462. // client's request for the DeleteWebACL operation. The "output" return
  1463. // value will be populated with the request's response once the request completes
  1464. // successfully.
  1465. //
  1466. // Use "Send" method on the returned Request to send the API call to the service.
  1467. // the "output" return value is not valid until after Send returns without error.
  1468. //
  1469. // See DeleteWebACL for more information on using the DeleteWebACL
  1470. // API call, and error handling.
  1471. //
  1472. // This method is useful when you want to inject custom logic or configuration
  1473. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1474. //
  1475. // // Example sending a request using the DeleteWebACLRequest method.
  1476. // req, resp := client.DeleteWebACLRequest(params)
  1477. //
  1478. // err := req.Send()
  1479. // if err == nil { // resp is now filled
  1480. // fmt.Println(resp)
  1481. // }
  1482. //
  1483. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteWebACL
  1484. func (c *WAFV2) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Request, output *DeleteWebACLOutput) {
  1485. op := &request.Operation{
  1486. Name: opDeleteWebACL,
  1487. HTTPMethod: "POST",
  1488. HTTPPath: "/",
  1489. }
  1490. if input == nil {
  1491. input = &DeleteWebACLInput{}
  1492. }
  1493. output = &DeleteWebACLOutput{}
  1494. req = c.newRequest(op, input, output)
  1495. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1496. return
  1497. }
  1498. // DeleteWebACL API operation for AWS WAFV2.
  1499. //
  1500. // Deletes the specified WebACL.
  1501. //
  1502. // You can only use this if ManagedByFirewallManager is false in the specified
  1503. // WebACL.
  1504. //
  1505. // Before deleting any web ACL, first disassociate it from all resources.
  1506. //
  1507. // - To retrieve a list of the resources that are associated with a web ACL,
  1508. // use the following calls: For regional resources, call ListResourcesForWebACL.
  1509. // For Amazon CloudFront distributions, use the CloudFront call ListDistributionsByWebACLId.
  1510. // For information, see ListDistributionsByWebACLId (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ListDistributionsByWebACLId.html).
  1511. //
  1512. // - To disassociate a resource from a web ACL, use the following calls:
  1513. // For regional resources, call DisassociateWebACL. For Amazon CloudFront
  1514. // distributions, provide an empty web ACL ID in the CloudFront call UpdateDistribution.
  1515. // For information, see UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html).
  1516. //
  1517. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1518. // with awserr.Error's Code and Message methods to get detailed information about
  1519. // the error.
  1520. //
  1521. // See the AWS API reference guide for AWS WAFV2's
  1522. // API operation DeleteWebACL for usage and error information.
  1523. //
  1524. // Returned Error Types:
  1525. //
  1526. // - WAFInternalErrorException
  1527. // Your request is valid, but WAF couldn’t perform the operation because of
  1528. // a system problem. Retry your request.
  1529. //
  1530. // - WAFInvalidParameterException
  1531. // The operation failed because WAF didn't recognize a parameter in the request.
  1532. // For example:
  1533. //
  1534. // - You specified a parameter name or value that isn't valid.
  1535. //
  1536. // - Your nested statement isn't valid. You might have tried to nest a statement
  1537. // that can’t be nested.
  1538. //
  1539. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1540. // types available at DefaultAction.
  1541. //
  1542. // - Your request references an ARN that is malformed, or corresponds to
  1543. // a resource with which a web ACL can't be associated.
  1544. //
  1545. // - WAFNonexistentItemException
  1546. // WAF couldn’t perform the operation because your resource doesn't exist.
  1547. // If you've just created a resource that you're using in this operation, you
  1548. // might just need to wait a few minutes. It can take from a few seconds to
  1549. // a number of minutes for changes to propagate.
  1550. //
  1551. // - WAFOptimisticLockException
  1552. // WAF couldn’t save your changes because you tried to update or delete a
  1553. // resource that has changed since you last retrieved it. Get the resource again,
  1554. // make any changes you need to make to the new copy, and retry your operation.
  1555. //
  1556. // - WAFAssociatedItemException
  1557. // WAF couldn’t perform the operation because your resource is being used
  1558. // by another resource or it’s associated with another resource.
  1559. //
  1560. // - WAFTagOperationException
  1561. // An error occurred during the tagging operation. Retry your request.
  1562. //
  1563. // - WAFTagOperationInternalErrorException
  1564. // WAF couldn’t perform your tagging operation because of an internal error.
  1565. // Retry your request.
  1566. //
  1567. // - WAFInvalidOperationException
  1568. // The operation isn't valid.
  1569. //
  1570. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteWebACL
  1571. func (c *WAFV2) DeleteWebACL(input *DeleteWebACLInput) (*DeleteWebACLOutput, error) {
  1572. req, out := c.DeleteWebACLRequest(input)
  1573. return out, req.Send()
  1574. }
  1575. // DeleteWebACLWithContext is the same as DeleteWebACL with the addition of
  1576. // the ability to pass a context and additional request options.
  1577. //
  1578. // See DeleteWebACL for details on how to use this API operation.
  1579. //
  1580. // The context must be non-nil and will be used for request cancellation. If
  1581. // the context is nil a panic will occur. In the future the SDK may create
  1582. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1583. // for more information on using Contexts.
  1584. func (c *WAFV2) DeleteWebACLWithContext(ctx aws.Context, input *DeleteWebACLInput, opts ...request.Option) (*DeleteWebACLOutput, error) {
  1585. req, out := c.DeleteWebACLRequest(input)
  1586. req.SetContext(ctx)
  1587. req.ApplyOptions(opts...)
  1588. return out, req.Send()
  1589. }
  1590. const opDescribeManagedRuleGroup = "DescribeManagedRuleGroup"
  1591. // DescribeManagedRuleGroupRequest generates a "aws/request.Request" representing the
  1592. // client's request for the DescribeManagedRuleGroup operation. The "output" return
  1593. // value will be populated with the request's response once the request completes
  1594. // successfully.
  1595. //
  1596. // Use "Send" method on the returned Request to send the API call to the service.
  1597. // the "output" return value is not valid until after Send returns without error.
  1598. //
  1599. // See DescribeManagedRuleGroup for more information on using the DescribeManagedRuleGroup
  1600. // API call, and error handling.
  1601. //
  1602. // This method is useful when you want to inject custom logic or configuration
  1603. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1604. //
  1605. // // Example sending a request using the DescribeManagedRuleGroupRequest method.
  1606. // req, resp := client.DescribeManagedRuleGroupRequest(params)
  1607. //
  1608. // err := req.Send()
  1609. // if err == nil { // resp is now filled
  1610. // fmt.Println(resp)
  1611. // }
  1612. //
  1613. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DescribeManagedRuleGroup
  1614. func (c *WAFV2) DescribeManagedRuleGroupRequest(input *DescribeManagedRuleGroupInput) (req *request.Request, output *DescribeManagedRuleGroupOutput) {
  1615. op := &request.Operation{
  1616. Name: opDescribeManagedRuleGroup,
  1617. HTTPMethod: "POST",
  1618. HTTPPath: "/",
  1619. }
  1620. if input == nil {
  1621. input = &DescribeManagedRuleGroupInput{}
  1622. }
  1623. output = &DescribeManagedRuleGroupOutput{}
  1624. req = c.newRequest(op, input, output)
  1625. return
  1626. }
  1627. // DescribeManagedRuleGroup API operation for AWS WAFV2.
  1628. //
  1629. // Provides high-level information for a managed rule group, including descriptions
  1630. // of the rules.
  1631. //
  1632. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1633. // with awserr.Error's Code and Message methods to get detailed information about
  1634. // the error.
  1635. //
  1636. // See the AWS API reference guide for AWS WAFV2's
  1637. // API operation DescribeManagedRuleGroup for usage and error information.
  1638. //
  1639. // Returned Error Types:
  1640. //
  1641. // - WAFInternalErrorException
  1642. // Your request is valid, but WAF couldn’t perform the operation because of
  1643. // a system problem. Retry your request.
  1644. //
  1645. // - WAFInvalidParameterException
  1646. // The operation failed because WAF didn't recognize a parameter in the request.
  1647. // For example:
  1648. //
  1649. // - You specified a parameter name or value that isn't valid.
  1650. //
  1651. // - Your nested statement isn't valid. You might have tried to nest a statement
  1652. // that can’t be nested.
  1653. //
  1654. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1655. // types available at DefaultAction.
  1656. //
  1657. // - Your request references an ARN that is malformed, or corresponds to
  1658. // a resource with which a web ACL can't be associated.
  1659. //
  1660. // - WAFInvalidResourceException
  1661. // WAF couldn’t perform the operation because the resource that you requested
  1662. // isn’t valid. Check the resource, and try again.
  1663. //
  1664. // - WAFNonexistentItemException
  1665. // WAF couldn’t perform the operation because your resource doesn't exist.
  1666. // If you've just created a resource that you're using in this operation, you
  1667. // might just need to wait a few minutes. It can take from a few seconds to
  1668. // a number of minutes for changes to propagate.
  1669. //
  1670. // - WAFInvalidOperationException
  1671. // The operation isn't valid.
  1672. //
  1673. // - WAFExpiredManagedRuleGroupVersionException
  1674. // The operation failed because the specified version for the managed rule group
  1675. // has expired. You can retrieve the available versions for the managed rule
  1676. // group by calling ListAvailableManagedRuleGroupVersions.
  1677. //
  1678. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DescribeManagedRuleGroup
  1679. func (c *WAFV2) DescribeManagedRuleGroup(input *DescribeManagedRuleGroupInput) (*DescribeManagedRuleGroupOutput, error) {
  1680. req, out := c.DescribeManagedRuleGroupRequest(input)
  1681. return out, req.Send()
  1682. }
  1683. // DescribeManagedRuleGroupWithContext is the same as DescribeManagedRuleGroup with the addition of
  1684. // the ability to pass a context and additional request options.
  1685. //
  1686. // See DescribeManagedRuleGroup for details on how to use this API operation.
  1687. //
  1688. // The context must be non-nil and will be used for request cancellation. If
  1689. // the context is nil a panic will occur. In the future the SDK may create
  1690. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1691. // for more information on using Contexts.
  1692. func (c *WAFV2) DescribeManagedRuleGroupWithContext(ctx aws.Context, input *DescribeManagedRuleGroupInput, opts ...request.Option) (*DescribeManagedRuleGroupOutput, error) {
  1693. req, out := c.DescribeManagedRuleGroupRequest(input)
  1694. req.SetContext(ctx)
  1695. req.ApplyOptions(opts...)
  1696. return out, req.Send()
  1697. }
  1698. const opDisassociateWebACL = "DisassociateWebACL"
  1699. // DisassociateWebACLRequest generates a "aws/request.Request" representing the
  1700. // client's request for the DisassociateWebACL operation. The "output" return
  1701. // value will be populated with the request's response once the request completes
  1702. // successfully.
  1703. //
  1704. // Use "Send" method on the returned Request to send the API call to the service.
  1705. // the "output" return value is not valid until after Send returns without error.
  1706. //
  1707. // See DisassociateWebACL for more information on using the DisassociateWebACL
  1708. // API call, and error handling.
  1709. //
  1710. // This method is useful when you want to inject custom logic or configuration
  1711. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1712. //
  1713. // // Example sending a request using the DisassociateWebACLRequest method.
  1714. // req, resp := client.DisassociateWebACLRequest(params)
  1715. //
  1716. // err := req.Send()
  1717. // if err == nil { // resp is now filled
  1718. // fmt.Println(resp)
  1719. // }
  1720. //
  1721. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DisassociateWebACL
  1722. func (c *WAFV2) DisassociateWebACLRequest(input *DisassociateWebACLInput) (req *request.Request, output *DisassociateWebACLOutput) {
  1723. op := &request.Operation{
  1724. Name: opDisassociateWebACL,
  1725. HTTPMethod: "POST",
  1726. HTTPPath: "/",
  1727. }
  1728. if input == nil {
  1729. input = &DisassociateWebACLInput{}
  1730. }
  1731. output = &DisassociateWebACLOutput{}
  1732. req = c.newRequest(op, input, output)
  1733. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1734. return
  1735. }
  1736. // DisassociateWebACL API operation for AWS WAFV2.
  1737. //
  1738. // Disassociates the specified regional application resource from any existing
  1739. // web ACL association. A resource can have at most one web ACL association.
  1740. // A regional application can be an Application Load Balancer (ALB), an Amazon
  1741. // API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
  1742. //
  1743. // For Amazon CloudFront, don't use this call. Instead, use your CloudFront
  1744. // distribution configuration. To disassociate a web ACL, provide an empty web
  1745. // ACL ID in the CloudFront call UpdateDistribution. For information, see UpdateDistribution
  1746. // (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html).
  1747. //
  1748. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1749. // with awserr.Error's Code and Message methods to get detailed information about
  1750. // the error.
  1751. //
  1752. // See the AWS API reference guide for AWS WAFV2's
  1753. // API operation DisassociateWebACL for usage and error information.
  1754. //
  1755. // Returned Error Types:
  1756. //
  1757. // - WAFInternalErrorException
  1758. // Your request is valid, but WAF couldn’t perform the operation because of
  1759. // a system problem. Retry your request.
  1760. //
  1761. // - WAFInvalidParameterException
  1762. // The operation failed because WAF didn't recognize a parameter in the request.
  1763. // For example:
  1764. //
  1765. // - You specified a parameter name or value that isn't valid.
  1766. //
  1767. // - Your nested statement isn't valid. You might have tried to nest a statement
  1768. // that can’t be nested.
  1769. //
  1770. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1771. // types available at DefaultAction.
  1772. //
  1773. // - Your request references an ARN that is malformed, or corresponds to
  1774. // a resource with which a web ACL can't be associated.
  1775. //
  1776. // - WAFNonexistentItemException
  1777. // WAF couldn’t perform the operation because your resource doesn't exist.
  1778. // If you've just created a resource that you're using in this operation, you
  1779. // might just need to wait a few minutes. It can take from a few seconds to
  1780. // a number of minutes for changes to propagate.
  1781. //
  1782. // - WAFInvalidOperationException
  1783. // The operation isn't valid.
  1784. //
  1785. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DisassociateWebACL
  1786. func (c *WAFV2) DisassociateWebACL(input *DisassociateWebACLInput) (*DisassociateWebACLOutput, error) {
  1787. req, out := c.DisassociateWebACLRequest(input)
  1788. return out, req.Send()
  1789. }
  1790. // DisassociateWebACLWithContext is the same as DisassociateWebACL with the addition of
  1791. // the ability to pass a context and additional request options.
  1792. //
  1793. // See DisassociateWebACL for details on how to use this API operation.
  1794. //
  1795. // The context must be non-nil and will be used for request cancellation. If
  1796. // the context is nil a panic will occur. In the future the SDK may create
  1797. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1798. // for more information on using Contexts.
  1799. func (c *WAFV2) DisassociateWebACLWithContext(ctx aws.Context, input *DisassociateWebACLInput, opts ...request.Option) (*DisassociateWebACLOutput, error) {
  1800. req, out := c.DisassociateWebACLRequest(input)
  1801. req.SetContext(ctx)
  1802. req.ApplyOptions(opts...)
  1803. return out, req.Send()
  1804. }
  1805. const opGenerateMobileSdkReleaseUrl = "GenerateMobileSdkReleaseUrl"
  1806. // GenerateMobileSdkReleaseUrlRequest generates a "aws/request.Request" representing the
  1807. // client's request for the GenerateMobileSdkReleaseUrl operation. The "output" return
  1808. // value will be populated with the request's response once the request completes
  1809. // successfully.
  1810. //
  1811. // Use "Send" method on the returned Request to send the API call to the service.
  1812. // the "output" return value is not valid until after Send returns without error.
  1813. //
  1814. // See GenerateMobileSdkReleaseUrl for more information on using the GenerateMobileSdkReleaseUrl
  1815. // API call, and error handling.
  1816. //
  1817. // This method is useful when you want to inject custom logic or configuration
  1818. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1819. //
  1820. // // Example sending a request using the GenerateMobileSdkReleaseUrlRequest method.
  1821. // req, resp := client.GenerateMobileSdkReleaseUrlRequest(params)
  1822. //
  1823. // err := req.Send()
  1824. // if err == nil { // resp is now filled
  1825. // fmt.Println(resp)
  1826. // }
  1827. //
  1828. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GenerateMobileSdkReleaseUrl
  1829. func (c *WAFV2) GenerateMobileSdkReleaseUrlRequest(input *GenerateMobileSdkReleaseUrlInput) (req *request.Request, output *GenerateMobileSdkReleaseUrlOutput) {
  1830. op := &request.Operation{
  1831. Name: opGenerateMobileSdkReleaseUrl,
  1832. HTTPMethod: "POST",
  1833. HTTPPath: "/",
  1834. }
  1835. if input == nil {
  1836. input = &GenerateMobileSdkReleaseUrlInput{}
  1837. }
  1838. output = &GenerateMobileSdkReleaseUrlOutput{}
  1839. req = c.newRequest(op, input, output)
  1840. return
  1841. }
  1842. // GenerateMobileSdkReleaseUrl API operation for AWS WAFV2.
  1843. //
  1844. // Generates a presigned download URL for the specified release of the mobile
  1845. // SDK.
  1846. //
  1847. // The mobile SDK is not generally available. Customers who have access to the
  1848. // mobile SDK can use it to establish and manage WAF tokens for use in HTTP(S)
  1849. // requests from a mobile device to WAF. For more information, see WAF client
  1850. // application integration (https://docs.aws.amazon.com/waf/latest/developerguide/waf-application-integration.html)
  1851. // in the WAF Developer Guide.
  1852. //
  1853. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1854. // with awserr.Error's Code and Message methods to get detailed information about
  1855. // the error.
  1856. //
  1857. // See the AWS API reference guide for AWS WAFV2's
  1858. // API operation GenerateMobileSdkReleaseUrl for usage and error information.
  1859. //
  1860. // Returned Error Types:
  1861. //
  1862. // - WAFInternalErrorException
  1863. // Your request is valid, but WAF couldn’t perform the operation because of
  1864. // a system problem. Retry your request.
  1865. //
  1866. // - WAFNonexistentItemException
  1867. // WAF couldn’t perform the operation because your resource doesn't exist.
  1868. // If you've just created a resource that you're using in this operation, you
  1869. // might just need to wait a few minutes. It can take from a few seconds to
  1870. // a number of minutes for changes to propagate.
  1871. //
  1872. // - WAFInvalidParameterException
  1873. // The operation failed because WAF didn't recognize a parameter in the request.
  1874. // For example:
  1875. //
  1876. // - You specified a parameter name or value that isn't valid.
  1877. //
  1878. // - Your nested statement isn't valid. You might have tried to nest a statement
  1879. // that can’t be nested.
  1880. //
  1881. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1882. // types available at DefaultAction.
  1883. //
  1884. // - Your request references an ARN that is malformed, or corresponds to
  1885. // a resource with which a web ACL can't be associated.
  1886. //
  1887. // - WAFInvalidOperationException
  1888. // The operation isn't valid.
  1889. //
  1890. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GenerateMobileSdkReleaseUrl
  1891. func (c *WAFV2) GenerateMobileSdkReleaseUrl(input *GenerateMobileSdkReleaseUrlInput) (*GenerateMobileSdkReleaseUrlOutput, error) {
  1892. req, out := c.GenerateMobileSdkReleaseUrlRequest(input)
  1893. return out, req.Send()
  1894. }
  1895. // GenerateMobileSdkReleaseUrlWithContext is the same as GenerateMobileSdkReleaseUrl with the addition of
  1896. // the ability to pass a context and additional request options.
  1897. //
  1898. // See GenerateMobileSdkReleaseUrl for details on how to use this API operation.
  1899. //
  1900. // The context must be non-nil and will be used for request cancellation. If
  1901. // the context is nil a panic will occur. In the future the SDK may create
  1902. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1903. // for more information on using Contexts.
  1904. func (c *WAFV2) GenerateMobileSdkReleaseUrlWithContext(ctx aws.Context, input *GenerateMobileSdkReleaseUrlInput, opts ...request.Option) (*GenerateMobileSdkReleaseUrlOutput, error) {
  1905. req, out := c.GenerateMobileSdkReleaseUrlRequest(input)
  1906. req.SetContext(ctx)
  1907. req.ApplyOptions(opts...)
  1908. return out, req.Send()
  1909. }
  1910. const opGetIPSet = "GetIPSet"
  1911. // GetIPSetRequest generates a "aws/request.Request" representing the
  1912. // client's request for the GetIPSet operation. The "output" return
  1913. // value will be populated with the request's response once the request completes
  1914. // successfully.
  1915. //
  1916. // Use "Send" method on the returned Request to send the API call to the service.
  1917. // the "output" return value is not valid until after Send returns without error.
  1918. //
  1919. // See GetIPSet for more information on using the GetIPSet
  1920. // API call, and error handling.
  1921. //
  1922. // This method is useful when you want to inject custom logic or configuration
  1923. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1924. //
  1925. // // Example sending a request using the GetIPSetRequest method.
  1926. // req, resp := client.GetIPSetRequest(params)
  1927. //
  1928. // err := req.Send()
  1929. // if err == nil { // resp is now filled
  1930. // fmt.Println(resp)
  1931. // }
  1932. //
  1933. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetIPSet
  1934. func (c *WAFV2) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) {
  1935. op := &request.Operation{
  1936. Name: opGetIPSet,
  1937. HTTPMethod: "POST",
  1938. HTTPPath: "/",
  1939. }
  1940. if input == nil {
  1941. input = &GetIPSetInput{}
  1942. }
  1943. output = &GetIPSetOutput{}
  1944. req = c.newRequest(op, input, output)
  1945. return
  1946. }
  1947. // GetIPSet API operation for AWS WAFV2.
  1948. //
  1949. // Retrieves the specified IPSet.
  1950. //
  1951. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1952. // with awserr.Error's Code and Message methods to get detailed information about
  1953. // the error.
  1954. //
  1955. // See the AWS API reference guide for AWS WAFV2's
  1956. // API operation GetIPSet for usage and error information.
  1957. //
  1958. // Returned Error Types:
  1959. //
  1960. // - WAFInternalErrorException
  1961. // Your request is valid, but WAF couldn’t perform the operation because of
  1962. // a system problem. Retry your request.
  1963. //
  1964. // - WAFInvalidParameterException
  1965. // The operation failed because WAF didn't recognize a parameter in the request.
  1966. // For example:
  1967. //
  1968. // - You specified a parameter name or value that isn't valid.
  1969. //
  1970. // - Your nested statement isn't valid. You might have tried to nest a statement
  1971. // that can’t be nested.
  1972. //
  1973. // - You tried to update a WebACL with a DefaultAction that isn't among the
  1974. // types available at DefaultAction.
  1975. //
  1976. // - Your request references an ARN that is malformed, or corresponds to
  1977. // a resource with which a web ACL can't be associated.
  1978. //
  1979. // - WAFNonexistentItemException
  1980. // WAF couldn’t perform the operation because your resource doesn't exist.
  1981. // If you've just created a resource that you're using in this operation, you
  1982. // might just need to wait a few minutes. It can take from a few seconds to
  1983. // a number of minutes for changes to propagate.
  1984. //
  1985. // - WAFInvalidOperationException
  1986. // The operation isn't valid.
  1987. //
  1988. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetIPSet
  1989. func (c *WAFV2) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) {
  1990. req, out := c.GetIPSetRequest(input)
  1991. return out, req.Send()
  1992. }
  1993. // GetIPSetWithContext is the same as GetIPSet with the addition of
  1994. // the ability to pass a context and additional request options.
  1995. //
  1996. // See GetIPSet for details on how to use this API operation.
  1997. //
  1998. // The context must be non-nil and will be used for request cancellation. If
  1999. // the context is nil a panic will occur. In the future the SDK may create
  2000. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2001. // for more information on using Contexts.
  2002. func (c *WAFV2) GetIPSetWithContext(ctx aws.Context, input *GetIPSetInput, opts ...request.Option) (*GetIPSetOutput, error) {
  2003. req, out := c.GetIPSetRequest(input)
  2004. req.SetContext(ctx)
  2005. req.ApplyOptions(opts...)
  2006. return out, req.Send()
  2007. }
  2008. const opGetLoggingConfiguration = "GetLoggingConfiguration"
  2009. // GetLoggingConfigurationRequest generates a "aws/request.Request" representing the
  2010. // client's request for the GetLoggingConfiguration operation. The "output" return
  2011. // value will be populated with the request's response once the request completes
  2012. // successfully.
  2013. //
  2014. // Use "Send" method on the returned Request to send the API call to the service.
  2015. // the "output" return value is not valid until after Send returns without error.
  2016. //
  2017. // See GetLoggingConfiguration for more information on using the GetLoggingConfiguration
  2018. // API call, and error handling.
  2019. //
  2020. // This method is useful when you want to inject custom logic or configuration
  2021. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2022. //
  2023. // // Example sending a request using the GetLoggingConfigurationRequest method.
  2024. // req, resp := client.GetLoggingConfigurationRequest(params)
  2025. //
  2026. // err := req.Send()
  2027. // if err == nil { // resp is now filled
  2028. // fmt.Println(resp)
  2029. // }
  2030. //
  2031. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetLoggingConfiguration
  2032. func (c *WAFV2) GetLoggingConfigurationRequest(input *GetLoggingConfigurationInput) (req *request.Request, output *GetLoggingConfigurationOutput) {
  2033. op := &request.Operation{
  2034. Name: opGetLoggingConfiguration,
  2035. HTTPMethod: "POST",
  2036. HTTPPath: "/",
  2037. }
  2038. if input == nil {
  2039. input = &GetLoggingConfigurationInput{}
  2040. }
  2041. output = &GetLoggingConfigurationOutput{}
  2042. req = c.newRequest(op, input, output)
  2043. return
  2044. }
  2045. // GetLoggingConfiguration API operation for AWS WAFV2.
  2046. //
  2047. // Returns the LoggingConfiguration for the specified web ACL.
  2048. //
  2049. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2050. // with awserr.Error's Code and Message methods to get detailed information about
  2051. // the error.
  2052. //
  2053. // See the AWS API reference guide for AWS WAFV2's
  2054. // API operation GetLoggingConfiguration for usage and error information.
  2055. //
  2056. // Returned Error Types:
  2057. //
  2058. // - WAFInternalErrorException
  2059. // Your request is valid, but WAF couldn’t perform the operation because of
  2060. // a system problem. Retry your request.
  2061. //
  2062. // - WAFNonexistentItemException
  2063. // WAF couldn’t perform the operation because your resource doesn't exist.
  2064. // If you've just created a resource that you're using in this operation, you
  2065. // might just need to wait a few minutes. It can take from a few seconds to
  2066. // a number of minutes for changes to propagate.
  2067. //
  2068. // - WAFInvalidParameterException
  2069. // The operation failed because WAF didn't recognize a parameter in the request.
  2070. // For example:
  2071. //
  2072. // - You specified a parameter name or value that isn't valid.
  2073. //
  2074. // - Your nested statement isn't valid. You might have tried to nest a statement
  2075. // that can’t be nested.
  2076. //
  2077. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2078. // types available at DefaultAction.
  2079. //
  2080. // - Your request references an ARN that is malformed, or corresponds to
  2081. // a resource with which a web ACL can't be associated.
  2082. //
  2083. // - WAFInvalidOperationException
  2084. // The operation isn't valid.
  2085. //
  2086. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetLoggingConfiguration
  2087. func (c *WAFV2) GetLoggingConfiguration(input *GetLoggingConfigurationInput) (*GetLoggingConfigurationOutput, error) {
  2088. req, out := c.GetLoggingConfigurationRequest(input)
  2089. return out, req.Send()
  2090. }
  2091. // GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of
  2092. // the ability to pass a context and additional request options.
  2093. //
  2094. // See GetLoggingConfiguration for details on how to use this API operation.
  2095. //
  2096. // The context must be non-nil and will be used for request cancellation. If
  2097. // the context is nil a panic will occur. In the future the SDK may create
  2098. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2099. // for more information on using Contexts.
  2100. func (c *WAFV2) GetLoggingConfigurationWithContext(ctx aws.Context, input *GetLoggingConfigurationInput, opts ...request.Option) (*GetLoggingConfigurationOutput, error) {
  2101. req, out := c.GetLoggingConfigurationRequest(input)
  2102. req.SetContext(ctx)
  2103. req.ApplyOptions(opts...)
  2104. return out, req.Send()
  2105. }
  2106. const opGetManagedRuleSet = "GetManagedRuleSet"
  2107. // GetManagedRuleSetRequest generates a "aws/request.Request" representing the
  2108. // client's request for the GetManagedRuleSet operation. The "output" return
  2109. // value will be populated with the request's response once the request completes
  2110. // successfully.
  2111. //
  2112. // Use "Send" method on the returned Request to send the API call to the service.
  2113. // the "output" return value is not valid until after Send returns without error.
  2114. //
  2115. // See GetManagedRuleSet for more information on using the GetManagedRuleSet
  2116. // API call, and error handling.
  2117. //
  2118. // This method is useful when you want to inject custom logic or configuration
  2119. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2120. //
  2121. // // Example sending a request using the GetManagedRuleSetRequest method.
  2122. // req, resp := client.GetManagedRuleSetRequest(params)
  2123. //
  2124. // err := req.Send()
  2125. // if err == nil { // resp is now filled
  2126. // fmt.Println(resp)
  2127. // }
  2128. //
  2129. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetManagedRuleSet
  2130. func (c *WAFV2) GetManagedRuleSetRequest(input *GetManagedRuleSetInput) (req *request.Request, output *GetManagedRuleSetOutput) {
  2131. op := &request.Operation{
  2132. Name: opGetManagedRuleSet,
  2133. HTTPMethod: "POST",
  2134. HTTPPath: "/",
  2135. }
  2136. if input == nil {
  2137. input = &GetManagedRuleSetInput{}
  2138. }
  2139. output = &GetManagedRuleSetOutput{}
  2140. req = c.newRequest(op, input, output)
  2141. return
  2142. }
  2143. // GetManagedRuleSet API operation for AWS WAFV2.
  2144. //
  2145. // Retrieves the specified managed rule set.
  2146. //
  2147. // This is intended for use only by vendors of managed rule sets. Vendors are
  2148. // Amazon Web Services and Amazon Web Services Marketplace sellers.
  2149. //
  2150. // Vendors, you can use the managed rule set APIs to provide controlled rollout
  2151. // of your versioned managed rule group offerings for your customers. The APIs
  2152. // are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and
  2153. // UpdateManagedRuleSetVersionExpiryDate.
  2154. //
  2155. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2156. // with awserr.Error's Code and Message methods to get detailed information about
  2157. // the error.
  2158. //
  2159. // See the AWS API reference guide for AWS WAFV2's
  2160. // API operation GetManagedRuleSet for usage and error information.
  2161. //
  2162. // Returned Error Types:
  2163. //
  2164. // - WAFInternalErrorException
  2165. // Your request is valid, but WAF couldn’t perform the operation because of
  2166. // a system problem. Retry your request.
  2167. //
  2168. // - WAFInvalidParameterException
  2169. // The operation failed because WAF didn't recognize a parameter in the request.
  2170. // For example:
  2171. //
  2172. // - You specified a parameter name or value that isn't valid.
  2173. //
  2174. // - Your nested statement isn't valid. You might have tried to nest a statement
  2175. // that can’t be nested.
  2176. //
  2177. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2178. // types available at DefaultAction.
  2179. //
  2180. // - Your request references an ARN that is malformed, or corresponds to
  2181. // a resource with which a web ACL can't be associated.
  2182. //
  2183. // - WAFNonexistentItemException
  2184. // WAF couldn’t perform the operation because your resource doesn't exist.
  2185. // If you've just created a resource that you're using in this operation, you
  2186. // might just need to wait a few minutes. It can take from a few seconds to
  2187. // a number of minutes for changes to propagate.
  2188. //
  2189. // - WAFInvalidOperationException
  2190. // The operation isn't valid.
  2191. //
  2192. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetManagedRuleSet
  2193. func (c *WAFV2) GetManagedRuleSet(input *GetManagedRuleSetInput) (*GetManagedRuleSetOutput, error) {
  2194. req, out := c.GetManagedRuleSetRequest(input)
  2195. return out, req.Send()
  2196. }
  2197. // GetManagedRuleSetWithContext is the same as GetManagedRuleSet with the addition of
  2198. // the ability to pass a context and additional request options.
  2199. //
  2200. // See GetManagedRuleSet for details on how to use this API operation.
  2201. //
  2202. // The context must be non-nil and will be used for request cancellation. If
  2203. // the context is nil a panic will occur. In the future the SDK may create
  2204. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2205. // for more information on using Contexts.
  2206. func (c *WAFV2) GetManagedRuleSetWithContext(ctx aws.Context, input *GetManagedRuleSetInput, opts ...request.Option) (*GetManagedRuleSetOutput, error) {
  2207. req, out := c.GetManagedRuleSetRequest(input)
  2208. req.SetContext(ctx)
  2209. req.ApplyOptions(opts...)
  2210. return out, req.Send()
  2211. }
  2212. const opGetMobileSdkRelease = "GetMobileSdkRelease"
  2213. // GetMobileSdkReleaseRequest generates a "aws/request.Request" representing the
  2214. // client's request for the GetMobileSdkRelease operation. The "output" return
  2215. // value will be populated with the request's response once the request completes
  2216. // successfully.
  2217. //
  2218. // Use "Send" method on the returned Request to send the API call to the service.
  2219. // the "output" return value is not valid until after Send returns without error.
  2220. //
  2221. // See GetMobileSdkRelease for more information on using the GetMobileSdkRelease
  2222. // API call, and error handling.
  2223. //
  2224. // This method is useful when you want to inject custom logic or configuration
  2225. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2226. //
  2227. // // Example sending a request using the GetMobileSdkReleaseRequest method.
  2228. // req, resp := client.GetMobileSdkReleaseRequest(params)
  2229. //
  2230. // err := req.Send()
  2231. // if err == nil { // resp is now filled
  2232. // fmt.Println(resp)
  2233. // }
  2234. //
  2235. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetMobileSdkRelease
  2236. func (c *WAFV2) GetMobileSdkReleaseRequest(input *GetMobileSdkReleaseInput) (req *request.Request, output *GetMobileSdkReleaseOutput) {
  2237. op := &request.Operation{
  2238. Name: opGetMobileSdkRelease,
  2239. HTTPMethod: "POST",
  2240. HTTPPath: "/",
  2241. }
  2242. if input == nil {
  2243. input = &GetMobileSdkReleaseInput{}
  2244. }
  2245. output = &GetMobileSdkReleaseOutput{}
  2246. req = c.newRequest(op, input, output)
  2247. return
  2248. }
  2249. // GetMobileSdkRelease API operation for AWS WAFV2.
  2250. //
  2251. // Retrieves information for the specified mobile SDK release, including release
  2252. // notes and tags.
  2253. //
  2254. // The mobile SDK is not generally available. Customers who have access to the
  2255. // mobile SDK can use it to establish and manage WAF tokens for use in HTTP(S)
  2256. // requests from a mobile device to WAF. For more information, see WAF client
  2257. // application integration (https://docs.aws.amazon.com/waf/latest/developerguide/waf-application-integration.html)
  2258. // in the WAF Developer Guide.
  2259. //
  2260. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2261. // with awserr.Error's Code and Message methods to get detailed information about
  2262. // the error.
  2263. //
  2264. // See the AWS API reference guide for AWS WAFV2's
  2265. // API operation GetMobileSdkRelease for usage and error information.
  2266. //
  2267. // Returned Error Types:
  2268. //
  2269. // - WAFInternalErrorException
  2270. // Your request is valid, but WAF couldn’t perform the operation because of
  2271. // a system problem. Retry your request.
  2272. //
  2273. // - WAFNonexistentItemException
  2274. // WAF couldn’t perform the operation because your resource doesn't exist.
  2275. // If you've just created a resource that you're using in this operation, you
  2276. // might just need to wait a few minutes. It can take from a few seconds to
  2277. // a number of minutes for changes to propagate.
  2278. //
  2279. // - WAFInvalidParameterException
  2280. // The operation failed because WAF didn't recognize a parameter in the request.
  2281. // For example:
  2282. //
  2283. // - You specified a parameter name or value that isn't valid.
  2284. //
  2285. // - Your nested statement isn't valid. You might have tried to nest a statement
  2286. // that can’t be nested.
  2287. //
  2288. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2289. // types available at DefaultAction.
  2290. //
  2291. // - Your request references an ARN that is malformed, or corresponds to
  2292. // a resource with which a web ACL can't be associated.
  2293. //
  2294. // - WAFInvalidOperationException
  2295. // The operation isn't valid.
  2296. //
  2297. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetMobileSdkRelease
  2298. func (c *WAFV2) GetMobileSdkRelease(input *GetMobileSdkReleaseInput) (*GetMobileSdkReleaseOutput, error) {
  2299. req, out := c.GetMobileSdkReleaseRequest(input)
  2300. return out, req.Send()
  2301. }
  2302. // GetMobileSdkReleaseWithContext is the same as GetMobileSdkRelease with the addition of
  2303. // the ability to pass a context and additional request options.
  2304. //
  2305. // See GetMobileSdkRelease for details on how to use this API operation.
  2306. //
  2307. // The context must be non-nil and will be used for request cancellation. If
  2308. // the context is nil a panic will occur. In the future the SDK may create
  2309. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2310. // for more information on using Contexts.
  2311. func (c *WAFV2) GetMobileSdkReleaseWithContext(ctx aws.Context, input *GetMobileSdkReleaseInput, opts ...request.Option) (*GetMobileSdkReleaseOutput, error) {
  2312. req, out := c.GetMobileSdkReleaseRequest(input)
  2313. req.SetContext(ctx)
  2314. req.ApplyOptions(opts...)
  2315. return out, req.Send()
  2316. }
  2317. const opGetPermissionPolicy = "GetPermissionPolicy"
  2318. // GetPermissionPolicyRequest generates a "aws/request.Request" representing the
  2319. // client's request for the GetPermissionPolicy operation. The "output" return
  2320. // value will be populated with the request's response once the request completes
  2321. // successfully.
  2322. //
  2323. // Use "Send" method on the returned Request to send the API call to the service.
  2324. // the "output" return value is not valid until after Send returns without error.
  2325. //
  2326. // See GetPermissionPolicy for more information on using the GetPermissionPolicy
  2327. // API call, and error handling.
  2328. //
  2329. // This method is useful when you want to inject custom logic or configuration
  2330. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2331. //
  2332. // // Example sending a request using the GetPermissionPolicyRequest method.
  2333. // req, resp := client.GetPermissionPolicyRequest(params)
  2334. //
  2335. // err := req.Send()
  2336. // if err == nil { // resp is now filled
  2337. // fmt.Println(resp)
  2338. // }
  2339. //
  2340. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetPermissionPolicy
  2341. func (c *WAFV2) GetPermissionPolicyRequest(input *GetPermissionPolicyInput) (req *request.Request, output *GetPermissionPolicyOutput) {
  2342. op := &request.Operation{
  2343. Name: opGetPermissionPolicy,
  2344. HTTPMethod: "POST",
  2345. HTTPPath: "/",
  2346. }
  2347. if input == nil {
  2348. input = &GetPermissionPolicyInput{}
  2349. }
  2350. output = &GetPermissionPolicyOutput{}
  2351. req = c.newRequest(op, input, output)
  2352. return
  2353. }
  2354. // GetPermissionPolicy API operation for AWS WAFV2.
  2355. //
  2356. // Returns the IAM policy that is attached to the specified rule group.
  2357. //
  2358. // You must be the owner of the rule group to perform this operation.
  2359. //
  2360. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2361. // with awserr.Error's Code and Message methods to get detailed information about
  2362. // the error.
  2363. //
  2364. // See the AWS API reference guide for AWS WAFV2's
  2365. // API operation GetPermissionPolicy for usage and error information.
  2366. //
  2367. // Returned Error Types:
  2368. //
  2369. // - WAFNonexistentItemException
  2370. // WAF couldn’t perform the operation because your resource doesn't exist.
  2371. // If you've just created a resource that you're using in this operation, you
  2372. // might just need to wait a few minutes. It can take from a few seconds to
  2373. // a number of minutes for changes to propagate.
  2374. //
  2375. // - WAFInternalErrorException
  2376. // Your request is valid, but WAF couldn’t perform the operation because of
  2377. // a system problem. Retry your request.
  2378. //
  2379. // - WAFInvalidParameterException
  2380. // The operation failed because WAF didn't recognize a parameter in the request.
  2381. // For example:
  2382. //
  2383. // - You specified a parameter name or value that isn't valid.
  2384. //
  2385. // - Your nested statement isn't valid. You might have tried to nest a statement
  2386. // that can’t be nested.
  2387. //
  2388. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2389. // types available at DefaultAction.
  2390. //
  2391. // - Your request references an ARN that is malformed, or corresponds to
  2392. // a resource with which a web ACL can't be associated.
  2393. //
  2394. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetPermissionPolicy
  2395. func (c *WAFV2) GetPermissionPolicy(input *GetPermissionPolicyInput) (*GetPermissionPolicyOutput, error) {
  2396. req, out := c.GetPermissionPolicyRequest(input)
  2397. return out, req.Send()
  2398. }
  2399. // GetPermissionPolicyWithContext is the same as GetPermissionPolicy with the addition of
  2400. // the ability to pass a context and additional request options.
  2401. //
  2402. // See GetPermissionPolicy for details on how to use this API operation.
  2403. //
  2404. // The context must be non-nil and will be used for request cancellation. If
  2405. // the context is nil a panic will occur. In the future the SDK may create
  2406. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2407. // for more information on using Contexts.
  2408. func (c *WAFV2) GetPermissionPolicyWithContext(ctx aws.Context, input *GetPermissionPolicyInput, opts ...request.Option) (*GetPermissionPolicyOutput, error) {
  2409. req, out := c.GetPermissionPolicyRequest(input)
  2410. req.SetContext(ctx)
  2411. req.ApplyOptions(opts...)
  2412. return out, req.Send()
  2413. }
  2414. const opGetRateBasedStatementManagedKeys = "GetRateBasedStatementManagedKeys"
  2415. // GetRateBasedStatementManagedKeysRequest generates a "aws/request.Request" representing the
  2416. // client's request for the GetRateBasedStatementManagedKeys operation. The "output" return
  2417. // value will be populated with the request's response once the request completes
  2418. // successfully.
  2419. //
  2420. // Use "Send" method on the returned Request to send the API call to the service.
  2421. // the "output" return value is not valid until after Send returns without error.
  2422. //
  2423. // See GetRateBasedStatementManagedKeys for more information on using the GetRateBasedStatementManagedKeys
  2424. // API call, and error handling.
  2425. //
  2426. // This method is useful when you want to inject custom logic or configuration
  2427. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2428. //
  2429. // // Example sending a request using the GetRateBasedStatementManagedKeysRequest method.
  2430. // req, resp := client.GetRateBasedStatementManagedKeysRequest(params)
  2431. //
  2432. // err := req.Send()
  2433. // if err == nil { // resp is now filled
  2434. // fmt.Println(resp)
  2435. // }
  2436. //
  2437. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRateBasedStatementManagedKeys
  2438. func (c *WAFV2) GetRateBasedStatementManagedKeysRequest(input *GetRateBasedStatementManagedKeysInput) (req *request.Request, output *GetRateBasedStatementManagedKeysOutput) {
  2439. op := &request.Operation{
  2440. Name: opGetRateBasedStatementManagedKeys,
  2441. HTTPMethod: "POST",
  2442. HTTPPath: "/",
  2443. }
  2444. if input == nil {
  2445. input = &GetRateBasedStatementManagedKeysInput{}
  2446. }
  2447. output = &GetRateBasedStatementManagedKeysOutput{}
  2448. req = c.newRequest(op, input, output)
  2449. return
  2450. }
  2451. // GetRateBasedStatementManagedKeys API operation for AWS WAFV2.
  2452. //
  2453. // Retrieves the keys that are currently blocked by a rate-based rule instance.
  2454. // The maximum number of managed keys that can be blocked for a single rate-based
  2455. // rule instance is 10,000. If more than 10,000 addresses exceed the rate limit,
  2456. // those with the highest rates are blocked.
  2457. //
  2458. // For a rate-based rule that you've defined inside a rule group, provide the
  2459. // name of the rule group reference statement in your request, in addition to
  2460. // the rate-based rule name and the web ACL name.
  2461. //
  2462. // WAF monitors web requests and manages keys independently for each unique
  2463. // combination of web ACL, optional rule group, and rate-based rule. For example,
  2464. // if you define a rate-based rule inside a rule group, and then use the rule
  2465. // group in a web ACL, WAF monitors web requests and manages keys for that web
  2466. // ACL, rule group reference statement, and rate-based rule instance. If you
  2467. // use the same rule group in a second web ACL, WAF monitors web requests and
  2468. // manages keys for this second usage completely independent of your first.
  2469. //
  2470. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2471. // with awserr.Error's Code and Message methods to get detailed information about
  2472. // the error.
  2473. //
  2474. // See the AWS API reference guide for AWS WAFV2's
  2475. // API operation GetRateBasedStatementManagedKeys for usage and error information.
  2476. //
  2477. // Returned Error Types:
  2478. //
  2479. // - WAFInternalErrorException
  2480. // Your request is valid, but WAF couldn’t perform the operation because of
  2481. // a system problem. Retry your request.
  2482. //
  2483. // - WAFInvalidParameterException
  2484. // The operation failed because WAF didn't recognize a parameter in the request.
  2485. // For example:
  2486. //
  2487. // - You specified a parameter name or value that isn't valid.
  2488. //
  2489. // - Your nested statement isn't valid. You might have tried to nest a statement
  2490. // that can’t be nested.
  2491. //
  2492. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2493. // types available at DefaultAction.
  2494. //
  2495. // - Your request references an ARN that is malformed, or corresponds to
  2496. // a resource with which a web ACL can't be associated.
  2497. //
  2498. // - WAFNonexistentItemException
  2499. // WAF couldn’t perform the operation because your resource doesn't exist.
  2500. // If you've just created a resource that you're using in this operation, you
  2501. // might just need to wait a few minutes. It can take from a few seconds to
  2502. // a number of minutes for changes to propagate.
  2503. //
  2504. // - WAFInvalidOperationException
  2505. // The operation isn't valid.
  2506. //
  2507. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRateBasedStatementManagedKeys
  2508. func (c *WAFV2) GetRateBasedStatementManagedKeys(input *GetRateBasedStatementManagedKeysInput) (*GetRateBasedStatementManagedKeysOutput, error) {
  2509. req, out := c.GetRateBasedStatementManagedKeysRequest(input)
  2510. return out, req.Send()
  2511. }
  2512. // GetRateBasedStatementManagedKeysWithContext is the same as GetRateBasedStatementManagedKeys with the addition of
  2513. // the ability to pass a context and additional request options.
  2514. //
  2515. // See GetRateBasedStatementManagedKeys for details on how to use this API operation.
  2516. //
  2517. // The context must be non-nil and will be used for request cancellation. If
  2518. // the context is nil a panic will occur. In the future the SDK may create
  2519. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2520. // for more information on using Contexts.
  2521. func (c *WAFV2) GetRateBasedStatementManagedKeysWithContext(ctx aws.Context, input *GetRateBasedStatementManagedKeysInput, opts ...request.Option) (*GetRateBasedStatementManagedKeysOutput, error) {
  2522. req, out := c.GetRateBasedStatementManagedKeysRequest(input)
  2523. req.SetContext(ctx)
  2524. req.ApplyOptions(opts...)
  2525. return out, req.Send()
  2526. }
  2527. const opGetRegexPatternSet = "GetRegexPatternSet"
  2528. // GetRegexPatternSetRequest generates a "aws/request.Request" representing the
  2529. // client's request for the GetRegexPatternSet operation. The "output" return
  2530. // value will be populated with the request's response once the request completes
  2531. // successfully.
  2532. //
  2533. // Use "Send" method on the returned Request to send the API call to the service.
  2534. // the "output" return value is not valid until after Send returns without error.
  2535. //
  2536. // See GetRegexPatternSet for more information on using the GetRegexPatternSet
  2537. // API call, and error handling.
  2538. //
  2539. // This method is useful when you want to inject custom logic or configuration
  2540. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2541. //
  2542. // // Example sending a request using the GetRegexPatternSetRequest method.
  2543. // req, resp := client.GetRegexPatternSetRequest(params)
  2544. //
  2545. // err := req.Send()
  2546. // if err == nil { // resp is now filled
  2547. // fmt.Println(resp)
  2548. // }
  2549. //
  2550. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRegexPatternSet
  2551. func (c *WAFV2) GetRegexPatternSetRequest(input *GetRegexPatternSetInput) (req *request.Request, output *GetRegexPatternSetOutput) {
  2552. op := &request.Operation{
  2553. Name: opGetRegexPatternSet,
  2554. HTTPMethod: "POST",
  2555. HTTPPath: "/",
  2556. }
  2557. if input == nil {
  2558. input = &GetRegexPatternSetInput{}
  2559. }
  2560. output = &GetRegexPatternSetOutput{}
  2561. req = c.newRequest(op, input, output)
  2562. return
  2563. }
  2564. // GetRegexPatternSet API operation for AWS WAFV2.
  2565. //
  2566. // Retrieves the specified RegexPatternSet.
  2567. //
  2568. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2569. // with awserr.Error's Code and Message methods to get detailed information about
  2570. // the error.
  2571. //
  2572. // See the AWS API reference guide for AWS WAFV2's
  2573. // API operation GetRegexPatternSet for usage and error information.
  2574. //
  2575. // Returned Error Types:
  2576. //
  2577. // - WAFInternalErrorException
  2578. // Your request is valid, but WAF couldn’t perform the operation because of
  2579. // a system problem. Retry your request.
  2580. //
  2581. // - WAFInvalidParameterException
  2582. // The operation failed because WAF didn't recognize a parameter in the request.
  2583. // For example:
  2584. //
  2585. // - You specified a parameter name or value that isn't valid.
  2586. //
  2587. // - Your nested statement isn't valid. You might have tried to nest a statement
  2588. // that can’t be nested.
  2589. //
  2590. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2591. // types available at DefaultAction.
  2592. //
  2593. // - Your request references an ARN that is malformed, or corresponds to
  2594. // a resource with which a web ACL can't be associated.
  2595. //
  2596. // - WAFNonexistentItemException
  2597. // WAF couldn’t perform the operation because your resource doesn't exist.
  2598. // If you've just created a resource that you're using in this operation, you
  2599. // might just need to wait a few minutes. It can take from a few seconds to
  2600. // a number of minutes for changes to propagate.
  2601. //
  2602. // - WAFInvalidOperationException
  2603. // The operation isn't valid.
  2604. //
  2605. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRegexPatternSet
  2606. func (c *WAFV2) GetRegexPatternSet(input *GetRegexPatternSetInput) (*GetRegexPatternSetOutput, error) {
  2607. req, out := c.GetRegexPatternSetRequest(input)
  2608. return out, req.Send()
  2609. }
  2610. // GetRegexPatternSetWithContext is the same as GetRegexPatternSet with the addition of
  2611. // the ability to pass a context and additional request options.
  2612. //
  2613. // See GetRegexPatternSet for details on how to use this API operation.
  2614. //
  2615. // The context must be non-nil and will be used for request cancellation. If
  2616. // the context is nil a panic will occur. In the future the SDK may create
  2617. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2618. // for more information on using Contexts.
  2619. func (c *WAFV2) GetRegexPatternSetWithContext(ctx aws.Context, input *GetRegexPatternSetInput, opts ...request.Option) (*GetRegexPatternSetOutput, error) {
  2620. req, out := c.GetRegexPatternSetRequest(input)
  2621. req.SetContext(ctx)
  2622. req.ApplyOptions(opts...)
  2623. return out, req.Send()
  2624. }
  2625. const opGetRuleGroup = "GetRuleGroup"
  2626. // GetRuleGroupRequest generates a "aws/request.Request" representing the
  2627. // client's request for the GetRuleGroup operation. The "output" return
  2628. // value will be populated with the request's response once the request completes
  2629. // successfully.
  2630. //
  2631. // Use "Send" method on the returned Request to send the API call to the service.
  2632. // the "output" return value is not valid until after Send returns without error.
  2633. //
  2634. // See GetRuleGroup for more information on using the GetRuleGroup
  2635. // API call, and error handling.
  2636. //
  2637. // This method is useful when you want to inject custom logic or configuration
  2638. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2639. //
  2640. // // Example sending a request using the GetRuleGroupRequest method.
  2641. // req, resp := client.GetRuleGroupRequest(params)
  2642. //
  2643. // err := req.Send()
  2644. // if err == nil { // resp is now filled
  2645. // fmt.Println(resp)
  2646. // }
  2647. //
  2648. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup
  2649. func (c *WAFV2) GetRuleGroupRequest(input *GetRuleGroupInput) (req *request.Request, output *GetRuleGroupOutput) {
  2650. op := &request.Operation{
  2651. Name: opGetRuleGroup,
  2652. HTTPMethod: "POST",
  2653. HTTPPath: "/",
  2654. }
  2655. if input == nil {
  2656. input = &GetRuleGroupInput{}
  2657. }
  2658. output = &GetRuleGroupOutput{}
  2659. req = c.newRequest(op, input, output)
  2660. return
  2661. }
  2662. // GetRuleGroup API operation for AWS WAFV2.
  2663. //
  2664. // Retrieves the specified RuleGroup.
  2665. //
  2666. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2667. // with awserr.Error's Code and Message methods to get detailed information about
  2668. // the error.
  2669. //
  2670. // See the AWS API reference guide for AWS WAFV2's
  2671. // API operation GetRuleGroup for usage and error information.
  2672. //
  2673. // Returned Error Types:
  2674. //
  2675. // - WAFInternalErrorException
  2676. // Your request is valid, but WAF couldn’t perform the operation because of
  2677. // a system problem. Retry your request.
  2678. //
  2679. // - WAFInvalidParameterException
  2680. // The operation failed because WAF didn't recognize a parameter in the request.
  2681. // For example:
  2682. //
  2683. // - You specified a parameter name or value that isn't valid.
  2684. //
  2685. // - Your nested statement isn't valid. You might have tried to nest a statement
  2686. // that can’t be nested.
  2687. //
  2688. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2689. // types available at DefaultAction.
  2690. //
  2691. // - Your request references an ARN that is malformed, or corresponds to
  2692. // a resource with which a web ACL can't be associated.
  2693. //
  2694. // - WAFNonexistentItemException
  2695. // WAF couldn’t perform the operation because your resource doesn't exist.
  2696. // If you've just created a resource that you're using in this operation, you
  2697. // might just need to wait a few minutes. It can take from a few seconds to
  2698. // a number of minutes for changes to propagate.
  2699. //
  2700. // - WAFInvalidOperationException
  2701. // The operation isn't valid.
  2702. //
  2703. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup
  2704. func (c *WAFV2) GetRuleGroup(input *GetRuleGroupInput) (*GetRuleGroupOutput, error) {
  2705. req, out := c.GetRuleGroupRequest(input)
  2706. return out, req.Send()
  2707. }
  2708. // GetRuleGroupWithContext is the same as GetRuleGroup with the addition of
  2709. // the ability to pass a context and additional request options.
  2710. //
  2711. // See GetRuleGroup for details on how to use this API operation.
  2712. //
  2713. // The context must be non-nil and will be used for request cancellation. If
  2714. // the context is nil a panic will occur. In the future the SDK may create
  2715. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2716. // for more information on using Contexts.
  2717. func (c *WAFV2) GetRuleGroupWithContext(ctx aws.Context, input *GetRuleGroupInput, opts ...request.Option) (*GetRuleGroupOutput, error) {
  2718. req, out := c.GetRuleGroupRequest(input)
  2719. req.SetContext(ctx)
  2720. req.ApplyOptions(opts...)
  2721. return out, req.Send()
  2722. }
  2723. const opGetSampledRequests = "GetSampledRequests"
  2724. // GetSampledRequestsRequest generates a "aws/request.Request" representing the
  2725. // client's request for the GetSampledRequests operation. The "output" return
  2726. // value will be populated with the request's response once the request completes
  2727. // successfully.
  2728. //
  2729. // Use "Send" method on the returned Request to send the API call to the service.
  2730. // the "output" return value is not valid until after Send returns without error.
  2731. //
  2732. // See GetSampledRequests for more information on using the GetSampledRequests
  2733. // API call, and error handling.
  2734. //
  2735. // This method is useful when you want to inject custom logic or configuration
  2736. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2737. //
  2738. // // Example sending a request using the GetSampledRequestsRequest method.
  2739. // req, resp := client.GetSampledRequestsRequest(params)
  2740. //
  2741. // err := req.Send()
  2742. // if err == nil { // resp is now filled
  2743. // fmt.Println(resp)
  2744. // }
  2745. //
  2746. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetSampledRequests
  2747. func (c *WAFV2) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *request.Request, output *GetSampledRequestsOutput) {
  2748. op := &request.Operation{
  2749. Name: opGetSampledRequests,
  2750. HTTPMethod: "POST",
  2751. HTTPPath: "/",
  2752. }
  2753. if input == nil {
  2754. input = &GetSampledRequestsInput{}
  2755. }
  2756. output = &GetSampledRequestsOutput{}
  2757. req = c.newRequest(op, input, output)
  2758. return
  2759. }
  2760. // GetSampledRequests API operation for AWS WAFV2.
  2761. //
  2762. // Gets detailed information about a specified number of requests--a sample--that
  2763. // WAF randomly selects from among the first 5,000 requests that your Amazon
  2764. // Web Services resource received during a time range that you choose. You can
  2765. // specify a sample size of up to 500 requests, and you can specify any time
  2766. // range in the previous three hours.
  2767. //
  2768. // GetSampledRequests returns a time range, which is usually the time range
  2769. // that you specified. However, if your resource (such as a CloudFront distribution)
  2770. // received 5,000 requests before the specified time range elapsed, GetSampledRequests
  2771. // returns an updated time range. This new time range indicates the actual period
  2772. // during which WAF selected the requests in the sample.
  2773. //
  2774. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2775. // with awserr.Error's Code and Message methods to get detailed information about
  2776. // the error.
  2777. //
  2778. // See the AWS API reference guide for AWS WAFV2's
  2779. // API operation GetSampledRequests for usage and error information.
  2780. //
  2781. // Returned Error Types:
  2782. //
  2783. // - WAFNonexistentItemException
  2784. // WAF couldn’t perform the operation because your resource doesn't exist.
  2785. // If you've just created a resource that you're using in this operation, you
  2786. // might just need to wait a few minutes. It can take from a few seconds to
  2787. // a number of minutes for changes to propagate.
  2788. //
  2789. // - WAFInternalErrorException
  2790. // Your request is valid, but WAF couldn’t perform the operation because of
  2791. // a system problem. Retry your request.
  2792. //
  2793. // - WAFInvalidParameterException
  2794. // The operation failed because WAF didn't recognize a parameter in the request.
  2795. // For example:
  2796. //
  2797. // - You specified a parameter name or value that isn't valid.
  2798. //
  2799. // - Your nested statement isn't valid. You might have tried to nest a statement
  2800. // that can’t be nested.
  2801. //
  2802. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2803. // types available at DefaultAction.
  2804. //
  2805. // - Your request references an ARN that is malformed, or corresponds to
  2806. // a resource with which a web ACL can't be associated.
  2807. //
  2808. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetSampledRequests
  2809. func (c *WAFV2) GetSampledRequests(input *GetSampledRequestsInput) (*GetSampledRequestsOutput, error) {
  2810. req, out := c.GetSampledRequestsRequest(input)
  2811. return out, req.Send()
  2812. }
  2813. // GetSampledRequestsWithContext is the same as GetSampledRequests with the addition of
  2814. // the ability to pass a context and additional request options.
  2815. //
  2816. // See GetSampledRequests for details on how to use this API operation.
  2817. //
  2818. // The context must be non-nil and will be used for request cancellation. If
  2819. // the context is nil a panic will occur. In the future the SDK may create
  2820. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2821. // for more information on using Contexts.
  2822. func (c *WAFV2) GetSampledRequestsWithContext(ctx aws.Context, input *GetSampledRequestsInput, opts ...request.Option) (*GetSampledRequestsOutput, error) {
  2823. req, out := c.GetSampledRequestsRequest(input)
  2824. req.SetContext(ctx)
  2825. req.ApplyOptions(opts...)
  2826. return out, req.Send()
  2827. }
  2828. const opGetWebACL = "GetWebACL"
  2829. // GetWebACLRequest generates a "aws/request.Request" representing the
  2830. // client's request for the GetWebACL operation. The "output" return
  2831. // value will be populated with the request's response once the request completes
  2832. // successfully.
  2833. //
  2834. // Use "Send" method on the returned Request to send the API call to the service.
  2835. // the "output" return value is not valid until after Send returns without error.
  2836. //
  2837. // See GetWebACL for more information on using the GetWebACL
  2838. // API call, and error handling.
  2839. //
  2840. // This method is useful when you want to inject custom logic or configuration
  2841. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2842. //
  2843. // // Example sending a request using the GetWebACLRequest method.
  2844. // req, resp := client.GetWebACLRequest(params)
  2845. //
  2846. // err := req.Send()
  2847. // if err == nil { // resp is now filled
  2848. // fmt.Println(resp)
  2849. // }
  2850. //
  2851. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACL
  2852. func (c *WAFV2) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, output *GetWebACLOutput) {
  2853. op := &request.Operation{
  2854. Name: opGetWebACL,
  2855. HTTPMethod: "POST",
  2856. HTTPPath: "/",
  2857. }
  2858. if input == nil {
  2859. input = &GetWebACLInput{}
  2860. }
  2861. output = &GetWebACLOutput{}
  2862. req = c.newRequest(op, input, output)
  2863. return
  2864. }
  2865. // GetWebACL API operation for AWS WAFV2.
  2866. //
  2867. // Retrieves the specified WebACL.
  2868. //
  2869. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2870. // with awserr.Error's Code and Message methods to get detailed information about
  2871. // the error.
  2872. //
  2873. // See the AWS API reference guide for AWS WAFV2's
  2874. // API operation GetWebACL for usage and error information.
  2875. //
  2876. // Returned Error Types:
  2877. //
  2878. // - WAFInternalErrorException
  2879. // Your request is valid, but WAF couldn’t perform the operation because of
  2880. // a system problem. Retry your request.
  2881. //
  2882. // - WAFInvalidParameterException
  2883. // The operation failed because WAF didn't recognize a parameter in the request.
  2884. // For example:
  2885. //
  2886. // - You specified a parameter name or value that isn't valid.
  2887. //
  2888. // - Your nested statement isn't valid. You might have tried to nest a statement
  2889. // that can’t be nested.
  2890. //
  2891. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2892. // types available at DefaultAction.
  2893. //
  2894. // - Your request references an ARN that is malformed, or corresponds to
  2895. // a resource with which a web ACL can't be associated.
  2896. //
  2897. // - WAFNonexistentItemException
  2898. // WAF couldn’t perform the operation because your resource doesn't exist.
  2899. // If you've just created a resource that you're using in this operation, you
  2900. // might just need to wait a few minutes. It can take from a few seconds to
  2901. // a number of minutes for changes to propagate.
  2902. //
  2903. // - WAFInvalidOperationException
  2904. // The operation isn't valid.
  2905. //
  2906. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACL
  2907. func (c *WAFV2) GetWebACL(input *GetWebACLInput) (*GetWebACLOutput, error) {
  2908. req, out := c.GetWebACLRequest(input)
  2909. return out, req.Send()
  2910. }
  2911. // GetWebACLWithContext is the same as GetWebACL with the addition of
  2912. // the ability to pass a context and additional request options.
  2913. //
  2914. // See GetWebACL for details on how to use this API operation.
  2915. //
  2916. // The context must be non-nil and will be used for request cancellation. If
  2917. // the context is nil a panic will occur. In the future the SDK may create
  2918. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2919. // for more information on using Contexts.
  2920. func (c *WAFV2) GetWebACLWithContext(ctx aws.Context, input *GetWebACLInput, opts ...request.Option) (*GetWebACLOutput, error) {
  2921. req, out := c.GetWebACLRequest(input)
  2922. req.SetContext(ctx)
  2923. req.ApplyOptions(opts...)
  2924. return out, req.Send()
  2925. }
  2926. const opGetWebACLForResource = "GetWebACLForResource"
  2927. // GetWebACLForResourceRequest generates a "aws/request.Request" representing the
  2928. // client's request for the GetWebACLForResource operation. The "output" return
  2929. // value will be populated with the request's response once the request completes
  2930. // successfully.
  2931. //
  2932. // Use "Send" method on the returned Request to send the API call to the service.
  2933. // the "output" return value is not valid until after Send returns without error.
  2934. //
  2935. // See GetWebACLForResource for more information on using the GetWebACLForResource
  2936. // API call, and error handling.
  2937. //
  2938. // This method is useful when you want to inject custom logic or configuration
  2939. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2940. //
  2941. // // Example sending a request using the GetWebACLForResourceRequest method.
  2942. // req, resp := client.GetWebACLForResourceRequest(params)
  2943. //
  2944. // err := req.Send()
  2945. // if err == nil { // resp is now filled
  2946. // fmt.Println(resp)
  2947. // }
  2948. //
  2949. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACLForResource
  2950. func (c *WAFV2) GetWebACLForResourceRequest(input *GetWebACLForResourceInput) (req *request.Request, output *GetWebACLForResourceOutput) {
  2951. op := &request.Operation{
  2952. Name: opGetWebACLForResource,
  2953. HTTPMethod: "POST",
  2954. HTTPPath: "/",
  2955. }
  2956. if input == nil {
  2957. input = &GetWebACLForResourceInput{}
  2958. }
  2959. output = &GetWebACLForResourceOutput{}
  2960. req = c.newRequest(op, input, output)
  2961. return
  2962. }
  2963. // GetWebACLForResource API operation for AWS WAFV2.
  2964. //
  2965. // Retrieves the WebACL for the specified resource.
  2966. //
  2967. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2968. // with awserr.Error's Code and Message methods to get detailed information about
  2969. // the error.
  2970. //
  2971. // See the AWS API reference guide for AWS WAFV2's
  2972. // API operation GetWebACLForResource for usage and error information.
  2973. //
  2974. // Returned Error Types:
  2975. //
  2976. // - WAFInternalErrorException
  2977. // Your request is valid, but WAF couldn’t perform the operation because of
  2978. // a system problem. Retry your request.
  2979. //
  2980. // - WAFNonexistentItemException
  2981. // WAF couldn’t perform the operation because your resource doesn't exist.
  2982. // If you've just created a resource that you're using in this operation, you
  2983. // might just need to wait a few minutes. It can take from a few seconds to
  2984. // a number of minutes for changes to propagate.
  2985. //
  2986. // - WAFInvalidParameterException
  2987. // The operation failed because WAF didn't recognize a parameter in the request.
  2988. // For example:
  2989. //
  2990. // - You specified a parameter name or value that isn't valid.
  2991. //
  2992. // - Your nested statement isn't valid. You might have tried to nest a statement
  2993. // that can’t be nested.
  2994. //
  2995. // - You tried to update a WebACL with a DefaultAction that isn't among the
  2996. // types available at DefaultAction.
  2997. //
  2998. // - Your request references an ARN that is malformed, or corresponds to
  2999. // a resource with which a web ACL can't be associated.
  3000. //
  3001. // - WAFUnavailableEntityException
  3002. // WAF couldn’t retrieve a resource that you specified for this operation.
  3003. // If you've just created a resource that you're using in this operation, you
  3004. // might just need to wait a few minutes. It can take from a few seconds to
  3005. // a number of minutes for changes to propagate. Verify the resources that you
  3006. // are specifying in your request parameters and then retry the operation.
  3007. //
  3008. // - WAFInvalidOperationException
  3009. // The operation isn't valid.
  3010. //
  3011. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACLForResource
  3012. func (c *WAFV2) GetWebACLForResource(input *GetWebACLForResourceInput) (*GetWebACLForResourceOutput, error) {
  3013. req, out := c.GetWebACLForResourceRequest(input)
  3014. return out, req.Send()
  3015. }
  3016. // GetWebACLForResourceWithContext is the same as GetWebACLForResource with the addition of
  3017. // the ability to pass a context and additional request options.
  3018. //
  3019. // See GetWebACLForResource for details on how to use this API operation.
  3020. //
  3021. // The context must be non-nil and will be used for request cancellation. If
  3022. // the context is nil a panic will occur. In the future the SDK may create
  3023. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3024. // for more information on using Contexts.
  3025. func (c *WAFV2) GetWebACLForResourceWithContext(ctx aws.Context, input *GetWebACLForResourceInput, opts ...request.Option) (*GetWebACLForResourceOutput, error) {
  3026. req, out := c.GetWebACLForResourceRequest(input)
  3027. req.SetContext(ctx)
  3028. req.ApplyOptions(opts...)
  3029. return out, req.Send()
  3030. }
  3031. const opListAvailableManagedRuleGroupVersions = "ListAvailableManagedRuleGroupVersions"
  3032. // ListAvailableManagedRuleGroupVersionsRequest generates a "aws/request.Request" representing the
  3033. // client's request for the ListAvailableManagedRuleGroupVersions operation. The "output" return
  3034. // value will be populated with the request's response once the request completes
  3035. // successfully.
  3036. //
  3037. // Use "Send" method on the returned Request to send the API call to the service.
  3038. // the "output" return value is not valid until after Send returns without error.
  3039. //
  3040. // See ListAvailableManagedRuleGroupVersions for more information on using the ListAvailableManagedRuleGroupVersions
  3041. // API call, and error handling.
  3042. //
  3043. // This method is useful when you want to inject custom logic or configuration
  3044. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3045. //
  3046. // // Example sending a request using the ListAvailableManagedRuleGroupVersionsRequest method.
  3047. // req, resp := client.ListAvailableManagedRuleGroupVersionsRequest(params)
  3048. //
  3049. // err := req.Send()
  3050. // if err == nil { // resp is now filled
  3051. // fmt.Println(resp)
  3052. // }
  3053. //
  3054. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroupVersions
  3055. func (c *WAFV2) ListAvailableManagedRuleGroupVersionsRequest(input *ListAvailableManagedRuleGroupVersionsInput) (req *request.Request, output *ListAvailableManagedRuleGroupVersionsOutput) {
  3056. op := &request.Operation{
  3057. Name: opListAvailableManagedRuleGroupVersions,
  3058. HTTPMethod: "POST",
  3059. HTTPPath: "/",
  3060. }
  3061. if input == nil {
  3062. input = &ListAvailableManagedRuleGroupVersionsInput{}
  3063. }
  3064. output = &ListAvailableManagedRuleGroupVersionsOutput{}
  3065. req = c.newRequest(op, input, output)
  3066. return
  3067. }
  3068. // ListAvailableManagedRuleGroupVersions API operation for AWS WAFV2.
  3069. //
  3070. // Returns a list of the available versions for the specified managed rule group.
  3071. //
  3072. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3073. // with awserr.Error's Code and Message methods to get detailed information about
  3074. // the error.
  3075. //
  3076. // See the AWS API reference guide for AWS WAFV2's
  3077. // API operation ListAvailableManagedRuleGroupVersions for usage and error information.
  3078. //
  3079. // Returned Error Types:
  3080. //
  3081. // - WAFInternalErrorException
  3082. // Your request is valid, but WAF couldn’t perform the operation because of
  3083. // a system problem. Retry your request.
  3084. //
  3085. // - WAFInvalidParameterException
  3086. // The operation failed because WAF didn't recognize a parameter in the request.
  3087. // For example:
  3088. //
  3089. // - You specified a parameter name or value that isn't valid.
  3090. //
  3091. // - Your nested statement isn't valid. You might have tried to nest a statement
  3092. // that can’t be nested.
  3093. //
  3094. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3095. // types available at DefaultAction.
  3096. //
  3097. // - Your request references an ARN that is malformed, or corresponds to
  3098. // a resource with which a web ACL can't be associated.
  3099. //
  3100. // - WAFNonexistentItemException
  3101. // WAF couldn’t perform the operation because your resource doesn't exist.
  3102. // If you've just created a resource that you're using in this operation, you
  3103. // might just need to wait a few minutes. It can take from a few seconds to
  3104. // a number of minutes for changes to propagate.
  3105. //
  3106. // - WAFInvalidOperationException
  3107. // The operation isn't valid.
  3108. //
  3109. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroupVersions
  3110. func (c *WAFV2) ListAvailableManagedRuleGroupVersions(input *ListAvailableManagedRuleGroupVersionsInput) (*ListAvailableManagedRuleGroupVersionsOutput, error) {
  3111. req, out := c.ListAvailableManagedRuleGroupVersionsRequest(input)
  3112. return out, req.Send()
  3113. }
  3114. // ListAvailableManagedRuleGroupVersionsWithContext is the same as ListAvailableManagedRuleGroupVersions with the addition of
  3115. // the ability to pass a context and additional request options.
  3116. //
  3117. // See ListAvailableManagedRuleGroupVersions for details on how to use this API operation.
  3118. //
  3119. // The context must be non-nil and will be used for request cancellation. If
  3120. // the context is nil a panic will occur. In the future the SDK may create
  3121. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3122. // for more information on using Contexts.
  3123. func (c *WAFV2) ListAvailableManagedRuleGroupVersionsWithContext(ctx aws.Context, input *ListAvailableManagedRuleGroupVersionsInput, opts ...request.Option) (*ListAvailableManagedRuleGroupVersionsOutput, error) {
  3124. req, out := c.ListAvailableManagedRuleGroupVersionsRequest(input)
  3125. req.SetContext(ctx)
  3126. req.ApplyOptions(opts...)
  3127. return out, req.Send()
  3128. }
  3129. const opListAvailableManagedRuleGroups = "ListAvailableManagedRuleGroups"
  3130. // ListAvailableManagedRuleGroupsRequest generates a "aws/request.Request" representing the
  3131. // client's request for the ListAvailableManagedRuleGroups operation. The "output" return
  3132. // value will be populated with the request's response once the request completes
  3133. // successfully.
  3134. //
  3135. // Use "Send" method on the returned Request to send the API call to the service.
  3136. // the "output" return value is not valid until after Send returns without error.
  3137. //
  3138. // See ListAvailableManagedRuleGroups for more information on using the ListAvailableManagedRuleGroups
  3139. // API call, and error handling.
  3140. //
  3141. // This method is useful when you want to inject custom logic or configuration
  3142. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3143. //
  3144. // // Example sending a request using the ListAvailableManagedRuleGroupsRequest method.
  3145. // req, resp := client.ListAvailableManagedRuleGroupsRequest(params)
  3146. //
  3147. // err := req.Send()
  3148. // if err == nil { // resp is now filled
  3149. // fmt.Println(resp)
  3150. // }
  3151. //
  3152. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroups
  3153. func (c *WAFV2) ListAvailableManagedRuleGroupsRequest(input *ListAvailableManagedRuleGroupsInput) (req *request.Request, output *ListAvailableManagedRuleGroupsOutput) {
  3154. op := &request.Operation{
  3155. Name: opListAvailableManagedRuleGroups,
  3156. HTTPMethod: "POST",
  3157. HTTPPath: "/",
  3158. }
  3159. if input == nil {
  3160. input = &ListAvailableManagedRuleGroupsInput{}
  3161. }
  3162. output = &ListAvailableManagedRuleGroupsOutput{}
  3163. req = c.newRequest(op, input, output)
  3164. return
  3165. }
  3166. // ListAvailableManagedRuleGroups API operation for AWS WAFV2.
  3167. //
  3168. // Retrieves an array of managed rule groups that are available for you to use.
  3169. // This list includes all Amazon Web Services Managed Rules rule groups and
  3170. // all of the Amazon Web Services Marketplace managed rule groups that you're
  3171. // subscribed to.
  3172. //
  3173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3174. // with awserr.Error's Code and Message methods to get detailed information about
  3175. // the error.
  3176. //
  3177. // See the AWS API reference guide for AWS WAFV2's
  3178. // API operation ListAvailableManagedRuleGroups for usage and error information.
  3179. //
  3180. // Returned Error Types:
  3181. //
  3182. // - WAFInternalErrorException
  3183. // Your request is valid, but WAF couldn’t perform the operation because of
  3184. // a system problem. Retry your request.
  3185. //
  3186. // - WAFInvalidParameterException
  3187. // The operation failed because WAF didn't recognize a parameter in the request.
  3188. // For example:
  3189. //
  3190. // - You specified a parameter name or value that isn't valid.
  3191. //
  3192. // - Your nested statement isn't valid. You might have tried to nest a statement
  3193. // that can’t be nested.
  3194. //
  3195. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3196. // types available at DefaultAction.
  3197. //
  3198. // - Your request references an ARN that is malformed, or corresponds to
  3199. // a resource with which a web ACL can't be associated.
  3200. //
  3201. // - WAFInvalidOperationException
  3202. // The operation isn't valid.
  3203. //
  3204. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroups
  3205. func (c *WAFV2) ListAvailableManagedRuleGroups(input *ListAvailableManagedRuleGroupsInput) (*ListAvailableManagedRuleGroupsOutput, error) {
  3206. req, out := c.ListAvailableManagedRuleGroupsRequest(input)
  3207. return out, req.Send()
  3208. }
  3209. // ListAvailableManagedRuleGroupsWithContext is the same as ListAvailableManagedRuleGroups with the addition of
  3210. // the ability to pass a context and additional request options.
  3211. //
  3212. // See ListAvailableManagedRuleGroups for details on how to use this API operation.
  3213. //
  3214. // The context must be non-nil and will be used for request cancellation. If
  3215. // the context is nil a panic will occur. In the future the SDK may create
  3216. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3217. // for more information on using Contexts.
  3218. func (c *WAFV2) ListAvailableManagedRuleGroupsWithContext(ctx aws.Context, input *ListAvailableManagedRuleGroupsInput, opts ...request.Option) (*ListAvailableManagedRuleGroupsOutput, error) {
  3219. req, out := c.ListAvailableManagedRuleGroupsRequest(input)
  3220. req.SetContext(ctx)
  3221. req.ApplyOptions(opts...)
  3222. return out, req.Send()
  3223. }
  3224. const opListIPSets = "ListIPSets"
  3225. // ListIPSetsRequest generates a "aws/request.Request" representing the
  3226. // client's request for the ListIPSets operation. The "output" return
  3227. // value will be populated with the request's response once the request completes
  3228. // successfully.
  3229. //
  3230. // Use "Send" method on the returned Request to send the API call to the service.
  3231. // the "output" return value is not valid until after Send returns without error.
  3232. //
  3233. // See ListIPSets for more information on using the ListIPSets
  3234. // API call, and error handling.
  3235. //
  3236. // This method is useful when you want to inject custom logic or configuration
  3237. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3238. //
  3239. // // Example sending a request using the ListIPSetsRequest method.
  3240. // req, resp := client.ListIPSetsRequest(params)
  3241. //
  3242. // err := req.Send()
  3243. // if err == nil { // resp is now filled
  3244. // fmt.Println(resp)
  3245. // }
  3246. //
  3247. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListIPSets
  3248. func (c *WAFV2) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) {
  3249. op := &request.Operation{
  3250. Name: opListIPSets,
  3251. HTTPMethod: "POST",
  3252. HTTPPath: "/",
  3253. }
  3254. if input == nil {
  3255. input = &ListIPSetsInput{}
  3256. }
  3257. output = &ListIPSetsOutput{}
  3258. req = c.newRequest(op, input, output)
  3259. return
  3260. }
  3261. // ListIPSets API operation for AWS WAFV2.
  3262. //
  3263. // Retrieves an array of IPSetSummary objects for the IP sets that you manage.
  3264. //
  3265. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3266. // with awserr.Error's Code and Message methods to get detailed information about
  3267. // the error.
  3268. //
  3269. // See the AWS API reference guide for AWS WAFV2's
  3270. // API operation ListIPSets for usage and error information.
  3271. //
  3272. // Returned Error Types:
  3273. //
  3274. // - WAFInternalErrorException
  3275. // Your request is valid, but WAF couldn’t perform the operation because of
  3276. // a system problem. Retry your request.
  3277. //
  3278. // - WAFInvalidParameterException
  3279. // The operation failed because WAF didn't recognize a parameter in the request.
  3280. // For example:
  3281. //
  3282. // - You specified a parameter name or value that isn't valid.
  3283. //
  3284. // - Your nested statement isn't valid. You might have tried to nest a statement
  3285. // that can’t be nested.
  3286. //
  3287. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3288. // types available at DefaultAction.
  3289. //
  3290. // - Your request references an ARN that is malformed, or corresponds to
  3291. // a resource with which a web ACL can't be associated.
  3292. //
  3293. // - WAFInvalidOperationException
  3294. // The operation isn't valid.
  3295. //
  3296. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListIPSets
  3297. func (c *WAFV2) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) {
  3298. req, out := c.ListIPSetsRequest(input)
  3299. return out, req.Send()
  3300. }
  3301. // ListIPSetsWithContext is the same as ListIPSets with the addition of
  3302. // the ability to pass a context and additional request options.
  3303. //
  3304. // See ListIPSets for details on how to use this API operation.
  3305. //
  3306. // The context must be non-nil and will be used for request cancellation. If
  3307. // the context is nil a panic will occur. In the future the SDK may create
  3308. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3309. // for more information on using Contexts.
  3310. func (c *WAFV2) ListIPSetsWithContext(ctx aws.Context, input *ListIPSetsInput, opts ...request.Option) (*ListIPSetsOutput, error) {
  3311. req, out := c.ListIPSetsRequest(input)
  3312. req.SetContext(ctx)
  3313. req.ApplyOptions(opts...)
  3314. return out, req.Send()
  3315. }
  3316. const opListLoggingConfigurations = "ListLoggingConfigurations"
  3317. // ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the
  3318. // client's request for the ListLoggingConfigurations operation. The "output" return
  3319. // value will be populated with the request's response once the request completes
  3320. // successfully.
  3321. //
  3322. // Use "Send" method on the returned Request to send the API call to the service.
  3323. // the "output" return value is not valid until after Send returns without error.
  3324. //
  3325. // See ListLoggingConfigurations for more information on using the ListLoggingConfigurations
  3326. // API call, and error handling.
  3327. //
  3328. // This method is useful when you want to inject custom logic or configuration
  3329. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3330. //
  3331. // // Example sending a request using the ListLoggingConfigurationsRequest method.
  3332. // req, resp := client.ListLoggingConfigurationsRequest(params)
  3333. //
  3334. // err := req.Send()
  3335. // if err == nil { // resp is now filled
  3336. // fmt.Println(resp)
  3337. // }
  3338. //
  3339. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListLoggingConfigurations
  3340. func (c *WAFV2) ListLoggingConfigurationsRequest(input *ListLoggingConfigurationsInput) (req *request.Request, output *ListLoggingConfigurationsOutput) {
  3341. op := &request.Operation{
  3342. Name: opListLoggingConfigurations,
  3343. HTTPMethod: "POST",
  3344. HTTPPath: "/",
  3345. }
  3346. if input == nil {
  3347. input = &ListLoggingConfigurationsInput{}
  3348. }
  3349. output = &ListLoggingConfigurationsOutput{}
  3350. req = c.newRequest(op, input, output)
  3351. return
  3352. }
  3353. // ListLoggingConfigurations API operation for AWS WAFV2.
  3354. //
  3355. // Retrieves an array of your LoggingConfiguration objects.
  3356. //
  3357. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3358. // with awserr.Error's Code and Message methods to get detailed information about
  3359. // the error.
  3360. //
  3361. // See the AWS API reference guide for AWS WAFV2's
  3362. // API operation ListLoggingConfigurations for usage and error information.
  3363. //
  3364. // Returned Error Types:
  3365. //
  3366. // - WAFInternalErrorException
  3367. // Your request is valid, but WAF couldn’t perform the operation because of
  3368. // a system problem. Retry your request.
  3369. //
  3370. // - WAFInvalidParameterException
  3371. // The operation failed because WAF didn't recognize a parameter in the request.
  3372. // For example:
  3373. //
  3374. // - You specified a parameter name or value that isn't valid.
  3375. //
  3376. // - Your nested statement isn't valid. You might have tried to nest a statement
  3377. // that can’t be nested.
  3378. //
  3379. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3380. // types available at DefaultAction.
  3381. //
  3382. // - Your request references an ARN that is malformed, or corresponds to
  3383. // a resource with which a web ACL can't be associated.
  3384. //
  3385. // - WAFInvalidOperationException
  3386. // The operation isn't valid.
  3387. //
  3388. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListLoggingConfigurations
  3389. func (c *WAFV2) ListLoggingConfigurations(input *ListLoggingConfigurationsInput) (*ListLoggingConfigurationsOutput, error) {
  3390. req, out := c.ListLoggingConfigurationsRequest(input)
  3391. return out, req.Send()
  3392. }
  3393. // ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of
  3394. // the ability to pass a context and additional request options.
  3395. //
  3396. // See ListLoggingConfigurations for details on how to use this API operation.
  3397. //
  3398. // The context must be non-nil and will be used for request cancellation. If
  3399. // the context is nil a panic will occur. In the future the SDK may create
  3400. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3401. // for more information on using Contexts.
  3402. func (c *WAFV2) ListLoggingConfigurationsWithContext(ctx aws.Context, input *ListLoggingConfigurationsInput, opts ...request.Option) (*ListLoggingConfigurationsOutput, error) {
  3403. req, out := c.ListLoggingConfigurationsRequest(input)
  3404. req.SetContext(ctx)
  3405. req.ApplyOptions(opts...)
  3406. return out, req.Send()
  3407. }
  3408. const opListManagedRuleSets = "ListManagedRuleSets"
  3409. // ListManagedRuleSetsRequest generates a "aws/request.Request" representing the
  3410. // client's request for the ListManagedRuleSets operation. The "output" return
  3411. // value will be populated with the request's response once the request completes
  3412. // successfully.
  3413. //
  3414. // Use "Send" method on the returned Request to send the API call to the service.
  3415. // the "output" return value is not valid until after Send returns without error.
  3416. //
  3417. // See ListManagedRuleSets for more information on using the ListManagedRuleSets
  3418. // API call, and error handling.
  3419. //
  3420. // This method is useful when you want to inject custom logic or configuration
  3421. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3422. //
  3423. // // Example sending a request using the ListManagedRuleSetsRequest method.
  3424. // req, resp := client.ListManagedRuleSetsRequest(params)
  3425. //
  3426. // err := req.Send()
  3427. // if err == nil { // resp is now filled
  3428. // fmt.Println(resp)
  3429. // }
  3430. //
  3431. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListManagedRuleSets
  3432. func (c *WAFV2) ListManagedRuleSetsRequest(input *ListManagedRuleSetsInput) (req *request.Request, output *ListManagedRuleSetsOutput) {
  3433. op := &request.Operation{
  3434. Name: opListManagedRuleSets,
  3435. HTTPMethod: "POST",
  3436. HTTPPath: "/",
  3437. }
  3438. if input == nil {
  3439. input = &ListManagedRuleSetsInput{}
  3440. }
  3441. output = &ListManagedRuleSetsOutput{}
  3442. req = c.newRequest(op, input, output)
  3443. return
  3444. }
  3445. // ListManagedRuleSets API operation for AWS WAFV2.
  3446. //
  3447. // Retrieves the managed rule sets that you own.
  3448. //
  3449. // This is intended for use only by vendors of managed rule sets. Vendors are
  3450. // Amazon Web Services and Amazon Web Services Marketplace sellers.
  3451. //
  3452. // Vendors, you can use the managed rule set APIs to provide controlled rollout
  3453. // of your versioned managed rule group offerings for your customers. The APIs
  3454. // are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and
  3455. // UpdateManagedRuleSetVersionExpiryDate.
  3456. //
  3457. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3458. // with awserr.Error's Code and Message methods to get detailed information about
  3459. // the error.
  3460. //
  3461. // See the AWS API reference guide for AWS WAFV2's
  3462. // API operation ListManagedRuleSets for usage and error information.
  3463. //
  3464. // Returned Error Types:
  3465. //
  3466. // - WAFInternalErrorException
  3467. // Your request is valid, but WAF couldn’t perform the operation because of
  3468. // a system problem. Retry your request.
  3469. //
  3470. // - WAFInvalidParameterException
  3471. // The operation failed because WAF didn't recognize a parameter in the request.
  3472. // For example:
  3473. //
  3474. // - You specified a parameter name or value that isn't valid.
  3475. //
  3476. // - Your nested statement isn't valid. You might have tried to nest a statement
  3477. // that can’t be nested.
  3478. //
  3479. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3480. // types available at DefaultAction.
  3481. //
  3482. // - Your request references an ARN that is malformed, or corresponds to
  3483. // a resource with which a web ACL can't be associated.
  3484. //
  3485. // - WAFInvalidOperationException
  3486. // The operation isn't valid.
  3487. //
  3488. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListManagedRuleSets
  3489. func (c *WAFV2) ListManagedRuleSets(input *ListManagedRuleSetsInput) (*ListManagedRuleSetsOutput, error) {
  3490. req, out := c.ListManagedRuleSetsRequest(input)
  3491. return out, req.Send()
  3492. }
  3493. // ListManagedRuleSetsWithContext is the same as ListManagedRuleSets with the addition of
  3494. // the ability to pass a context and additional request options.
  3495. //
  3496. // See ListManagedRuleSets for details on how to use this API operation.
  3497. //
  3498. // The context must be non-nil and will be used for request cancellation. If
  3499. // the context is nil a panic will occur. In the future the SDK may create
  3500. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3501. // for more information on using Contexts.
  3502. func (c *WAFV2) ListManagedRuleSetsWithContext(ctx aws.Context, input *ListManagedRuleSetsInput, opts ...request.Option) (*ListManagedRuleSetsOutput, error) {
  3503. req, out := c.ListManagedRuleSetsRequest(input)
  3504. req.SetContext(ctx)
  3505. req.ApplyOptions(opts...)
  3506. return out, req.Send()
  3507. }
  3508. const opListMobileSdkReleases = "ListMobileSdkReleases"
  3509. // ListMobileSdkReleasesRequest generates a "aws/request.Request" representing the
  3510. // client's request for the ListMobileSdkReleases operation. The "output" return
  3511. // value will be populated with the request's response once the request completes
  3512. // successfully.
  3513. //
  3514. // Use "Send" method on the returned Request to send the API call to the service.
  3515. // the "output" return value is not valid until after Send returns without error.
  3516. //
  3517. // See ListMobileSdkReleases for more information on using the ListMobileSdkReleases
  3518. // API call, and error handling.
  3519. //
  3520. // This method is useful when you want to inject custom logic or configuration
  3521. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3522. //
  3523. // // Example sending a request using the ListMobileSdkReleasesRequest method.
  3524. // req, resp := client.ListMobileSdkReleasesRequest(params)
  3525. //
  3526. // err := req.Send()
  3527. // if err == nil { // resp is now filled
  3528. // fmt.Println(resp)
  3529. // }
  3530. //
  3531. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListMobileSdkReleases
  3532. func (c *WAFV2) ListMobileSdkReleasesRequest(input *ListMobileSdkReleasesInput) (req *request.Request, output *ListMobileSdkReleasesOutput) {
  3533. op := &request.Operation{
  3534. Name: opListMobileSdkReleases,
  3535. HTTPMethod: "POST",
  3536. HTTPPath: "/",
  3537. }
  3538. if input == nil {
  3539. input = &ListMobileSdkReleasesInput{}
  3540. }
  3541. output = &ListMobileSdkReleasesOutput{}
  3542. req = c.newRequest(op, input, output)
  3543. return
  3544. }
  3545. // ListMobileSdkReleases API operation for AWS WAFV2.
  3546. //
  3547. // Retrieves a list of the available releases for the mobile SDK and the specified
  3548. // device platform.
  3549. //
  3550. // The mobile SDK is not generally available. Customers who have access to the
  3551. // mobile SDK can use it to establish and manage WAF tokens for use in HTTP(S)
  3552. // requests from a mobile device to WAF. For more information, see WAF client
  3553. // application integration (https://docs.aws.amazon.com/waf/latest/developerguide/waf-application-integration.html)
  3554. // in the WAF Developer Guide.
  3555. //
  3556. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3557. // with awserr.Error's Code and Message methods to get detailed information about
  3558. // the error.
  3559. //
  3560. // See the AWS API reference guide for AWS WAFV2's
  3561. // API operation ListMobileSdkReleases for usage and error information.
  3562. //
  3563. // Returned Error Types:
  3564. //
  3565. // - WAFInternalErrorException
  3566. // Your request is valid, but WAF couldn’t perform the operation because of
  3567. // a system problem. Retry your request.
  3568. //
  3569. // - WAFInvalidParameterException
  3570. // The operation failed because WAF didn't recognize a parameter in the request.
  3571. // For example:
  3572. //
  3573. // - You specified a parameter name or value that isn't valid.
  3574. //
  3575. // - Your nested statement isn't valid. You might have tried to nest a statement
  3576. // that can’t be nested.
  3577. //
  3578. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3579. // types available at DefaultAction.
  3580. //
  3581. // - Your request references an ARN that is malformed, or corresponds to
  3582. // a resource with which a web ACL can't be associated.
  3583. //
  3584. // - WAFInvalidOperationException
  3585. // The operation isn't valid.
  3586. //
  3587. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListMobileSdkReleases
  3588. func (c *WAFV2) ListMobileSdkReleases(input *ListMobileSdkReleasesInput) (*ListMobileSdkReleasesOutput, error) {
  3589. req, out := c.ListMobileSdkReleasesRequest(input)
  3590. return out, req.Send()
  3591. }
  3592. // ListMobileSdkReleasesWithContext is the same as ListMobileSdkReleases with the addition of
  3593. // the ability to pass a context and additional request options.
  3594. //
  3595. // See ListMobileSdkReleases for details on how to use this API operation.
  3596. //
  3597. // The context must be non-nil and will be used for request cancellation. If
  3598. // the context is nil a panic will occur. In the future the SDK may create
  3599. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3600. // for more information on using Contexts.
  3601. func (c *WAFV2) ListMobileSdkReleasesWithContext(ctx aws.Context, input *ListMobileSdkReleasesInput, opts ...request.Option) (*ListMobileSdkReleasesOutput, error) {
  3602. req, out := c.ListMobileSdkReleasesRequest(input)
  3603. req.SetContext(ctx)
  3604. req.ApplyOptions(opts...)
  3605. return out, req.Send()
  3606. }
  3607. const opListRegexPatternSets = "ListRegexPatternSets"
  3608. // ListRegexPatternSetsRequest generates a "aws/request.Request" representing the
  3609. // client's request for the ListRegexPatternSets operation. The "output" return
  3610. // value will be populated with the request's response once the request completes
  3611. // successfully.
  3612. //
  3613. // Use "Send" method on the returned Request to send the API call to the service.
  3614. // the "output" return value is not valid until after Send returns without error.
  3615. //
  3616. // See ListRegexPatternSets for more information on using the ListRegexPatternSets
  3617. // API call, and error handling.
  3618. //
  3619. // This method is useful when you want to inject custom logic or configuration
  3620. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3621. //
  3622. // // Example sending a request using the ListRegexPatternSetsRequest method.
  3623. // req, resp := client.ListRegexPatternSetsRequest(params)
  3624. //
  3625. // err := req.Send()
  3626. // if err == nil { // resp is now filled
  3627. // fmt.Println(resp)
  3628. // }
  3629. //
  3630. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRegexPatternSets
  3631. func (c *WAFV2) ListRegexPatternSetsRequest(input *ListRegexPatternSetsInput) (req *request.Request, output *ListRegexPatternSetsOutput) {
  3632. op := &request.Operation{
  3633. Name: opListRegexPatternSets,
  3634. HTTPMethod: "POST",
  3635. HTTPPath: "/",
  3636. }
  3637. if input == nil {
  3638. input = &ListRegexPatternSetsInput{}
  3639. }
  3640. output = &ListRegexPatternSetsOutput{}
  3641. req = c.newRequest(op, input, output)
  3642. return
  3643. }
  3644. // ListRegexPatternSets API operation for AWS WAFV2.
  3645. //
  3646. // Retrieves an array of RegexPatternSetSummary objects for the regex pattern
  3647. // sets that you manage.
  3648. //
  3649. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3650. // with awserr.Error's Code and Message methods to get detailed information about
  3651. // the error.
  3652. //
  3653. // See the AWS API reference guide for AWS WAFV2's
  3654. // API operation ListRegexPatternSets for usage and error information.
  3655. //
  3656. // Returned Error Types:
  3657. //
  3658. // - WAFInternalErrorException
  3659. // Your request is valid, but WAF couldn’t perform the operation because of
  3660. // a system problem. Retry your request.
  3661. //
  3662. // - WAFInvalidParameterException
  3663. // The operation failed because WAF didn't recognize a parameter in the request.
  3664. // For example:
  3665. //
  3666. // - You specified a parameter name or value that isn't valid.
  3667. //
  3668. // - Your nested statement isn't valid. You might have tried to nest a statement
  3669. // that can’t be nested.
  3670. //
  3671. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3672. // types available at DefaultAction.
  3673. //
  3674. // - Your request references an ARN that is malformed, or corresponds to
  3675. // a resource with which a web ACL can't be associated.
  3676. //
  3677. // - WAFInvalidOperationException
  3678. // The operation isn't valid.
  3679. //
  3680. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRegexPatternSets
  3681. func (c *WAFV2) ListRegexPatternSets(input *ListRegexPatternSetsInput) (*ListRegexPatternSetsOutput, error) {
  3682. req, out := c.ListRegexPatternSetsRequest(input)
  3683. return out, req.Send()
  3684. }
  3685. // ListRegexPatternSetsWithContext is the same as ListRegexPatternSets with the addition of
  3686. // the ability to pass a context and additional request options.
  3687. //
  3688. // See ListRegexPatternSets for details on how to use this API operation.
  3689. //
  3690. // The context must be non-nil and will be used for request cancellation. If
  3691. // the context is nil a panic will occur. In the future the SDK may create
  3692. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3693. // for more information on using Contexts.
  3694. func (c *WAFV2) ListRegexPatternSetsWithContext(ctx aws.Context, input *ListRegexPatternSetsInput, opts ...request.Option) (*ListRegexPatternSetsOutput, error) {
  3695. req, out := c.ListRegexPatternSetsRequest(input)
  3696. req.SetContext(ctx)
  3697. req.ApplyOptions(opts...)
  3698. return out, req.Send()
  3699. }
  3700. const opListResourcesForWebACL = "ListResourcesForWebACL"
  3701. // ListResourcesForWebACLRequest generates a "aws/request.Request" representing the
  3702. // client's request for the ListResourcesForWebACL operation. The "output" return
  3703. // value will be populated with the request's response once the request completes
  3704. // successfully.
  3705. //
  3706. // Use "Send" method on the returned Request to send the API call to the service.
  3707. // the "output" return value is not valid until after Send returns without error.
  3708. //
  3709. // See ListResourcesForWebACL for more information on using the ListResourcesForWebACL
  3710. // API call, and error handling.
  3711. //
  3712. // This method is useful when you want to inject custom logic or configuration
  3713. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3714. //
  3715. // // Example sending a request using the ListResourcesForWebACLRequest method.
  3716. // req, resp := client.ListResourcesForWebACLRequest(params)
  3717. //
  3718. // err := req.Send()
  3719. // if err == nil { // resp is now filled
  3720. // fmt.Println(resp)
  3721. // }
  3722. //
  3723. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListResourcesForWebACL
  3724. func (c *WAFV2) ListResourcesForWebACLRequest(input *ListResourcesForWebACLInput) (req *request.Request, output *ListResourcesForWebACLOutput) {
  3725. op := &request.Operation{
  3726. Name: opListResourcesForWebACL,
  3727. HTTPMethod: "POST",
  3728. HTTPPath: "/",
  3729. }
  3730. if input == nil {
  3731. input = &ListResourcesForWebACLInput{}
  3732. }
  3733. output = &ListResourcesForWebACLOutput{}
  3734. req = c.newRequest(op, input, output)
  3735. return
  3736. }
  3737. // ListResourcesForWebACL API operation for AWS WAFV2.
  3738. //
  3739. // Retrieves an array of the Amazon Resource Names (ARNs) for the regional resources
  3740. // that are associated with the specified web ACL. If you want the list of Amazon
  3741. // CloudFront resources, use the CloudFront call ListDistributionsByWebACLId.
  3742. //
  3743. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3744. // with awserr.Error's Code and Message methods to get detailed information about
  3745. // the error.
  3746. //
  3747. // See the AWS API reference guide for AWS WAFV2's
  3748. // API operation ListResourcesForWebACL for usage and error information.
  3749. //
  3750. // Returned Error Types:
  3751. //
  3752. // - WAFInternalErrorException
  3753. // Your request is valid, but WAF couldn’t perform the operation because of
  3754. // a system problem. Retry your request.
  3755. //
  3756. // - WAFNonexistentItemException
  3757. // WAF couldn’t perform the operation because your resource doesn't exist.
  3758. // If you've just created a resource that you're using in this operation, you
  3759. // might just need to wait a few minutes. It can take from a few seconds to
  3760. // a number of minutes for changes to propagate.
  3761. //
  3762. // - WAFInvalidParameterException
  3763. // The operation failed because WAF didn't recognize a parameter in the request.
  3764. // For example:
  3765. //
  3766. // - You specified a parameter name or value that isn't valid.
  3767. //
  3768. // - Your nested statement isn't valid. You might have tried to nest a statement
  3769. // that can’t be nested.
  3770. //
  3771. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3772. // types available at DefaultAction.
  3773. //
  3774. // - Your request references an ARN that is malformed, or corresponds to
  3775. // a resource with which a web ACL can't be associated.
  3776. //
  3777. // - WAFInvalidOperationException
  3778. // The operation isn't valid.
  3779. //
  3780. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListResourcesForWebACL
  3781. func (c *WAFV2) ListResourcesForWebACL(input *ListResourcesForWebACLInput) (*ListResourcesForWebACLOutput, error) {
  3782. req, out := c.ListResourcesForWebACLRequest(input)
  3783. return out, req.Send()
  3784. }
  3785. // ListResourcesForWebACLWithContext is the same as ListResourcesForWebACL with the addition of
  3786. // the ability to pass a context and additional request options.
  3787. //
  3788. // See ListResourcesForWebACL for details on how to use this API operation.
  3789. //
  3790. // The context must be non-nil and will be used for request cancellation. If
  3791. // the context is nil a panic will occur. In the future the SDK may create
  3792. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3793. // for more information on using Contexts.
  3794. func (c *WAFV2) ListResourcesForWebACLWithContext(ctx aws.Context, input *ListResourcesForWebACLInput, opts ...request.Option) (*ListResourcesForWebACLOutput, error) {
  3795. req, out := c.ListResourcesForWebACLRequest(input)
  3796. req.SetContext(ctx)
  3797. req.ApplyOptions(opts...)
  3798. return out, req.Send()
  3799. }
  3800. const opListRuleGroups = "ListRuleGroups"
  3801. // ListRuleGroupsRequest generates a "aws/request.Request" representing the
  3802. // client's request for the ListRuleGroups operation. The "output" return
  3803. // value will be populated with the request's response once the request completes
  3804. // successfully.
  3805. //
  3806. // Use "Send" method on the returned Request to send the API call to the service.
  3807. // the "output" return value is not valid until after Send returns without error.
  3808. //
  3809. // See ListRuleGroups for more information on using the ListRuleGroups
  3810. // API call, and error handling.
  3811. //
  3812. // This method is useful when you want to inject custom logic or configuration
  3813. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3814. //
  3815. // // Example sending a request using the ListRuleGroupsRequest method.
  3816. // req, resp := client.ListRuleGroupsRequest(params)
  3817. //
  3818. // err := req.Send()
  3819. // if err == nil { // resp is now filled
  3820. // fmt.Println(resp)
  3821. // }
  3822. //
  3823. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRuleGroups
  3824. func (c *WAFV2) ListRuleGroupsRequest(input *ListRuleGroupsInput) (req *request.Request, output *ListRuleGroupsOutput) {
  3825. op := &request.Operation{
  3826. Name: opListRuleGroups,
  3827. HTTPMethod: "POST",
  3828. HTTPPath: "/",
  3829. }
  3830. if input == nil {
  3831. input = &ListRuleGroupsInput{}
  3832. }
  3833. output = &ListRuleGroupsOutput{}
  3834. req = c.newRequest(op, input, output)
  3835. return
  3836. }
  3837. // ListRuleGroups API operation for AWS WAFV2.
  3838. //
  3839. // Retrieves an array of RuleGroupSummary objects for the rule groups that you
  3840. // manage.
  3841. //
  3842. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3843. // with awserr.Error's Code and Message methods to get detailed information about
  3844. // the error.
  3845. //
  3846. // See the AWS API reference guide for AWS WAFV2's
  3847. // API operation ListRuleGroups for usage and error information.
  3848. //
  3849. // Returned Error Types:
  3850. //
  3851. // - WAFInternalErrorException
  3852. // Your request is valid, but WAF couldn’t perform the operation because of
  3853. // a system problem. Retry your request.
  3854. //
  3855. // - WAFInvalidParameterException
  3856. // The operation failed because WAF didn't recognize a parameter in the request.
  3857. // For example:
  3858. //
  3859. // - You specified a parameter name or value that isn't valid.
  3860. //
  3861. // - Your nested statement isn't valid. You might have tried to nest a statement
  3862. // that can’t be nested.
  3863. //
  3864. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3865. // types available at DefaultAction.
  3866. //
  3867. // - Your request references an ARN that is malformed, or corresponds to
  3868. // a resource with which a web ACL can't be associated.
  3869. //
  3870. // - WAFInvalidOperationException
  3871. // The operation isn't valid.
  3872. //
  3873. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRuleGroups
  3874. func (c *WAFV2) ListRuleGroups(input *ListRuleGroupsInput) (*ListRuleGroupsOutput, error) {
  3875. req, out := c.ListRuleGroupsRequest(input)
  3876. return out, req.Send()
  3877. }
  3878. // ListRuleGroupsWithContext is the same as ListRuleGroups with the addition of
  3879. // the ability to pass a context and additional request options.
  3880. //
  3881. // See ListRuleGroups for details on how to use this API operation.
  3882. //
  3883. // The context must be non-nil and will be used for request cancellation. If
  3884. // the context is nil a panic will occur. In the future the SDK may create
  3885. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3886. // for more information on using Contexts.
  3887. func (c *WAFV2) ListRuleGroupsWithContext(ctx aws.Context, input *ListRuleGroupsInput, opts ...request.Option) (*ListRuleGroupsOutput, error) {
  3888. req, out := c.ListRuleGroupsRequest(input)
  3889. req.SetContext(ctx)
  3890. req.ApplyOptions(opts...)
  3891. return out, req.Send()
  3892. }
  3893. const opListTagsForResource = "ListTagsForResource"
  3894. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  3895. // client's request for the ListTagsForResource operation. The "output" return
  3896. // value will be populated with the request's response once the request completes
  3897. // successfully.
  3898. //
  3899. // Use "Send" method on the returned Request to send the API call to the service.
  3900. // the "output" return value is not valid until after Send returns without error.
  3901. //
  3902. // See ListTagsForResource for more information on using the ListTagsForResource
  3903. // API call, and error handling.
  3904. //
  3905. // This method is useful when you want to inject custom logic or configuration
  3906. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3907. //
  3908. // // Example sending a request using the ListTagsForResourceRequest method.
  3909. // req, resp := client.ListTagsForResourceRequest(params)
  3910. //
  3911. // err := req.Send()
  3912. // if err == nil { // resp is now filled
  3913. // fmt.Println(resp)
  3914. // }
  3915. //
  3916. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListTagsForResource
  3917. func (c *WAFV2) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  3918. op := &request.Operation{
  3919. Name: opListTagsForResource,
  3920. HTTPMethod: "POST",
  3921. HTTPPath: "/",
  3922. }
  3923. if input == nil {
  3924. input = &ListTagsForResourceInput{}
  3925. }
  3926. output = &ListTagsForResourceOutput{}
  3927. req = c.newRequest(op, input, output)
  3928. return
  3929. }
  3930. // ListTagsForResource API operation for AWS WAFV2.
  3931. //
  3932. // Retrieves the TagInfoForResource for the specified resource. Tags are key:value
  3933. // pairs that you can use to categorize and manage your resources, for purposes
  3934. // like billing. For example, you might set the tag key to "customer" and the
  3935. // value to the customer name or ID. You can specify one or more tags to add
  3936. // to each Amazon Web Services resource, up to 50 tags for a resource.
  3937. //
  3938. // You can tag the Amazon Web Services resources that you manage through WAF:
  3939. // web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage
  3940. // or view tags through the WAF console.
  3941. //
  3942. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3943. // with awserr.Error's Code and Message methods to get detailed information about
  3944. // the error.
  3945. //
  3946. // See the AWS API reference guide for AWS WAFV2's
  3947. // API operation ListTagsForResource for usage and error information.
  3948. //
  3949. // Returned Error Types:
  3950. //
  3951. // - WAFInternalErrorException
  3952. // Your request is valid, but WAF couldn’t perform the operation because of
  3953. // a system problem. Retry your request.
  3954. //
  3955. // - WAFInvalidParameterException
  3956. // The operation failed because WAF didn't recognize a parameter in the request.
  3957. // For example:
  3958. //
  3959. // - You specified a parameter name or value that isn't valid.
  3960. //
  3961. // - Your nested statement isn't valid. You might have tried to nest a statement
  3962. // that can’t be nested.
  3963. //
  3964. // - You tried to update a WebACL with a DefaultAction that isn't among the
  3965. // types available at DefaultAction.
  3966. //
  3967. // - Your request references an ARN that is malformed, or corresponds to
  3968. // a resource with which a web ACL can't be associated.
  3969. //
  3970. // - WAFNonexistentItemException
  3971. // WAF couldn’t perform the operation because your resource doesn't exist.
  3972. // If you've just created a resource that you're using in this operation, you
  3973. // might just need to wait a few minutes. It can take from a few seconds to
  3974. // a number of minutes for changes to propagate.
  3975. //
  3976. // - WAFTagOperationException
  3977. // An error occurred during the tagging operation. Retry your request.
  3978. //
  3979. // - WAFTagOperationInternalErrorException
  3980. // WAF couldn’t perform your tagging operation because of an internal error.
  3981. // Retry your request.
  3982. //
  3983. // - WAFInvalidOperationException
  3984. // The operation isn't valid.
  3985. //
  3986. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListTagsForResource
  3987. func (c *WAFV2) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  3988. req, out := c.ListTagsForResourceRequest(input)
  3989. return out, req.Send()
  3990. }
  3991. // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
  3992. // the ability to pass a context and additional request options.
  3993. //
  3994. // See ListTagsForResource for details on how to use this API operation.
  3995. //
  3996. // The context must be non-nil and will be used for request cancellation. If
  3997. // the context is nil a panic will occur. In the future the SDK may create
  3998. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3999. // for more information on using Contexts.
  4000. func (c *WAFV2) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
  4001. req, out := c.ListTagsForResourceRequest(input)
  4002. req.SetContext(ctx)
  4003. req.ApplyOptions(opts...)
  4004. return out, req.Send()
  4005. }
  4006. const opListWebACLs = "ListWebACLs"
  4007. // ListWebACLsRequest generates a "aws/request.Request" representing the
  4008. // client's request for the ListWebACLs operation. The "output" return
  4009. // value will be populated with the request's response once the request completes
  4010. // successfully.
  4011. //
  4012. // Use "Send" method on the returned Request to send the API call to the service.
  4013. // the "output" return value is not valid until after Send returns without error.
  4014. //
  4015. // See ListWebACLs for more information on using the ListWebACLs
  4016. // API call, and error handling.
  4017. //
  4018. // This method is useful when you want to inject custom logic or configuration
  4019. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4020. //
  4021. // // Example sending a request using the ListWebACLsRequest method.
  4022. // req, resp := client.ListWebACLsRequest(params)
  4023. //
  4024. // err := req.Send()
  4025. // if err == nil { // resp is now filled
  4026. // fmt.Println(resp)
  4027. // }
  4028. //
  4029. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListWebACLs
  4030. func (c *WAFV2) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, output *ListWebACLsOutput) {
  4031. op := &request.Operation{
  4032. Name: opListWebACLs,
  4033. HTTPMethod: "POST",
  4034. HTTPPath: "/",
  4035. }
  4036. if input == nil {
  4037. input = &ListWebACLsInput{}
  4038. }
  4039. output = &ListWebACLsOutput{}
  4040. req = c.newRequest(op, input, output)
  4041. return
  4042. }
  4043. // ListWebACLs API operation for AWS WAFV2.
  4044. //
  4045. // Retrieves an array of WebACLSummary objects for the web ACLs that you manage.
  4046. //
  4047. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4048. // with awserr.Error's Code and Message methods to get detailed information about
  4049. // the error.
  4050. //
  4051. // See the AWS API reference guide for AWS WAFV2's
  4052. // API operation ListWebACLs for usage and error information.
  4053. //
  4054. // Returned Error Types:
  4055. //
  4056. // - WAFInternalErrorException
  4057. // Your request is valid, but WAF couldn’t perform the operation because of
  4058. // a system problem. Retry your request.
  4059. //
  4060. // - WAFInvalidParameterException
  4061. // The operation failed because WAF didn't recognize a parameter in the request.
  4062. // For example:
  4063. //
  4064. // - You specified a parameter name or value that isn't valid.
  4065. //
  4066. // - Your nested statement isn't valid. You might have tried to nest a statement
  4067. // that can’t be nested.
  4068. //
  4069. // - You tried to update a WebACL with a DefaultAction that isn't among the
  4070. // types available at DefaultAction.
  4071. //
  4072. // - Your request references an ARN that is malformed, or corresponds to
  4073. // a resource with which a web ACL can't be associated.
  4074. //
  4075. // - WAFInvalidOperationException
  4076. // The operation isn't valid.
  4077. //
  4078. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListWebACLs
  4079. func (c *WAFV2) ListWebACLs(input *ListWebACLsInput) (*ListWebACLsOutput, error) {
  4080. req, out := c.ListWebACLsRequest(input)
  4081. return out, req.Send()
  4082. }
  4083. // ListWebACLsWithContext is the same as ListWebACLs with the addition of
  4084. // the ability to pass a context and additional request options.
  4085. //
  4086. // See ListWebACLs for details on how to use this API operation.
  4087. //
  4088. // The context must be non-nil and will be used for request cancellation. If
  4089. // the context is nil a panic will occur. In the future the SDK may create
  4090. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4091. // for more information on using Contexts.
  4092. func (c *WAFV2) ListWebACLsWithContext(ctx aws.Context, input *ListWebACLsInput, opts ...request.Option) (*ListWebACLsOutput, error) {
  4093. req, out := c.ListWebACLsRequest(input)
  4094. req.SetContext(ctx)
  4095. req.ApplyOptions(opts...)
  4096. return out, req.Send()
  4097. }
  4098. const opPutLoggingConfiguration = "PutLoggingConfiguration"
  4099. // PutLoggingConfigurationRequest generates a "aws/request.Request" representing the
  4100. // client's request for the PutLoggingConfiguration operation. The "output" return
  4101. // value will be populated with the request's response once the request completes
  4102. // successfully.
  4103. //
  4104. // Use "Send" method on the returned Request to send the API call to the service.
  4105. // the "output" return value is not valid until after Send returns without error.
  4106. //
  4107. // See PutLoggingConfiguration for more information on using the PutLoggingConfiguration
  4108. // API call, and error handling.
  4109. //
  4110. // This method is useful when you want to inject custom logic or configuration
  4111. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4112. //
  4113. // // Example sending a request using the PutLoggingConfigurationRequest method.
  4114. // req, resp := client.PutLoggingConfigurationRequest(params)
  4115. //
  4116. // err := req.Send()
  4117. // if err == nil { // resp is now filled
  4118. // fmt.Println(resp)
  4119. // }
  4120. //
  4121. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration
  4122. func (c *WAFV2) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput) (req *request.Request, output *PutLoggingConfigurationOutput) {
  4123. op := &request.Operation{
  4124. Name: opPutLoggingConfiguration,
  4125. HTTPMethod: "POST",
  4126. HTTPPath: "/",
  4127. }
  4128. if input == nil {
  4129. input = &PutLoggingConfigurationInput{}
  4130. }
  4131. output = &PutLoggingConfigurationOutput{}
  4132. req = c.newRequest(op, input, output)
  4133. return
  4134. }
  4135. // PutLoggingConfiguration API operation for AWS WAFV2.
  4136. //
  4137. // Enables the specified LoggingConfiguration, to start logging from a web ACL,
  4138. // according to the configuration provided.
  4139. //
  4140. // This operation completely replaces any mutable specifications that you already
  4141. // have for a logging configuration with the ones that you provide to this call.
  4142. //
  4143. // To modify an existing logging configuration, do the following:
  4144. //
  4145. // # Retrieve it by calling GetLoggingConfiguration
  4146. //
  4147. // # Update its settings as needed
  4148. //
  4149. // # Provide the complete logging configuration specification to this call
  4150. //
  4151. // You can define one logging destination per web ACL.
  4152. //
  4153. // You can access information about the traffic that WAF inspects using the
  4154. // following steps:
  4155. //
  4156. // Create your logging destination. You can use an Amazon CloudWatch Logs log
  4157. // group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon
  4158. // Kinesis Data Firehose.
  4159. //
  4160. // The name that you give the destination must start with aws-waf-logs-. Depending
  4161. // on the type of destination, you might need to configure additional settings
  4162. // or permissions.
  4163. //
  4164. // For configuration requirements and pricing information for each destination
  4165. // type, see Logging web ACL traffic (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
  4166. // in the WAF Developer Guide.
  4167. //
  4168. // Associate your logging destination to your web ACL using a PutLoggingConfiguration
  4169. // request.
  4170. //
  4171. // When you successfully enable logging using a PutLoggingConfiguration request,
  4172. // WAF creates an additional role or policy that is required to write logs to
  4173. // the logging destination. For an Amazon CloudWatch Logs log group, WAF creates
  4174. // a resource policy on the log group. For an Amazon S3 bucket, WAF creates
  4175. // a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked
  4176. // role.
  4177. //
  4178. // For additional information about web ACL logging, see Logging web ACL traffic
  4179. // information (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
  4180. // in the WAF Developer Guide.
  4181. //
  4182. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4183. // with awserr.Error's Code and Message methods to get detailed information about
  4184. // the error.
  4185. //
  4186. // See the AWS API reference guide for AWS WAFV2's
  4187. // API operation PutLoggingConfiguration for usage and error information.
  4188. //
  4189. // Returned Error Types:
  4190. //
  4191. // - WAFInternalErrorException
  4192. // Your request is valid, but WAF couldn’t perform the operation because of
  4193. // a system problem. Retry your request.
  4194. //
  4195. // - WAFNonexistentItemException
  4196. // WAF couldn’t perform the operation because your resource doesn't exist.
  4197. // If you've just created a resource that you're using in this operation, you
  4198. // might just need to wait a few minutes. It can take from a few seconds to
  4199. // a number of minutes for changes to propagate.
  4200. //
  4201. // - WAFOptimisticLockException
  4202. // WAF couldn’t save your changes because you tried to update or delete a
  4203. // resource that has changed since you last retrieved it. Get the resource again,
  4204. // make any changes you need to make to the new copy, and retry your operation.
  4205. //
  4206. // - WAFServiceLinkedRoleErrorException
  4207. // WAF is not able to access the service linked role. This can be caused by
  4208. // a previous PutLoggingConfiguration request, which can lock the service linked
  4209. // role for about 20 seconds. Please try your request again. The service linked
  4210. // role can also be locked by a previous DeleteServiceLinkedRole request, which
  4211. // can lock the role for 15 minutes or more. If you recently made a call to
  4212. // DeleteServiceLinkedRole, wait at least 15 minutes and try the request again.
  4213. // If you receive this same exception again, you will have to wait additional
  4214. // time until the role is unlocked.
  4215. //
  4216. // - WAFInvalidParameterException
  4217. // The operation failed because WAF didn't recognize a parameter in the request.
  4218. // For example:
  4219. //
  4220. // - You specified a parameter name or value that isn't valid.
  4221. //
  4222. // - Your nested statement isn't valid. You might have tried to nest a statement
  4223. // that can’t be nested.
  4224. //
  4225. // - You tried to update a WebACL with a DefaultAction that isn't among the
  4226. // types available at DefaultAction.
  4227. //
  4228. // - Your request references an ARN that is malformed, or corresponds to
  4229. // a resource with which a web ACL can't be associated.
  4230. //
  4231. // - WAFInvalidOperationException
  4232. // The operation isn't valid.
  4233. //
  4234. // - WAFLimitsExceededException
  4235. // WAF couldn’t perform the operation because you exceeded your resource limit.
  4236. // For example, the maximum number of WebACL objects that you can create for
  4237. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  4238. // in the WAF Developer Guide.
  4239. //
  4240. // - WAFLogDestinationPermissionIssueException
  4241. // The operation failed because you don't have the permissions that your logging
  4242. // configuration requires. For information, see Logging web ACL traffic information
  4243. // (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html) in the
  4244. // WAF Developer Guide.
  4245. //
  4246. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration
  4247. func (c *WAFV2) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) {
  4248. req, out := c.PutLoggingConfigurationRequest(input)
  4249. return out, req.Send()
  4250. }
  4251. // PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of
  4252. // the ability to pass a context and additional request options.
  4253. //
  4254. // See PutLoggingConfiguration for details on how to use this API operation.
  4255. //
  4256. // The context must be non-nil and will be used for request cancellation. If
  4257. // the context is nil a panic will occur. In the future the SDK may create
  4258. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4259. // for more information on using Contexts.
  4260. func (c *WAFV2) PutLoggingConfigurationWithContext(ctx aws.Context, input *PutLoggingConfigurationInput, opts ...request.Option) (*PutLoggingConfigurationOutput, error) {
  4261. req, out := c.PutLoggingConfigurationRequest(input)
  4262. req.SetContext(ctx)
  4263. req.ApplyOptions(opts...)
  4264. return out, req.Send()
  4265. }
  4266. const opPutManagedRuleSetVersions = "PutManagedRuleSetVersions"
  4267. // PutManagedRuleSetVersionsRequest generates a "aws/request.Request" representing the
  4268. // client's request for the PutManagedRuleSetVersions operation. The "output" return
  4269. // value will be populated with the request's response once the request completes
  4270. // successfully.
  4271. //
  4272. // Use "Send" method on the returned Request to send the API call to the service.
  4273. // the "output" return value is not valid until after Send returns without error.
  4274. //
  4275. // See PutManagedRuleSetVersions for more information on using the PutManagedRuleSetVersions
  4276. // API call, and error handling.
  4277. //
  4278. // This method is useful when you want to inject custom logic or configuration
  4279. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4280. //
  4281. // // Example sending a request using the PutManagedRuleSetVersionsRequest method.
  4282. // req, resp := client.PutManagedRuleSetVersionsRequest(params)
  4283. //
  4284. // err := req.Send()
  4285. // if err == nil { // resp is now filled
  4286. // fmt.Println(resp)
  4287. // }
  4288. //
  4289. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutManagedRuleSetVersions
  4290. func (c *WAFV2) PutManagedRuleSetVersionsRequest(input *PutManagedRuleSetVersionsInput) (req *request.Request, output *PutManagedRuleSetVersionsOutput) {
  4291. op := &request.Operation{
  4292. Name: opPutManagedRuleSetVersions,
  4293. HTTPMethod: "POST",
  4294. HTTPPath: "/",
  4295. }
  4296. if input == nil {
  4297. input = &PutManagedRuleSetVersionsInput{}
  4298. }
  4299. output = &PutManagedRuleSetVersionsOutput{}
  4300. req = c.newRequest(op, input, output)
  4301. return
  4302. }
  4303. // PutManagedRuleSetVersions API operation for AWS WAFV2.
  4304. //
  4305. // Defines the versions of your managed rule set that you are offering to the
  4306. // customers. Customers see your offerings as managed rule groups with versioning.
  4307. //
  4308. // This is intended for use only by vendors of managed rule sets. Vendors are
  4309. // Amazon Web Services and Amazon Web Services Marketplace sellers.
  4310. //
  4311. // Vendors, you can use the managed rule set APIs to provide controlled rollout
  4312. // of your versioned managed rule group offerings for your customers. The APIs
  4313. // are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and
  4314. // UpdateManagedRuleSetVersionExpiryDate.
  4315. //
  4316. // Customers retrieve their managed rule group list by calling ListAvailableManagedRuleGroups.
  4317. // The name that you provide here for your managed rule set is the name the
  4318. // customer sees for the corresponding managed rule group. Customers can retrieve
  4319. // the available versions for a managed rule group by calling ListAvailableManagedRuleGroupVersions.
  4320. // You provide a rule group specification for each version. For each managed
  4321. // rule set, you must specify a version that you recommend using.
  4322. //
  4323. // To initiate the expiration of a managed rule group version, use UpdateManagedRuleSetVersionExpiryDate.
  4324. //
  4325. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4326. // with awserr.Error's Code and Message methods to get detailed information about
  4327. // the error.
  4328. //
  4329. // See the AWS API reference guide for AWS WAFV2's
  4330. // API operation PutManagedRuleSetVersions for usage and error information.
  4331. //
  4332. // Returned Error Types:
  4333. //
  4334. // - WAFInternalErrorException
  4335. // Your request is valid, but WAF couldn’t perform the operation because of
  4336. // a system problem. Retry your request.
  4337. //
  4338. // - WAFInvalidParameterException
  4339. // The operation failed because WAF didn't recognize a parameter in the request.
  4340. // For example:
  4341. //
  4342. // - You specified a parameter name or value that isn't valid.
  4343. //
  4344. // - Your nested statement isn't valid. You might have tried to nest a statement
  4345. // that can’t be nested.
  4346. //
  4347. // - You tried to update a WebACL with a DefaultAction that isn't among the
  4348. // types available at DefaultAction.
  4349. //
  4350. // - Your request references an ARN that is malformed, or corresponds to
  4351. // a resource with which a web ACL can't be associated.
  4352. //
  4353. // - WAFNonexistentItemException
  4354. // WAF couldn’t perform the operation because your resource doesn't exist.
  4355. // If you've just created a resource that you're using in this operation, you
  4356. // might just need to wait a few minutes. It can take from a few seconds to
  4357. // a number of minutes for changes to propagate.
  4358. //
  4359. // - WAFOptimisticLockException
  4360. // WAF couldn’t save your changes because you tried to update or delete a
  4361. // resource that has changed since you last retrieved it. Get the resource again,
  4362. // make any changes you need to make to the new copy, and retry your operation.
  4363. //
  4364. // - WAFInvalidOperationException
  4365. // The operation isn't valid.
  4366. //
  4367. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutManagedRuleSetVersions
  4368. func (c *WAFV2) PutManagedRuleSetVersions(input *PutManagedRuleSetVersionsInput) (*PutManagedRuleSetVersionsOutput, error) {
  4369. req, out := c.PutManagedRuleSetVersionsRequest(input)
  4370. return out, req.Send()
  4371. }
  4372. // PutManagedRuleSetVersionsWithContext is the same as PutManagedRuleSetVersions with the addition of
  4373. // the ability to pass a context and additional request options.
  4374. //
  4375. // See PutManagedRuleSetVersions for details on how to use this API operation.
  4376. //
  4377. // The context must be non-nil and will be used for request cancellation. If
  4378. // the context is nil a panic will occur. In the future the SDK may create
  4379. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4380. // for more information on using Contexts.
  4381. func (c *WAFV2) PutManagedRuleSetVersionsWithContext(ctx aws.Context, input *PutManagedRuleSetVersionsInput, opts ...request.Option) (*PutManagedRuleSetVersionsOutput, error) {
  4382. req, out := c.PutManagedRuleSetVersionsRequest(input)
  4383. req.SetContext(ctx)
  4384. req.ApplyOptions(opts...)
  4385. return out, req.Send()
  4386. }
  4387. const opPutPermissionPolicy = "PutPermissionPolicy"
  4388. // PutPermissionPolicyRequest generates a "aws/request.Request" representing the
  4389. // client's request for the PutPermissionPolicy operation. The "output" return
  4390. // value will be populated with the request's response once the request completes
  4391. // successfully.
  4392. //
  4393. // Use "Send" method on the returned Request to send the API call to the service.
  4394. // the "output" return value is not valid until after Send returns without error.
  4395. //
  4396. // See PutPermissionPolicy for more information on using the PutPermissionPolicy
  4397. // API call, and error handling.
  4398. //
  4399. // This method is useful when you want to inject custom logic or configuration
  4400. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4401. //
  4402. // // Example sending a request using the PutPermissionPolicyRequest method.
  4403. // req, resp := client.PutPermissionPolicyRequest(params)
  4404. //
  4405. // err := req.Send()
  4406. // if err == nil { // resp is now filled
  4407. // fmt.Println(resp)
  4408. // }
  4409. //
  4410. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutPermissionPolicy
  4411. func (c *WAFV2) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req *request.Request, output *PutPermissionPolicyOutput) {
  4412. op := &request.Operation{
  4413. Name: opPutPermissionPolicy,
  4414. HTTPMethod: "POST",
  4415. HTTPPath: "/",
  4416. }
  4417. if input == nil {
  4418. input = &PutPermissionPolicyInput{}
  4419. }
  4420. output = &PutPermissionPolicyOutput{}
  4421. req = c.newRequest(op, input, output)
  4422. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4423. return
  4424. }
  4425. // PutPermissionPolicy API operation for AWS WAFV2.
  4426. //
  4427. // Attaches an IAM policy to the specified resource. Use this to share a rule
  4428. // group across accounts.
  4429. //
  4430. // You must be the owner of the rule group to perform this operation.
  4431. //
  4432. // This action is subject to the following restrictions:
  4433. //
  4434. // - You can attach only one policy with each PutPermissionPolicy request.
  4435. //
  4436. // - The ARN in the request must be a valid WAF RuleGroup ARN and the rule
  4437. // group must exist in the same Region.
  4438. //
  4439. // - The user making the request must be the owner of the rule group.
  4440. //
  4441. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4442. // with awserr.Error's Code and Message methods to get detailed information about
  4443. // the error.
  4444. //
  4445. // See the AWS API reference guide for AWS WAFV2's
  4446. // API operation PutPermissionPolicy for usage and error information.
  4447. //
  4448. // Returned Error Types:
  4449. //
  4450. // - WAFNonexistentItemException
  4451. // WAF couldn’t perform the operation because your resource doesn't exist.
  4452. // If you've just created a resource that you're using in this operation, you
  4453. // might just need to wait a few minutes. It can take from a few seconds to
  4454. // a number of minutes for changes to propagate.
  4455. //
  4456. // - WAFInternalErrorException
  4457. // Your request is valid, but WAF couldn’t perform the operation because of
  4458. // a system problem. Retry your request.
  4459. //
  4460. // - WAFInvalidParameterException
  4461. // The operation failed because WAF didn't recognize a parameter in the request.
  4462. // For example:
  4463. //
  4464. // - You specified a parameter name or value that isn't valid.
  4465. //
  4466. // - Your nested statement isn't valid. You might have tried to nest a statement
  4467. // that can’t be nested.
  4468. //
  4469. // - You tried to update a WebACL with a DefaultAction that isn't among the
  4470. // types available at DefaultAction.
  4471. //
  4472. // - Your request references an ARN that is malformed, or corresponds to
  4473. // a resource with which a web ACL can't be associated.
  4474. //
  4475. // - WAFInvalidPermissionPolicyException
  4476. // The operation failed because the specified policy isn't in the proper format.
  4477. //
  4478. // The policy specifications must conform to the following:
  4479. //
  4480. // - The policy must be composed using IAM Policy version 2012-10-17 or version
  4481. // 2015-01-01.
  4482. //
  4483. // - The policy must include specifications for Effect, Action, and Principal.
  4484. //
  4485. // - Effect must specify Allow.
  4486. //
  4487. // - Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups
  4488. // and may optionally specify wafv2:GetRuleGroup. WAF rejects any extra actions
  4489. // or wildcard actions in the policy.
  4490. //
  4491. // - The policy must not include a Resource parameter.
  4492. //
  4493. // For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html).
  4494. //
  4495. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutPermissionPolicy
  4496. func (c *WAFV2) PutPermissionPolicy(input *PutPermissionPolicyInput) (*PutPermissionPolicyOutput, error) {
  4497. req, out := c.PutPermissionPolicyRequest(input)
  4498. return out, req.Send()
  4499. }
  4500. // PutPermissionPolicyWithContext is the same as PutPermissionPolicy with the addition of
  4501. // the ability to pass a context and additional request options.
  4502. //
  4503. // See PutPermissionPolicy for details on how to use this API operation.
  4504. //
  4505. // The context must be non-nil and will be used for request cancellation. If
  4506. // the context is nil a panic will occur. In the future the SDK may create
  4507. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4508. // for more information on using Contexts.
  4509. func (c *WAFV2) PutPermissionPolicyWithContext(ctx aws.Context, input *PutPermissionPolicyInput, opts ...request.Option) (*PutPermissionPolicyOutput, error) {
  4510. req, out := c.PutPermissionPolicyRequest(input)
  4511. req.SetContext(ctx)
  4512. req.ApplyOptions(opts...)
  4513. return out, req.Send()
  4514. }
  4515. const opTagResource = "TagResource"
  4516. // TagResourceRequest generates a "aws/request.Request" representing the
  4517. // client's request for the TagResource operation. The "output" return
  4518. // value will be populated with the request's response once the request completes
  4519. // successfully.
  4520. //
  4521. // Use "Send" method on the returned Request to send the API call to the service.
  4522. // the "output" return value is not valid until after Send returns without error.
  4523. //
  4524. // See TagResource for more information on using the TagResource
  4525. // API call, and error handling.
  4526. //
  4527. // This method is useful when you want to inject custom logic or configuration
  4528. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4529. //
  4530. // // Example sending a request using the TagResourceRequest method.
  4531. // req, resp := client.TagResourceRequest(params)
  4532. //
  4533. // err := req.Send()
  4534. // if err == nil { // resp is now filled
  4535. // fmt.Println(resp)
  4536. // }
  4537. //
  4538. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/TagResource
  4539. func (c *WAFV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  4540. op := &request.Operation{
  4541. Name: opTagResource,
  4542. HTTPMethod: "POST",
  4543. HTTPPath: "/",
  4544. }
  4545. if input == nil {
  4546. input = &TagResourceInput{}
  4547. }
  4548. output = &TagResourceOutput{}
  4549. req = c.newRequest(op, input, output)
  4550. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4551. return
  4552. }
  4553. // TagResource API operation for AWS WAFV2.
  4554. //
  4555. // Associates tags with the specified Amazon Web Services resource. Tags are
  4556. // key:value pairs that you can use to categorize and manage your resources,
  4557. // for purposes like billing. For example, you might set the tag key to "customer"
  4558. // and the value to the customer name or ID. You can specify one or more tags
  4559. // to add to each Amazon Web Services resource, up to 50 tags for a resource.
  4560. //
  4561. // You can tag the Amazon Web Services resources that you manage through WAF:
  4562. // web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage
  4563. // or view tags through the WAF console.
  4564. //
  4565. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4566. // with awserr.Error's Code and Message methods to get detailed information about
  4567. // the error.
  4568. //
  4569. // See the AWS API reference guide for AWS WAFV2's
  4570. // API operation TagResource for usage and error information.
  4571. //
  4572. // Returned Error Types:
  4573. //
  4574. // - WAFInternalErrorException
  4575. // Your request is valid, but WAF couldn’t perform the operation because of
  4576. // a system problem. Retry your request.
  4577. //
  4578. // - WAFInvalidParameterException
  4579. // The operation failed because WAF didn't recognize a parameter in the request.
  4580. // For example:
  4581. //
  4582. // - You specified a parameter name or value that isn't valid.
  4583. //
  4584. // - Your nested statement isn't valid. You might have tried to nest a statement
  4585. // that can’t be nested.
  4586. //
  4587. // - You tried to update a WebACL with a DefaultAction that isn't among the
  4588. // types available at DefaultAction.
  4589. //
  4590. // - Your request references an ARN that is malformed, or corresponds to
  4591. // a resource with which a web ACL can't be associated.
  4592. //
  4593. // - WAFLimitsExceededException
  4594. // WAF couldn’t perform the operation because you exceeded your resource limit.
  4595. // For example, the maximum number of WebACL objects that you can create for
  4596. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  4597. // in the WAF Developer Guide.
  4598. //
  4599. // - WAFNonexistentItemException
  4600. // WAF couldn’t perform the operation because your resource doesn't exist.
  4601. // If you've just created a resource that you're using in this operation, you
  4602. // might just need to wait a few minutes. It can take from a few seconds to
  4603. // a number of minutes for changes to propagate.
  4604. //
  4605. // - WAFTagOperationException
  4606. // An error occurred during the tagging operation. Retry your request.
  4607. //
  4608. // - WAFTagOperationInternalErrorException
  4609. // WAF couldn’t perform your tagging operation because of an internal error.
  4610. // Retry your request.
  4611. //
  4612. // - WAFInvalidOperationException
  4613. // The operation isn't valid.
  4614. //
  4615. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/TagResource
  4616. func (c *WAFV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  4617. req, out := c.TagResourceRequest(input)
  4618. return out, req.Send()
  4619. }
  4620. // TagResourceWithContext is the same as TagResource with the addition of
  4621. // the ability to pass a context and additional request options.
  4622. //
  4623. // See TagResource for details on how to use this API operation.
  4624. //
  4625. // The context must be non-nil and will be used for request cancellation. If
  4626. // the context is nil a panic will occur. In the future the SDK may create
  4627. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4628. // for more information on using Contexts.
  4629. func (c *WAFV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  4630. req, out := c.TagResourceRequest(input)
  4631. req.SetContext(ctx)
  4632. req.ApplyOptions(opts...)
  4633. return out, req.Send()
  4634. }
  4635. const opUntagResource = "UntagResource"
  4636. // UntagResourceRequest generates a "aws/request.Request" representing the
  4637. // client's request for the UntagResource operation. The "output" return
  4638. // value will be populated with the request's response once the request completes
  4639. // successfully.
  4640. //
  4641. // Use "Send" method on the returned Request to send the API call to the service.
  4642. // the "output" return value is not valid until after Send returns without error.
  4643. //
  4644. // See UntagResource for more information on using the UntagResource
  4645. // API call, and error handling.
  4646. //
  4647. // This method is useful when you want to inject custom logic or configuration
  4648. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4649. //
  4650. // // Example sending a request using the UntagResourceRequest method.
  4651. // req, resp := client.UntagResourceRequest(params)
  4652. //
  4653. // err := req.Send()
  4654. // if err == nil { // resp is now filled
  4655. // fmt.Println(resp)
  4656. // }
  4657. //
  4658. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UntagResource
  4659. func (c *WAFV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  4660. op := &request.Operation{
  4661. Name: opUntagResource,
  4662. HTTPMethod: "POST",
  4663. HTTPPath: "/",
  4664. }
  4665. if input == nil {
  4666. input = &UntagResourceInput{}
  4667. }
  4668. output = &UntagResourceOutput{}
  4669. req = c.newRequest(op, input, output)
  4670. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4671. return
  4672. }
  4673. // UntagResource API operation for AWS WAFV2.
  4674. //
  4675. // Disassociates tags from an Amazon Web Services resource. Tags are key:value
  4676. // pairs that you can associate with Amazon Web Services resources. For example,
  4677. // the tag key might be "customer" and the tag value might be "companyA." You
  4678. // can specify one or more tags to add to each container. You can add up to
  4679. // 50 tags to each Amazon Web Services resource.
  4680. //
  4681. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4682. // with awserr.Error's Code and Message methods to get detailed information about
  4683. // the error.
  4684. //
  4685. // See the AWS API reference guide for AWS WAFV2's
  4686. // API operation UntagResource for usage and error information.
  4687. //
  4688. // Returned Error Types:
  4689. //
  4690. // - WAFInternalErrorException
  4691. // Your request is valid, but WAF couldn’t perform the operation because of
  4692. // a system problem. Retry your request.
  4693. //
  4694. // - WAFInvalidParameterException
  4695. // The operation failed because WAF didn't recognize a parameter in the request.
  4696. // For example:
  4697. //
  4698. // - You specified a parameter name or value that isn't valid.
  4699. //
  4700. // - Your nested statement isn't valid. You might have tried to nest a statement
  4701. // that can’t be nested.
  4702. //
  4703. // - You tried to update a WebACL with a DefaultAction that isn't among the
  4704. // types available at DefaultAction.
  4705. //
  4706. // - Your request references an ARN that is malformed, or corresponds to
  4707. // a resource with which a web ACL can't be associated.
  4708. //
  4709. // - WAFNonexistentItemException
  4710. // WAF couldn’t perform the operation because your resource doesn't exist.
  4711. // If you've just created a resource that you're using in this operation, you
  4712. // might just need to wait a few minutes. It can take from a few seconds to
  4713. // a number of minutes for changes to propagate.
  4714. //
  4715. // - WAFTagOperationException
  4716. // An error occurred during the tagging operation. Retry your request.
  4717. //
  4718. // - WAFTagOperationInternalErrorException
  4719. // WAF couldn’t perform your tagging operation because of an internal error.
  4720. // Retry your request.
  4721. //
  4722. // - WAFInvalidOperationException
  4723. // The operation isn't valid.
  4724. //
  4725. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UntagResource
  4726. func (c *WAFV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  4727. req, out := c.UntagResourceRequest(input)
  4728. return out, req.Send()
  4729. }
  4730. // UntagResourceWithContext is the same as UntagResource with the addition of
  4731. // the ability to pass a context and additional request options.
  4732. //
  4733. // See UntagResource for details on how to use this API operation.
  4734. //
  4735. // The context must be non-nil and will be used for request cancellation. If
  4736. // the context is nil a panic will occur. In the future the SDK may create
  4737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4738. // for more information on using Contexts.
  4739. func (c *WAFV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  4740. req, out := c.UntagResourceRequest(input)
  4741. req.SetContext(ctx)
  4742. req.ApplyOptions(opts...)
  4743. return out, req.Send()
  4744. }
  4745. const opUpdateIPSet = "UpdateIPSet"
  4746. // UpdateIPSetRequest generates a "aws/request.Request" representing the
  4747. // client's request for the UpdateIPSet operation. The "output" return
  4748. // value will be populated with the request's response once the request completes
  4749. // successfully.
  4750. //
  4751. // Use "Send" method on the returned Request to send the API call to the service.
  4752. // the "output" return value is not valid until after Send returns without error.
  4753. //
  4754. // See UpdateIPSet for more information on using the UpdateIPSet
  4755. // API call, and error handling.
  4756. //
  4757. // This method is useful when you want to inject custom logic or configuration
  4758. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4759. //
  4760. // // Example sending a request using the UpdateIPSetRequest method.
  4761. // req, resp := client.UpdateIPSetRequest(params)
  4762. //
  4763. // err := req.Send()
  4764. // if err == nil { // resp is now filled
  4765. // fmt.Println(resp)
  4766. // }
  4767. //
  4768. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateIPSet
  4769. func (c *WAFV2) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, output *UpdateIPSetOutput) {
  4770. op := &request.Operation{
  4771. Name: opUpdateIPSet,
  4772. HTTPMethod: "POST",
  4773. HTTPPath: "/",
  4774. }
  4775. if input == nil {
  4776. input = &UpdateIPSetInput{}
  4777. }
  4778. output = &UpdateIPSetOutput{}
  4779. req = c.newRequest(op, input, output)
  4780. return
  4781. }
  4782. // UpdateIPSet API operation for AWS WAFV2.
  4783. //
  4784. // Updates the specified IPSet.
  4785. //
  4786. // This operation completely replaces the mutable specifications that you already
  4787. // have for the IP set with the ones that you provide to this call.
  4788. //
  4789. // To modify an IP set, do the following:
  4790. //
  4791. // # Retrieve it by calling GetIPSet
  4792. //
  4793. // # Update its settings as needed
  4794. //
  4795. // # Provide the complete IP set specification to this call
  4796. //
  4797. // When you make changes to web ACLs or web ACL components, like rules and rule
  4798. // groups, WAF propagates the changes everywhere that the web ACL and its components
  4799. // are stored and used. Your changes are applied within seconds, but there might
  4800. // be a brief period of inconsistency when the changes have arrived in some
  4801. // places and not in others. So, for example, if you change a rule action setting,
  4802. // the action might be the old action in one area and the new action in another
  4803. // area. Or if you add an IP address to an IP set used in a blocking rule, the
  4804. // new address might briefly be blocked in one area while still allowed in another.
  4805. // This temporary inconsistency can occur when you first associate a web ACL
  4806. // with an Amazon Web Services resource and when you change a web ACL that is
  4807. // already associated with a resource. Generally, any inconsistencies of this
  4808. // type last only a few seconds.
  4809. //
  4810. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4811. // with awserr.Error's Code and Message methods to get detailed information about
  4812. // the error.
  4813. //
  4814. // See the AWS API reference guide for AWS WAFV2's
  4815. // API operation UpdateIPSet for usage and error information.
  4816. //
  4817. // Returned Error Types:
  4818. //
  4819. // - WAFInternalErrorException
  4820. // Your request is valid, but WAF couldn’t perform the operation because of
  4821. // a system problem. Retry your request.
  4822. //
  4823. // - WAFInvalidParameterException
  4824. // The operation failed because WAF didn't recognize a parameter in the request.
  4825. // For example:
  4826. //
  4827. // - You specified a parameter name or value that isn't valid.
  4828. //
  4829. // - Your nested statement isn't valid. You might have tried to nest a statement
  4830. // that can’t be nested.
  4831. //
  4832. // - You tried to update a WebACL with a DefaultAction that isn't among the
  4833. // types available at DefaultAction.
  4834. //
  4835. // - Your request references an ARN that is malformed, or corresponds to
  4836. // a resource with which a web ACL can't be associated.
  4837. //
  4838. // - WAFNonexistentItemException
  4839. // WAF couldn’t perform the operation because your resource doesn't exist.
  4840. // If you've just created a resource that you're using in this operation, you
  4841. // might just need to wait a few minutes. It can take from a few seconds to
  4842. // a number of minutes for changes to propagate.
  4843. //
  4844. // - WAFDuplicateItemException
  4845. // WAF couldn’t perform the operation because the resource that you tried
  4846. // to save is a duplicate of an existing one.
  4847. //
  4848. // - WAFOptimisticLockException
  4849. // WAF couldn’t save your changes because you tried to update or delete a
  4850. // resource that has changed since you last retrieved it. Get the resource again,
  4851. // make any changes you need to make to the new copy, and retry your operation.
  4852. //
  4853. // - WAFLimitsExceededException
  4854. // WAF couldn’t perform the operation because you exceeded your resource limit.
  4855. // For example, the maximum number of WebACL objects that you can create for
  4856. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  4857. // in the WAF Developer Guide.
  4858. //
  4859. // - WAFInvalidOperationException
  4860. // The operation isn't valid.
  4861. //
  4862. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateIPSet
  4863. func (c *WAFV2) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) {
  4864. req, out := c.UpdateIPSetRequest(input)
  4865. return out, req.Send()
  4866. }
  4867. // UpdateIPSetWithContext is the same as UpdateIPSet with the addition of
  4868. // the ability to pass a context and additional request options.
  4869. //
  4870. // See UpdateIPSet for details on how to use this API operation.
  4871. //
  4872. // The context must be non-nil and will be used for request cancellation. If
  4873. // the context is nil a panic will occur. In the future the SDK may create
  4874. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4875. // for more information on using Contexts.
  4876. func (c *WAFV2) UpdateIPSetWithContext(ctx aws.Context, input *UpdateIPSetInput, opts ...request.Option) (*UpdateIPSetOutput, error) {
  4877. req, out := c.UpdateIPSetRequest(input)
  4878. req.SetContext(ctx)
  4879. req.ApplyOptions(opts...)
  4880. return out, req.Send()
  4881. }
  4882. const opUpdateManagedRuleSetVersionExpiryDate = "UpdateManagedRuleSetVersionExpiryDate"
  4883. // UpdateManagedRuleSetVersionExpiryDateRequest generates a "aws/request.Request" representing the
  4884. // client's request for the UpdateManagedRuleSetVersionExpiryDate operation. The "output" return
  4885. // value will be populated with the request's response once the request completes
  4886. // successfully.
  4887. //
  4888. // Use "Send" method on the returned Request to send the API call to the service.
  4889. // the "output" return value is not valid until after Send returns without error.
  4890. //
  4891. // See UpdateManagedRuleSetVersionExpiryDate for more information on using the UpdateManagedRuleSetVersionExpiryDate
  4892. // API call, and error handling.
  4893. //
  4894. // This method is useful when you want to inject custom logic or configuration
  4895. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4896. //
  4897. // // Example sending a request using the UpdateManagedRuleSetVersionExpiryDateRequest method.
  4898. // req, resp := client.UpdateManagedRuleSetVersionExpiryDateRequest(params)
  4899. //
  4900. // err := req.Send()
  4901. // if err == nil { // resp is now filled
  4902. // fmt.Println(resp)
  4903. // }
  4904. //
  4905. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateManagedRuleSetVersionExpiryDate
  4906. func (c *WAFV2) UpdateManagedRuleSetVersionExpiryDateRequest(input *UpdateManagedRuleSetVersionExpiryDateInput) (req *request.Request, output *UpdateManagedRuleSetVersionExpiryDateOutput) {
  4907. op := &request.Operation{
  4908. Name: opUpdateManagedRuleSetVersionExpiryDate,
  4909. HTTPMethod: "POST",
  4910. HTTPPath: "/",
  4911. }
  4912. if input == nil {
  4913. input = &UpdateManagedRuleSetVersionExpiryDateInput{}
  4914. }
  4915. output = &UpdateManagedRuleSetVersionExpiryDateOutput{}
  4916. req = c.newRequest(op, input, output)
  4917. return
  4918. }
  4919. // UpdateManagedRuleSetVersionExpiryDate API operation for AWS WAFV2.
  4920. //
  4921. // Updates the expiration information for your managed rule set. Use this to
  4922. // initiate the expiration of a managed rule group version. After you initiate
  4923. // expiration for a version, WAF excludes it from the response to ListAvailableManagedRuleGroupVersions
  4924. // for the managed rule group.
  4925. //
  4926. // This is intended for use only by vendors of managed rule sets. Vendors are
  4927. // Amazon Web Services and Amazon Web Services Marketplace sellers.
  4928. //
  4929. // Vendors, you can use the managed rule set APIs to provide controlled rollout
  4930. // of your versioned managed rule group offerings for your customers. The APIs
  4931. // are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and
  4932. // UpdateManagedRuleSetVersionExpiryDate.
  4933. //
  4934. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4935. // with awserr.Error's Code and Message methods to get detailed information about
  4936. // the error.
  4937. //
  4938. // See the AWS API reference guide for AWS WAFV2's
  4939. // API operation UpdateManagedRuleSetVersionExpiryDate for usage and error information.
  4940. //
  4941. // Returned Error Types:
  4942. //
  4943. // - WAFInternalErrorException
  4944. // Your request is valid, but WAF couldn’t perform the operation because of
  4945. // a system problem. Retry your request.
  4946. //
  4947. // - WAFInvalidParameterException
  4948. // The operation failed because WAF didn't recognize a parameter in the request.
  4949. // For example:
  4950. //
  4951. // - You specified a parameter name or value that isn't valid.
  4952. //
  4953. // - Your nested statement isn't valid. You might have tried to nest a statement
  4954. // that can’t be nested.
  4955. //
  4956. // - You tried to update a WebACL with a DefaultAction that isn't among the
  4957. // types available at DefaultAction.
  4958. //
  4959. // - Your request references an ARN that is malformed, or corresponds to
  4960. // a resource with which a web ACL can't be associated.
  4961. //
  4962. // - WAFNonexistentItemException
  4963. // WAF couldn’t perform the operation because your resource doesn't exist.
  4964. // If you've just created a resource that you're using in this operation, you
  4965. // might just need to wait a few minutes. It can take from a few seconds to
  4966. // a number of minutes for changes to propagate.
  4967. //
  4968. // - WAFOptimisticLockException
  4969. // WAF couldn’t save your changes because you tried to update or delete a
  4970. // resource that has changed since you last retrieved it. Get the resource again,
  4971. // make any changes you need to make to the new copy, and retry your operation.
  4972. //
  4973. // - WAFInvalidOperationException
  4974. // The operation isn't valid.
  4975. //
  4976. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateManagedRuleSetVersionExpiryDate
  4977. func (c *WAFV2) UpdateManagedRuleSetVersionExpiryDate(input *UpdateManagedRuleSetVersionExpiryDateInput) (*UpdateManagedRuleSetVersionExpiryDateOutput, error) {
  4978. req, out := c.UpdateManagedRuleSetVersionExpiryDateRequest(input)
  4979. return out, req.Send()
  4980. }
  4981. // UpdateManagedRuleSetVersionExpiryDateWithContext is the same as UpdateManagedRuleSetVersionExpiryDate with the addition of
  4982. // the ability to pass a context and additional request options.
  4983. //
  4984. // See UpdateManagedRuleSetVersionExpiryDate for details on how to use this API operation.
  4985. //
  4986. // The context must be non-nil and will be used for request cancellation. If
  4987. // the context is nil a panic will occur. In the future the SDK may create
  4988. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4989. // for more information on using Contexts.
  4990. func (c *WAFV2) UpdateManagedRuleSetVersionExpiryDateWithContext(ctx aws.Context, input *UpdateManagedRuleSetVersionExpiryDateInput, opts ...request.Option) (*UpdateManagedRuleSetVersionExpiryDateOutput, error) {
  4991. req, out := c.UpdateManagedRuleSetVersionExpiryDateRequest(input)
  4992. req.SetContext(ctx)
  4993. req.ApplyOptions(opts...)
  4994. return out, req.Send()
  4995. }
  4996. const opUpdateRegexPatternSet = "UpdateRegexPatternSet"
  4997. // UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the
  4998. // client's request for the UpdateRegexPatternSet operation. The "output" return
  4999. // value will be populated with the request's response once the request completes
  5000. // successfully.
  5001. //
  5002. // Use "Send" method on the returned Request to send the API call to the service.
  5003. // the "output" return value is not valid until after Send returns without error.
  5004. //
  5005. // See UpdateRegexPatternSet for more information on using the UpdateRegexPatternSet
  5006. // API call, and error handling.
  5007. //
  5008. // This method is useful when you want to inject custom logic or configuration
  5009. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5010. //
  5011. // // Example sending a request using the UpdateRegexPatternSetRequest method.
  5012. // req, resp := client.UpdateRegexPatternSetRequest(params)
  5013. //
  5014. // err := req.Send()
  5015. // if err == nil { // resp is now filled
  5016. // fmt.Println(resp)
  5017. // }
  5018. //
  5019. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRegexPatternSet
  5020. func (c *WAFV2) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (req *request.Request, output *UpdateRegexPatternSetOutput) {
  5021. op := &request.Operation{
  5022. Name: opUpdateRegexPatternSet,
  5023. HTTPMethod: "POST",
  5024. HTTPPath: "/",
  5025. }
  5026. if input == nil {
  5027. input = &UpdateRegexPatternSetInput{}
  5028. }
  5029. output = &UpdateRegexPatternSetOutput{}
  5030. req = c.newRequest(op, input, output)
  5031. return
  5032. }
  5033. // UpdateRegexPatternSet API operation for AWS WAFV2.
  5034. //
  5035. // Updates the specified RegexPatternSet.
  5036. //
  5037. // This operation completely replaces the mutable specifications that you already
  5038. // have for the regex pattern set with the ones that you provide to this call.
  5039. //
  5040. // To modify a regex pattern set, do the following:
  5041. //
  5042. // # Retrieve it by calling GetRegexPatternSet
  5043. //
  5044. // # Update its settings as needed
  5045. //
  5046. // # Provide the complete regex pattern set specification to this call
  5047. //
  5048. // When you make changes to web ACLs or web ACL components, like rules and rule
  5049. // groups, WAF propagates the changes everywhere that the web ACL and its components
  5050. // are stored and used. Your changes are applied within seconds, but there might
  5051. // be a brief period of inconsistency when the changes have arrived in some
  5052. // places and not in others. So, for example, if you change a rule action setting,
  5053. // the action might be the old action in one area and the new action in another
  5054. // area. Or if you add an IP address to an IP set used in a blocking rule, the
  5055. // new address might briefly be blocked in one area while still allowed in another.
  5056. // This temporary inconsistency can occur when you first associate a web ACL
  5057. // with an Amazon Web Services resource and when you change a web ACL that is
  5058. // already associated with a resource. Generally, any inconsistencies of this
  5059. // type last only a few seconds.
  5060. //
  5061. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5062. // with awserr.Error's Code and Message methods to get detailed information about
  5063. // the error.
  5064. //
  5065. // See the AWS API reference guide for AWS WAFV2's
  5066. // API operation UpdateRegexPatternSet for usage and error information.
  5067. //
  5068. // Returned Error Types:
  5069. //
  5070. // - WAFInternalErrorException
  5071. // Your request is valid, but WAF couldn’t perform the operation because of
  5072. // a system problem. Retry your request.
  5073. //
  5074. // - WAFInvalidParameterException
  5075. // The operation failed because WAF didn't recognize a parameter in the request.
  5076. // For example:
  5077. //
  5078. // - You specified a parameter name or value that isn't valid.
  5079. //
  5080. // - Your nested statement isn't valid. You might have tried to nest a statement
  5081. // that can’t be nested.
  5082. //
  5083. // - You tried to update a WebACL with a DefaultAction that isn't among the
  5084. // types available at DefaultAction.
  5085. //
  5086. // - Your request references an ARN that is malformed, or corresponds to
  5087. // a resource with which a web ACL can't be associated.
  5088. //
  5089. // - WAFNonexistentItemException
  5090. // WAF couldn’t perform the operation because your resource doesn't exist.
  5091. // If you've just created a resource that you're using in this operation, you
  5092. // might just need to wait a few minutes. It can take from a few seconds to
  5093. // a number of minutes for changes to propagate.
  5094. //
  5095. // - WAFDuplicateItemException
  5096. // WAF couldn’t perform the operation because the resource that you tried
  5097. // to save is a duplicate of an existing one.
  5098. //
  5099. // - WAFOptimisticLockException
  5100. // WAF couldn’t save your changes because you tried to update or delete a
  5101. // resource that has changed since you last retrieved it. Get the resource again,
  5102. // make any changes you need to make to the new copy, and retry your operation.
  5103. //
  5104. // - WAFLimitsExceededException
  5105. // WAF couldn’t perform the operation because you exceeded your resource limit.
  5106. // For example, the maximum number of WebACL objects that you can create for
  5107. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  5108. // in the WAF Developer Guide.
  5109. //
  5110. // - WAFInvalidOperationException
  5111. // The operation isn't valid.
  5112. //
  5113. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRegexPatternSet
  5114. func (c *WAFV2) UpdateRegexPatternSet(input *UpdateRegexPatternSetInput) (*UpdateRegexPatternSetOutput, error) {
  5115. req, out := c.UpdateRegexPatternSetRequest(input)
  5116. return out, req.Send()
  5117. }
  5118. // UpdateRegexPatternSetWithContext is the same as UpdateRegexPatternSet with the addition of
  5119. // the ability to pass a context and additional request options.
  5120. //
  5121. // See UpdateRegexPatternSet for details on how to use this API operation.
  5122. //
  5123. // The context must be non-nil and will be used for request cancellation. If
  5124. // the context is nil a panic will occur. In the future the SDK may create
  5125. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5126. // for more information on using Contexts.
  5127. func (c *WAFV2) UpdateRegexPatternSetWithContext(ctx aws.Context, input *UpdateRegexPatternSetInput, opts ...request.Option) (*UpdateRegexPatternSetOutput, error) {
  5128. req, out := c.UpdateRegexPatternSetRequest(input)
  5129. req.SetContext(ctx)
  5130. req.ApplyOptions(opts...)
  5131. return out, req.Send()
  5132. }
  5133. const opUpdateRuleGroup = "UpdateRuleGroup"
  5134. // UpdateRuleGroupRequest generates a "aws/request.Request" representing the
  5135. // client's request for the UpdateRuleGroup operation. The "output" return
  5136. // value will be populated with the request's response once the request completes
  5137. // successfully.
  5138. //
  5139. // Use "Send" method on the returned Request to send the API call to the service.
  5140. // the "output" return value is not valid until after Send returns without error.
  5141. //
  5142. // See UpdateRuleGroup for more information on using the UpdateRuleGroup
  5143. // API call, and error handling.
  5144. //
  5145. // This method is useful when you want to inject custom logic or configuration
  5146. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5147. //
  5148. // // Example sending a request using the UpdateRuleGroupRequest method.
  5149. // req, resp := client.UpdateRuleGroupRequest(params)
  5150. //
  5151. // err := req.Send()
  5152. // if err == nil { // resp is now filled
  5153. // fmt.Println(resp)
  5154. // }
  5155. //
  5156. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup
  5157. func (c *WAFV2) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request.Request, output *UpdateRuleGroupOutput) {
  5158. op := &request.Operation{
  5159. Name: opUpdateRuleGroup,
  5160. HTTPMethod: "POST",
  5161. HTTPPath: "/",
  5162. }
  5163. if input == nil {
  5164. input = &UpdateRuleGroupInput{}
  5165. }
  5166. output = &UpdateRuleGroupOutput{}
  5167. req = c.newRequest(op, input, output)
  5168. return
  5169. }
  5170. // UpdateRuleGroup API operation for AWS WAFV2.
  5171. //
  5172. // Updates the specified RuleGroup.
  5173. //
  5174. // This operation completely replaces the mutable specifications that you already
  5175. // have for the rule group with the ones that you provide to this call.
  5176. //
  5177. // To modify a rule group, do the following:
  5178. //
  5179. // # Retrieve it by calling GetRuleGroup
  5180. //
  5181. // # Update its settings as needed
  5182. //
  5183. // # Provide the complete rule group specification to this call
  5184. //
  5185. // When you make changes to web ACLs or web ACL components, like rules and rule
  5186. // groups, WAF propagates the changes everywhere that the web ACL and its components
  5187. // are stored and used. Your changes are applied within seconds, but there might
  5188. // be a brief period of inconsistency when the changes have arrived in some
  5189. // places and not in others. So, for example, if you change a rule action setting,
  5190. // the action might be the old action in one area and the new action in another
  5191. // area. Or if you add an IP address to an IP set used in a blocking rule, the
  5192. // new address might briefly be blocked in one area while still allowed in another.
  5193. // This temporary inconsistency can occur when you first associate a web ACL
  5194. // with an Amazon Web Services resource and when you change a web ACL that is
  5195. // already associated with a resource. Generally, any inconsistencies of this
  5196. // type last only a few seconds.
  5197. //
  5198. // A rule group defines a collection of rules to inspect and control web requests
  5199. // that you can use in a WebACL. When you create a rule group, you define an
  5200. // immutable capacity limit. If you update a rule group, you must stay within
  5201. // the capacity. This allows others to reuse the rule group with confidence
  5202. // in its capacity requirements.
  5203. //
  5204. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5205. // with awserr.Error's Code and Message methods to get detailed information about
  5206. // the error.
  5207. //
  5208. // See the AWS API reference guide for AWS WAFV2's
  5209. // API operation UpdateRuleGroup for usage and error information.
  5210. //
  5211. // Returned Error Types:
  5212. //
  5213. // - WAFInternalErrorException
  5214. // Your request is valid, but WAF couldn’t perform the operation because of
  5215. // a system problem. Retry your request.
  5216. //
  5217. // - WAFInvalidParameterException
  5218. // The operation failed because WAF didn't recognize a parameter in the request.
  5219. // For example:
  5220. //
  5221. // - You specified a parameter name or value that isn't valid.
  5222. //
  5223. // - Your nested statement isn't valid. You might have tried to nest a statement
  5224. // that can’t be nested.
  5225. //
  5226. // - You tried to update a WebACL with a DefaultAction that isn't among the
  5227. // types available at DefaultAction.
  5228. //
  5229. // - Your request references an ARN that is malformed, or corresponds to
  5230. // a resource with which a web ACL can't be associated.
  5231. //
  5232. // - WAFNonexistentItemException
  5233. // WAF couldn’t perform the operation because your resource doesn't exist.
  5234. // If you've just created a resource that you're using in this operation, you
  5235. // might just need to wait a few minutes. It can take from a few seconds to
  5236. // a number of minutes for changes to propagate.
  5237. //
  5238. // - WAFDuplicateItemException
  5239. // WAF couldn’t perform the operation because the resource that you tried
  5240. // to save is a duplicate of an existing one.
  5241. //
  5242. // - WAFOptimisticLockException
  5243. // WAF couldn’t save your changes because you tried to update or delete a
  5244. // resource that has changed since you last retrieved it. Get the resource again,
  5245. // make any changes you need to make to the new copy, and retry your operation.
  5246. //
  5247. // - WAFLimitsExceededException
  5248. // WAF couldn’t perform the operation because you exceeded your resource limit.
  5249. // For example, the maximum number of WebACL objects that you can create for
  5250. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  5251. // in the WAF Developer Guide.
  5252. //
  5253. // - WAFUnavailableEntityException
  5254. // WAF couldn’t retrieve a resource that you specified for this operation.
  5255. // If you've just created a resource that you're using in this operation, you
  5256. // might just need to wait a few minutes. It can take from a few seconds to
  5257. // a number of minutes for changes to propagate. Verify the resources that you
  5258. // are specifying in your request parameters and then retry the operation.
  5259. //
  5260. // - WAFSubscriptionNotFoundException
  5261. // You tried to use a managed rule group that's available by subscription, but
  5262. // you aren't subscribed to it yet.
  5263. //
  5264. // - WAFInvalidOperationException
  5265. // The operation isn't valid.
  5266. //
  5267. // - WAFConfigurationWarningException
  5268. // The operation failed because you are inspecting the web request body, headers,
  5269. // or cookies without specifying how to handle oversize components. Rules that
  5270. // inspect the body must either provide an OversizeHandling configuration or
  5271. // they must be preceded by a SizeConstraintStatement that blocks the body content
  5272. // from being too large. Rules that inspect the headers or cookies must provide
  5273. // an OversizeHandling configuration.
  5274. //
  5275. // Provide the handling configuration and retry your operation.
  5276. //
  5277. // Alternately, you can suppress this warning by adding the following tag to
  5278. // the resource that you provide to this operation: Tag (key:WAF:OversizeFieldsHandlingConstraintOptOut,
  5279. // value:true).
  5280. //
  5281. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup
  5282. func (c *WAFV2) UpdateRuleGroup(input *UpdateRuleGroupInput) (*UpdateRuleGroupOutput, error) {
  5283. req, out := c.UpdateRuleGroupRequest(input)
  5284. return out, req.Send()
  5285. }
  5286. // UpdateRuleGroupWithContext is the same as UpdateRuleGroup with the addition of
  5287. // the ability to pass a context and additional request options.
  5288. //
  5289. // See UpdateRuleGroup for details on how to use this API operation.
  5290. //
  5291. // The context must be non-nil and will be used for request cancellation. If
  5292. // the context is nil a panic will occur. In the future the SDK may create
  5293. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5294. // for more information on using Contexts.
  5295. func (c *WAFV2) UpdateRuleGroupWithContext(ctx aws.Context, input *UpdateRuleGroupInput, opts ...request.Option) (*UpdateRuleGroupOutput, error) {
  5296. req, out := c.UpdateRuleGroupRequest(input)
  5297. req.SetContext(ctx)
  5298. req.ApplyOptions(opts...)
  5299. return out, req.Send()
  5300. }
  5301. const opUpdateWebACL = "UpdateWebACL"
  5302. // UpdateWebACLRequest generates a "aws/request.Request" representing the
  5303. // client's request for the UpdateWebACL operation. The "output" return
  5304. // value will be populated with the request's response once the request completes
  5305. // successfully.
  5306. //
  5307. // Use "Send" method on the returned Request to send the API call to the service.
  5308. // the "output" return value is not valid until after Send returns without error.
  5309. //
  5310. // See UpdateWebACL for more information on using the UpdateWebACL
  5311. // API call, and error handling.
  5312. //
  5313. // This method is useful when you want to inject custom logic or configuration
  5314. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5315. //
  5316. // // Example sending a request using the UpdateWebACLRequest method.
  5317. // req, resp := client.UpdateWebACLRequest(params)
  5318. //
  5319. // err := req.Send()
  5320. // if err == nil { // resp is now filled
  5321. // fmt.Println(resp)
  5322. // }
  5323. //
  5324. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL
  5325. func (c *WAFV2) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Request, output *UpdateWebACLOutput) {
  5326. op := &request.Operation{
  5327. Name: opUpdateWebACL,
  5328. HTTPMethod: "POST",
  5329. HTTPPath: "/",
  5330. }
  5331. if input == nil {
  5332. input = &UpdateWebACLInput{}
  5333. }
  5334. output = &UpdateWebACLOutput{}
  5335. req = c.newRequest(op, input, output)
  5336. return
  5337. }
  5338. // UpdateWebACL API operation for AWS WAFV2.
  5339. //
  5340. // Updates the specified WebACL. While updating a web ACL, WAF provides continuous
  5341. // coverage to the resources that you have associated with the web ACL.
  5342. //
  5343. // This operation completely replaces the mutable specifications that you already
  5344. // have for the web ACL with the ones that you provide to this call.
  5345. //
  5346. // To modify a web ACL, do the following:
  5347. //
  5348. // # Retrieve it by calling GetWebACL
  5349. //
  5350. // # Update its settings as needed
  5351. //
  5352. // # Provide the complete web ACL specification to this call
  5353. //
  5354. // When you make changes to web ACLs or web ACL components, like rules and rule
  5355. // groups, WAF propagates the changes everywhere that the web ACL and its components
  5356. // are stored and used. Your changes are applied within seconds, but there might
  5357. // be a brief period of inconsistency when the changes have arrived in some
  5358. // places and not in others. So, for example, if you change a rule action setting,
  5359. // the action might be the old action in one area and the new action in another
  5360. // area. Or if you add an IP address to an IP set used in a blocking rule, the
  5361. // new address might briefly be blocked in one area while still allowed in another.
  5362. // This temporary inconsistency can occur when you first associate a web ACL
  5363. // with an Amazon Web Services resource and when you change a web ACL that is
  5364. // already associated with a resource. Generally, any inconsistencies of this
  5365. // type last only a few seconds.
  5366. //
  5367. // A web ACL defines a collection of rules to use to inspect and control web
  5368. // requests. Each rule has an action defined (allow, block, or count) for requests
  5369. // that match the statement of the rule. In the web ACL, you assign a default
  5370. // action to take (allow, block) for any request that does not match any of
  5371. // the rules. The rules in a web ACL can be a combination of the types Rule,
  5372. // RuleGroup, and managed rule group. You can associate a web ACL with one or
  5373. // more Amazon Web Services resources to protect. The resources can be an Amazon
  5374. // CloudFront distribution, an Amazon API Gateway REST API, an Application Load
  5375. // Balancer, an AppSync GraphQL API, or an Amazon Cognito user pool.
  5376. //
  5377. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5378. // with awserr.Error's Code and Message methods to get detailed information about
  5379. // the error.
  5380. //
  5381. // See the AWS API reference guide for AWS WAFV2's
  5382. // API operation UpdateWebACL for usage and error information.
  5383. //
  5384. // Returned Error Types:
  5385. //
  5386. // - WAFInternalErrorException
  5387. // Your request is valid, but WAF couldn’t perform the operation because of
  5388. // a system problem. Retry your request.
  5389. //
  5390. // - WAFInvalidParameterException
  5391. // The operation failed because WAF didn't recognize a parameter in the request.
  5392. // For example:
  5393. //
  5394. // - You specified a parameter name or value that isn't valid.
  5395. //
  5396. // - Your nested statement isn't valid. You might have tried to nest a statement
  5397. // that can’t be nested.
  5398. //
  5399. // - You tried to update a WebACL with a DefaultAction that isn't among the
  5400. // types available at DefaultAction.
  5401. //
  5402. // - Your request references an ARN that is malformed, or corresponds to
  5403. // a resource with which a web ACL can't be associated.
  5404. //
  5405. // - WAFNonexistentItemException
  5406. // WAF couldn’t perform the operation because your resource doesn't exist.
  5407. // If you've just created a resource that you're using in this operation, you
  5408. // might just need to wait a few minutes. It can take from a few seconds to
  5409. // a number of minutes for changes to propagate.
  5410. //
  5411. // - WAFDuplicateItemException
  5412. // WAF couldn’t perform the operation because the resource that you tried
  5413. // to save is a duplicate of an existing one.
  5414. //
  5415. // - WAFOptimisticLockException
  5416. // WAF couldn’t save your changes because you tried to update or delete a
  5417. // resource that has changed since you last retrieved it. Get the resource again,
  5418. // make any changes you need to make to the new copy, and retry your operation.
  5419. //
  5420. // - WAFLimitsExceededException
  5421. // WAF couldn’t perform the operation because you exceeded your resource limit.
  5422. // For example, the maximum number of WebACL objects that you can create for
  5423. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  5424. // in the WAF Developer Guide.
  5425. //
  5426. // - WAFInvalidResourceException
  5427. // WAF couldn’t perform the operation because the resource that you requested
  5428. // isn’t valid. Check the resource, and try again.
  5429. //
  5430. // - WAFUnavailableEntityException
  5431. // WAF couldn’t retrieve a resource that you specified for this operation.
  5432. // If you've just created a resource that you're using in this operation, you
  5433. // might just need to wait a few minutes. It can take from a few seconds to
  5434. // a number of minutes for changes to propagate. Verify the resources that you
  5435. // are specifying in your request parameters and then retry the operation.
  5436. //
  5437. // - WAFSubscriptionNotFoundException
  5438. // You tried to use a managed rule group that's available by subscription, but
  5439. // you aren't subscribed to it yet.
  5440. //
  5441. // - WAFInvalidOperationException
  5442. // The operation isn't valid.
  5443. //
  5444. // - WAFExpiredManagedRuleGroupVersionException
  5445. // The operation failed because the specified version for the managed rule group
  5446. // has expired. You can retrieve the available versions for the managed rule
  5447. // group by calling ListAvailableManagedRuleGroupVersions.
  5448. //
  5449. // - WAFConfigurationWarningException
  5450. // The operation failed because you are inspecting the web request body, headers,
  5451. // or cookies without specifying how to handle oversize components. Rules that
  5452. // inspect the body must either provide an OversizeHandling configuration or
  5453. // they must be preceded by a SizeConstraintStatement that blocks the body content
  5454. // from being too large. Rules that inspect the headers or cookies must provide
  5455. // an OversizeHandling configuration.
  5456. //
  5457. // Provide the handling configuration and retry your operation.
  5458. //
  5459. // Alternately, you can suppress this warning by adding the following tag to
  5460. // the resource that you provide to this operation: Tag (key:WAF:OversizeFieldsHandlingConstraintOptOut,
  5461. // value:true).
  5462. //
  5463. // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL
  5464. func (c *WAFV2) UpdateWebACL(input *UpdateWebACLInput) (*UpdateWebACLOutput, error) {
  5465. req, out := c.UpdateWebACLRequest(input)
  5466. return out, req.Send()
  5467. }
  5468. // UpdateWebACLWithContext is the same as UpdateWebACL with the addition of
  5469. // the ability to pass a context and additional request options.
  5470. //
  5471. // See UpdateWebACL for details on how to use this API operation.
  5472. //
  5473. // The context must be non-nil and will be used for request cancellation. If
  5474. // the context is nil a panic will occur. In the future the SDK may create
  5475. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5476. // for more information on using Contexts.
  5477. func (c *WAFV2) UpdateWebACLWithContext(ctx aws.Context, input *UpdateWebACLInput, opts ...request.Option) (*UpdateWebACLOutput, error) {
  5478. req, out := c.UpdateWebACLRequest(input)
  5479. req.SetContext(ctx)
  5480. req.ApplyOptions(opts...)
  5481. return out, req.Send()
  5482. }
  5483. // Details for your use of the Bot Control managed rule group, used in ManagedRuleGroupConfig.
  5484. type AWSManagedRulesBotControlRuleSet struct {
  5485. _ struct{} `type:"structure"`
  5486. // The inspection level to use for the Bot Control rule group. The common level
  5487. // is the least expensive. The targeted level includes all common level rules
  5488. // and adds rules with more advanced inspection criteria. For details, see WAF
  5489. // Bot Control rule group (https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html).
  5490. //
  5491. // InspectionLevel is a required field
  5492. InspectionLevel *string `type:"string" required:"true" enum:"InspectionLevel"`
  5493. }
  5494. // String returns the string representation.
  5495. //
  5496. // API parameter values that are decorated as "sensitive" in the API will not
  5497. // be included in the string output. The member name will be present, but the
  5498. // value will be replaced with "sensitive".
  5499. func (s AWSManagedRulesBotControlRuleSet) String() string {
  5500. return awsutil.Prettify(s)
  5501. }
  5502. // GoString returns the string representation.
  5503. //
  5504. // API parameter values that are decorated as "sensitive" in the API will not
  5505. // be included in the string output. The member name will be present, but the
  5506. // value will be replaced with "sensitive".
  5507. func (s AWSManagedRulesBotControlRuleSet) GoString() string {
  5508. return s.String()
  5509. }
  5510. // Validate inspects the fields of the type to determine if they are valid.
  5511. func (s *AWSManagedRulesBotControlRuleSet) Validate() error {
  5512. invalidParams := request.ErrInvalidParams{Context: "AWSManagedRulesBotControlRuleSet"}
  5513. if s.InspectionLevel == nil {
  5514. invalidParams.Add(request.NewErrParamRequired("InspectionLevel"))
  5515. }
  5516. if invalidParams.Len() > 0 {
  5517. return invalidParams
  5518. }
  5519. return nil
  5520. }
  5521. // SetInspectionLevel sets the InspectionLevel field's value.
  5522. func (s *AWSManagedRulesBotControlRuleSet) SetInspectionLevel(v string) *AWSManagedRulesBotControlRuleSet {
  5523. s.InspectionLevel = &v
  5524. return s
  5525. }
  5526. // A single action condition for a Condition in a logging filter.
  5527. type ActionCondition struct {
  5528. _ struct{} `type:"structure"`
  5529. // The action setting that a log record must contain in order to meet the condition.
  5530. // This is the action that WAF applied to the web request.
  5531. //
  5532. // For rule groups, this is either the configured rule action setting, or if
  5533. // you've applied a rule action override to the rule, it's the override action.
  5534. // The value EXCLUDED_AS_COUNT matches on excluded rules and also on rules that
  5535. // have a rule action override of Count.
  5536. //
  5537. // Action is a required field
  5538. Action *string `type:"string" required:"true" enum:"ActionValue"`
  5539. }
  5540. // String returns the string representation.
  5541. //
  5542. // API parameter values that are decorated as "sensitive" in the API will not
  5543. // be included in the string output. The member name will be present, but the
  5544. // value will be replaced with "sensitive".
  5545. func (s ActionCondition) String() string {
  5546. return awsutil.Prettify(s)
  5547. }
  5548. // GoString returns the string representation.
  5549. //
  5550. // API parameter values that are decorated as "sensitive" in the API will not
  5551. // be included in the string output. The member name will be present, but the
  5552. // value will be replaced with "sensitive".
  5553. func (s ActionCondition) GoString() string {
  5554. return s.String()
  5555. }
  5556. // Validate inspects the fields of the type to determine if they are valid.
  5557. func (s *ActionCondition) Validate() error {
  5558. invalidParams := request.ErrInvalidParams{Context: "ActionCondition"}
  5559. if s.Action == nil {
  5560. invalidParams.Add(request.NewErrParamRequired("Action"))
  5561. }
  5562. if invalidParams.Len() > 0 {
  5563. return invalidParams
  5564. }
  5565. return nil
  5566. }
  5567. // SetAction sets the Action field's value.
  5568. func (s *ActionCondition) SetAction(v string) *ActionCondition {
  5569. s.Action = &v
  5570. return s
  5571. }
  5572. // Inspect all of the elements that WAF has parsed and extracted from the web
  5573. // request component that you've identified in your FieldToMatch specifications.
  5574. //
  5575. // This is used only in the FieldToMatch specification for some web request
  5576. // component types.
  5577. //
  5578. // JSON specification: "All": {}
  5579. type All struct {
  5580. _ struct{} `type:"structure"`
  5581. }
  5582. // String returns the string representation.
  5583. //
  5584. // API parameter values that are decorated as "sensitive" in the API will not
  5585. // be included in the string output. The member name will be present, but the
  5586. // value will be replaced with "sensitive".
  5587. func (s All) String() string {
  5588. return awsutil.Prettify(s)
  5589. }
  5590. // GoString returns the string representation.
  5591. //
  5592. // API parameter values that are decorated as "sensitive" in the API will not
  5593. // be included in the string output. The member name will be present, but the
  5594. // value will be replaced with "sensitive".
  5595. func (s All) GoString() string {
  5596. return s.String()
  5597. }
  5598. // Inspect all query arguments of the web request.
  5599. //
  5600. // This is used only in the FieldToMatch specification for some web request
  5601. // component types.
  5602. //
  5603. // JSON specification: "AllQueryArguments": {}
  5604. type AllQueryArguments struct {
  5605. _ struct{} `type:"structure"`
  5606. }
  5607. // String returns the string representation.
  5608. //
  5609. // API parameter values that are decorated as "sensitive" in the API will not
  5610. // be included in the string output. The member name will be present, but the
  5611. // value will be replaced with "sensitive".
  5612. func (s AllQueryArguments) String() string {
  5613. return awsutil.Prettify(s)
  5614. }
  5615. // GoString returns the string representation.
  5616. //
  5617. // API parameter values that are decorated as "sensitive" in the API will not
  5618. // be included in the string output. The member name will be present, but the
  5619. // value will be replaced with "sensitive".
  5620. func (s AllQueryArguments) GoString() string {
  5621. return s.String()
  5622. }
  5623. // Specifies that WAF should allow the request and optionally defines additional
  5624. // custom handling for the request.
  5625. //
  5626. // This is used in the context of other settings, for example to specify values
  5627. // for RuleAction and web ACL DefaultAction.
  5628. type AllowAction struct {
  5629. _ struct{} `type:"structure"`
  5630. // Defines custom handling for the web request.
  5631. //
  5632. // For information about customizing web requests and responses, see Customizing
  5633. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  5634. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  5635. CustomRequestHandling *CustomRequestHandling `type:"structure"`
  5636. }
  5637. // String returns the string representation.
  5638. //
  5639. // API parameter values that are decorated as "sensitive" in the API will not
  5640. // be included in the string output. The member name will be present, but the
  5641. // value will be replaced with "sensitive".
  5642. func (s AllowAction) String() string {
  5643. return awsutil.Prettify(s)
  5644. }
  5645. // GoString returns the string representation.
  5646. //
  5647. // API parameter values that are decorated as "sensitive" in the API will not
  5648. // be included in the string output. The member name will be present, but the
  5649. // value will be replaced with "sensitive".
  5650. func (s AllowAction) GoString() string {
  5651. return s.String()
  5652. }
  5653. // Validate inspects the fields of the type to determine if they are valid.
  5654. func (s *AllowAction) Validate() error {
  5655. invalidParams := request.ErrInvalidParams{Context: "AllowAction"}
  5656. if s.CustomRequestHandling != nil {
  5657. if err := s.CustomRequestHandling.Validate(); err != nil {
  5658. invalidParams.AddNested("CustomRequestHandling", err.(request.ErrInvalidParams))
  5659. }
  5660. }
  5661. if invalidParams.Len() > 0 {
  5662. return invalidParams
  5663. }
  5664. return nil
  5665. }
  5666. // SetCustomRequestHandling sets the CustomRequestHandling field's value.
  5667. func (s *AllowAction) SetCustomRequestHandling(v *CustomRequestHandling) *AllowAction {
  5668. s.CustomRequestHandling = v
  5669. return s
  5670. }
  5671. // A logical rule statement used to combine other rule statements with AND logic.
  5672. // You provide more than one Statement within the AndStatement.
  5673. type AndStatement struct {
  5674. _ struct{} `type:"structure"`
  5675. // The statements to combine with AND logic. You can use any statements that
  5676. // can be nested.
  5677. //
  5678. // Statements is a required field
  5679. Statements []*Statement `type:"list" required:"true"`
  5680. }
  5681. // String returns the string representation.
  5682. //
  5683. // API parameter values that are decorated as "sensitive" in the API will not
  5684. // be included in the string output. The member name will be present, but the
  5685. // value will be replaced with "sensitive".
  5686. func (s AndStatement) String() string {
  5687. return awsutil.Prettify(s)
  5688. }
  5689. // GoString returns the string representation.
  5690. //
  5691. // API parameter values that are decorated as "sensitive" in the API will not
  5692. // be included in the string output. The member name will be present, but the
  5693. // value will be replaced with "sensitive".
  5694. func (s AndStatement) GoString() string {
  5695. return s.String()
  5696. }
  5697. // Validate inspects the fields of the type to determine if they are valid.
  5698. func (s *AndStatement) Validate() error {
  5699. invalidParams := request.ErrInvalidParams{Context: "AndStatement"}
  5700. if s.Statements == nil {
  5701. invalidParams.Add(request.NewErrParamRequired("Statements"))
  5702. }
  5703. if invalidParams.Len() > 0 {
  5704. return invalidParams
  5705. }
  5706. return nil
  5707. }
  5708. // SetStatements sets the Statements field's value.
  5709. func (s *AndStatement) SetStatements(v []*Statement) *AndStatement {
  5710. s.Statements = v
  5711. return s
  5712. }
  5713. type AssociateWebACLInput struct {
  5714. _ struct{} `type:"structure"`
  5715. // The Amazon Resource Name (ARN) of the resource to associate with the web
  5716. // ACL.
  5717. //
  5718. // The ARN must be in one of the following formats:
  5719. //
  5720. // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
  5721. //
  5722. // * For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
  5723. //
  5724. // * For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId
  5725. //
  5726. // * For an Amazon Cognito user pool: arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
  5727. //
  5728. // ResourceArn is a required field
  5729. ResourceArn *string `min:"20" type:"string" required:"true"`
  5730. // The Amazon Resource Name (ARN) of the web ACL that you want to associate
  5731. // with the resource.
  5732. //
  5733. // WebACLArn is a required field
  5734. WebACLArn *string `min:"20" type:"string" required:"true"`
  5735. }
  5736. // String returns the string representation.
  5737. //
  5738. // API parameter values that are decorated as "sensitive" in the API will not
  5739. // be included in the string output. The member name will be present, but the
  5740. // value will be replaced with "sensitive".
  5741. func (s AssociateWebACLInput) String() string {
  5742. return awsutil.Prettify(s)
  5743. }
  5744. // GoString returns the string representation.
  5745. //
  5746. // API parameter values that are decorated as "sensitive" in the API will not
  5747. // be included in the string output. The member name will be present, but the
  5748. // value will be replaced with "sensitive".
  5749. func (s AssociateWebACLInput) GoString() string {
  5750. return s.String()
  5751. }
  5752. // Validate inspects the fields of the type to determine if they are valid.
  5753. func (s *AssociateWebACLInput) Validate() error {
  5754. invalidParams := request.ErrInvalidParams{Context: "AssociateWebACLInput"}
  5755. if s.ResourceArn == nil {
  5756. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  5757. }
  5758. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  5759. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  5760. }
  5761. if s.WebACLArn == nil {
  5762. invalidParams.Add(request.NewErrParamRequired("WebACLArn"))
  5763. }
  5764. if s.WebACLArn != nil && len(*s.WebACLArn) < 20 {
  5765. invalidParams.Add(request.NewErrParamMinLen("WebACLArn", 20))
  5766. }
  5767. if invalidParams.Len() > 0 {
  5768. return invalidParams
  5769. }
  5770. return nil
  5771. }
  5772. // SetResourceArn sets the ResourceArn field's value.
  5773. func (s *AssociateWebACLInput) SetResourceArn(v string) *AssociateWebACLInput {
  5774. s.ResourceArn = &v
  5775. return s
  5776. }
  5777. // SetWebACLArn sets the WebACLArn field's value.
  5778. func (s *AssociateWebACLInput) SetWebACLArn(v string) *AssociateWebACLInput {
  5779. s.WebACLArn = &v
  5780. return s
  5781. }
  5782. type AssociateWebACLOutput struct {
  5783. _ struct{} `type:"structure"`
  5784. }
  5785. // String returns the string representation.
  5786. //
  5787. // API parameter values that are decorated as "sensitive" in the API will not
  5788. // be included in the string output. The member name will be present, but the
  5789. // value will be replaced with "sensitive".
  5790. func (s AssociateWebACLOutput) String() string {
  5791. return awsutil.Prettify(s)
  5792. }
  5793. // GoString returns the string representation.
  5794. //
  5795. // API parameter values that are decorated as "sensitive" in the API will not
  5796. // be included in the string output. The member name will be present, but the
  5797. // value will be replaced with "sensitive".
  5798. func (s AssociateWebACLOutput) GoString() string {
  5799. return s.String()
  5800. }
  5801. // Specifies that WAF should block the request and optionally defines additional
  5802. // custom handling for the response to the web request.
  5803. //
  5804. // This is used in the context of other settings, for example to specify values
  5805. // for RuleAction and web ACL DefaultAction.
  5806. type BlockAction struct {
  5807. _ struct{} `type:"structure"`
  5808. // Defines a custom response for the web request.
  5809. //
  5810. // For information about customizing web requests and responses, see Customizing
  5811. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  5812. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  5813. CustomResponse *CustomResponse `type:"structure"`
  5814. }
  5815. // String returns the string representation.
  5816. //
  5817. // API parameter values that are decorated as "sensitive" in the API will not
  5818. // be included in the string output. The member name will be present, but the
  5819. // value will be replaced with "sensitive".
  5820. func (s BlockAction) String() string {
  5821. return awsutil.Prettify(s)
  5822. }
  5823. // GoString returns the string representation.
  5824. //
  5825. // API parameter values that are decorated as "sensitive" in the API will not
  5826. // be included in the string output. The member name will be present, but the
  5827. // value will be replaced with "sensitive".
  5828. func (s BlockAction) GoString() string {
  5829. return s.String()
  5830. }
  5831. // Validate inspects the fields of the type to determine if they are valid.
  5832. func (s *BlockAction) Validate() error {
  5833. invalidParams := request.ErrInvalidParams{Context: "BlockAction"}
  5834. if s.CustomResponse != nil {
  5835. if err := s.CustomResponse.Validate(); err != nil {
  5836. invalidParams.AddNested("CustomResponse", err.(request.ErrInvalidParams))
  5837. }
  5838. }
  5839. if invalidParams.Len() > 0 {
  5840. return invalidParams
  5841. }
  5842. return nil
  5843. }
  5844. // SetCustomResponse sets the CustomResponse field's value.
  5845. func (s *BlockAction) SetCustomResponse(v *CustomResponse) *BlockAction {
  5846. s.CustomResponse = v
  5847. return s
  5848. }
  5849. // Inspect the body of the web request. The body immediately follows the request
  5850. // headers.
  5851. //
  5852. // This is used to indicate the web request component to inspect, in the FieldToMatch
  5853. // specification.
  5854. type Body struct {
  5855. _ struct{} `type:"structure"`
  5856. // What WAF should do if the body is larger than WAF can inspect. WAF does not
  5857. // support inspecting the entire contents of the body of a web request when
  5858. // the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body
  5859. // are forwarded to WAF by the underlying host service.
  5860. //
  5861. // The options for oversize handling are the following:
  5862. //
  5863. // * CONTINUE - Inspect the body normally, according to the rule inspection
  5864. // criteria.
  5865. //
  5866. // * MATCH - Treat the web request as matching the rule statement. WAF applies
  5867. // the rule action to the request.
  5868. //
  5869. // * NO_MATCH - Treat the web request as not matching the rule statement.
  5870. //
  5871. // You can combine the MATCH or NO_MATCH settings for oversize handling with
  5872. // your rule and web ACL action settings, so that you block any request whose
  5873. // body is over 8 KB.
  5874. //
  5875. // Default: CONTINUE
  5876. OversizeHandling *string `type:"string" enum:"OversizeHandling"`
  5877. }
  5878. // String returns the string representation.
  5879. //
  5880. // API parameter values that are decorated as "sensitive" in the API will not
  5881. // be included in the string output. The member name will be present, but the
  5882. // value will be replaced with "sensitive".
  5883. func (s Body) String() string {
  5884. return awsutil.Prettify(s)
  5885. }
  5886. // GoString returns the string representation.
  5887. //
  5888. // API parameter values that are decorated as "sensitive" in the API will not
  5889. // be included in the string output. The member name will be present, but the
  5890. // value will be replaced with "sensitive".
  5891. func (s Body) GoString() string {
  5892. return s.String()
  5893. }
  5894. // SetOversizeHandling sets the OversizeHandling field's value.
  5895. func (s *Body) SetOversizeHandling(v string) *Body {
  5896. s.OversizeHandling = &v
  5897. return s
  5898. }
  5899. // A rule statement that defines a string match search for WAF to apply to web
  5900. // requests. The byte match statement provides the bytes to search for, the
  5901. // location in requests that you want WAF to search, and other settings. The
  5902. // bytes to search for are typically a string that corresponds with ASCII characters.
  5903. // In the WAF console and the developer guide, this is called a string match
  5904. // statement.
  5905. type ByteMatchStatement struct {
  5906. _ struct{} `type:"structure"`
  5907. // The part of the web request that you want WAF to inspect.
  5908. //
  5909. // FieldToMatch is a required field
  5910. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  5911. // The area within the portion of the web request that you want WAF to search
  5912. // for SearchString. Valid values include the following:
  5913. //
  5914. // CONTAINS
  5915. //
  5916. // The specified part of the web request must include the value of SearchString,
  5917. // but the location doesn't matter.
  5918. //
  5919. // CONTAINS_WORD
  5920. //
  5921. // The specified part of the web request must include the value of SearchString,
  5922. // and SearchString must contain only alphanumeric characters or underscore
  5923. // (A-Z, a-z, 0-9, or _). In addition, SearchString must be a word, which means
  5924. // that both of the following are true:
  5925. //
  5926. // * SearchString is at the beginning of the specified part of the web request
  5927. // or is preceded by a character other than an alphanumeric character or
  5928. // underscore (_). Examples include the value of a header and ;BadBot.
  5929. //
  5930. // * SearchString is at the end of the specified part of the web request
  5931. // or is followed by a character other than an alphanumeric character or
  5932. // underscore (_), for example, BadBot; and -BadBot;.
  5933. //
  5934. // EXACTLY
  5935. //
  5936. // The value of the specified part of the web request must exactly match the
  5937. // value of SearchString.
  5938. //
  5939. // STARTS_WITH
  5940. //
  5941. // The value of SearchString must appear at the beginning of the specified part
  5942. // of the web request.
  5943. //
  5944. // ENDS_WITH
  5945. //
  5946. // The value of SearchString must appear at the end of the specified part of
  5947. // the web request.
  5948. //
  5949. // PositionalConstraint is a required field
  5950. PositionalConstraint *string `type:"string" required:"true" enum:"PositionalConstraint"`
  5951. // A string value that you want WAF to search for. WAF searches only in the
  5952. // part of web requests that you designate for inspection in FieldToMatch. The
  5953. // maximum length of the value is 50 bytes.
  5954. //
  5955. // Valid values depend on the component that you specify for inspection in FieldToMatch:
  5956. //
  5957. // * Method: The HTTP method that you want WAF to search for. This indicates
  5958. // the type of operation specified in the request.
  5959. //
  5960. // * UriPath: The value that you want WAF to search for in the URI path,
  5961. // for example, /images/daily-ad.jpg.
  5962. //
  5963. // If SearchString includes alphabetic characters A-Z and a-z, note that the
  5964. // value is case sensitive.
  5965. //
  5966. // If you're using the WAF API
  5967. //
  5968. // Specify a base64-encoded version of the value. The maximum length of the
  5969. // value before you base64-encode it is 50 bytes.
  5970. //
  5971. // For example, suppose the value of Type is HEADER and the value of Data is
  5972. // User-Agent. If you want to search the User-Agent header for the value BadBot,
  5973. // you base64-encode BadBot using MIME base64-encoding and include the resulting
  5974. // value, QmFkQm90, in the value of SearchString.
  5975. //
  5976. // If you're using the CLI or one of the Amazon Web Services SDKs
  5977. //
  5978. // The value that you want WAF to search for. The SDK automatically base64 encodes
  5979. // the value.
  5980. // SearchString is automatically base64 encoded/decoded by the SDK.
  5981. //
  5982. // SearchString is a required field
  5983. SearchString []byte `type:"blob" required:"true"`
  5984. // Text transformations eliminate some of the unusual formatting that attackers
  5985. // use in web requests in an effort to bypass detection. If you specify one
  5986. // or more transformations in a rule statement, WAF performs all transformations
  5987. // on the content of the request component identified by FieldToMatch, starting
  5988. // from the lowest priority setting, before inspecting the content for a match.
  5989. //
  5990. // TextTransformations is a required field
  5991. TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"`
  5992. }
  5993. // String returns the string representation.
  5994. //
  5995. // API parameter values that are decorated as "sensitive" in the API will not
  5996. // be included in the string output. The member name will be present, but the
  5997. // value will be replaced with "sensitive".
  5998. func (s ByteMatchStatement) String() string {
  5999. return awsutil.Prettify(s)
  6000. }
  6001. // GoString returns the string representation.
  6002. //
  6003. // API parameter values that are decorated as "sensitive" in the API will not
  6004. // be included in the string output. The member name will be present, but the
  6005. // value will be replaced with "sensitive".
  6006. func (s ByteMatchStatement) GoString() string {
  6007. return s.String()
  6008. }
  6009. // Validate inspects the fields of the type to determine if they are valid.
  6010. func (s *ByteMatchStatement) Validate() error {
  6011. invalidParams := request.ErrInvalidParams{Context: "ByteMatchStatement"}
  6012. if s.FieldToMatch == nil {
  6013. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  6014. }
  6015. if s.PositionalConstraint == nil {
  6016. invalidParams.Add(request.NewErrParamRequired("PositionalConstraint"))
  6017. }
  6018. if s.SearchString == nil {
  6019. invalidParams.Add(request.NewErrParamRequired("SearchString"))
  6020. }
  6021. if s.TextTransformations == nil {
  6022. invalidParams.Add(request.NewErrParamRequired("TextTransformations"))
  6023. }
  6024. if s.TextTransformations != nil && len(s.TextTransformations) < 1 {
  6025. invalidParams.Add(request.NewErrParamMinLen("TextTransformations", 1))
  6026. }
  6027. if s.FieldToMatch != nil {
  6028. if err := s.FieldToMatch.Validate(); err != nil {
  6029. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  6030. }
  6031. }
  6032. if s.TextTransformations != nil {
  6033. for i, v := range s.TextTransformations {
  6034. if v == nil {
  6035. continue
  6036. }
  6037. if err := v.Validate(); err != nil {
  6038. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TextTransformations", i), err.(request.ErrInvalidParams))
  6039. }
  6040. }
  6041. }
  6042. if invalidParams.Len() > 0 {
  6043. return invalidParams
  6044. }
  6045. return nil
  6046. }
  6047. // SetFieldToMatch sets the FieldToMatch field's value.
  6048. func (s *ByteMatchStatement) SetFieldToMatch(v *FieldToMatch) *ByteMatchStatement {
  6049. s.FieldToMatch = v
  6050. return s
  6051. }
  6052. // SetPositionalConstraint sets the PositionalConstraint field's value.
  6053. func (s *ByteMatchStatement) SetPositionalConstraint(v string) *ByteMatchStatement {
  6054. s.PositionalConstraint = &v
  6055. return s
  6056. }
  6057. // SetSearchString sets the SearchString field's value.
  6058. func (s *ByteMatchStatement) SetSearchString(v []byte) *ByteMatchStatement {
  6059. s.SearchString = v
  6060. return s
  6061. }
  6062. // SetTextTransformations sets the TextTransformations field's value.
  6063. func (s *ByteMatchStatement) SetTextTransformations(v []*TextTransformation) *ByteMatchStatement {
  6064. s.TextTransformations = v
  6065. return s
  6066. }
  6067. // Specifies that WAF should run a CAPTCHA check against the request:
  6068. //
  6069. // - If the request includes a valid, unexpired CAPTCHA token, WAF applies
  6070. // any custom request handling and labels that you've configured and then
  6071. // allows the web request inspection to proceed to the next rule, similar
  6072. // to a CountAction.
  6073. //
  6074. // - If the request doesn't include a valid, unexpired token, WAF discontinues
  6075. // the web ACL evaluation of the request and blocks it from going to its
  6076. // intended destination. WAF generates a response that it sends back to the
  6077. // client, which includes the following: The header x-amzn-waf-action with
  6078. // a value of captcha. The HTTP status code 405 Method Not Allowed. If the
  6079. // request contains an Accept header with a value of text/html, the response
  6080. // includes a CAPTCHA JavaScript page interstitial.
  6081. //
  6082. // You can configure the expiration time in the CaptchaConfig ImmunityTimeProperty
  6083. // setting at the rule and web ACL level. The rule setting overrides the web
  6084. // ACL setting.
  6085. //
  6086. // This action option is available for rules. It isn't available for web ACL
  6087. // default actions.
  6088. type CaptchaAction struct {
  6089. _ struct{} `type:"structure"`
  6090. // Defines custom handling for the web request, used when the CAPTCHA inspection
  6091. // determines that the request's token is valid and unexpired.
  6092. //
  6093. // For information about customizing web requests and responses, see Customizing
  6094. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  6095. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  6096. CustomRequestHandling *CustomRequestHandling `type:"structure"`
  6097. }
  6098. // String returns the string representation.
  6099. //
  6100. // API parameter values that are decorated as "sensitive" in the API will not
  6101. // be included in the string output. The member name will be present, but the
  6102. // value will be replaced with "sensitive".
  6103. func (s CaptchaAction) String() string {
  6104. return awsutil.Prettify(s)
  6105. }
  6106. // GoString returns the string representation.
  6107. //
  6108. // API parameter values that are decorated as "sensitive" in the API will not
  6109. // be included in the string output. The member name will be present, but the
  6110. // value will be replaced with "sensitive".
  6111. func (s CaptchaAction) GoString() string {
  6112. return s.String()
  6113. }
  6114. // Validate inspects the fields of the type to determine if they are valid.
  6115. func (s *CaptchaAction) Validate() error {
  6116. invalidParams := request.ErrInvalidParams{Context: "CaptchaAction"}
  6117. if s.CustomRequestHandling != nil {
  6118. if err := s.CustomRequestHandling.Validate(); err != nil {
  6119. invalidParams.AddNested("CustomRequestHandling", err.(request.ErrInvalidParams))
  6120. }
  6121. }
  6122. if invalidParams.Len() > 0 {
  6123. return invalidParams
  6124. }
  6125. return nil
  6126. }
  6127. // SetCustomRequestHandling sets the CustomRequestHandling field's value.
  6128. func (s *CaptchaAction) SetCustomRequestHandling(v *CustomRequestHandling) *CaptchaAction {
  6129. s.CustomRequestHandling = v
  6130. return s
  6131. }
  6132. // Specifies how WAF should handle CAPTCHA evaluations. This is available at
  6133. // the web ACL level and in each rule.
  6134. type CaptchaConfig struct {
  6135. _ struct{} `type:"structure"`
  6136. // Determines how long a CAPTCHA timestamp in the token remains valid after
  6137. // the client successfully solves a CAPTCHA puzzle.
  6138. ImmunityTimeProperty *ImmunityTimeProperty `type:"structure"`
  6139. }
  6140. // String returns the string representation.
  6141. //
  6142. // API parameter values that are decorated as "sensitive" in the API will not
  6143. // be included in the string output. The member name will be present, but the
  6144. // value will be replaced with "sensitive".
  6145. func (s CaptchaConfig) String() string {
  6146. return awsutil.Prettify(s)
  6147. }
  6148. // GoString returns the string representation.
  6149. //
  6150. // API parameter values that are decorated as "sensitive" in the API will not
  6151. // be included in the string output. The member name will be present, but the
  6152. // value will be replaced with "sensitive".
  6153. func (s CaptchaConfig) GoString() string {
  6154. return s.String()
  6155. }
  6156. // Validate inspects the fields of the type to determine if they are valid.
  6157. func (s *CaptchaConfig) Validate() error {
  6158. invalidParams := request.ErrInvalidParams{Context: "CaptchaConfig"}
  6159. if s.ImmunityTimeProperty != nil {
  6160. if err := s.ImmunityTimeProperty.Validate(); err != nil {
  6161. invalidParams.AddNested("ImmunityTimeProperty", err.(request.ErrInvalidParams))
  6162. }
  6163. }
  6164. if invalidParams.Len() > 0 {
  6165. return invalidParams
  6166. }
  6167. return nil
  6168. }
  6169. // SetImmunityTimeProperty sets the ImmunityTimeProperty field's value.
  6170. func (s *CaptchaConfig) SetImmunityTimeProperty(v *ImmunityTimeProperty) *CaptchaConfig {
  6171. s.ImmunityTimeProperty = v
  6172. return s
  6173. }
  6174. // The result from the inspection of the web request for a valid CAPTCHA token.
  6175. type CaptchaResponse struct {
  6176. _ struct{} `type:"structure"`
  6177. // The reason for failure, populated when the evaluation of the token fails.
  6178. FailureReason *string `type:"string" enum:"FailureReason"`
  6179. // The HTTP response code indicating the status of the CAPTCHA token in the
  6180. // web request. If the token is missing, invalid, or expired, this code is 405
  6181. // Method Not Allowed.
  6182. ResponseCode *int64 `type:"integer"`
  6183. // The time that the CAPTCHA was last solved for the supplied token.
  6184. SolveTimestamp *int64 `type:"long"`
  6185. }
  6186. // String returns the string representation.
  6187. //
  6188. // API parameter values that are decorated as "sensitive" in the API will not
  6189. // be included in the string output. The member name will be present, but the
  6190. // value will be replaced with "sensitive".
  6191. func (s CaptchaResponse) String() string {
  6192. return awsutil.Prettify(s)
  6193. }
  6194. // GoString returns the string representation.
  6195. //
  6196. // API parameter values that are decorated as "sensitive" in the API will not
  6197. // be included in the string output. The member name will be present, but the
  6198. // value will be replaced with "sensitive".
  6199. func (s CaptchaResponse) GoString() string {
  6200. return s.String()
  6201. }
  6202. // SetFailureReason sets the FailureReason field's value.
  6203. func (s *CaptchaResponse) SetFailureReason(v string) *CaptchaResponse {
  6204. s.FailureReason = &v
  6205. return s
  6206. }
  6207. // SetResponseCode sets the ResponseCode field's value.
  6208. func (s *CaptchaResponse) SetResponseCode(v int64) *CaptchaResponse {
  6209. s.ResponseCode = &v
  6210. return s
  6211. }
  6212. // SetSolveTimestamp sets the SolveTimestamp field's value.
  6213. func (s *CaptchaResponse) SetSolveTimestamp(v int64) *CaptchaResponse {
  6214. s.SolveTimestamp = &v
  6215. return s
  6216. }
  6217. // Specifies that WAF should run a Challenge check against the request to verify
  6218. // that the request is coming from a legitimate client session:
  6219. //
  6220. // - If the request includes a valid, unexpired challenge token, WAF applies
  6221. // any custom request handling and labels that you've configured and then
  6222. // allows the web request inspection to proceed to the next rule, similar
  6223. // to a CountAction.
  6224. //
  6225. // - If the request doesn't include a valid, unexpired challenge token, WAF
  6226. // discontinues the web ACL evaluation of the request and blocks it from
  6227. // going to its intended destination. WAF then generates a challenge response
  6228. // that it sends back to the client, which includes the following: The header
  6229. // x-amzn-waf-action with a value of challenge. The HTTP status code 202
  6230. // Request Accepted. If the request contains an Accept header with a value
  6231. // of text/html, the response includes a JavaScript page interstitial with
  6232. // a challenge script. Challenges run silent browser interrogations in the
  6233. // background, and don't generally affect the end user experience. A challenge
  6234. // enforces token acquisition using an interstitial JavaScript challenge
  6235. // that inspects the client session for legitimate behavior. The challenge
  6236. // blocks bots or at least increases the cost of operating sophisticated
  6237. // bots. After the client session successfully responds to the challenge,
  6238. // it receives a new token from WAF, which the challenge script uses to resubmit
  6239. // the original request.
  6240. //
  6241. // You can configure the expiration time in the ChallengeConfig ImmunityTimeProperty
  6242. // setting at the rule and web ACL level. The rule setting overrides the web
  6243. // ACL setting.
  6244. //
  6245. // This action option is available for rules. It isn't available for web ACL
  6246. // default actions.
  6247. type ChallengeAction struct {
  6248. _ struct{} `type:"structure"`
  6249. // Defines custom handling for the web request, used when the challenge inspection
  6250. // determines that the request's token is valid and unexpired.
  6251. //
  6252. // For information about customizing web requests and responses, see Customizing
  6253. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  6254. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  6255. CustomRequestHandling *CustomRequestHandling `type:"structure"`
  6256. }
  6257. // String returns the string representation.
  6258. //
  6259. // API parameter values that are decorated as "sensitive" in the API will not
  6260. // be included in the string output. The member name will be present, but the
  6261. // value will be replaced with "sensitive".
  6262. func (s ChallengeAction) String() string {
  6263. return awsutil.Prettify(s)
  6264. }
  6265. // GoString returns the string representation.
  6266. //
  6267. // API parameter values that are decorated as "sensitive" in the API will not
  6268. // be included in the string output. The member name will be present, but the
  6269. // value will be replaced with "sensitive".
  6270. func (s ChallengeAction) GoString() string {
  6271. return s.String()
  6272. }
  6273. // Validate inspects the fields of the type to determine if they are valid.
  6274. func (s *ChallengeAction) Validate() error {
  6275. invalidParams := request.ErrInvalidParams{Context: "ChallengeAction"}
  6276. if s.CustomRequestHandling != nil {
  6277. if err := s.CustomRequestHandling.Validate(); err != nil {
  6278. invalidParams.AddNested("CustomRequestHandling", err.(request.ErrInvalidParams))
  6279. }
  6280. }
  6281. if invalidParams.Len() > 0 {
  6282. return invalidParams
  6283. }
  6284. return nil
  6285. }
  6286. // SetCustomRequestHandling sets the CustomRequestHandling field's value.
  6287. func (s *ChallengeAction) SetCustomRequestHandling(v *CustomRequestHandling) *ChallengeAction {
  6288. s.CustomRequestHandling = v
  6289. return s
  6290. }
  6291. // Specifies how WAF should handle Challenge evaluations. This is available
  6292. // at the web ACL level and in each rule.
  6293. type ChallengeConfig struct {
  6294. _ struct{} `type:"structure"`
  6295. // Determines how long a challenge timestamp in the token remains valid after
  6296. // the client successfully responds to a challenge.
  6297. ImmunityTimeProperty *ImmunityTimeProperty `type:"structure"`
  6298. }
  6299. // String returns the string representation.
  6300. //
  6301. // API parameter values that are decorated as "sensitive" in the API will not
  6302. // be included in the string output. The member name will be present, but the
  6303. // value will be replaced with "sensitive".
  6304. func (s ChallengeConfig) String() string {
  6305. return awsutil.Prettify(s)
  6306. }
  6307. // GoString returns the string representation.
  6308. //
  6309. // API parameter values that are decorated as "sensitive" in the API will not
  6310. // be included in the string output. The member name will be present, but the
  6311. // value will be replaced with "sensitive".
  6312. func (s ChallengeConfig) GoString() string {
  6313. return s.String()
  6314. }
  6315. // Validate inspects the fields of the type to determine if they are valid.
  6316. func (s *ChallengeConfig) Validate() error {
  6317. invalidParams := request.ErrInvalidParams{Context: "ChallengeConfig"}
  6318. if s.ImmunityTimeProperty != nil {
  6319. if err := s.ImmunityTimeProperty.Validate(); err != nil {
  6320. invalidParams.AddNested("ImmunityTimeProperty", err.(request.ErrInvalidParams))
  6321. }
  6322. }
  6323. if invalidParams.Len() > 0 {
  6324. return invalidParams
  6325. }
  6326. return nil
  6327. }
  6328. // SetImmunityTimeProperty sets the ImmunityTimeProperty field's value.
  6329. func (s *ChallengeConfig) SetImmunityTimeProperty(v *ImmunityTimeProperty) *ChallengeConfig {
  6330. s.ImmunityTimeProperty = v
  6331. return s
  6332. }
  6333. // The result from the inspection of the web request for a valid challenge token.
  6334. type ChallengeResponse struct {
  6335. _ struct{} `type:"structure"`
  6336. // The reason for failure, populated when the evaluation of the token fails.
  6337. FailureReason *string `type:"string" enum:"FailureReason"`
  6338. // The HTTP response code indicating the status of the challenge token in the
  6339. // web request. If the token is missing, invalid, or expired, this code is 202
  6340. // Request Accepted.
  6341. ResponseCode *int64 `type:"integer"`
  6342. // The time that the challenge was last solved for the supplied token.
  6343. SolveTimestamp *int64 `type:"long"`
  6344. }
  6345. // String returns the string representation.
  6346. //
  6347. // API parameter values that are decorated as "sensitive" in the API will not
  6348. // be included in the string output. The member name will be present, but the
  6349. // value will be replaced with "sensitive".
  6350. func (s ChallengeResponse) String() string {
  6351. return awsutil.Prettify(s)
  6352. }
  6353. // GoString returns the string representation.
  6354. //
  6355. // API parameter values that are decorated as "sensitive" in the API will not
  6356. // be included in the string output. The member name will be present, but the
  6357. // value will be replaced with "sensitive".
  6358. func (s ChallengeResponse) GoString() string {
  6359. return s.String()
  6360. }
  6361. // SetFailureReason sets the FailureReason field's value.
  6362. func (s *ChallengeResponse) SetFailureReason(v string) *ChallengeResponse {
  6363. s.FailureReason = &v
  6364. return s
  6365. }
  6366. // SetResponseCode sets the ResponseCode field's value.
  6367. func (s *ChallengeResponse) SetResponseCode(v int64) *ChallengeResponse {
  6368. s.ResponseCode = &v
  6369. return s
  6370. }
  6371. // SetSolveTimestamp sets the SolveTimestamp field's value.
  6372. func (s *ChallengeResponse) SetSolveTimestamp(v int64) *ChallengeResponse {
  6373. s.SolveTimestamp = &v
  6374. return s
  6375. }
  6376. type CheckCapacityInput struct {
  6377. _ struct{} `type:"structure"`
  6378. // An array of Rule that you're configuring to use in a rule group or web ACL.
  6379. //
  6380. // Rules is a required field
  6381. Rules []*Rule `type:"list" required:"true"`
  6382. // Specifies whether this is for an Amazon CloudFront distribution or for a
  6383. // regional application. A regional application can be an Application Load Balancer
  6384. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  6385. // Cognito user pool.
  6386. //
  6387. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  6388. // as follows:
  6389. //
  6390. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  6391. // --region=us-east-1.
  6392. //
  6393. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  6394. //
  6395. // Scope is a required field
  6396. Scope *string `type:"string" required:"true" enum:"Scope"`
  6397. }
  6398. // String returns the string representation.
  6399. //
  6400. // API parameter values that are decorated as "sensitive" in the API will not
  6401. // be included in the string output. The member name will be present, but the
  6402. // value will be replaced with "sensitive".
  6403. func (s CheckCapacityInput) String() string {
  6404. return awsutil.Prettify(s)
  6405. }
  6406. // GoString returns the string representation.
  6407. //
  6408. // API parameter values that are decorated as "sensitive" in the API will not
  6409. // be included in the string output. The member name will be present, but the
  6410. // value will be replaced with "sensitive".
  6411. func (s CheckCapacityInput) GoString() string {
  6412. return s.String()
  6413. }
  6414. // Validate inspects the fields of the type to determine if they are valid.
  6415. func (s *CheckCapacityInput) Validate() error {
  6416. invalidParams := request.ErrInvalidParams{Context: "CheckCapacityInput"}
  6417. if s.Rules == nil {
  6418. invalidParams.Add(request.NewErrParamRequired("Rules"))
  6419. }
  6420. if s.Scope == nil {
  6421. invalidParams.Add(request.NewErrParamRequired("Scope"))
  6422. }
  6423. if s.Rules != nil {
  6424. for i, v := range s.Rules {
  6425. if v == nil {
  6426. continue
  6427. }
  6428. if err := v.Validate(); err != nil {
  6429. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  6430. }
  6431. }
  6432. }
  6433. if invalidParams.Len() > 0 {
  6434. return invalidParams
  6435. }
  6436. return nil
  6437. }
  6438. // SetRules sets the Rules field's value.
  6439. func (s *CheckCapacityInput) SetRules(v []*Rule) *CheckCapacityInput {
  6440. s.Rules = v
  6441. return s
  6442. }
  6443. // SetScope sets the Scope field's value.
  6444. func (s *CheckCapacityInput) SetScope(v string) *CheckCapacityInput {
  6445. s.Scope = &v
  6446. return s
  6447. }
  6448. type CheckCapacityOutput struct {
  6449. _ struct{} `type:"structure"`
  6450. // The capacity required by the rules and scope.
  6451. Capacity *int64 `type:"long"`
  6452. }
  6453. // String returns the string representation.
  6454. //
  6455. // API parameter values that are decorated as "sensitive" in the API will not
  6456. // be included in the string output. The member name will be present, but the
  6457. // value will be replaced with "sensitive".
  6458. func (s CheckCapacityOutput) String() string {
  6459. return awsutil.Prettify(s)
  6460. }
  6461. // GoString returns the string representation.
  6462. //
  6463. // API parameter values that are decorated as "sensitive" in the API will not
  6464. // be included in the string output. The member name will be present, but the
  6465. // value will be replaced with "sensitive".
  6466. func (s CheckCapacityOutput) GoString() string {
  6467. return s.String()
  6468. }
  6469. // SetCapacity sets the Capacity field's value.
  6470. func (s *CheckCapacityOutput) SetCapacity(v int64) *CheckCapacityOutput {
  6471. s.Capacity = &v
  6472. return s
  6473. }
  6474. // A single match condition for a Filter.
  6475. type Condition struct {
  6476. _ struct{} `type:"structure"`
  6477. // A single action condition. This is the action setting that a log record must
  6478. // contain in order to meet the condition.
  6479. ActionCondition *ActionCondition `type:"structure"`
  6480. // A single label name condition. This is the fully qualified label name that
  6481. // a log record must contain in order to meet the condition. Fully qualified
  6482. // labels have a prefix, optional namespaces, and label name. The prefix identifies
  6483. // the rule group or web ACL context of the rule that added the label.
  6484. LabelNameCondition *LabelNameCondition `type:"structure"`
  6485. }
  6486. // String returns the string representation.
  6487. //
  6488. // API parameter values that are decorated as "sensitive" in the API will not
  6489. // be included in the string output. The member name will be present, but the
  6490. // value will be replaced with "sensitive".
  6491. func (s Condition) String() string {
  6492. return awsutil.Prettify(s)
  6493. }
  6494. // GoString returns the string representation.
  6495. //
  6496. // API parameter values that are decorated as "sensitive" in the API will not
  6497. // be included in the string output. The member name will be present, but the
  6498. // value will be replaced with "sensitive".
  6499. func (s Condition) GoString() string {
  6500. return s.String()
  6501. }
  6502. // Validate inspects the fields of the type to determine if they are valid.
  6503. func (s *Condition) Validate() error {
  6504. invalidParams := request.ErrInvalidParams{Context: "Condition"}
  6505. if s.ActionCondition != nil {
  6506. if err := s.ActionCondition.Validate(); err != nil {
  6507. invalidParams.AddNested("ActionCondition", err.(request.ErrInvalidParams))
  6508. }
  6509. }
  6510. if s.LabelNameCondition != nil {
  6511. if err := s.LabelNameCondition.Validate(); err != nil {
  6512. invalidParams.AddNested("LabelNameCondition", err.(request.ErrInvalidParams))
  6513. }
  6514. }
  6515. if invalidParams.Len() > 0 {
  6516. return invalidParams
  6517. }
  6518. return nil
  6519. }
  6520. // SetActionCondition sets the ActionCondition field's value.
  6521. func (s *Condition) SetActionCondition(v *ActionCondition) *Condition {
  6522. s.ActionCondition = v
  6523. return s
  6524. }
  6525. // SetLabelNameCondition sets the LabelNameCondition field's value.
  6526. func (s *Condition) SetLabelNameCondition(v *LabelNameCondition) *Condition {
  6527. s.LabelNameCondition = v
  6528. return s
  6529. }
  6530. // The filter to use to identify the subset of cookies to inspect in a web request.
  6531. //
  6532. // You must specify exactly one setting: either All, IncludedCookies, or ExcludedCookies.
  6533. //
  6534. // Example JSON: "MatchPattern": { "IncludedCookies": {"KeyToInclude1", "KeyToInclude2",
  6535. // "KeyToInclude3"} }
  6536. type CookieMatchPattern struct {
  6537. _ struct{} `type:"structure"`
  6538. // Inspect all cookies.
  6539. All *All `type:"structure"`
  6540. // Inspect only the cookies whose keys don't match any of the strings specified
  6541. // here.
  6542. ExcludedCookies []*string `min:"1" type:"list"`
  6543. // Inspect only the cookies that have a key that matches one of the strings
  6544. // specified here.
  6545. IncludedCookies []*string `min:"1" type:"list"`
  6546. }
  6547. // String returns the string representation.
  6548. //
  6549. // API parameter values that are decorated as "sensitive" in the API will not
  6550. // be included in the string output. The member name will be present, but the
  6551. // value will be replaced with "sensitive".
  6552. func (s CookieMatchPattern) String() string {
  6553. return awsutil.Prettify(s)
  6554. }
  6555. // GoString returns the string representation.
  6556. //
  6557. // API parameter values that are decorated as "sensitive" in the API will not
  6558. // be included in the string output. The member name will be present, but the
  6559. // value will be replaced with "sensitive".
  6560. func (s CookieMatchPattern) GoString() string {
  6561. return s.String()
  6562. }
  6563. // Validate inspects the fields of the type to determine if they are valid.
  6564. func (s *CookieMatchPattern) Validate() error {
  6565. invalidParams := request.ErrInvalidParams{Context: "CookieMatchPattern"}
  6566. if s.ExcludedCookies != nil && len(s.ExcludedCookies) < 1 {
  6567. invalidParams.Add(request.NewErrParamMinLen("ExcludedCookies", 1))
  6568. }
  6569. if s.IncludedCookies != nil && len(s.IncludedCookies) < 1 {
  6570. invalidParams.Add(request.NewErrParamMinLen("IncludedCookies", 1))
  6571. }
  6572. if invalidParams.Len() > 0 {
  6573. return invalidParams
  6574. }
  6575. return nil
  6576. }
  6577. // SetAll sets the All field's value.
  6578. func (s *CookieMatchPattern) SetAll(v *All) *CookieMatchPattern {
  6579. s.All = v
  6580. return s
  6581. }
  6582. // SetExcludedCookies sets the ExcludedCookies field's value.
  6583. func (s *CookieMatchPattern) SetExcludedCookies(v []*string) *CookieMatchPattern {
  6584. s.ExcludedCookies = v
  6585. return s
  6586. }
  6587. // SetIncludedCookies sets the IncludedCookies field's value.
  6588. func (s *CookieMatchPattern) SetIncludedCookies(v []*string) *CookieMatchPattern {
  6589. s.IncludedCookies = v
  6590. return s
  6591. }
  6592. // Inspect the cookies in the web request. You can specify the parts of the
  6593. // cookies to inspect and you can narrow the set of cookies to inspect by including
  6594. // or excluding specific keys.
  6595. //
  6596. // This is used to indicate the web request component to inspect, in the FieldToMatch
  6597. // specification.
  6598. //
  6599. // Example JSON: "Cookies": { "MatchPattern": { "All": {} }, "MatchScope": "KEY",
  6600. // "OversizeHandling": "MATCH" }
  6601. type Cookies struct {
  6602. _ struct{} `type:"structure"`
  6603. // The filter to use to identify the subset of cookies to inspect in a web request.
  6604. //
  6605. // You must specify exactly one setting: either All, IncludedCookies, or ExcludedCookies.
  6606. //
  6607. // Example JSON: "MatchPattern": { "IncludedCookies": {"KeyToInclude1", "KeyToInclude2",
  6608. // "KeyToInclude3"} }
  6609. //
  6610. // MatchPattern is a required field
  6611. MatchPattern *CookieMatchPattern `type:"structure" required:"true"`
  6612. // The parts of the cookies to inspect with the rule inspection criteria. If
  6613. // you specify All, WAF inspects both keys and values.
  6614. //
  6615. // MatchScope is a required field
  6616. MatchScope *string `type:"string" required:"true" enum:"MapMatchScope"`
  6617. // What WAF should do if the cookies of the request are larger than WAF can
  6618. // inspect. WAF does not support inspecting the entire contents of request cookies
  6619. // when they exceed 8 KB (8192 bytes) or 200 total cookies. The underlying host
  6620. // service forwards a maximum of 200 cookies and at most 8 KB of cookie contents
  6621. // to WAF.
  6622. //
  6623. // The options for oversize handling are the following:
  6624. //
  6625. // * CONTINUE - Inspect the cookies normally, according to the rule inspection
  6626. // criteria.
  6627. //
  6628. // * MATCH - Treat the web request as matching the rule statement. WAF applies
  6629. // the rule action to the request.
  6630. //
  6631. // * NO_MATCH - Treat the web request as not matching the rule statement.
  6632. //
  6633. // OversizeHandling is a required field
  6634. OversizeHandling *string `type:"string" required:"true" enum:"OversizeHandling"`
  6635. }
  6636. // String returns the string representation.
  6637. //
  6638. // API parameter values that are decorated as "sensitive" in the API will not
  6639. // be included in the string output. The member name will be present, but the
  6640. // value will be replaced with "sensitive".
  6641. func (s Cookies) String() string {
  6642. return awsutil.Prettify(s)
  6643. }
  6644. // GoString returns the string representation.
  6645. //
  6646. // API parameter values that are decorated as "sensitive" in the API will not
  6647. // be included in the string output. The member name will be present, but the
  6648. // value will be replaced with "sensitive".
  6649. func (s Cookies) GoString() string {
  6650. return s.String()
  6651. }
  6652. // Validate inspects the fields of the type to determine if they are valid.
  6653. func (s *Cookies) Validate() error {
  6654. invalidParams := request.ErrInvalidParams{Context: "Cookies"}
  6655. if s.MatchPattern == nil {
  6656. invalidParams.Add(request.NewErrParamRequired("MatchPattern"))
  6657. }
  6658. if s.MatchScope == nil {
  6659. invalidParams.Add(request.NewErrParamRequired("MatchScope"))
  6660. }
  6661. if s.OversizeHandling == nil {
  6662. invalidParams.Add(request.NewErrParamRequired("OversizeHandling"))
  6663. }
  6664. if s.MatchPattern != nil {
  6665. if err := s.MatchPattern.Validate(); err != nil {
  6666. invalidParams.AddNested("MatchPattern", err.(request.ErrInvalidParams))
  6667. }
  6668. }
  6669. if invalidParams.Len() > 0 {
  6670. return invalidParams
  6671. }
  6672. return nil
  6673. }
  6674. // SetMatchPattern sets the MatchPattern field's value.
  6675. func (s *Cookies) SetMatchPattern(v *CookieMatchPattern) *Cookies {
  6676. s.MatchPattern = v
  6677. return s
  6678. }
  6679. // SetMatchScope sets the MatchScope field's value.
  6680. func (s *Cookies) SetMatchScope(v string) *Cookies {
  6681. s.MatchScope = &v
  6682. return s
  6683. }
  6684. // SetOversizeHandling sets the OversizeHandling field's value.
  6685. func (s *Cookies) SetOversizeHandling(v string) *Cookies {
  6686. s.OversizeHandling = &v
  6687. return s
  6688. }
  6689. // Specifies that WAF should count the request. Optionally defines additional
  6690. // custom handling for the request.
  6691. //
  6692. // This is used in the context of other settings, for example to specify values
  6693. // for RuleAction and web ACL DefaultAction.
  6694. type CountAction struct {
  6695. _ struct{} `type:"structure"`
  6696. // Defines custom handling for the web request.
  6697. //
  6698. // For information about customizing web requests and responses, see Customizing
  6699. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  6700. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  6701. CustomRequestHandling *CustomRequestHandling `type:"structure"`
  6702. }
  6703. // String returns the string representation.
  6704. //
  6705. // API parameter values that are decorated as "sensitive" in the API will not
  6706. // be included in the string output. The member name will be present, but the
  6707. // value will be replaced with "sensitive".
  6708. func (s CountAction) String() string {
  6709. return awsutil.Prettify(s)
  6710. }
  6711. // GoString returns the string representation.
  6712. //
  6713. // API parameter values that are decorated as "sensitive" in the API will not
  6714. // be included in the string output. The member name will be present, but the
  6715. // value will be replaced with "sensitive".
  6716. func (s CountAction) GoString() string {
  6717. return s.String()
  6718. }
  6719. // Validate inspects the fields of the type to determine if they are valid.
  6720. func (s *CountAction) Validate() error {
  6721. invalidParams := request.ErrInvalidParams{Context: "CountAction"}
  6722. if s.CustomRequestHandling != nil {
  6723. if err := s.CustomRequestHandling.Validate(); err != nil {
  6724. invalidParams.AddNested("CustomRequestHandling", err.(request.ErrInvalidParams))
  6725. }
  6726. }
  6727. if invalidParams.Len() > 0 {
  6728. return invalidParams
  6729. }
  6730. return nil
  6731. }
  6732. // SetCustomRequestHandling sets the CustomRequestHandling field's value.
  6733. func (s *CountAction) SetCustomRequestHandling(v *CustomRequestHandling) *CountAction {
  6734. s.CustomRequestHandling = v
  6735. return s
  6736. }
  6737. type CreateIPSetInput struct {
  6738. _ struct{} `type:"structure"`
  6739. // Contains an array of strings that specifies zero or more IP addresses or
  6740. // blocks of IP addresses. All addresses must be specified using Classless Inter-Domain
  6741. // Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except
  6742. // for /0.
  6743. //
  6744. // Example address strings:
  6745. //
  6746. // * To configure WAF to allow, block, or count requests that originated
  6747. // from the IP address 192.0.2.44, specify 192.0.2.44/32.
  6748. //
  6749. // * To configure WAF to allow, block, or count requests that originated
  6750. // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.
  6751. //
  6752. // * To configure WAF to allow, block, or count requests that originated
  6753. // from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.
  6754. //
  6755. // * To configure WAF to allow, block, or count requests that originated
  6756. // from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff,
  6757. // specify 1111:0000:0000:0000:0000:0000:0000:0000/64.
  6758. //
  6759. // For more information about CIDR notation, see the Wikipedia entry Classless
  6760. // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  6761. //
  6762. // Example JSON Addresses specifications:
  6763. //
  6764. // * Empty array: "Addresses": []
  6765. //
  6766. // * Array with one address: "Addresses": ["192.0.2.44/32"]
  6767. //
  6768. // * Array with three addresses: "Addresses": ["192.0.2.44/32", "192.0.2.0/24",
  6769. // "192.0.0.0/16"]
  6770. //
  6771. // * INVALID specification: "Addresses": [""] INVALID
  6772. //
  6773. // Addresses is a required field
  6774. Addresses []*string `type:"list" required:"true"`
  6775. // A description of the IP set that helps with identification.
  6776. Description *string `min:"1" type:"string"`
  6777. // The version of the IP addresses, either IPV4 or IPV6.
  6778. //
  6779. // IPAddressVersion is a required field
  6780. IPAddressVersion *string `type:"string" required:"true" enum:"IPAddressVersion"`
  6781. // The name of the IP set. You cannot change the name of an IPSet after you
  6782. // create it.
  6783. //
  6784. // Name is a required field
  6785. Name *string `min:"1" type:"string" required:"true"`
  6786. // Specifies whether this is for an Amazon CloudFront distribution or for a
  6787. // regional application. A regional application can be an Application Load Balancer
  6788. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  6789. // Cognito user pool.
  6790. //
  6791. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  6792. // as follows:
  6793. //
  6794. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  6795. // --region=us-east-1.
  6796. //
  6797. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  6798. //
  6799. // Scope is a required field
  6800. Scope *string `type:"string" required:"true" enum:"Scope"`
  6801. // An array of key:value pairs to associate with the resource.
  6802. Tags []*Tag `min:"1" type:"list"`
  6803. }
  6804. // String returns the string representation.
  6805. //
  6806. // API parameter values that are decorated as "sensitive" in the API will not
  6807. // be included in the string output. The member name will be present, but the
  6808. // value will be replaced with "sensitive".
  6809. func (s CreateIPSetInput) String() string {
  6810. return awsutil.Prettify(s)
  6811. }
  6812. // GoString returns the string representation.
  6813. //
  6814. // API parameter values that are decorated as "sensitive" in the API will not
  6815. // be included in the string output. The member name will be present, but the
  6816. // value will be replaced with "sensitive".
  6817. func (s CreateIPSetInput) GoString() string {
  6818. return s.String()
  6819. }
  6820. // Validate inspects the fields of the type to determine if they are valid.
  6821. func (s *CreateIPSetInput) Validate() error {
  6822. invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"}
  6823. if s.Addresses == nil {
  6824. invalidParams.Add(request.NewErrParamRequired("Addresses"))
  6825. }
  6826. if s.Description != nil && len(*s.Description) < 1 {
  6827. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  6828. }
  6829. if s.IPAddressVersion == nil {
  6830. invalidParams.Add(request.NewErrParamRequired("IPAddressVersion"))
  6831. }
  6832. if s.Name == nil {
  6833. invalidParams.Add(request.NewErrParamRequired("Name"))
  6834. }
  6835. if s.Name != nil && len(*s.Name) < 1 {
  6836. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  6837. }
  6838. if s.Scope == nil {
  6839. invalidParams.Add(request.NewErrParamRequired("Scope"))
  6840. }
  6841. if s.Tags != nil && len(s.Tags) < 1 {
  6842. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  6843. }
  6844. if s.Tags != nil {
  6845. for i, v := range s.Tags {
  6846. if v == nil {
  6847. continue
  6848. }
  6849. if err := v.Validate(); err != nil {
  6850. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6851. }
  6852. }
  6853. }
  6854. if invalidParams.Len() > 0 {
  6855. return invalidParams
  6856. }
  6857. return nil
  6858. }
  6859. // SetAddresses sets the Addresses field's value.
  6860. func (s *CreateIPSetInput) SetAddresses(v []*string) *CreateIPSetInput {
  6861. s.Addresses = v
  6862. return s
  6863. }
  6864. // SetDescription sets the Description field's value.
  6865. func (s *CreateIPSetInput) SetDescription(v string) *CreateIPSetInput {
  6866. s.Description = &v
  6867. return s
  6868. }
  6869. // SetIPAddressVersion sets the IPAddressVersion field's value.
  6870. func (s *CreateIPSetInput) SetIPAddressVersion(v string) *CreateIPSetInput {
  6871. s.IPAddressVersion = &v
  6872. return s
  6873. }
  6874. // SetName sets the Name field's value.
  6875. func (s *CreateIPSetInput) SetName(v string) *CreateIPSetInput {
  6876. s.Name = &v
  6877. return s
  6878. }
  6879. // SetScope sets the Scope field's value.
  6880. func (s *CreateIPSetInput) SetScope(v string) *CreateIPSetInput {
  6881. s.Scope = &v
  6882. return s
  6883. }
  6884. // SetTags sets the Tags field's value.
  6885. func (s *CreateIPSetInput) SetTags(v []*Tag) *CreateIPSetInput {
  6886. s.Tags = v
  6887. return s
  6888. }
  6889. type CreateIPSetOutput struct {
  6890. _ struct{} `type:"structure"`
  6891. // High-level information about an IPSet, returned by operations like create
  6892. // and list. This provides information like the ID, that you can use to retrieve
  6893. // and manage an IPSet, and the ARN, that you provide to the IPSetReferenceStatement
  6894. // to use the address set in a Rule.
  6895. Summary *IPSetSummary `type:"structure"`
  6896. }
  6897. // String returns the string representation.
  6898. //
  6899. // API parameter values that are decorated as "sensitive" in the API will not
  6900. // be included in the string output. The member name will be present, but the
  6901. // value will be replaced with "sensitive".
  6902. func (s CreateIPSetOutput) String() string {
  6903. return awsutil.Prettify(s)
  6904. }
  6905. // GoString returns the string representation.
  6906. //
  6907. // API parameter values that are decorated as "sensitive" in the API will not
  6908. // be included in the string output. The member name will be present, but the
  6909. // value will be replaced with "sensitive".
  6910. func (s CreateIPSetOutput) GoString() string {
  6911. return s.String()
  6912. }
  6913. // SetSummary sets the Summary field's value.
  6914. func (s *CreateIPSetOutput) SetSummary(v *IPSetSummary) *CreateIPSetOutput {
  6915. s.Summary = v
  6916. return s
  6917. }
  6918. type CreateRegexPatternSetInput struct {
  6919. _ struct{} `type:"structure"`
  6920. // A description of the set that helps with identification.
  6921. Description *string `min:"1" type:"string"`
  6922. // The name of the set. You cannot change the name after you create the set.
  6923. //
  6924. // Name is a required field
  6925. Name *string `min:"1" type:"string" required:"true"`
  6926. // Array of regular expression strings.
  6927. //
  6928. // RegularExpressionList is a required field
  6929. RegularExpressionList []*Regex `type:"list" required:"true"`
  6930. // Specifies whether this is for an Amazon CloudFront distribution or for a
  6931. // regional application. A regional application can be an Application Load Balancer
  6932. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  6933. // Cognito user pool.
  6934. //
  6935. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  6936. // as follows:
  6937. //
  6938. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  6939. // --region=us-east-1.
  6940. //
  6941. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  6942. //
  6943. // Scope is a required field
  6944. Scope *string `type:"string" required:"true" enum:"Scope"`
  6945. // An array of key:value pairs to associate with the resource.
  6946. Tags []*Tag `min:"1" type:"list"`
  6947. }
  6948. // String returns the string representation.
  6949. //
  6950. // API parameter values that are decorated as "sensitive" in the API will not
  6951. // be included in the string output. The member name will be present, but the
  6952. // value will be replaced with "sensitive".
  6953. func (s CreateRegexPatternSetInput) String() string {
  6954. return awsutil.Prettify(s)
  6955. }
  6956. // GoString returns the string representation.
  6957. //
  6958. // API parameter values that are decorated as "sensitive" in the API will not
  6959. // be included in the string output. The member name will be present, but the
  6960. // value will be replaced with "sensitive".
  6961. func (s CreateRegexPatternSetInput) GoString() string {
  6962. return s.String()
  6963. }
  6964. // Validate inspects the fields of the type to determine if they are valid.
  6965. func (s *CreateRegexPatternSetInput) Validate() error {
  6966. invalidParams := request.ErrInvalidParams{Context: "CreateRegexPatternSetInput"}
  6967. if s.Description != nil && len(*s.Description) < 1 {
  6968. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  6969. }
  6970. if s.Name == nil {
  6971. invalidParams.Add(request.NewErrParamRequired("Name"))
  6972. }
  6973. if s.Name != nil && len(*s.Name) < 1 {
  6974. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  6975. }
  6976. if s.RegularExpressionList == nil {
  6977. invalidParams.Add(request.NewErrParamRequired("RegularExpressionList"))
  6978. }
  6979. if s.Scope == nil {
  6980. invalidParams.Add(request.NewErrParamRequired("Scope"))
  6981. }
  6982. if s.Tags != nil && len(s.Tags) < 1 {
  6983. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  6984. }
  6985. if s.RegularExpressionList != nil {
  6986. for i, v := range s.RegularExpressionList {
  6987. if v == nil {
  6988. continue
  6989. }
  6990. if err := v.Validate(); err != nil {
  6991. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RegularExpressionList", i), err.(request.ErrInvalidParams))
  6992. }
  6993. }
  6994. }
  6995. if s.Tags != nil {
  6996. for i, v := range s.Tags {
  6997. if v == nil {
  6998. continue
  6999. }
  7000. if err := v.Validate(); err != nil {
  7001. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  7002. }
  7003. }
  7004. }
  7005. if invalidParams.Len() > 0 {
  7006. return invalidParams
  7007. }
  7008. return nil
  7009. }
  7010. // SetDescription sets the Description field's value.
  7011. func (s *CreateRegexPatternSetInput) SetDescription(v string) *CreateRegexPatternSetInput {
  7012. s.Description = &v
  7013. return s
  7014. }
  7015. // SetName sets the Name field's value.
  7016. func (s *CreateRegexPatternSetInput) SetName(v string) *CreateRegexPatternSetInput {
  7017. s.Name = &v
  7018. return s
  7019. }
  7020. // SetRegularExpressionList sets the RegularExpressionList field's value.
  7021. func (s *CreateRegexPatternSetInput) SetRegularExpressionList(v []*Regex) *CreateRegexPatternSetInput {
  7022. s.RegularExpressionList = v
  7023. return s
  7024. }
  7025. // SetScope sets the Scope field's value.
  7026. func (s *CreateRegexPatternSetInput) SetScope(v string) *CreateRegexPatternSetInput {
  7027. s.Scope = &v
  7028. return s
  7029. }
  7030. // SetTags sets the Tags field's value.
  7031. func (s *CreateRegexPatternSetInput) SetTags(v []*Tag) *CreateRegexPatternSetInput {
  7032. s.Tags = v
  7033. return s
  7034. }
  7035. type CreateRegexPatternSetOutput struct {
  7036. _ struct{} `type:"structure"`
  7037. // High-level information about a RegexPatternSet, returned by operations like
  7038. // create and list. This provides information like the ID, that you can use
  7039. // to retrieve and manage a RegexPatternSet, and the ARN, that you provide to
  7040. // the RegexPatternSetReferenceStatement to use the pattern set in a Rule.
  7041. Summary *RegexPatternSetSummary `type:"structure"`
  7042. }
  7043. // String returns the string representation.
  7044. //
  7045. // API parameter values that are decorated as "sensitive" in the API will not
  7046. // be included in the string output. The member name will be present, but the
  7047. // value will be replaced with "sensitive".
  7048. func (s CreateRegexPatternSetOutput) String() string {
  7049. return awsutil.Prettify(s)
  7050. }
  7051. // GoString returns the string representation.
  7052. //
  7053. // API parameter values that are decorated as "sensitive" in the API will not
  7054. // be included in the string output. The member name will be present, but the
  7055. // value will be replaced with "sensitive".
  7056. func (s CreateRegexPatternSetOutput) GoString() string {
  7057. return s.String()
  7058. }
  7059. // SetSummary sets the Summary field's value.
  7060. func (s *CreateRegexPatternSetOutput) SetSummary(v *RegexPatternSetSummary) *CreateRegexPatternSetOutput {
  7061. s.Summary = v
  7062. return s
  7063. }
  7064. type CreateRuleGroupInput struct {
  7065. _ struct{} `type:"structure"`
  7066. // The web ACL capacity units (WCUs) required for this rule group.
  7067. //
  7068. // When you create your own rule group, you define this, and you cannot change
  7069. // it after creation. When you add or modify the rules in a rule group, WAF
  7070. // enforces this limit. You can check the capacity for a set of rules using
  7071. // CheckCapacity.
  7072. //
  7073. // WAF uses WCUs to calculate and control the operating resources that are used
  7074. // to run your rules, rule groups, and web ACLs. WAF calculates capacity differently
  7075. // for each rule type, to reflect the relative cost of each rule. Simple rules
  7076. // that cost little to run use fewer WCUs than more complex rules that use more
  7077. // processing power. Rule group capacity is fixed at creation, which helps users
  7078. // plan their web ACL WCU usage when they use a rule group. The WCU limit for
  7079. // web ACLs is 1,500.
  7080. //
  7081. // Capacity is a required field
  7082. Capacity *int64 `min:"1" type:"long" required:"true"`
  7083. // A map of custom response keys and content bodies. When you create a rule
  7084. // with a block action, you can send a custom response to the web request. You
  7085. // define these for the rule group, and then use them in the rules that you
  7086. // define in the rule group.
  7087. //
  7088. // For information about customizing web requests and responses, see Customizing
  7089. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  7090. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7091. //
  7092. // For information about the limits on count and size for custom request and
  7093. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  7094. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7095. CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"`
  7096. // A description of the rule group that helps with identification.
  7097. Description *string `min:"1" type:"string"`
  7098. // The name of the rule group. You cannot change the name of a rule group after
  7099. // you create it.
  7100. //
  7101. // Name is a required field
  7102. Name *string `min:"1" type:"string" required:"true"`
  7103. // The Rule statements used to identify the web requests that you want to allow,
  7104. // block, or count. Each rule includes one top-level statement that WAF uses
  7105. // to identify matching web requests, and parameters that govern how WAF handles
  7106. // them.
  7107. Rules []*Rule `type:"list"`
  7108. // Specifies whether this is for an Amazon CloudFront distribution or for a
  7109. // regional application. A regional application can be an Application Load Balancer
  7110. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  7111. // Cognito user pool.
  7112. //
  7113. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  7114. // as follows:
  7115. //
  7116. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  7117. // --region=us-east-1.
  7118. //
  7119. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  7120. //
  7121. // Scope is a required field
  7122. Scope *string `type:"string" required:"true" enum:"Scope"`
  7123. // An array of key:value pairs to associate with the resource.
  7124. Tags []*Tag `min:"1" type:"list"`
  7125. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  7126. //
  7127. // VisibilityConfig is a required field
  7128. VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
  7129. }
  7130. // String returns the string representation.
  7131. //
  7132. // API parameter values that are decorated as "sensitive" in the API will not
  7133. // be included in the string output. The member name will be present, but the
  7134. // value will be replaced with "sensitive".
  7135. func (s CreateRuleGroupInput) String() string {
  7136. return awsutil.Prettify(s)
  7137. }
  7138. // GoString returns the string representation.
  7139. //
  7140. // API parameter values that are decorated as "sensitive" in the API will not
  7141. // be included in the string output. The member name will be present, but the
  7142. // value will be replaced with "sensitive".
  7143. func (s CreateRuleGroupInput) GoString() string {
  7144. return s.String()
  7145. }
  7146. // Validate inspects the fields of the type to determine if they are valid.
  7147. func (s *CreateRuleGroupInput) Validate() error {
  7148. invalidParams := request.ErrInvalidParams{Context: "CreateRuleGroupInput"}
  7149. if s.Capacity == nil {
  7150. invalidParams.Add(request.NewErrParamRequired("Capacity"))
  7151. }
  7152. if s.Capacity != nil && *s.Capacity < 1 {
  7153. invalidParams.Add(request.NewErrParamMinValue("Capacity", 1))
  7154. }
  7155. if s.CustomResponseBodies != nil && len(s.CustomResponseBodies) < 1 {
  7156. invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodies", 1))
  7157. }
  7158. if s.Description != nil && len(*s.Description) < 1 {
  7159. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  7160. }
  7161. if s.Name == nil {
  7162. invalidParams.Add(request.NewErrParamRequired("Name"))
  7163. }
  7164. if s.Name != nil && len(*s.Name) < 1 {
  7165. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  7166. }
  7167. if s.Scope == nil {
  7168. invalidParams.Add(request.NewErrParamRequired("Scope"))
  7169. }
  7170. if s.Tags != nil && len(s.Tags) < 1 {
  7171. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  7172. }
  7173. if s.VisibilityConfig == nil {
  7174. invalidParams.Add(request.NewErrParamRequired("VisibilityConfig"))
  7175. }
  7176. if s.CustomResponseBodies != nil {
  7177. for i, v := range s.CustomResponseBodies {
  7178. if v == nil {
  7179. continue
  7180. }
  7181. if err := v.Validate(); err != nil {
  7182. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomResponseBodies", i), err.(request.ErrInvalidParams))
  7183. }
  7184. }
  7185. }
  7186. if s.Rules != nil {
  7187. for i, v := range s.Rules {
  7188. if v == nil {
  7189. continue
  7190. }
  7191. if err := v.Validate(); err != nil {
  7192. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  7193. }
  7194. }
  7195. }
  7196. if s.Tags != nil {
  7197. for i, v := range s.Tags {
  7198. if v == nil {
  7199. continue
  7200. }
  7201. if err := v.Validate(); err != nil {
  7202. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  7203. }
  7204. }
  7205. }
  7206. if s.VisibilityConfig != nil {
  7207. if err := s.VisibilityConfig.Validate(); err != nil {
  7208. invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams))
  7209. }
  7210. }
  7211. if invalidParams.Len() > 0 {
  7212. return invalidParams
  7213. }
  7214. return nil
  7215. }
  7216. // SetCapacity sets the Capacity field's value.
  7217. func (s *CreateRuleGroupInput) SetCapacity(v int64) *CreateRuleGroupInput {
  7218. s.Capacity = &v
  7219. return s
  7220. }
  7221. // SetCustomResponseBodies sets the CustomResponseBodies field's value.
  7222. func (s *CreateRuleGroupInput) SetCustomResponseBodies(v map[string]*CustomResponseBody) *CreateRuleGroupInput {
  7223. s.CustomResponseBodies = v
  7224. return s
  7225. }
  7226. // SetDescription sets the Description field's value.
  7227. func (s *CreateRuleGroupInput) SetDescription(v string) *CreateRuleGroupInput {
  7228. s.Description = &v
  7229. return s
  7230. }
  7231. // SetName sets the Name field's value.
  7232. func (s *CreateRuleGroupInput) SetName(v string) *CreateRuleGroupInput {
  7233. s.Name = &v
  7234. return s
  7235. }
  7236. // SetRules sets the Rules field's value.
  7237. func (s *CreateRuleGroupInput) SetRules(v []*Rule) *CreateRuleGroupInput {
  7238. s.Rules = v
  7239. return s
  7240. }
  7241. // SetScope sets the Scope field's value.
  7242. func (s *CreateRuleGroupInput) SetScope(v string) *CreateRuleGroupInput {
  7243. s.Scope = &v
  7244. return s
  7245. }
  7246. // SetTags sets the Tags field's value.
  7247. func (s *CreateRuleGroupInput) SetTags(v []*Tag) *CreateRuleGroupInput {
  7248. s.Tags = v
  7249. return s
  7250. }
  7251. // SetVisibilityConfig sets the VisibilityConfig field's value.
  7252. func (s *CreateRuleGroupInput) SetVisibilityConfig(v *VisibilityConfig) *CreateRuleGroupInput {
  7253. s.VisibilityConfig = v
  7254. return s
  7255. }
  7256. type CreateRuleGroupOutput struct {
  7257. _ struct{} `type:"structure"`
  7258. // High-level information about a RuleGroup, returned by operations like create
  7259. // and list. This provides information like the ID, that you can use to retrieve
  7260. // and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement
  7261. // to use the rule group in a Rule.
  7262. Summary *RuleGroupSummary `type:"structure"`
  7263. }
  7264. // String returns the string representation.
  7265. //
  7266. // API parameter values that are decorated as "sensitive" in the API will not
  7267. // be included in the string output. The member name will be present, but the
  7268. // value will be replaced with "sensitive".
  7269. func (s CreateRuleGroupOutput) String() string {
  7270. return awsutil.Prettify(s)
  7271. }
  7272. // GoString returns the string representation.
  7273. //
  7274. // API parameter values that are decorated as "sensitive" in the API will not
  7275. // be included in the string output. The member name will be present, but the
  7276. // value will be replaced with "sensitive".
  7277. func (s CreateRuleGroupOutput) GoString() string {
  7278. return s.String()
  7279. }
  7280. // SetSummary sets the Summary field's value.
  7281. func (s *CreateRuleGroupOutput) SetSummary(v *RuleGroupSummary) *CreateRuleGroupOutput {
  7282. s.Summary = v
  7283. return s
  7284. }
  7285. type CreateWebACLInput struct {
  7286. _ struct{} `type:"structure"`
  7287. // Specifies how WAF should handle CAPTCHA evaluations for rules that don't
  7288. // have their own CaptchaConfig settings. If you don't specify this, WAF uses
  7289. // its default settings for CaptchaConfig.
  7290. CaptchaConfig *CaptchaConfig `type:"structure"`
  7291. // Specifies how WAF should handle challenge evaluations for rules that don't
  7292. // have their own ChallengeConfig settings. If you don't specify this, WAF uses
  7293. // its default settings for ChallengeConfig.
  7294. ChallengeConfig *ChallengeConfig `type:"structure"`
  7295. // A map of custom response keys and content bodies. When you create a rule
  7296. // with a block action, you can send a custom response to the web request. You
  7297. // define these for the web ACL, and then use them in the rules and default
  7298. // actions that you define in the web ACL.
  7299. //
  7300. // For information about customizing web requests and responses, see Customizing
  7301. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  7302. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7303. //
  7304. // For information about the limits on count and size for custom request and
  7305. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  7306. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7307. CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"`
  7308. // The action to perform if none of the Rules contained in the WebACL match.
  7309. //
  7310. // DefaultAction is a required field
  7311. DefaultAction *DefaultAction `type:"structure" required:"true"`
  7312. // A description of the web ACL that helps with identification.
  7313. Description *string `min:"1" type:"string"`
  7314. // The name of the web ACL. You cannot change the name of a web ACL after you
  7315. // create it.
  7316. //
  7317. // Name is a required field
  7318. Name *string `min:"1" type:"string" required:"true"`
  7319. // The Rule statements used to identify the web requests that you want to allow,
  7320. // block, or count. Each rule includes one top-level statement that WAF uses
  7321. // to identify matching web requests, and parameters that govern how WAF handles
  7322. // them.
  7323. Rules []*Rule `type:"list"`
  7324. // Specifies whether this is for an Amazon CloudFront distribution or for a
  7325. // regional application. A regional application can be an Application Load Balancer
  7326. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  7327. // Cognito user pool.
  7328. //
  7329. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  7330. // as follows:
  7331. //
  7332. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  7333. // --region=us-east-1.
  7334. //
  7335. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  7336. //
  7337. // Scope is a required field
  7338. Scope *string `type:"string" required:"true" enum:"Scope"`
  7339. // An array of key:value pairs to associate with the resource.
  7340. Tags []*Tag `min:"1" type:"list"`
  7341. // Specifies the domains that WAF should accept in a web request token. This
  7342. // enables the use of tokens across multiple protected websites. When WAF provides
  7343. // a token, it uses the domain of the Amazon Web Services resource that the
  7344. // web ACL is protecting. If you don't specify a list of token domains, WAF
  7345. // accepts tokens only for the domain of the protected resource. With a token
  7346. // domain list, WAF accepts the resource's host domain plus all domains in the
  7347. // token domain list, including their prefixed subdomains.
  7348. //
  7349. // Example JSON: "TokenDomains": { "mywebsite.com", "myotherwebsite.com" }
  7350. //
  7351. // Public suffixes aren't allowed. For example, you can't use usa.gov or co.uk
  7352. // as token domains.
  7353. TokenDomains []*string `min:"1" type:"list"`
  7354. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  7355. //
  7356. // VisibilityConfig is a required field
  7357. VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
  7358. }
  7359. // String returns the string representation.
  7360. //
  7361. // API parameter values that are decorated as "sensitive" in the API will not
  7362. // be included in the string output. The member name will be present, but the
  7363. // value will be replaced with "sensitive".
  7364. func (s CreateWebACLInput) String() string {
  7365. return awsutil.Prettify(s)
  7366. }
  7367. // GoString returns the string representation.
  7368. //
  7369. // API parameter values that are decorated as "sensitive" in the API will not
  7370. // be included in the string output. The member name will be present, but the
  7371. // value will be replaced with "sensitive".
  7372. func (s CreateWebACLInput) GoString() string {
  7373. return s.String()
  7374. }
  7375. // Validate inspects the fields of the type to determine if they are valid.
  7376. func (s *CreateWebACLInput) Validate() error {
  7377. invalidParams := request.ErrInvalidParams{Context: "CreateWebACLInput"}
  7378. if s.CustomResponseBodies != nil && len(s.CustomResponseBodies) < 1 {
  7379. invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodies", 1))
  7380. }
  7381. if s.DefaultAction == nil {
  7382. invalidParams.Add(request.NewErrParamRequired("DefaultAction"))
  7383. }
  7384. if s.Description != nil && len(*s.Description) < 1 {
  7385. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  7386. }
  7387. if s.Name == nil {
  7388. invalidParams.Add(request.NewErrParamRequired("Name"))
  7389. }
  7390. if s.Name != nil && len(*s.Name) < 1 {
  7391. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  7392. }
  7393. if s.Scope == nil {
  7394. invalidParams.Add(request.NewErrParamRequired("Scope"))
  7395. }
  7396. if s.Tags != nil && len(s.Tags) < 1 {
  7397. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  7398. }
  7399. if s.TokenDomains != nil && len(s.TokenDomains) < 1 {
  7400. invalidParams.Add(request.NewErrParamMinLen("TokenDomains", 1))
  7401. }
  7402. if s.VisibilityConfig == nil {
  7403. invalidParams.Add(request.NewErrParamRequired("VisibilityConfig"))
  7404. }
  7405. if s.CaptchaConfig != nil {
  7406. if err := s.CaptchaConfig.Validate(); err != nil {
  7407. invalidParams.AddNested("CaptchaConfig", err.(request.ErrInvalidParams))
  7408. }
  7409. }
  7410. if s.ChallengeConfig != nil {
  7411. if err := s.ChallengeConfig.Validate(); err != nil {
  7412. invalidParams.AddNested("ChallengeConfig", err.(request.ErrInvalidParams))
  7413. }
  7414. }
  7415. if s.CustomResponseBodies != nil {
  7416. for i, v := range s.CustomResponseBodies {
  7417. if v == nil {
  7418. continue
  7419. }
  7420. if err := v.Validate(); err != nil {
  7421. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomResponseBodies", i), err.(request.ErrInvalidParams))
  7422. }
  7423. }
  7424. }
  7425. if s.DefaultAction != nil {
  7426. if err := s.DefaultAction.Validate(); err != nil {
  7427. invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
  7428. }
  7429. }
  7430. if s.Rules != nil {
  7431. for i, v := range s.Rules {
  7432. if v == nil {
  7433. continue
  7434. }
  7435. if err := v.Validate(); err != nil {
  7436. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  7437. }
  7438. }
  7439. }
  7440. if s.Tags != nil {
  7441. for i, v := range s.Tags {
  7442. if v == nil {
  7443. continue
  7444. }
  7445. if err := v.Validate(); err != nil {
  7446. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  7447. }
  7448. }
  7449. }
  7450. if s.VisibilityConfig != nil {
  7451. if err := s.VisibilityConfig.Validate(); err != nil {
  7452. invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams))
  7453. }
  7454. }
  7455. if invalidParams.Len() > 0 {
  7456. return invalidParams
  7457. }
  7458. return nil
  7459. }
  7460. // SetCaptchaConfig sets the CaptchaConfig field's value.
  7461. func (s *CreateWebACLInput) SetCaptchaConfig(v *CaptchaConfig) *CreateWebACLInput {
  7462. s.CaptchaConfig = v
  7463. return s
  7464. }
  7465. // SetChallengeConfig sets the ChallengeConfig field's value.
  7466. func (s *CreateWebACLInput) SetChallengeConfig(v *ChallengeConfig) *CreateWebACLInput {
  7467. s.ChallengeConfig = v
  7468. return s
  7469. }
  7470. // SetCustomResponseBodies sets the CustomResponseBodies field's value.
  7471. func (s *CreateWebACLInput) SetCustomResponseBodies(v map[string]*CustomResponseBody) *CreateWebACLInput {
  7472. s.CustomResponseBodies = v
  7473. return s
  7474. }
  7475. // SetDefaultAction sets the DefaultAction field's value.
  7476. func (s *CreateWebACLInput) SetDefaultAction(v *DefaultAction) *CreateWebACLInput {
  7477. s.DefaultAction = v
  7478. return s
  7479. }
  7480. // SetDescription sets the Description field's value.
  7481. func (s *CreateWebACLInput) SetDescription(v string) *CreateWebACLInput {
  7482. s.Description = &v
  7483. return s
  7484. }
  7485. // SetName sets the Name field's value.
  7486. func (s *CreateWebACLInput) SetName(v string) *CreateWebACLInput {
  7487. s.Name = &v
  7488. return s
  7489. }
  7490. // SetRules sets the Rules field's value.
  7491. func (s *CreateWebACLInput) SetRules(v []*Rule) *CreateWebACLInput {
  7492. s.Rules = v
  7493. return s
  7494. }
  7495. // SetScope sets the Scope field's value.
  7496. func (s *CreateWebACLInput) SetScope(v string) *CreateWebACLInput {
  7497. s.Scope = &v
  7498. return s
  7499. }
  7500. // SetTags sets the Tags field's value.
  7501. func (s *CreateWebACLInput) SetTags(v []*Tag) *CreateWebACLInput {
  7502. s.Tags = v
  7503. return s
  7504. }
  7505. // SetTokenDomains sets the TokenDomains field's value.
  7506. func (s *CreateWebACLInput) SetTokenDomains(v []*string) *CreateWebACLInput {
  7507. s.TokenDomains = v
  7508. return s
  7509. }
  7510. // SetVisibilityConfig sets the VisibilityConfig field's value.
  7511. func (s *CreateWebACLInput) SetVisibilityConfig(v *VisibilityConfig) *CreateWebACLInput {
  7512. s.VisibilityConfig = v
  7513. return s
  7514. }
  7515. type CreateWebACLOutput struct {
  7516. _ struct{} `type:"structure"`
  7517. // High-level information about a WebACL, returned by operations like create
  7518. // and list. This provides information like the ID, that you can use to retrieve
  7519. // and manage a WebACL, and the ARN, that you provide to operations like AssociateWebACL.
  7520. Summary *WebACLSummary `type:"structure"`
  7521. }
  7522. // String returns the string representation.
  7523. //
  7524. // API parameter values that are decorated as "sensitive" in the API will not
  7525. // be included in the string output. The member name will be present, but the
  7526. // value will be replaced with "sensitive".
  7527. func (s CreateWebACLOutput) String() string {
  7528. return awsutil.Prettify(s)
  7529. }
  7530. // GoString returns the string representation.
  7531. //
  7532. // API parameter values that are decorated as "sensitive" in the API will not
  7533. // be included in the string output. The member name will be present, but the
  7534. // value will be replaced with "sensitive".
  7535. func (s CreateWebACLOutput) GoString() string {
  7536. return s.String()
  7537. }
  7538. // SetSummary sets the Summary field's value.
  7539. func (s *CreateWebACLOutput) SetSummary(v *WebACLSummary) *CreateWebACLOutput {
  7540. s.Summary = v
  7541. return s
  7542. }
  7543. // A custom header for custom request and response handling. This is used in
  7544. // CustomResponse and CustomRequestHandling.
  7545. type CustomHTTPHeader struct {
  7546. _ struct{} `type:"structure"`
  7547. // The name of the custom header.
  7548. //
  7549. // For custom request header insertion, when WAF inserts the header into the
  7550. // request, it prefixes this name x-amzn-waf-, to avoid confusion with the headers
  7551. // that are already in the request. For example, for the header name sample,
  7552. // WAF inserts the header x-amzn-waf-sample.
  7553. //
  7554. // Name is a required field
  7555. Name *string `min:"1" type:"string" required:"true"`
  7556. // The value of the custom header.
  7557. //
  7558. // Value is a required field
  7559. Value *string `min:"1" type:"string" required:"true"`
  7560. }
  7561. // String returns the string representation.
  7562. //
  7563. // API parameter values that are decorated as "sensitive" in the API will not
  7564. // be included in the string output. The member name will be present, but the
  7565. // value will be replaced with "sensitive".
  7566. func (s CustomHTTPHeader) String() string {
  7567. return awsutil.Prettify(s)
  7568. }
  7569. // GoString returns the string representation.
  7570. //
  7571. // API parameter values that are decorated as "sensitive" in the API will not
  7572. // be included in the string output. The member name will be present, but the
  7573. // value will be replaced with "sensitive".
  7574. func (s CustomHTTPHeader) GoString() string {
  7575. return s.String()
  7576. }
  7577. // Validate inspects the fields of the type to determine if they are valid.
  7578. func (s *CustomHTTPHeader) Validate() error {
  7579. invalidParams := request.ErrInvalidParams{Context: "CustomHTTPHeader"}
  7580. if s.Name == nil {
  7581. invalidParams.Add(request.NewErrParamRequired("Name"))
  7582. }
  7583. if s.Name != nil && len(*s.Name) < 1 {
  7584. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  7585. }
  7586. if s.Value == nil {
  7587. invalidParams.Add(request.NewErrParamRequired("Value"))
  7588. }
  7589. if s.Value != nil && len(*s.Value) < 1 {
  7590. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  7591. }
  7592. if invalidParams.Len() > 0 {
  7593. return invalidParams
  7594. }
  7595. return nil
  7596. }
  7597. // SetName sets the Name field's value.
  7598. func (s *CustomHTTPHeader) SetName(v string) *CustomHTTPHeader {
  7599. s.Name = &v
  7600. return s
  7601. }
  7602. // SetValue sets the Value field's value.
  7603. func (s *CustomHTTPHeader) SetValue(v string) *CustomHTTPHeader {
  7604. s.Value = &v
  7605. return s
  7606. }
  7607. // Custom request handling behavior that inserts custom headers into a web request.
  7608. // You can add custom request handling for WAF to use when the rule action doesn't
  7609. // block the request. For example, CaptchaAction for requests with valid t okens,
  7610. // and AllowAction.
  7611. //
  7612. // For information about customizing web requests and responses, see Customizing
  7613. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  7614. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7615. type CustomRequestHandling struct {
  7616. _ struct{} `type:"structure"`
  7617. // The HTTP headers to insert into the request. Duplicate header names are not
  7618. // allowed.
  7619. //
  7620. // For information about the limits on count and size for custom request and
  7621. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  7622. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7623. //
  7624. // InsertHeaders is a required field
  7625. InsertHeaders []*CustomHTTPHeader `min:"1" type:"list" required:"true"`
  7626. }
  7627. // String returns the string representation.
  7628. //
  7629. // API parameter values that are decorated as "sensitive" in the API will not
  7630. // be included in the string output. The member name will be present, but the
  7631. // value will be replaced with "sensitive".
  7632. func (s CustomRequestHandling) String() string {
  7633. return awsutil.Prettify(s)
  7634. }
  7635. // GoString returns the string representation.
  7636. //
  7637. // API parameter values that are decorated as "sensitive" in the API will not
  7638. // be included in the string output. The member name will be present, but the
  7639. // value will be replaced with "sensitive".
  7640. func (s CustomRequestHandling) GoString() string {
  7641. return s.String()
  7642. }
  7643. // Validate inspects the fields of the type to determine if they are valid.
  7644. func (s *CustomRequestHandling) Validate() error {
  7645. invalidParams := request.ErrInvalidParams{Context: "CustomRequestHandling"}
  7646. if s.InsertHeaders == nil {
  7647. invalidParams.Add(request.NewErrParamRequired("InsertHeaders"))
  7648. }
  7649. if s.InsertHeaders != nil && len(s.InsertHeaders) < 1 {
  7650. invalidParams.Add(request.NewErrParamMinLen("InsertHeaders", 1))
  7651. }
  7652. if s.InsertHeaders != nil {
  7653. for i, v := range s.InsertHeaders {
  7654. if v == nil {
  7655. continue
  7656. }
  7657. if err := v.Validate(); err != nil {
  7658. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InsertHeaders", i), err.(request.ErrInvalidParams))
  7659. }
  7660. }
  7661. }
  7662. if invalidParams.Len() > 0 {
  7663. return invalidParams
  7664. }
  7665. return nil
  7666. }
  7667. // SetInsertHeaders sets the InsertHeaders field's value.
  7668. func (s *CustomRequestHandling) SetInsertHeaders(v []*CustomHTTPHeader) *CustomRequestHandling {
  7669. s.InsertHeaders = v
  7670. return s
  7671. }
  7672. // A custom response to send to the client. You can define a custom response
  7673. // for rule actions and default web ACL actions that are set to BlockAction.
  7674. //
  7675. // For information about customizing web requests and responses, see Customizing
  7676. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  7677. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7678. type CustomResponse struct {
  7679. _ struct{} `type:"structure"`
  7680. // References the response body that you want WAF to return to the web request
  7681. // client. You can define a custom response for a rule action or a default web
  7682. // ACL action that is set to block. To do this, you first define the response
  7683. // body key and value in the CustomResponseBodies setting for the WebACL or
  7684. // RuleGroup where you want to use it. Then, in the rule action or web ACL default
  7685. // action BlockAction setting, you reference the response body using this key.
  7686. CustomResponseBodyKey *string `min:"1" type:"string"`
  7687. // The HTTP status code to return to the client.
  7688. //
  7689. // For a list of status codes that you can use in your custom responses, see
  7690. // Supported status codes for custom response (https://docs.aws.amazon.com/waf/latest/developerguide/customizing-the-response-status-codes.html)
  7691. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7692. //
  7693. // ResponseCode is a required field
  7694. ResponseCode *int64 `min:"200" type:"integer" required:"true"`
  7695. // The HTTP headers to use in the response. Duplicate header names are not allowed.
  7696. //
  7697. // For information about the limits on count and size for custom request and
  7698. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  7699. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7700. ResponseHeaders []*CustomHTTPHeader `min:"1" type:"list"`
  7701. }
  7702. // String returns the string representation.
  7703. //
  7704. // API parameter values that are decorated as "sensitive" in the API will not
  7705. // be included in the string output. The member name will be present, but the
  7706. // value will be replaced with "sensitive".
  7707. func (s CustomResponse) String() string {
  7708. return awsutil.Prettify(s)
  7709. }
  7710. // GoString returns the string representation.
  7711. //
  7712. // API parameter values that are decorated as "sensitive" in the API will not
  7713. // be included in the string output. The member name will be present, but the
  7714. // value will be replaced with "sensitive".
  7715. func (s CustomResponse) GoString() string {
  7716. return s.String()
  7717. }
  7718. // Validate inspects the fields of the type to determine if they are valid.
  7719. func (s *CustomResponse) Validate() error {
  7720. invalidParams := request.ErrInvalidParams{Context: "CustomResponse"}
  7721. if s.CustomResponseBodyKey != nil && len(*s.CustomResponseBodyKey) < 1 {
  7722. invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodyKey", 1))
  7723. }
  7724. if s.ResponseCode == nil {
  7725. invalidParams.Add(request.NewErrParamRequired("ResponseCode"))
  7726. }
  7727. if s.ResponseCode != nil && *s.ResponseCode < 200 {
  7728. invalidParams.Add(request.NewErrParamMinValue("ResponseCode", 200))
  7729. }
  7730. if s.ResponseHeaders != nil && len(s.ResponseHeaders) < 1 {
  7731. invalidParams.Add(request.NewErrParamMinLen("ResponseHeaders", 1))
  7732. }
  7733. if s.ResponseHeaders != nil {
  7734. for i, v := range s.ResponseHeaders {
  7735. if v == nil {
  7736. continue
  7737. }
  7738. if err := v.Validate(); err != nil {
  7739. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResponseHeaders", i), err.(request.ErrInvalidParams))
  7740. }
  7741. }
  7742. }
  7743. if invalidParams.Len() > 0 {
  7744. return invalidParams
  7745. }
  7746. return nil
  7747. }
  7748. // SetCustomResponseBodyKey sets the CustomResponseBodyKey field's value.
  7749. func (s *CustomResponse) SetCustomResponseBodyKey(v string) *CustomResponse {
  7750. s.CustomResponseBodyKey = &v
  7751. return s
  7752. }
  7753. // SetResponseCode sets the ResponseCode field's value.
  7754. func (s *CustomResponse) SetResponseCode(v int64) *CustomResponse {
  7755. s.ResponseCode = &v
  7756. return s
  7757. }
  7758. // SetResponseHeaders sets the ResponseHeaders field's value.
  7759. func (s *CustomResponse) SetResponseHeaders(v []*CustomHTTPHeader) *CustomResponse {
  7760. s.ResponseHeaders = v
  7761. return s
  7762. }
  7763. // The response body to use in a custom response to a web request. This is referenced
  7764. // by key from CustomResponse CustomResponseBodyKey.
  7765. type CustomResponseBody struct {
  7766. _ struct{} `type:"structure"`
  7767. // The payload of the custom response.
  7768. //
  7769. // You can use JSON escape strings in JSON content. To do this, you must specify
  7770. // JSON content in the ContentType setting.
  7771. //
  7772. // For information about the limits on count and size for custom request and
  7773. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  7774. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  7775. //
  7776. // Content is a required field
  7777. Content *string `min:"1" type:"string" required:"true"`
  7778. // The type of content in the payload that you are defining in the Content string.
  7779. //
  7780. // ContentType is a required field
  7781. ContentType *string `type:"string" required:"true" enum:"ResponseContentType"`
  7782. }
  7783. // String returns the string representation.
  7784. //
  7785. // API parameter values that are decorated as "sensitive" in the API will not
  7786. // be included in the string output. The member name will be present, but the
  7787. // value will be replaced with "sensitive".
  7788. func (s CustomResponseBody) String() string {
  7789. return awsutil.Prettify(s)
  7790. }
  7791. // GoString returns the string representation.
  7792. //
  7793. // API parameter values that are decorated as "sensitive" in the API will not
  7794. // be included in the string output. The member name will be present, but the
  7795. // value will be replaced with "sensitive".
  7796. func (s CustomResponseBody) GoString() string {
  7797. return s.String()
  7798. }
  7799. // Validate inspects the fields of the type to determine if they are valid.
  7800. func (s *CustomResponseBody) Validate() error {
  7801. invalidParams := request.ErrInvalidParams{Context: "CustomResponseBody"}
  7802. if s.Content == nil {
  7803. invalidParams.Add(request.NewErrParamRequired("Content"))
  7804. }
  7805. if s.Content != nil && len(*s.Content) < 1 {
  7806. invalidParams.Add(request.NewErrParamMinLen("Content", 1))
  7807. }
  7808. if s.ContentType == nil {
  7809. invalidParams.Add(request.NewErrParamRequired("ContentType"))
  7810. }
  7811. if invalidParams.Len() > 0 {
  7812. return invalidParams
  7813. }
  7814. return nil
  7815. }
  7816. // SetContent sets the Content field's value.
  7817. func (s *CustomResponseBody) SetContent(v string) *CustomResponseBody {
  7818. s.Content = &v
  7819. return s
  7820. }
  7821. // SetContentType sets the ContentType field's value.
  7822. func (s *CustomResponseBody) SetContentType(v string) *CustomResponseBody {
  7823. s.ContentType = &v
  7824. return s
  7825. }
  7826. // In a WebACL, this is the action that you want WAF to perform when a web request
  7827. // doesn't match any of the rules in the WebACL. The default action must be
  7828. // a terminating action.
  7829. type DefaultAction struct {
  7830. _ struct{} `type:"structure"`
  7831. // Specifies that WAF should allow requests by default.
  7832. Allow *AllowAction `type:"structure"`
  7833. // Specifies that WAF should block requests by default.
  7834. Block *BlockAction `type:"structure"`
  7835. }
  7836. // String returns the string representation.
  7837. //
  7838. // API parameter values that are decorated as "sensitive" in the API will not
  7839. // be included in the string output. The member name will be present, but the
  7840. // value will be replaced with "sensitive".
  7841. func (s DefaultAction) String() string {
  7842. return awsutil.Prettify(s)
  7843. }
  7844. // GoString returns the string representation.
  7845. //
  7846. // API parameter values that are decorated as "sensitive" in the API will not
  7847. // be included in the string output. The member name will be present, but the
  7848. // value will be replaced with "sensitive".
  7849. func (s DefaultAction) GoString() string {
  7850. return s.String()
  7851. }
  7852. // Validate inspects the fields of the type to determine if they are valid.
  7853. func (s *DefaultAction) Validate() error {
  7854. invalidParams := request.ErrInvalidParams{Context: "DefaultAction"}
  7855. if s.Allow != nil {
  7856. if err := s.Allow.Validate(); err != nil {
  7857. invalidParams.AddNested("Allow", err.(request.ErrInvalidParams))
  7858. }
  7859. }
  7860. if s.Block != nil {
  7861. if err := s.Block.Validate(); err != nil {
  7862. invalidParams.AddNested("Block", err.(request.ErrInvalidParams))
  7863. }
  7864. }
  7865. if invalidParams.Len() > 0 {
  7866. return invalidParams
  7867. }
  7868. return nil
  7869. }
  7870. // SetAllow sets the Allow field's value.
  7871. func (s *DefaultAction) SetAllow(v *AllowAction) *DefaultAction {
  7872. s.Allow = v
  7873. return s
  7874. }
  7875. // SetBlock sets the Block field's value.
  7876. func (s *DefaultAction) SetBlock(v *BlockAction) *DefaultAction {
  7877. s.Block = v
  7878. return s
  7879. }
  7880. type DeleteFirewallManagerRuleGroupsInput struct {
  7881. _ struct{} `type:"structure"`
  7882. // The Amazon Resource Name (ARN) of the web ACL.
  7883. //
  7884. // WebACLArn is a required field
  7885. WebACLArn *string `min:"20" type:"string" required:"true"`
  7886. // A token used for optimistic locking. WAF returns a token to your get and
  7887. // list requests, to mark the state of the entity at the time of the request.
  7888. // To make changes to the entity associated with the token, you provide the
  7889. // token to operations like update and delete. WAF uses the token to ensure
  7890. // that no changes have been made to the entity since you last retrieved it.
  7891. // If a change has been made, the update fails with a WAFOptimisticLockException.
  7892. // If this happens, perform another get, and use the new token returned by that
  7893. // operation.
  7894. //
  7895. // WebACLLockToken is a required field
  7896. WebACLLockToken *string `min:"1" type:"string" required:"true"`
  7897. }
  7898. // String returns the string representation.
  7899. //
  7900. // API parameter values that are decorated as "sensitive" in the API will not
  7901. // be included in the string output. The member name will be present, but the
  7902. // value will be replaced with "sensitive".
  7903. func (s DeleteFirewallManagerRuleGroupsInput) String() string {
  7904. return awsutil.Prettify(s)
  7905. }
  7906. // GoString returns the string representation.
  7907. //
  7908. // API parameter values that are decorated as "sensitive" in the API will not
  7909. // be included in the string output. The member name will be present, but the
  7910. // value will be replaced with "sensitive".
  7911. func (s DeleteFirewallManagerRuleGroupsInput) GoString() string {
  7912. return s.String()
  7913. }
  7914. // Validate inspects the fields of the type to determine if they are valid.
  7915. func (s *DeleteFirewallManagerRuleGroupsInput) Validate() error {
  7916. invalidParams := request.ErrInvalidParams{Context: "DeleteFirewallManagerRuleGroupsInput"}
  7917. if s.WebACLArn == nil {
  7918. invalidParams.Add(request.NewErrParamRequired("WebACLArn"))
  7919. }
  7920. if s.WebACLArn != nil && len(*s.WebACLArn) < 20 {
  7921. invalidParams.Add(request.NewErrParamMinLen("WebACLArn", 20))
  7922. }
  7923. if s.WebACLLockToken == nil {
  7924. invalidParams.Add(request.NewErrParamRequired("WebACLLockToken"))
  7925. }
  7926. if s.WebACLLockToken != nil && len(*s.WebACLLockToken) < 1 {
  7927. invalidParams.Add(request.NewErrParamMinLen("WebACLLockToken", 1))
  7928. }
  7929. if invalidParams.Len() > 0 {
  7930. return invalidParams
  7931. }
  7932. return nil
  7933. }
  7934. // SetWebACLArn sets the WebACLArn field's value.
  7935. func (s *DeleteFirewallManagerRuleGroupsInput) SetWebACLArn(v string) *DeleteFirewallManagerRuleGroupsInput {
  7936. s.WebACLArn = &v
  7937. return s
  7938. }
  7939. // SetWebACLLockToken sets the WebACLLockToken field's value.
  7940. func (s *DeleteFirewallManagerRuleGroupsInput) SetWebACLLockToken(v string) *DeleteFirewallManagerRuleGroupsInput {
  7941. s.WebACLLockToken = &v
  7942. return s
  7943. }
  7944. type DeleteFirewallManagerRuleGroupsOutput struct {
  7945. _ struct{} `type:"structure"`
  7946. // A token used for optimistic locking. WAF returns a token to your get and
  7947. // list requests, to mark the state of the entity at the time of the request.
  7948. // To make changes to the entity associated with the token, you provide the
  7949. // token to operations like update and delete. WAF uses the token to ensure
  7950. // that no changes have been made to the entity since you last retrieved it.
  7951. // If a change has been made, the update fails with a WAFOptimisticLockException.
  7952. // If this happens, perform another get, and use the new token returned by that
  7953. // operation.
  7954. NextWebACLLockToken *string `min:"1" type:"string"`
  7955. }
  7956. // String returns the string representation.
  7957. //
  7958. // API parameter values that are decorated as "sensitive" in the API will not
  7959. // be included in the string output. The member name will be present, but the
  7960. // value will be replaced with "sensitive".
  7961. func (s DeleteFirewallManagerRuleGroupsOutput) String() string {
  7962. return awsutil.Prettify(s)
  7963. }
  7964. // GoString returns the string representation.
  7965. //
  7966. // API parameter values that are decorated as "sensitive" in the API will not
  7967. // be included in the string output. The member name will be present, but the
  7968. // value will be replaced with "sensitive".
  7969. func (s DeleteFirewallManagerRuleGroupsOutput) GoString() string {
  7970. return s.String()
  7971. }
  7972. // SetNextWebACLLockToken sets the NextWebACLLockToken field's value.
  7973. func (s *DeleteFirewallManagerRuleGroupsOutput) SetNextWebACLLockToken(v string) *DeleteFirewallManagerRuleGroupsOutput {
  7974. s.NextWebACLLockToken = &v
  7975. return s
  7976. }
  7977. type DeleteIPSetInput struct {
  7978. _ struct{} `type:"structure"`
  7979. // A unique identifier for the set. This ID is returned in the responses to
  7980. // create and list commands. You provide it to operations like update and delete.
  7981. //
  7982. // Id is a required field
  7983. Id *string `min:"1" type:"string" required:"true"`
  7984. // A token used for optimistic locking. WAF returns a token to your get and
  7985. // list requests, to mark the state of the entity at the time of the request.
  7986. // To make changes to the entity associated with the token, you provide the
  7987. // token to operations like update and delete. WAF uses the token to ensure
  7988. // that no changes have been made to the entity since you last retrieved it.
  7989. // If a change has been made, the update fails with a WAFOptimisticLockException.
  7990. // If this happens, perform another get, and use the new token returned by that
  7991. // operation.
  7992. //
  7993. // LockToken is a required field
  7994. LockToken *string `min:"1" type:"string" required:"true"`
  7995. // The name of the IP set. You cannot change the name of an IPSet after you
  7996. // create it.
  7997. //
  7998. // Name is a required field
  7999. Name *string `min:"1" type:"string" required:"true"`
  8000. // Specifies whether this is for an Amazon CloudFront distribution or for a
  8001. // regional application. A regional application can be an Application Load Balancer
  8002. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  8003. // Cognito user pool.
  8004. //
  8005. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  8006. // as follows:
  8007. //
  8008. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  8009. // --region=us-east-1.
  8010. //
  8011. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  8012. //
  8013. // Scope is a required field
  8014. Scope *string `type:"string" required:"true" enum:"Scope"`
  8015. }
  8016. // String returns the string representation.
  8017. //
  8018. // API parameter values that are decorated as "sensitive" in the API will not
  8019. // be included in the string output. The member name will be present, but the
  8020. // value will be replaced with "sensitive".
  8021. func (s DeleteIPSetInput) String() string {
  8022. return awsutil.Prettify(s)
  8023. }
  8024. // GoString returns the string representation.
  8025. //
  8026. // API parameter values that are decorated as "sensitive" in the API will not
  8027. // be included in the string output. The member name will be present, but the
  8028. // value will be replaced with "sensitive".
  8029. func (s DeleteIPSetInput) GoString() string {
  8030. return s.String()
  8031. }
  8032. // Validate inspects the fields of the type to determine if they are valid.
  8033. func (s *DeleteIPSetInput) Validate() error {
  8034. invalidParams := request.ErrInvalidParams{Context: "DeleteIPSetInput"}
  8035. if s.Id == nil {
  8036. invalidParams.Add(request.NewErrParamRequired("Id"))
  8037. }
  8038. if s.Id != nil && len(*s.Id) < 1 {
  8039. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8040. }
  8041. if s.LockToken == nil {
  8042. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  8043. }
  8044. if s.LockToken != nil && len(*s.LockToken) < 1 {
  8045. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  8046. }
  8047. if s.Name == nil {
  8048. invalidParams.Add(request.NewErrParamRequired("Name"))
  8049. }
  8050. if s.Name != nil && len(*s.Name) < 1 {
  8051. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  8052. }
  8053. if s.Scope == nil {
  8054. invalidParams.Add(request.NewErrParamRequired("Scope"))
  8055. }
  8056. if invalidParams.Len() > 0 {
  8057. return invalidParams
  8058. }
  8059. return nil
  8060. }
  8061. // SetId sets the Id field's value.
  8062. func (s *DeleteIPSetInput) SetId(v string) *DeleteIPSetInput {
  8063. s.Id = &v
  8064. return s
  8065. }
  8066. // SetLockToken sets the LockToken field's value.
  8067. func (s *DeleteIPSetInput) SetLockToken(v string) *DeleteIPSetInput {
  8068. s.LockToken = &v
  8069. return s
  8070. }
  8071. // SetName sets the Name field's value.
  8072. func (s *DeleteIPSetInput) SetName(v string) *DeleteIPSetInput {
  8073. s.Name = &v
  8074. return s
  8075. }
  8076. // SetScope sets the Scope field's value.
  8077. func (s *DeleteIPSetInput) SetScope(v string) *DeleteIPSetInput {
  8078. s.Scope = &v
  8079. return s
  8080. }
  8081. type DeleteIPSetOutput struct {
  8082. _ struct{} `type:"structure"`
  8083. }
  8084. // String returns the string representation.
  8085. //
  8086. // API parameter values that are decorated as "sensitive" in the API will not
  8087. // be included in the string output. The member name will be present, but the
  8088. // value will be replaced with "sensitive".
  8089. func (s DeleteIPSetOutput) String() string {
  8090. return awsutil.Prettify(s)
  8091. }
  8092. // GoString returns the string representation.
  8093. //
  8094. // API parameter values that are decorated as "sensitive" in the API will not
  8095. // be included in the string output. The member name will be present, but the
  8096. // value will be replaced with "sensitive".
  8097. func (s DeleteIPSetOutput) GoString() string {
  8098. return s.String()
  8099. }
  8100. type DeleteLoggingConfigurationInput struct {
  8101. _ struct{} `type:"structure"`
  8102. // The Amazon Resource Name (ARN) of the web ACL from which you want to delete
  8103. // the LoggingConfiguration.
  8104. //
  8105. // ResourceArn is a required field
  8106. ResourceArn *string `min:"20" type:"string" required:"true"`
  8107. }
  8108. // String returns the string representation.
  8109. //
  8110. // API parameter values that are decorated as "sensitive" in the API will not
  8111. // be included in the string output. The member name will be present, but the
  8112. // value will be replaced with "sensitive".
  8113. func (s DeleteLoggingConfigurationInput) String() string {
  8114. return awsutil.Prettify(s)
  8115. }
  8116. // GoString returns the string representation.
  8117. //
  8118. // API parameter values that are decorated as "sensitive" in the API will not
  8119. // be included in the string output. The member name will be present, but the
  8120. // value will be replaced with "sensitive".
  8121. func (s DeleteLoggingConfigurationInput) GoString() string {
  8122. return s.String()
  8123. }
  8124. // Validate inspects the fields of the type to determine if they are valid.
  8125. func (s *DeleteLoggingConfigurationInput) Validate() error {
  8126. invalidParams := request.ErrInvalidParams{Context: "DeleteLoggingConfigurationInput"}
  8127. if s.ResourceArn == nil {
  8128. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  8129. }
  8130. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  8131. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  8132. }
  8133. if invalidParams.Len() > 0 {
  8134. return invalidParams
  8135. }
  8136. return nil
  8137. }
  8138. // SetResourceArn sets the ResourceArn field's value.
  8139. func (s *DeleteLoggingConfigurationInput) SetResourceArn(v string) *DeleteLoggingConfigurationInput {
  8140. s.ResourceArn = &v
  8141. return s
  8142. }
  8143. type DeleteLoggingConfigurationOutput struct {
  8144. _ struct{} `type:"structure"`
  8145. }
  8146. // String returns the string representation.
  8147. //
  8148. // API parameter values that are decorated as "sensitive" in the API will not
  8149. // be included in the string output. The member name will be present, but the
  8150. // value will be replaced with "sensitive".
  8151. func (s DeleteLoggingConfigurationOutput) String() string {
  8152. return awsutil.Prettify(s)
  8153. }
  8154. // GoString returns the string representation.
  8155. //
  8156. // API parameter values that are decorated as "sensitive" in the API will not
  8157. // be included in the string output. The member name will be present, but the
  8158. // value will be replaced with "sensitive".
  8159. func (s DeleteLoggingConfigurationOutput) GoString() string {
  8160. return s.String()
  8161. }
  8162. type DeletePermissionPolicyInput struct {
  8163. _ struct{} `type:"structure"`
  8164. // The Amazon Resource Name (ARN) of the rule group from which you want to delete
  8165. // the policy.
  8166. //
  8167. // You must be the owner of the rule group to perform this operation.
  8168. //
  8169. // ResourceArn is a required field
  8170. ResourceArn *string `min:"20" type:"string" required:"true"`
  8171. }
  8172. // String returns the string representation.
  8173. //
  8174. // API parameter values that are decorated as "sensitive" in the API will not
  8175. // be included in the string output. The member name will be present, but the
  8176. // value will be replaced with "sensitive".
  8177. func (s DeletePermissionPolicyInput) String() string {
  8178. return awsutil.Prettify(s)
  8179. }
  8180. // GoString returns the string representation.
  8181. //
  8182. // API parameter values that are decorated as "sensitive" in the API will not
  8183. // be included in the string output. The member name will be present, but the
  8184. // value will be replaced with "sensitive".
  8185. func (s DeletePermissionPolicyInput) GoString() string {
  8186. return s.String()
  8187. }
  8188. // Validate inspects the fields of the type to determine if they are valid.
  8189. func (s *DeletePermissionPolicyInput) Validate() error {
  8190. invalidParams := request.ErrInvalidParams{Context: "DeletePermissionPolicyInput"}
  8191. if s.ResourceArn == nil {
  8192. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  8193. }
  8194. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  8195. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  8196. }
  8197. if invalidParams.Len() > 0 {
  8198. return invalidParams
  8199. }
  8200. return nil
  8201. }
  8202. // SetResourceArn sets the ResourceArn field's value.
  8203. func (s *DeletePermissionPolicyInput) SetResourceArn(v string) *DeletePermissionPolicyInput {
  8204. s.ResourceArn = &v
  8205. return s
  8206. }
  8207. type DeletePermissionPolicyOutput struct {
  8208. _ struct{} `type:"structure"`
  8209. }
  8210. // String returns the string representation.
  8211. //
  8212. // API parameter values that are decorated as "sensitive" in the API will not
  8213. // be included in the string output. The member name will be present, but the
  8214. // value will be replaced with "sensitive".
  8215. func (s DeletePermissionPolicyOutput) String() string {
  8216. return awsutil.Prettify(s)
  8217. }
  8218. // GoString returns the string representation.
  8219. //
  8220. // API parameter values that are decorated as "sensitive" in the API will not
  8221. // be included in the string output. The member name will be present, but the
  8222. // value will be replaced with "sensitive".
  8223. func (s DeletePermissionPolicyOutput) GoString() string {
  8224. return s.String()
  8225. }
  8226. type DeleteRegexPatternSetInput struct {
  8227. _ struct{} `type:"structure"`
  8228. // A unique identifier for the set. This ID is returned in the responses to
  8229. // create and list commands. You provide it to operations like update and delete.
  8230. //
  8231. // Id is a required field
  8232. Id *string `min:"1" type:"string" required:"true"`
  8233. // A token used for optimistic locking. WAF returns a token to your get and
  8234. // list requests, to mark the state of the entity at the time of the request.
  8235. // To make changes to the entity associated with the token, you provide the
  8236. // token to operations like update and delete. WAF uses the token to ensure
  8237. // that no changes have been made to the entity since you last retrieved it.
  8238. // If a change has been made, the update fails with a WAFOptimisticLockException.
  8239. // If this happens, perform another get, and use the new token returned by that
  8240. // operation.
  8241. //
  8242. // LockToken is a required field
  8243. LockToken *string `min:"1" type:"string" required:"true"`
  8244. // The name of the set. You cannot change the name after you create the set.
  8245. //
  8246. // Name is a required field
  8247. Name *string `min:"1" type:"string" required:"true"`
  8248. // Specifies whether this is for an Amazon CloudFront distribution or for a
  8249. // regional application. A regional application can be an Application Load Balancer
  8250. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  8251. // Cognito user pool.
  8252. //
  8253. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  8254. // as follows:
  8255. //
  8256. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  8257. // --region=us-east-1.
  8258. //
  8259. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  8260. //
  8261. // Scope is a required field
  8262. Scope *string `type:"string" required:"true" enum:"Scope"`
  8263. }
  8264. // String returns the string representation.
  8265. //
  8266. // API parameter values that are decorated as "sensitive" in the API will not
  8267. // be included in the string output. The member name will be present, but the
  8268. // value will be replaced with "sensitive".
  8269. func (s DeleteRegexPatternSetInput) String() string {
  8270. return awsutil.Prettify(s)
  8271. }
  8272. // GoString returns the string representation.
  8273. //
  8274. // API parameter values that are decorated as "sensitive" in the API will not
  8275. // be included in the string output. The member name will be present, but the
  8276. // value will be replaced with "sensitive".
  8277. func (s DeleteRegexPatternSetInput) GoString() string {
  8278. return s.String()
  8279. }
  8280. // Validate inspects the fields of the type to determine if they are valid.
  8281. func (s *DeleteRegexPatternSetInput) Validate() error {
  8282. invalidParams := request.ErrInvalidParams{Context: "DeleteRegexPatternSetInput"}
  8283. if s.Id == nil {
  8284. invalidParams.Add(request.NewErrParamRequired("Id"))
  8285. }
  8286. if s.Id != nil && len(*s.Id) < 1 {
  8287. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8288. }
  8289. if s.LockToken == nil {
  8290. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  8291. }
  8292. if s.LockToken != nil && len(*s.LockToken) < 1 {
  8293. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  8294. }
  8295. if s.Name == nil {
  8296. invalidParams.Add(request.NewErrParamRequired("Name"))
  8297. }
  8298. if s.Name != nil && len(*s.Name) < 1 {
  8299. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  8300. }
  8301. if s.Scope == nil {
  8302. invalidParams.Add(request.NewErrParamRequired("Scope"))
  8303. }
  8304. if invalidParams.Len() > 0 {
  8305. return invalidParams
  8306. }
  8307. return nil
  8308. }
  8309. // SetId sets the Id field's value.
  8310. func (s *DeleteRegexPatternSetInput) SetId(v string) *DeleteRegexPatternSetInput {
  8311. s.Id = &v
  8312. return s
  8313. }
  8314. // SetLockToken sets the LockToken field's value.
  8315. func (s *DeleteRegexPatternSetInput) SetLockToken(v string) *DeleteRegexPatternSetInput {
  8316. s.LockToken = &v
  8317. return s
  8318. }
  8319. // SetName sets the Name field's value.
  8320. func (s *DeleteRegexPatternSetInput) SetName(v string) *DeleteRegexPatternSetInput {
  8321. s.Name = &v
  8322. return s
  8323. }
  8324. // SetScope sets the Scope field's value.
  8325. func (s *DeleteRegexPatternSetInput) SetScope(v string) *DeleteRegexPatternSetInput {
  8326. s.Scope = &v
  8327. return s
  8328. }
  8329. type DeleteRegexPatternSetOutput struct {
  8330. _ struct{} `type:"structure"`
  8331. }
  8332. // String returns the string representation.
  8333. //
  8334. // API parameter values that are decorated as "sensitive" in the API will not
  8335. // be included in the string output. The member name will be present, but the
  8336. // value will be replaced with "sensitive".
  8337. func (s DeleteRegexPatternSetOutput) String() string {
  8338. return awsutil.Prettify(s)
  8339. }
  8340. // GoString returns the string representation.
  8341. //
  8342. // API parameter values that are decorated as "sensitive" in the API will not
  8343. // be included in the string output. The member name will be present, but the
  8344. // value will be replaced with "sensitive".
  8345. func (s DeleteRegexPatternSetOutput) GoString() string {
  8346. return s.String()
  8347. }
  8348. type DeleteRuleGroupInput struct {
  8349. _ struct{} `type:"structure"`
  8350. // A unique identifier for the rule group. This ID is returned in the responses
  8351. // to create and list commands. You provide it to operations like update and
  8352. // delete.
  8353. //
  8354. // Id is a required field
  8355. Id *string `min:"1" type:"string" required:"true"`
  8356. // A token used for optimistic locking. WAF returns a token to your get and
  8357. // list requests, to mark the state of the entity at the time of the request.
  8358. // To make changes to the entity associated with the token, you provide the
  8359. // token to operations like update and delete. WAF uses the token to ensure
  8360. // that no changes have been made to the entity since you last retrieved it.
  8361. // If a change has been made, the update fails with a WAFOptimisticLockException.
  8362. // If this happens, perform another get, and use the new token returned by that
  8363. // operation.
  8364. //
  8365. // LockToken is a required field
  8366. LockToken *string `min:"1" type:"string" required:"true"`
  8367. // The name of the rule group. You cannot change the name of a rule group after
  8368. // you create it.
  8369. //
  8370. // Name is a required field
  8371. Name *string `min:"1" type:"string" required:"true"`
  8372. // Specifies whether this is for an Amazon CloudFront distribution or for a
  8373. // regional application. A regional application can be an Application Load Balancer
  8374. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  8375. // Cognito user pool.
  8376. //
  8377. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  8378. // as follows:
  8379. //
  8380. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  8381. // --region=us-east-1.
  8382. //
  8383. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  8384. //
  8385. // Scope is a required field
  8386. Scope *string `type:"string" required:"true" enum:"Scope"`
  8387. }
  8388. // String returns the string representation.
  8389. //
  8390. // API parameter values that are decorated as "sensitive" in the API will not
  8391. // be included in the string output. The member name will be present, but the
  8392. // value will be replaced with "sensitive".
  8393. func (s DeleteRuleGroupInput) String() string {
  8394. return awsutil.Prettify(s)
  8395. }
  8396. // GoString returns the string representation.
  8397. //
  8398. // API parameter values that are decorated as "sensitive" in the API will not
  8399. // be included in the string output. The member name will be present, but the
  8400. // value will be replaced with "sensitive".
  8401. func (s DeleteRuleGroupInput) GoString() string {
  8402. return s.String()
  8403. }
  8404. // Validate inspects the fields of the type to determine if they are valid.
  8405. func (s *DeleteRuleGroupInput) Validate() error {
  8406. invalidParams := request.ErrInvalidParams{Context: "DeleteRuleGroupInput"}
  8407. if s.Id == nil {
  8408. invalidParams.Add(request.NewErrParamRequired("Id"))
  8409. }
  8410. if s.Id != nil && len(*s.Id) < 1 {
  8411. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8412. }
  8413. if s.LockToken == nil {
  8414. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  8415. }
  8416. if s.LockToken != nil && len(*s.LockToken) < 1 {
  8417. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  8418. }
  8419. if s.Name == nil {
  8420. invalidParams.Add(request.NewErrParamRequired("Name"))
  8421. }
  8422. if s.Name != nil && len(*s.Name) < 1 {
  8423. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  8424. }
  8425. if s.Scope == nil {
  8426. invalidParams.Add(request.NewErrParamRequired("Scope"))
  8427. }
  8428. if invalidParams.Len() > 0 {
  8429. return invalidParams
  8430. }
  8431. return nil
  8432. }
  8433. // SetId sets the Id field's value.
  8434. func (s *DeleteRuleGroupInput) SetId(v string) *DeleteRuleGroupInput {
  8435. s.Id = &v
  8436. return s
  8437. }
  8438. // SetLockToken sets the LockToken field's value.
  8439. func (s *DeleteRuleGroupInput) SetLockToken(v string) *DeleteRuleGroupInput {
  8440. s.LockToken = &v
  8441. return s
  8442. }
  8443. // SetName sets the Name field's value.
  8444. func (s *DeleteRuleGroupInput) SetName(v string) *DeleteRuleGroupInput {
  8445. s.Name = &v
  8446. return s
  8447. }
  8448. // SetScope sets the Scope field's value.
  8449. func (s *DeleteRuleGroupInput) SetScope(v string) *DeleteRuleGroupInput {
  8450. s.Scope = &v
  8451. return s
  8452. }
  8453. type DeleteRuleGroupOutput struct {
  8454. _ struct{} `type:"structure"`
  8455. }
  8456. // String returns the string representation.
  8457. //
  8458. // API parameter values that are decorated as "sensitive" in the API will not
  8459. // be included in the string output. The member name will be present, but the
  8460. // value will be replaced with "sensitive".
  8461. func (s DeleteRuleGroupOutput) String() string {
  8462. return awsutil.Prettify(s)
  8463. }
  8464. // GoString returns the string representation.
  8465. //
  8466. // API parameter values that are decorated as "sensitive" in the API will not
  8467. // be included in the string output. The member name will be present, but the
  8468. // value will be replaced with "sensitive".
  8469. func (s DeleteRuleGroupOutput) GoString() string {
  8470. return s.String()
  8471. }
  8472. type DeleteWebACLInput struct {
  8473. _ struct{} `type:"structure"`
  8474. // The unique identifier for the web ACL. This ID is returned in the responses
  8475. // to create and list commands. You provide it to operations like update and
  8476. // delete.
  8477. //
  8478. // Id is a required field
  8479. Id *string `min:"1" type:"string" required:"true"`
  8480. // A token used for optimistic locking. WAF returns a token to your get and
  8481. // list requests, to mark the state of the entity at the time of the request.
  8482. // To make changes to the entity associated with the token, you provide the
  8483. // token to operations like update and delete. WAF uses the token to ensure
  8484. // that no changes have been made to the entity since you last retrieved it.
  8485. // If a change has been made, the update fails with a WAFOptimisticLockException.
  8486. // If this happens, perform another get, and use the new token returned by that
  8487. // operation.
  8488. //
  8489. // LockToken is a required field
  8490. LockToken *string `min:"1" type:"string" required:"true"`
  8491. // The name of the web ACL. You cannot change the name of a web ACL after you
  8492. // create it.
  8493. //
  8494. // Name is a required field
  8495. Name *string `min:"1" type:"string" required:"true"`
  8496. // Specifies whether this is for an Amazon CloudFront distribution or for a
  8497. // regional application. A regional application can be an Application Load Balancer
  8498. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  8499. // Cognito user pool.
  8500. //
  8501. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  8502. // as follows:
  8503. //
  8504. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  8505. // --region=us-east-1.
  8506. //
  8507. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  8508. //
  8509. // Scope is a required field
  8510. Scope *string `type:"string" required:"true" enum:"Scope"`
  8511. }
  8512. // String returns the string representation.
  8513. //
  8514. // API parameter values that are decorated as "sensitive" in the API will not
  8515. // be included in the string output. The member name will be present, but the
  8516. // value will be replaced with "sensitive".
  8517. func (s DeleteWebACLInput) String() string {
  8518. return awsutil.Prettify(s)
  8519. }
  8520. // GoString returns the string representation.
  8521. //
  8522. // API parameter values that are decorated as "sensitive" in the API will not
  8523. // be included in the string output. The member name will be present, but the
  8524. // value will be replaced with "sensitive".
  8525. func (s DeleteWebACLInput) GoString() string {
  8526. return s.String()
  8527. }
  8528. // Validate inspects the fields of the type to determine if they are valid.
  8529. func (s *DeleteWebACLInput) Validate() error {
  8530. invalidParams := request.ErrInvalidParams{Context: "DeleteWebACLInput"}
  8531. if s.Id == nil {
  8532. invalidParams.Add(request.NewErrParamRequired("Id"))
  8533. }
  8534. if s.Id != nil && len(*s.Id) < 1 {
  8535. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8536. }
  8537. if s.LockToken == nil {
  8538. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  8539. }
  8540. if s.LockToken != nil && len(*s.LockToken) < 1 {
  8541. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  8542. }
  8543. if s.Name == nil {
  8544. invalidParams.Add(request.NewErrParamRequired("Name"))
  8545. }
  8546. if s.Name != nil && len(*s.Name) < 1 {
  8547. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  8548. }
  8549. if s.Scope == nil {
  8550. invalidParams.Add(request.NewErrParamRequired("Scope"))
  8551. }
  8552. if invalidParams.Len() > 0 {
  8553. return invalidParams
  8554. }
  8555. return nil
  8556. }
  8557. // SetId sets the Id field's value.
  8558. func (s *DeleteWebACLInput) SetId(v string) *DeleteWebACLInput {
  8559. s.Id = &v
  8560. return s
  8561. }
  8562. // SetLockToken sets the LockToken field's value.
  8563. func (s *DeleteWebACLInput) SetLockToken(v string) *DeleteWebACLInput {
  8564. s.LockToken = &v
  8565. return s
  8566. }
  8567. // SetName sets the Name field's value.
  8568. func (s *DeleteWebACLInput) SetName(v string) *DeleteWebACLInput {
  8569. s.Name = &v
  8570. return s
  8571. }
  8572. // SetScope sets the Scope field's value.
  8573. func (s *DeleteWebACLInput) SetScope(v string) *DeleteWebACLInput {
  8574. s.Scope = &v
  8575. return s
  8576. }
  8577. type DeleteWebACLOutput struct {
  8578. _ struct{} `type:"structure"`
  8579. }
  8580. // String returns the string representation.
  8581. //
  8582. // API parameter values that are decorated as "sensitive" in the API will not
  8583. // be included in the string output. The member name will be present, but the
  8584. // value will be replaced with "sensitive".
  8585. func (s DeleteWebACLOutput) String() string {
  8586. return awsutil.Prettify(s)
  8587. }
  8588. // GoString returns the string representation.
  8589. //
  8590. // API parameter values that are decorated as "sensitive" in the API will not
  8591. // be included in the string output. The member name will be present, but the
  8592. // value will be replaced with "sensitive".
  8593. func (s DeleteWebACLOutput) GoString() string {
  8594. return s.String()
  8595. }
  8596. type DescribeManagedRuleGroupInput struct {
  8597. _ struct{} `type:"structure"`
  8598. // The name of the managed rule group. You use this, along with the vendor name,
  8599. // to identify the rule group.
  8600. //
  8601. // Name is a required field
  8602. Name *string `min:"1" type:"string" required:"true"`
  8603. // Specifies whether this is for an Amazon CloudFront distribution or for a
  8604. // regional application. A regional application can be an Application Load Balancer
  8605. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  8606. // Cognito user pool.
  8607. //
  8608. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  8609. // as follows:
  8610. //
  8611. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  8612. // --region=us-east-1.
  8613. //
  8614. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  8615. //
  8616. // Scope is a required field
  8617. Scope *string `type:"string" required:"true" enum:"Scope"`
  8618. // The name of the managed rule group vendor. You use this, along with the rule
  8619. // group name, to identify the rule group.
  8620. //
  8621. // VendorName is a required field
  8622. VendorName *string `min:"1" type:"string" required:"true"`
  8623. // The version of the rule group. You can only use a version that is not scheduled
  8624. // for expiration. If you don't provide this, WAF uses the vendor's default
  8625. // version.
  8626. VersionName *string `min:"1" type:"string"`
  8627. }
  8628. // String returns the string representation.
  8629. //
  8630. // API parameter values that are decorated as "sensitive" in the API will not
  8631. // be included in the string output. The member name will be present, but the
  8632. // value will be replaced with "sensitive".
  8633. func (s DescribeManagedRuleGroupInput) String() string {
  8634. return awsutil.Prettify(s)
  8635. }
  8636. // GoString returns the string representation.
  8637. //
  8638. // API parameter values that are decorated as "sensitive" in the API will not
  8639. // be included in the string output. The member name will be present, but the
  8640. // value will be replaced with "sensitive".
  8641. func (s DescribeManagedRuleGroupInput) GoString() string {
  8642. return s.String()
  8643. }
  8644. // Validate inspects the fields of the type to determine if they are valid.
  8645. func (s *DescribeManagedRuleGroupInput) Validate() error {
  8646. invalidParams := request.ErrInvalidParams{Context: "DescribeManagedRuleGroupInput"}
  8647. if s.Name == nil {
  8648. invalidParams.Add(request.NewErrParamRequired("Name"))
  8649. }
  8650. if s.Name != nil && len(*s.Name) < 1 {
  8651. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  8652. }
  8653. if s.Scope == nil {
  8654. invalidParams.Add(request.NewErrParamRequired("Scope"))
  8655. }
  8656. if s.VendorName == nil {
  8657. invalidParams.Add(request.NewErrParamRequired("VendorName"))
  8658. }
  8659. if s.VendorName != nil && len(*s.VendorName) < 1 {
  8660. invalidParams.Add(request.NewErrParamMinLen("VendorName", 1))
  8661. }
  8662. if s.VersionName != nil && len(*s.VersionName) < 1 {
  8663. invalidParams.Add(request.NewErrParamMinLen("VersionName", 1))
  8664. }
  8665. if invalidParams.Len() > 0 {
  8666. return invalidParams
  8667. }
  8668. return nil
  8669. }
  8670. // SetName sets the Name field's value.
  8671. func (s *DescribeManagedRuleGroupInput) SetName(v string) *DescribeManagedRuleGroupInput {
  8672. s.Name = &v
  8673. return s
  8674. }
  8675. // SetScope sets the Scope field's value.
  8676. func (s *DescribeManagedRuleGroupInput) SetScope(v string) *DescribeManagedRuleGroupInput {
  8677. s.Scope = &v
  8678. return s
  8679. }
  8680. // SetVendorName sets the VendorName field's value.
  8681. func (s *DescribeManagedRuleGroupInput) SetVendorName(v string) *DescribeManagedRuleGroupInput {
  8682. s.VendorName = &v
  8683. return s
  8684. }
  8685. // SetVersionName sets the VersionName field's value.
  8686. func (s *DescribeManagedRuleGroupInput) SetVersionName(v string) *DescribeManagedRuleGroupInput {
  8687. s.VersionName = &v
  8688. return s
  8689. }
  8690. type DescribeManagedRuleGroupOutput struct {
  8691. _ struct{} `type:"structure"`
  8692. // The labels that one or more rules in this rule group add to matching web
  8693. // requests. These labels are defined in the RuleLabels for a Rule.
  8694. AvailableLabels []*LabelSummary `type:"list"`
  8695. // The web ACL capacity units (WCUs) required for this rule group. WAF uses
  8696. // web ACL capacity units (WCU) to calculate and control the operating resources
  8697. // that are used to run your rules, rule groups, and web ACLs. WAF calculates
  8698. // capacity differently for each rule type, to reflect each rule's relative
  8699. // cost. Rule group capacity is fixed at creation, so users can plan their web
  8700. // ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
  8701. Capacity *int64 `min:"1" type:"long"`
  8702. // The labels that one or more rules in this rule group match against in label
  8703. // match statements. These labels are defined in a LabelMatchStatement specification,
  8704. // in the Statement definition of a rule.
  8705. ConsumedLabels []*LabelSummary `type:"list"`
  8706. // The label namespace prefix for this rule group. All labels added by rules
  8707. // in this rule group have this prefix.
  8708. //
  8709. // * The syntax for the label namespace prefix for a managed rule group is
  8710. // the following: awswaf:managed:<vendor>:<rule group name>:
  8711. //
  8712. // * When a rule with a label matches a web request, WAF adds the fully qualified
  8713. // label to the request. A fully qualified label is made up of the label
  8714. // namespace from the rule group or web ACL where the rule is defined and
  8715. // the label from the rule, separated by a colon: <label namespace>:<label
  8716. // from rule>
  8717. LabelNamespace *string `min:"1" type:"string"`
  8718. Rules []*RuleSummary `type:"list"`
  8719. // The Amazon resource name (ARN) of the Amazon Simple Notification Service
  8720. // SNS topic that's used to record changes to the managed rule group. You can
  8721. // subscribe to the SNS topic to receive notifications when the managed rule
  8722. // group is modified, such as for new versions and for version expiration. For
  8723. // more information, see the Amazon Simple Notification Service Developer Guide
  8724. // (https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
  8725. SnsTopicArn *string `min:"20" type:"string"`
  8726. // The managed rule group's version.
  8727. VersionName *string `min:"1" type:"string"`
  8728. }
  8729. // String returns the string representation.
  8730. //
  8731. // API parameter values that are decorated as "sensitive" in the API will not
  8732. // be included in the string output. The member name will be present, but the
  8733. // value will be replaced with "sensitive".
  8734. func (s DescribeManagedRuleGroupOutput) String() string {
  8735. return awsutil.Prettify(s)
  8736. }
  8737. // GoString returns the string representation.
  8738. //
  8739. // API parameter values that are decorated as "sensitive" in the API will not
  8740. // be included in the string output. The member name will be present, but the
  8741. // value will be replaced with "sensitive".
  8742. func (s DescribeManagedRuleGroupOutput) GoString() string {
  8743. return s.String()
  8744. }
  8745. // SetAvailableLabels sets the AvailableLabels field's value.
  8746. func (s *DescribeManagedRuleGroupOutput) SetAvailableLabels(v []*LabelSummary) *DescribeManagedRuleGroupOutput {
  8747. s.AvailableLabels = v
  8748. return s
  8749. }
  8750. // SetCapacity sets the Capacity field's value.
  8751. func (s *DescribeManagedRuleGroupOutput) SetCapacity(v int64) *DescribeManagedRuleGroupOutput {
  8752. s.Capacity = &v
  8753. return s
  8754. }
  8755. // SetConsumedLabels sets the ConsumedLabels field's value.
  8756. func (s *DescribeManagedRuleGroupOutput) SetConsumedLabels(v []*LabelSummary) *DescribeManagedRuleGroupOutput {
  8757. s.ConsumedLabels = v
  8758. return s
  8759. }
  8760. // SetLabelNamespace sets the LabelNamespace field's value.
  8761. func (s *DescribeManagedRuleGroupOutput) SetLabelNamespace(v string) *DescribeManagedRuleGroupOutput {
  8762. s.LabelNamespace = &v
  8763. return s
  8764. }
  8765. // SetRules sets the Rules field's value.
  8766. func (s *DescribeManagedRuleGroupOutput) SetRules(v []*RuleSummary) *DescribeManagedRuleGroupOutput {
  8767. s.Rules = v
  8768. return s
  8769. }
  8770. // SetSnsTopicArn sets the SnsTopicArn field's value.
  8771. func (s *DescribeManagedRuleGroupOutput) SetSnsTopicArn(v string) *DescribeManagedRuleGroupOutput {
  8772. s.SnsTopicArn = &v
  8773. return s
  8774. }
  8775. // SetVersionName sets the VersionName field's value.
  8776. func (s *DescribeManagedRuleGroupOutput) SetVersionName(v string) *DescribeManagedRuleGroupOutput {
  8777. s.VersionName = &v
  8778. return s
  8779. }
  8780. type DisassociateWebACLInput struct {
  8781. _ struct{} `type:"structure"`
  8782. // The Amazon Resource Name (ARN) of the resource to disassociate from the web
  8783. // ACL.
  8784. //
  8785. // The ARN must be in one of the following formats:
  8786. //
  8787. // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
  8788. //
  8789. // * For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
  8790. //
  8791. // * For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId
  8792. //
  8793. // * For an Amazon Cognito user pool: arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
  8794. //
  8795. // ResourceArn is a required field
  8796. ResourceArn *string `min:"20" type:"string" required:"true"`
  8797. }
  8798. // String returns the string representation.
  8799. //
  8800. // API parameter values that are decorated as "sensitive" in the API will not
  8801. // be included in the string output. The member name will be present, but the
  8802. // value will be replaced with "sensitive".
  8803. func (s DisassociateWebACLInput) String() string {
  8804. return awsutil.Prettify(s)
  8805. }
  8806. // GoString returns the string representation.
  8807. //
  8808. // API parameter values that are decorated as "sensitive" in the API will not
  8809. // be included in the string output. The member name will be present, but the
  8810. // value will be replaced with "sensitive".
  8811. func (s DisassociateWebACLInput) GoString() string {
  8812. return s.String()
  8813. }
  8814. // Validate inspects the fields of the type to determine if they are valid.
  8815. func (s *DisassociateWebACLInput) Validate() error {
  8816. invalidParams := request.ErrInvalidParams{Context: "DisassociateWebACLInput"}
  8817. if s.ResourceArn == nil {
  8818. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  8819. }
  8820. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  8821. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  8822. }
  8823. if invalidParams.Len() > 0 {
  8824. return invalidParams
  8825. }
  8826. return nil
  8827. }
  8828. // SetResourceArn sets the ResourceArn field's value.
  8829. func (s *DisassociateWebACLInput) SetResourceArn(v string) *DisassociateWebACLInput {
  8830. s.ResourceArn = &v
  8831. return s
  8832. }
  8833. type DisassociateWebACLOutput struct {
  8834. _ struct{} `type:"structure"`
  8835. }
  8836. // String returns the string representation.
  8837. //
  8838. // API parameter values that are decorated as "sensitive" in the API will not
  8839. // be included in the string output. The member name will be present, but the
  8840. // value will be replaced with "sensitive".
  8841. func (s DisassociateWebACLOutput) String() string {
  8842. return awsutil.Prettify(s)
  8843. }
  8844. // GoString returns the string representation.
  8845. //
  8846. // API parameter values that are decorated as "sensitive" in the API will not
  8847. // be included in the string output. The member name will be present, but the
  8848. // value will be replaced with "sensitive".
  8849. func (s DisassociateWebACLOutput) GoString() string {
  8850. return s.String()
  8851. }
  8852. // Specifies a single rule in a rule group whose action you want to override
  8853. // to Count.
  8854. //
  8855. // Instead of this option, use RuleActionOverrides. It accepts any valid action
  8856. // setting, including Count.
  8857. type ExcludedRule struct {
  8858. _ struct{} `type:"structure"`
  8859. // The name of the rule whose action you want to override to Count.
  8860. //
  8861. // Name is a required field
  8862. Name *string `min:"1" type:"string" required:"true"`
  8863. }
  8864. // String returns the string representation.
  8865. //
  8866. // API parameter values that are decorated as "sensitive" in the API will not
  8867. // be included in the string output. The member name will be present, but the
  8868. // value will be replaced with "sensitive".
  8869. func (s ExcludedRule) String() string {
  8870. return awsutil.Prettify(s)
  8871. }
  8872. // GoString returns the string representation.
  8873. //
  8874. // API parameter values that are decorated as "sensitive" in the API will not
  8875. // be included in the string output. The member name will be present, but the
  8876. // value will be replaced with "sensitive".
  8877. func (s ExcludedRule) GoString() string {
  8878. return s.String()
  8879. }
  8880. // Validate inspects the fields of the type to determine if they are valid.
  8881. func (s *ExcludedRule) Validate() error {
  8882. invalidParams := request.ErrInvalidParams{Context: "ExcludedRule"}
  8883. if s.Name == nil {
  8884. invalidParams.Add(request.NewErrParamRequired("Name"))
  8885. }
  8886. if s.Name != nil && len(*s.Name) < 1 {
  8887. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  8888. }
  8889. if invalidParams.Len() > 0 {
  8890. return invalidParams
  8891. }
  8892. return nil
  8893. }
  8894. // SetName sets the Name field's value.
  8895. func (s *ExcludedRule) SetName(v string) *ExcludedRule {
  8896. s.Name = &v
  8897. return s
  8898. }
  8899. // The part of the web request that you want WAF to inspect. Include the single
  8900. // FieldToMatch type that you want to inspect, with additional specifications
  8901. // as needed, according to the type. You specify a single request component
  8902. // in FieldToMatch for each rule statement that requires it. To inspect more
  8903. // than one component of the web request, create a separate rule statement for
  8904. // each component.
  8905. //
  8906. // Example JSON for a QueryString field to match:
  8907. //
  8908. // "FieldToMatch": { "QueryString": {} }
  8909. //
  8910. // Example JSON for a Method field to match specification:
  8911. //
  8912. // "FieldToMatch": { "Method": { "Name": "DELETE" } }
  8913. type FieldToMatch struct {
  8914. _ struct{} `type:"structure"`
  8915. // Inspect all query arguments.
  8916. AllQueryArguments *AllQueryArguments `type:"structure"`
  8917. // Inspect the request body as plain text. The request body immediately follows
  8918. // the request headers. This is the part of a request that contains any additional
  8919. // data that you want to send to your web server as the HTTP request body, such
  8920. // as data from a form.
  8921. //
  8922. // Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF
  8923. // for inspection by the underlying host service. For information about how
  8924. // to handle oversized request bodies, see the Body object configuration.
  8925. Body *Body `type:"structure"`
  8926. // Inspect the request cookies. You must configure scope and pattern matching
  8927. // filters in the Cookies object, to define the set of cookies and the parts
  8928. // of the cookies that WAF inspects.
  8929. //
  8930. // Only the first 8 KB (8192 bytes) of a request's cookies and only the first
  8931. // 200 cookies are forwarded to WAF for inspection by the underlying host service.
  8932. // You must configure how to handle any oversize cookie content in the Cookies
  8933. // object. WAF applies the pattern matching filters to the cookies that it receives
  8934. // from the underlying host service.
  8935. Cookies *Cookies `type:"structure"`
  8936. // Inspect the request headers. You must configure scope and pattern matching
  8937. // filters in the Headers object, to define the set of headers to and the parts
  8938. // of the headers that WAF inspects.
  8939. //
  8940. // Only the first 8 KB (8192 bytes) of a request's headers and only the first
  8941. // 200 headers are forwarded to WAF for inspection by the underlying host service.
  8942. // You must configure how to handle any oversize header content in the Headers
  8943. // object. WAF applies the pattern matching filters to the headers that it receives
  8944. // from the underlying host service.
  8945. Headers *Headers `type:"structure"`
  8946. // Inspect the request body as JSON. The request body immediately follows the
  8947. // request headers. This is the part of a request that contains any additional
  8948. // data that you want to send to your web server as the HTTP request body, such
  8949. // as data from a form.
  8950. //
  8951. // Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF
  8952. // for inspection by the underlying host service. For information about how
  8953. // to handle oversized request bodies, see the JsonBody object configuration.
  8954. JsonBody *JsonBody `type:"structure"`
  8955. // Inspect the HTTP method. The method indicates the type of operation that
  8956. // the request is asking the origin to perform.
  8957. Method *Method `type:"structure"`
  8958. // Inspect the query string. This is the part of a URL that appears after a
  8959. // ? character, if any.
  8960. QueryString *QueryString `type:"structure"`
  8961. // Inspect a single header. Provide the name of the header to inspect, for example,
  8962. // User-Agent or Referer. This setting isn't case sensitive.
  8963. //
  8964. // Example JSON: "SingleHeader": { "Name": "haystack" }
  8965. //
  8966. // Alternately, you can filter and inspect all headers with the Headers FieldToMatch
  8967. // setting.
  8968. SingleHeader *SingleHeader `type:"structure"`
  8969. // Inspect a single query argument. Provide the name of the query argument to
  8970. // inspect, such as UserName or SalesRegion. The name can be up to 30 characters
  8971. // long and isn't case sensitive.
  8972. //
  8973. // Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
  8974. SingleQueryArgument *SingleQueryArgument `type:"structure"`
  8975. // Inspect the request URI path. This is the part of the web request that identifies
  8976. // a resource, for example, /images/daily-ad.jpg.
  8977. UriPath *UriPath `type:"structure"`
  8978. }
  8979. // String returns the string representation.
  8980. //
  8981. // API parameter values that are decorated as "sensitive" in the API will not
  8982. // be included in the string output. The member name will be present, but the
  8983. // value will be replaced with "sensitive".
  8984. func (s FieldToMatch) String() string {
  8985. return awsutil.Prettify(s)
  8986. }
  8987. // GoString returns the string representation.
  8988. //
  8989. // API parameter values that are decorated as "sensitive" in the API will not
  8990. // be included in the string output. The member name will be present, but the
  8991. // value will be replaced with "sensitive".
  8992. func (s FieldToMatch) GoString() string {
  8993. return s.String()
  8994. }
  8995. // Validate inspects the fields of the type to determine if they are valid.
  8996. func (s *FieldToMatch) Validate() error {
  8997. invalidParams := request.ErrInvalidParams{Context: "FieldToMatch"}
  8998. if s.Cookies != nil {
  8999. if err := s.Cookies.Validate(); err != nil {
  9000. invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams))
  9001. }
  9002. }
  9003. if s.Headers != nil {
  9004. if err := s.Headers.Validate(); err != nil {
  9005. invalidParams.AddNested("Headers", err.(request.ErrInvalidParams))
  9006. }
  9007. }
  9008. if s.JsonBody != nil {
  9009. if err := s.JsonBody.Validate(); err != nil {
  9010. invalidParams.AddNested("JsonBody", err.(request.ErrInvalidParams))
  9011. }
  9012. }
  9013. if s.SingleHeader != nil {
  9014. if err := s.SingleHeader.Validate(); err != nil {
  9015. invalidParams.AddNested("SingleHeader", err.(request.ErrInvalidParams))
  9016. }
  9017. }
  9018. if s.SingleQueryArgument != nil {
  9019. if err := s.SingleQueryArgument.Validate(); err != nil {
  9020. invalidParams.AddNested("SingleQueryArgument", err.(request.ErrInvalidParams))
  9021. }
  9022. }
  9023. if invalidParams.Len() > 0 {
  9024. return invalidParams
  9025. }
  9026. return nil
  9027. }
  9028. // SetAllQueryArguments sets the AllQueryArguments field's value.
  9029. func (s *FieldToMatch) SetAllQueryArguments(v *AllQueryArguments) *FieldToMatch {
  9030. s.AllQueryArguments = v
  9031. return s
  9032. }
  9033. // SetBody sets the Body field's value.
  9034. func (s *FieldToMatch) SetBody(v *Body) *FieldToMatch {
  9035. s.Body = v
  9036. return s
  9037. }
  9038. // SetCookies sets the Cookies field's value.
  9039. func (s *FieldToMatch) SetCookies(v *Cookies) *FieldToMatch {
  9040. s.Cookies = v
  9041. return s
  9042. }
  9043. // SetHeaders sets the Headers field's value.
  9044. func (s *FieldToMatch) SetHeaders(v *Headers) *FieldToMatch {
  9045. s.Headers = v
  9046. return s
  9047. }
  9048. // SetJsonBody sets the JsonBody field's value.
  9049. func (s *FieldToMatch) SetJsonBody(v *JsonBody) *FieldToMatch {
  9050. s.JsonBody = v
  9051. return s
  9052. }
  9053. // SetMethod sets the Method field's value.
  9054. func (s *FieldToMatch) SetMethod(v *Method) *FieldToMatch {
  9055. s.Method = v
  9056. return s
  9057. }
  9058. // SetQueryString sets the QueryString field's value.
  9059. func (s *FieldToMatch) SetQueryString(v *QueryString) *FieldToMatch {
  9060. s.QueryString = v
  9061. return s
  9062. }
  9063. // SetSingleHeader sets the SingleHeader field's value.
  9064. func (s *FieldToMatch) SetSingleHeader(v *SingleHeader) *FieldToMatch {
  9065. s.SingleHeader = v
  9066. return s
  9067. }
  9068. // SetSingleQueryArgument sets the SingleQueryArgument field's value.
  9069. func (s *FieldToMatch) SetSingleQueryArgument(v *SingleQueryArgument) *FieldToMatch {
  9070. s.SingleQueryArgument = v
  9071. return s
  9072. }
  9073. // SetUriPath sets the UriPath field's value.
  9074. func (s *FieldToMatch) SetUriPath(v *UriPath) *FieldToMatch {
  9075. s.UriPath = v
  9076. return s
  9077. }
  9078. // A single logging filter, used in LoggingFilter.
  9079. type Filter struct {
  9080. _ struct{} `type:"structure"`
  9081. // How to handle logs that satisfy the filter's conditions and requirement.
  9082. //
  9083. // Behavior is a required field
  9084. Behavior *string `type:"string" required:"true" enum:"FilterBehavior"`
  9085. // Match conditions for the filter.
  9086. //
  9087. // Conditions is a required field
  9088. Conditions []*Condition `min:"1" type:"list" required:"true"`
  9089. // Logic to apply to the filtering conditions. You can specify that, in order
  9090. // to satisfy the filter, a log must match all conditions or must match at least
  9091. // one condition.
  9092. //
  9093. // Requirement is a required field
  9094. Requirement *string `type:"string" required:"true" enum:"FilterRequirement"`
  9095. }
  9096. // String returns the string representation.
  9097. //
  9098. // API parameter values that are decorated as "sensitive" in the API will not
  9099. // be included in the string output. The member name will be present, but the
  9100. // value will be replaced with "sensitive".
  9101. func (s Filter) String() string {
  9102. return awsutil.Prettify(s)
  9103. }
  9104. // GoString returns the string representation.
  9105. //
  9106. // API parameter values that are decorated as "sensitive" in the API will not
  9107. // be included in the string output. The member name will be present, but the
  9108. // value will be replaced with "sensitive".
  9109. func (s Filter) GoString() string {
  9110. return s.String()
  9111. }
  9112. // Validate inspects the fields of the type to determine if they are valid.
  9113. func (s *Filter) Validate() error {
  9114. invalidParams := request.ErrInvalidParams{Context: "Filter"}
  9115. if s.Behavior == nil {
  9116. invalidParams.Add(request.NewErrParamRequired("Behavior"))
  9117. }
  9118. if s.Conditions == nil {
  9119. invalidParams.Add(request.NewErrParamRequired("Conditions"))
  9120. }
  9121. if s.Conditions != nil && len(s.Conditions) < 1 {
  9122. invalidParams.Add(request.NewErrParamMinLen("Conditions", 1))
  9123. }
  9124. if s.Requirement == nil {
  9125. invalidParams.Add(request.NewErrParamRequired("Requirement"))
  9126. }
  9127. if s.Conditions != nil {
  9128. for i, v := range s.Conditions {
  9129. if v == nil {
  9130. continue
  9131. }
  9132. if err := v.Validate(); err != nil {
  9133. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Conditions", i), err.(request.ErrInvalidParams))
  9134. }
  9135. }
  9136. }
  9137. if invalidParams.Len() > 0 {
  9138. return invalidParams
  9139. }
  9140. return nil
  9141. }
  9142. // SetBehavior sets the Behavior field's value.
  9143. func (s *Filter) SetBehavior(v string) *Filter {
  9144. s.Behavior = &v
  9145. return s
  9146. }
  9147. // SetConditions sets the Conditions field's value.
  9148. func (s *Filter) SetConditions(v []*Condition) *Filter {
  9149. s.Conditions = v
  9150. return s
  9151. }
  9152. // SetRequirement sets the Requirement field's value.
  9153. func (s *Filter) SetRequirement(v string) *Filter {
  9154. s.Requirement = &v
  9155. return s
  9156. }
  9157. // A rule group that's defined for an Firewall Manager WAF policy.
  9158. type FirewallManagerRuleGroup struct {
  9159. _ struct{} `type:"structure"`
  9160. // The processing guidance for an Firewall Manager rule. This is like a regular
  9161. // rule Statement, but it can only contain a rule group reference.
  9162. //
  9163. // FirewallManagerStatement is a required field
  9164. FirewallManagerStatement *FirewallManagerStatement `type:"structure" required:"true"`
  9165. // The name of the rule group. You cannot change the name of a rule group after
  9166. // you create it.
  9167. //
  9168. // Name is a required field
  9169. Name *string `min:"1" type:"string" required:"true"`
  9170. // The action to use in the place of the action that results from the rule group
  9171. // evaluation. Set the override action to none to leave the result of the rule
  9172. // group alone. Set it to count to override the result to count only.
  9173. //
  9174. // You can only use this for rule statements that reference a rule group, like
  9175. // RuleGroupReferenceStatement and ManagedRuleGroupStatement.
  9176. //
  9177. // This option is usually set to none. It does not affect how the rules in the
  9178. // rule group are evaluated. If you want the rules in the rule group to only
  9179. // count matches, do not use this and instead use the rule action override option,
  9180. // with Count action, in your rule group reference statement settings.
  9181. //
  9182. // OverrideAction is a required field
  9183. OverrideAction *OverrideAction `type:"structure" required:"true"`
  9184. // If you define more than one rule group in the first or last Firewall Manager
  9185. // rule groups, WAF evaluates each request against the rule groups in order,
  9186. // starting from the lowest priority setting. The priorities don't need to be
  9187. // consecutive, but they must all be different.
  9188. //
  9189. // Priority is a required field
  9190. Priority *int64 `type:"integer" required:"true"`
  9191. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  9192. //
  9193. // VisibilityConfig is a required field
  9194. VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
  9195. }
  9196. // String returns the string representation.
  9197. //
  9198. // API parameter values that are decorated as "sensitive" in the API will not
  9199. // be included in the string output. The member name will be present, but the
  9200. // value will be replaced with "sensitive".
  9201. func (s FirewallManagerRuleGroup) String() string {
  9202. return awsutil.Prettify(s)
  9203. }
  9204. // GoString returns the string representation.
  9205. //
  9206. // API parameter values that are decorated as "sensitive" in the API will not
  9207. // be included in the string output. The member name will be present, but the
  9208. // value will be replaced with "sensitive".
  9209. func (s FirewallManagerRuleGroup) GoString() string {
  9210. return s.String()
  9211. }
  9212. // SetFirewallManagerStatement sets the FirewallManagerStatement field's value.
  9213. func (s *FirewallManagerRuleGroup) SetFirewallManagerStatement(v *FirewallManagerStatement) *FirewallManagerRuleGroup {
  9214. s.FirewallManagerStatement = v
  9215. return s
  9216. }
  9217. // SetName sets the Name field's value.
  9218. func (s *FirewallManagerRuleGroup) SetName(v string) *FirewallManagerRuleGroup {
  9219. s.Name = &v
  9220. return s
  9221. }
  9222. // SetOverrideAction sets the OverrideAction field's value.
  9223. func (s *FirewallManagerRuleGroup) SetOverrideAction(v *OverrideAction) *FirewallManagerRuleGroup {
  9224. s.OverrideAction = v
  9225. return s
  9226. }
  9227. // SetPriority sets the Priority field's value.
  9228. func (s *FirewallManagerRuleGroup) SetPriority(v int64) *FirewallManagerRuleGroup {
  9229. s.Priority = &v
  9230. return s
  9231. }
  9232. // SetVisibilityConfig sets the VisibilityConfig field's value.
  9233. func (s *FirewallManagerRuleGroup) SetVisibilityConfig(v *VisibilityConfig) *FirewallManagerRuleGroup {
  9234. s.VisibilityConfig = v
  9235. return s
  9236. }
  9237. // The processing guidance for an Firewall Manager rule. This is like a regular
  9238. // rule Statement, but it can only contain a rule group reference.
  9239. type FirewallManagerStatement struct {
  9240. _ struct{} `type:"structure"`
  9241. // A rule statement used to run the rules that are defined in a managed rule
  9242. // group. To use this, provide the vendor name and the name of the rule group
  9243. // in this statement. You can retrieve the required names by calling ListAvailableManagedRuleGroups.
  9244. //
  9245. // You cannot nest a ManagedRuleGroupStatement, for example for use inside a
  9246. // NotStatement or OrStatement. It can only be referenced as a top-level statement
  9247. // within a rule.
  9248. //
  9249. // You are charged additional fees when you use the WAF Bot Control managed
  9250. // rule group AWSManagedRulesBotControlRuleSet or the WAF Fraud Control account
  9251. // takeover prevention (ATP) managed rule group AWSManagedRulesATPRuleSet. For
  9252. // more information, see WAF Pricing (http://aws.amazon.com/waf/pricing/).
  9253. ManagedRuleGroupStatement *ManagedRuleGroupStatement `type:"structure"`
  9254. // A rule statement used to run the rules that are defined in a RuleGroup. To
  9255. // use this, create a rule group with your rules, then provide the ARN of the
  9256. // rule group in this statement.
  9257. //
  9258. // You cannot nest a RuleGroupReferenceStatement, for example for use inside
  9259. // a NotStatement or OrStatement. You can only use a rule group reference statement
  9260. // at the top level inside a web ACL.
  9261. RuleGroupReferenceStatement *RuleGroupReferenceStatement `type:"structure"`
  9262. }
  9263. // String returns the string representation.
  9264. //
  9265. // API parameter values that are decorated as "sensitive" in the API will not
  9266. // be included in the string output. The member name will be present, but the
  9267. // value will be replaced with "sensitive".
  9268. func (s FirewallManagerStatement) String() string {
  9269. return awsutil.Prettify(s)
  9270. }
  9271. // GoString returns the string representation.
  9272. //
  9273. // API parameter values that are decorated as "sensitive" in the API will not
  9274. // be included in the string output. The member name will be present, but the
  9275. // value will be replaced with "sensitive".
  9276. func (s FirewallManagerStatement) GoString() string {
  9277. return s.String()
  9278. }
  9279. // SetManagedRuleGroupStatement sets the ManagedRuleGroupStatement field's value.
  9280. func (s *FirewallManagerStatement) SetManagedRuleGroupStatement(v *ManagedRuleGroupStatement) *FirewallManagerStatement {
  9281. s.ManagedRuleGroupStatement = v
  9282. return s
  9283. }
  9284. // SetRuleGroupReferenceStatement sets the RuleGroupReferenceStatement field's value.
  9285. func (s *FirewallManagerStatement) SetRuleGroupReferenceStatement(v *RuleGroupReferenceStatement) *FirewallManagerStatement {
  9286. s.RuleGroupReferenceStatement = v
  9287. return s
  9288. }
  9289. // The configuration for inspecting IP addresses in an HTTP header that you
  9290. // specify, instead of using the IP address that's reported by the web request
  9291. // origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify
  9292. // any header name.
  9293. //
  9294. // If the specified header isn't present in the request, WAF doesn't apply the
  9295. // rule to the web request at all.
  9296. //
  9297. // This configuration is used for GeoMatchStatement and RateBasedStatement.
  9298. // For IPSetReferenceStatement, use IPSetForwardedIPConfig instead.
  9299. //
  9300. // WAF only evaluates the first IP address found in the specified HTTP header.
  9301. type ForwardedIPConfig struct {
  9302. _ struct{} `type:"structure"`
  9303. // The match status to assign to the web request if the request doesn't have
  9304. // a valid IP address in the specified position.
  9305. //
  9306. // If the specified header isn't present in the request, WAF doesn't apply the
  9307. // rule to the web request at all.
  9308. //
  9309. // You can specify the following fallback behaviors:
  9310. //
  9311. // * MATCH - Treat the web request as matching the rule statement. WAF applies
  9312. // the rule action to the request.
  9313. //
  9314. // * NO_MATCH - Treat the web request as not matching the rule statement.
  9315. //
  9316. // FallbackBehavior is a required field
  9317. FallbackBehavior *string `type:"string" required:"true" enum:"FallbackBehavior"`
  9318. // The name of the HTTP header to use for the IP address. For example, to use
  9319. // the X-Forwarded-For (XFF) header, set this to X-Forwarded-For.
  9320. //
  9321. // If the specified header isn't present in the request, WAF doesn't apply the
  9322. // rule to the web request at all.
  9323. //
  9324. // HeaderName is a required field
  9325. HeaderName *string `min:"1" type:"string" required:"true"`
  9326. }
  9327. // String returns the string representation.
  9328. //
  9329. // API parameter values that are decorated as "sensitive" in the API will not
  9330. // be included in the string output. The member name will be present, but the
  9331. // value will be replaced with "sensitive".
  9332. func (s ForwardedIPConfig) String() string {
  9333. return awsutil.Prettify(s)
  9334. }
  9335. // GoString returns the string representation.
  9336. //
  9337. // API parameter values that are decorated as "sensitive" in the API will not
  9338. // be included in the string output. The member name will be present, but the
  9339. // value will be replaced with "sensitive".
  9340. func (s ForwardedIPConfig) GoString() string {
  9341. return s.String()
  9342. }
  9343. // Validate inspects the fields of the type to determine if they are valid.
  9344. func (s *ForwardedIPConfig) Validate() error {
  9345. invalidParams := request.ErrInvalidParams{Context: "ForwardedIPConfig"}
  9346. if s.FallbackBehavior == nil {
  9347. invalidParams.Add(request.NewErrParamRequired("FallbackBehavior"))
  9348. }
  9349. if s.HeaderName == nil {
  9350. invalidParams.Add(request.NewErrParamRequired("HeaderName"))
  9351. }
  9352. if s.HeaderName != nil && len(*s.HeaderName) < 1 {
  9353. invalidParams.Add(request.NewErrParamMinLen("HeaderName", 1))
  9354. }
  9355. if invalidParams.Len() > 0 {
  9356. return invalidParams
  9357. }
  9358. return nil
  9359. }
  9360. // SetFallbackBehavior sets the FallbackBehavior field's value.
  9361. func (s *ForwardedIPConfig) SetFallbackBehavior(v string) *ForwardedIPConfig {
  9362. s.FallbackBehavior = &v
  9363. return s
  9364. }
  9365. // SetHeaderName sets the HeaderName field's value.
  9366. func (s *ForwardedIPConfig) SetHeaderName(v string) *ForwardedIPConfig {
  9367. s.HeaderName = &v
  9368. return s
  9369. }
  9370. type GenerateMobileSdkReleaseUrlInput struct {
  9371. _ struct{} `type:"structure"`
  9372. // The device platform.
  9373. //
  9374. // Platform is a required field
  9375. Platform *string `type:"string" required:"true" enum:"Platform"`
  9376. // The release version. For the latest available version, specify LATEST.
  9377. //
  9378. // ReleaseVersion is a required field
  9379. ReleaseVersion *string `min:"1" type:"string" required:"true"`
  9380. }
  9381. // String returns the string representation.
  9382. //
  9383. // API parameter values that are decorated as "sensitive" in the API will not
  9384. // be included in the string output. The member name will be present, but the
  9385. // value will be replaced with "sensitive".
  9386. func (s GenerateMobileSdkReleaseUrlInput) String() string {
  9387. return awsutil.Prettify(s)
  9388. }
  9389. // GoString returns the string representation.
  9390. //
  9391. // API parameter values that are decorated as "sensitive" in the API will not
  9392. // be included in the string output. The member name will be present, but the
  9393. // value will be replaced with "sensitive".
  9394. func (s GenerateMobileSdkReleaseUrlInput) GoString() string {
  9395. return s.String()
  9396. }
  9397. // Validate inspects the fields of the type to determine if they are valid.
  9398. func (s *GenerateMobileSdkReleaseUrlInput) Validate() error {
  9399. invalidParams := request.ErrInvalidParams{Context: "GenerateMobileSdkReleaseUrlInput"}
  9400. if s.Platform == nil {
  9401. invalidParams.Add(request.NewErrParamRequired("Platform"))
  9402. }
  9403. if s.ReleaseVersion == nil {
  9404. invalidParams.Add(request.NewErrParamRequired("ReleaseVersion"))
  9405. }
  9406. if s.ReleaseVersion != nil && len(*s.ReleaseVersion) < 1 {
  9407. invalidParams.Add(request.NewErrParamMinLen("ReleaseVersion", 1))
  9408. }
  9409. if invalidParams.Len() > 0 {
  9410. return invalidParams
  9411. }
  9412. return nil
  9413. }
  9414. // SetPlatform sets the Platform field's value.
  9415. func (s *GenerateMobileSdkReleaseUrlInput) SetPlatform(v string) *GenerateMobileSdkReleaseUrlInput {
  9416. s.Platform = &v
  9417. return s
  9418. }
  9419. // SetReleaseVersion sets the ReleaseVersion field's value.
  9420. func (s *GenerateMobileSdkReleaseUrlInput) SetReleaseVersion(v string) *GenerateMobileSdkReleaseUrlInput {
  9421. s.ReleaseVersion = &v
  9422. return s
  9423. }
  9424. type GenerateMobileSdkReleaseUrlOutput struct {
  9425. _ struct{} `type:"structure"`
  9426. // The presigned download URL for the specified SDK release.
  9427. Url *string `type:"string"`
  9428. }
  9429. // String returns the string representation.
  9430. //
  9431. // API parameter values that are decorated as "sensitive" in the API will not
  9432. // be included in the string output. The member name will be present, but the
  9433. // value will be replaced with "sensitive".
  9434. func (s GenerateMobileSdkReleaseUrlOutput) String() string {
  9435. return awsutil.Prettify(s)
  9436. }
  9437. // GoString returns the string representation.
  9438. //
  9439. // API parameter values that are decorated as "sensitive" in the API will not
  9440. // be included in the string output. The member name will be present, but the
  9441. // value will be replaced with "sensitive".
  9442. func (s GenerateMobileSdkReleaseUrlOutput) GoString() string {
  9443. return s.String()
  9444. }
  9445. // SetUrl sets the Url field's value.
  9446. func (s *GenerateMobileSdkReleaseUrlOutput) SetUrl(v string) *GenerateMobileSdkReleaseUrlOutput {
  9447. s.Url = &v
  9448. return s
  9449. }
  9450. // A rule statement that labels web requests by country and region and that
  9451. // matches against web requests based on country code. A geo match rule labels
  9452. // every request that it inspects regardless of whether it finds a match.
  9453. //
  9454. // - To manage requests only by country, you can use this statement by itself
  9455. // and specify the countries that you want to match against in the CountryCodes
  9456. // array.
  9457. //
  9458. // - Otherwise, configure your geo match rule with Count action so that it
  9459. // only labels requests. Then, add one or more label match rules to run after
  9460. // the geo match rule and configure them to match against the geographic
  9461. // labels and handle the requests as needed.
  9462. //
  9463. // WAF labels requests using the alpha-2 country and region codes from the International
  9464. // Organization for Standardization (ISO) 3166 standard. WAF determines the
  9465. // codes using either the IP address in the web request origin or, if you specify
  9466. // it, the address in the geo match ForwardedIPConfig.
  9467. //
  9468. // If you use the web request origin, the label formats are awswaf:clientip:geo:region:<ISO
  9469. // country code>-<ISO region code> and awswaf:clientip:geo:country:<ISO country
  9470. // code>.
  9471. //
  9472. // If you use a forwarded IP address, the label formats are awswaf:forwardedip:geo:region:<ISO
  9473. // country code>-<ISO region code> and awswaf:forwardedip:geo:country:<ISO country
  9474. // code>.
  9475. //
  9476. // For additional details, see Geographic match rule statement (https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-geo-match.html)
  9477. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  9478. type GeoMatchStatement struct {
  9479. _ struct{} `type:"structure"`
  9480. // An array of two-character country codes that you want to match against, for
  9481. // example, [ "US", "CN" ], from the alpha-2 country ISO codes of the ISO 3166
  9482. // international standard.
  9483. //
  9484. // When you use a geo match statement just for the region and country labels
  9485. // that it adds to requests, you still have to supply a country code for the
  9486. // rule to evaluate. In this case, you configure the rule to only count matching
  9487. // requests, but it will still generate logging and count metrics for any matches.
  9488. // You can reduce the logging and metrics that the rule produces by specifying
  9489. // a country that's unlikely to be a source of traffic to your site.
  9490. CountryCodes []*string `min:"1" type:"list" enum:"CountryCode"`
  9491. // The configuration for inspecting IP addresses in an HTTP header that you
  9492. // specify, instead of using the IP address that's reported by the web request
  9493. // origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify
  9494. // any header name.
  9495. //
  9496. // If the specified header isn't present in the request, WAF doesn't apply the
  9497. // rule to the web request at all.
  9498. ForwardedIPConfig *ForwardedIPConfig `type:"structure"`
  9499. }
  9500. // String returns the string representation.
  9501. //
  9502. // API parameter values that are decorated as "sensitive" in the API will not
  9503. // be included in the string output. The member name will be present, but the
  9504. // value will be replaced with "sensitive".
  9505. func (s GeoMatchStatement) String() string {
  9506. return awsutil.Prettify(s)
  9507. }
  9508. // GoString returns the string representation.
  9509. //
  9510. // API parameter values that are decorated as "sensitive" in the API will not
  9511. // be included in the string output. The member name will be present, but the
  9512. // value will be replaced with "sensitive".
  9513. func (s GeoMatchStatement) GoString() string {
  9514. return s.String()
  9515. }
  9516. // Validate inspects the fields of the type to determine if they are valid.
  9517. func (s *GeoMatchStatement) Validate() error {
  9518. invalidParams := request.ErrInvalidParams{Context: "GeoMatchStatement"}
  9519. if s.CountryCodes != nil && len(s.CountryCodes) < 1 {
  9520. invalidParams.Add(request.NewErrParamMinLen("CountryCodes", 1))
  9521. }
  9522. if s.ForwardedIPConfig != nil {
  9523. if err := s.ForwardedIPConfig.Validate(); err != nil {
  9524. invalidParams.AddNested("ForwardedIPConfig", err.(request.ErrInvalidParams))
  9525. }
  9526. }
  9527. if invalidParams.Len() > 0 {
  9528. return invalidParams
  9529. }
  9530. return nil
  9531. }
  9532. // SetCountryCodes sets the CountryCodes field's value.
  9533. func (s *GeoMatchStatement) SetCountryCodes(v []*string) *GeoMatchStatement {
  9534. s.CountryCodes = v
  9535. return s
  9536. }
  9537. // SetForwardedIPConfig sets the ForwardedIPConfig field's value.
  9538. func (s *GeoMatchStatement) SetForwardedIPConfig(v *ForwardedIPConfig) *GeoMatchStatement {
  9539. s.ForwardedIPConfig = v
  9540. return s
  9541. }
  9542. type GetIPSetInput struct {
  9543. _ struct{} `type:"structure"`
  9544. // A unique identifier for the set. This ID is returned in the responses to
  9545. // create and list commands. You provide it to operations like update and delete.
  9546. //
  9547. // Id is a required field
  9548. Id *string `min:"1" type:"string" required:"true"`
  9549. // The name of the IP set. You cannot change the name of an IPSet after you
  9550. // create it.
  9551. //
  9552. // Name is a required field
  9553. Name *string `min:"1" type:"string" required:"true"`
  9554. // Specifies whether this is for an Amazon CloudFront distribution or for a
  9555. // regional application. A regional application can be an Application Load Balancer
  9556. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  9557. // Cognito user pool.
  9558. //
  9559. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  9560. // as follows:
  9561. //
  9562. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  9563. // --region=us-east-1.
  9564. //
  9565. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  9566. //
  9567. // Scope is a required field
  9568. Scope *string `type:"string" required:"true" enum:"Scope"`
  9569. }
  9570. // String returns the string representation.
  9571. //
  9572. // API parameter values that are decorated as "sensitive" in the API will not
  9573. // be included in the string output. The member name will be present, but the
  9574. // value will be replaced with "sensitive".
  9575. func (s GetIPSetInput) String() string {
  9576. return awsutil.Prettify(s)
  9577. }
  9578. // GoString returns the string representation.
  9579. //
  9580. // API parameter values that are decorated as "sensitive" in the API will not
  9581. // be included in the string output. The member name will be present, but the
  9582. // value will be replaced with "sensitive".
  9583. func (s GetIPSetInput) GoString() string {
  9584. return s.String()
  9585. }
  9586. // Validate inspects the fields of the type to determine if they are valid.
  9587. func (s *GetIPSetInput) Validate() error {
  9588. invalidParams := request.ErrInvalidParams{Context: "GetIPSetInput"}
  9589. if s.Id == nil {
  9590. invalidParams.Add(request.NewErrParamRequired("Id"))
  9591. }
  9592. if s.Id != nil && len(*s.Id) < 1 {
  9593. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  9594. }
  9595. if s.Name == nil {
  9596. invalidParams.Add(request.NewErrParamRequired("Name"))
  9597. }
  9598. if s.Name != nil && len(*s.Name) < 1 {
  9599. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  9600. }
  9601. if s.Scope == nil {
  9602. invalidParams.Add(request.NewErrParamRequired("Scope"))
  9603. }
  9604. if invalidParams.Len() > 0 {
  9605. return invalidParams
  9606. }
  9607. return nil
  9608. }
  9609. // SetId sets the Id field's value.
  9610. func (s *GetIPSetInput) SetId(v string) *GetIPSetInput {
  9611. s.Id = &v
  9612. return s
  9613. }
  9614. // SetName sets the Name field's value.
  9615. func (s *GetIPSetInput) SetName(v string) *GetIPSetInput {
  9616. s.Name = &v
  9617. return s
  9618. }
  9619. // SetScope sets the Scope field's value.
  9620. func (s *GetIPSetInput) SetScope(v string) *GetIPSetInput {
  9621. s.Scope = &v
  9622. return s
  9623. }
  9624. type GetIPSetOutput struct {
  9625. _ struct{} `type:"structure"`
  9626. // Contains zero or more IP addresses or blocks of IP addresses specified in
  9627. // Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and
  9628. // IPv6 CIDR ranges except for /0. For information about CIDR notation, see
  9629. // the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  9630. //
  9631. // WAF assigns an ARN to each IPSet that you create. To use an IP set in a rule,
  9632. // you provide the ARN to the Rule statement IPSetReferenceStatement.
  9633. IPSet *IPSet `type:"structure"`
  9634. // A token used for optimistic locking. WAF returns a token to your get and
  9635. // list requests, to mark the state of the entity at the time of the request.
  9636. // To make changes to the entity associated with the token, you provide the
  9637. // token to operations like update and delete. WAF uses the token to ensure
  9638. // that no changes have been made to the entity since you last retrieved it.
  9639. // If a change has been made, the update fails with a WAFOptimisticLockException.
  9640. // If this happens, perform another get, and use the new token returned by that
  9641. // operation.
  9642. LockToken *string `min:"1" type:"string"`
  9643. }
  9644. // String returns the string representation.
  9645. //
  9646. // API parameter values that are decorated as "sensitive" in the API will not
  9647. // be included in the string output. The member name will be present, but the
  9648. // value will be replaced with "sensitive".
  9649. func (s GetIPSetOutput) String() string {
  9650. return awsutil.Prettify(s)
  9651. }
  9652. // GoString returns the string representation.
  9653. //
  9654. // API parameter values that are decorated as "sensitive" in the API will not
  9655. // be included in the string output. The member name will be present, but the
  9656. // value will be replaced with "sensitive".
  9657. func (s GetIPSetOutput) GoString() string {
  9658. return s.String()
  9659. }
  9660. // SetIPSet sets the IPSet field's value.
  9661. func (s *GetIPSetOutput) SetIPSet(v *IPSet) *GetIPSetOutput {
  9662. s.IPSet = v
  9663. return s
  9664. }
  9665. // SetLockToken sets the LockToken field's value.
  9666. func (s *GetIPSetOutput) SetLockToken(v string) *GetIPSetOutput {
  9667. s.LockToken = &v
  9668. return s
  9669. }
  9670. type GetLoggingConfigurationInput struct {
  9671. _ struct{} `type:"structure"`
  9672. // The Amazon Resource Name (ARN) of the web ACL for which you want to get the
  9673. // LoggingConfiguration.
  9674. //
  9675. // ResourceArn is a required field
  9676. ResourceArn *string `min:"20" type:"string" required:"true"`
  9677. }
  9678. // String returns the string representation.
  9679. //
  9680. // API parameter values that are decorated as "sensitive" in the API will not
  9681. // be included in the string output. The member name will be present, but the
  9682. // value will be replaced with "sensitive".
  9683. func (s GetLoggingConfigurationInput) String() string {
  9684. return awsutil.Prettify(s)
  9685. }
  9686. // GoString returns the string representation.
  9687. //
  9688. // API parameter values that are decorated as "sensitive" in the API will not
  9689. // be included in the string output. The member name will be present, but the
  9690. // value will be replaced with "sensitive".
  9691. func (s GetLoggingConfigurationInput) GoString() string {
  9692. return s.String()
  9693. }
  9694. // Validate inspects the fields of the type to determine if they are valid.
  9695. func (s *GetLoggingConfigurationInput) Validate() error {
  9696. invalidParams := request.ErrInvalidParams{Context: "GetLoggingConfigurationInput"}
  9697. if s.ResourceArn == nil {
  9698. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  9699. }
  9700. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  9701. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  9702. }
  9703. if invalidParams.Len() > 0 {
  9704. return invalidParams
  9705. }
  9706. return nil
  9707. }
  9708. // SetResourceArn sets the ResourceArn field's value.
  9709. func (s *GetLoggingConfigurationInput) SetResourceArn(v string) *GetLoggingConfigurationInput {
  9710. s.ResourceArn = &v
  9711. return s
  9712. }
  9713. type GetLoggingConfigurationOutput struct {
  9714. _ struct{} `type:"structure"`
  9715. // The LoggingConfiguration for the specified web ACL.
  9716. LoggingConfiguration *LoggingConfiguration `type:"structure"`
  9717. }
  9718. // String returns the string representation.
  9719. //
  9720. // API parameter values that are decorated as "sensitive" in the API will not
  9721. // be included in the string output. The member name will be present, but the
  9722. // value will be replaced with "sensitive".
  9723. func (s GetLoggingConfigurationOutput) String() string {
  9724. return awsutil.Prettify(s)
  9725. }
  9726. // GoString returns the string representation.
  9727. //
  9728. // API parameter values that are decorated as "sensitive" in the API will not
  9729. // be included in the string output. The member name will be present, but the
  9730. // value will be replaced with "sensitive".
  9731. func (s GetLoggingConfigurationOutput) GoString() string {
  9732. return s.String()
  9733. }
  9734. // SetLoggingConfiguration sets the LoggingConfiguration field's value.
  9735. func (s *GetLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfiguration) *GetLoggingConfigurationOutput {
  9736. s.LoggingConfiguration = v
  9737. return s
  9738. }
  9739. type GetManagedRuleSetInput struct {
  9740. _ struct{} `type:"structure"`
  9741. // A unique identifier for the managed rule set. The ID is returned in the responses
  9742. // to commands like list. You provide it to operations like get and update.
  9743. //
  9744. // Id is a required field
  9745. Id *string `min:"1" type:"string" required:"true"`
  9746. // The name of the managed rule set. You use this, along with the rule set ID,
  9747. // to identify the rule set.
  9748. //
  9749. // This name is assigned to the corresponding managed rule group, which your
  9750. // customers can access and use.
  9751. //
  9752. // Name is a required field
  9753. Name *string `min:"1" type:"string" required:"true"`
  9754. // Specifies whether this is for an Amazon CloudFront distribution or for a
  9755. // regional application. A regional application can be an Application Load Balancer
  9756. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  9757. // Cognito user pool.
  9758. //
  9759. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  9760. // as follows:
  9761. //
  9762. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  9763. // --region=us-east-1.
  9764. //
  9765. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  9766. //
  9767. // Scope is a required field
  9768. Scope *string `type:"string" required:"true" enum:"Scope"`
  9769. }
  9770. // String returns the string representation.
  9771. //
  9772. // API parameter values that are decorated as "sensitive" in the API will not
  9773. // be included in the string output. The member name will be present, but the
  9774. // value will be replaced with "sensitive".
  9775. func (s GetManagedRuleSetInput) String() string {
  9776. return awsutil.Prettify(s)
  9777. }
  9778. // GoString returns the string representation.
  9779. //
  9780. // API parameter values that are decorated as "sensitive" in the API will not
  9781. // be included in the string output. The member name will be present, but the
  9782. // value will be replaced with "sensitive".
  9783. func (s GetManagedRuleSetInput) GoString() string {
  9784. return s.String()
  9785. }
  9786. // Validate inspects the fields of the type to determine if they are valid.
  9787. func (s *GetManagedRuleSetInput) Validate() error {
  9788. invalidParams := request.ErrInvalidParams{Context: "GetManagedRuleSetInput"}
  9789. if s.Id == nil {
  9790. invalidParams.Add(request.NewErrParamRequired("Id"))
  9791. }
  9792. if s.Id != nil && len(*s.Id) < 1 {
  9793. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  9794. }
  9795. if s.Name == nil {
  9796. invalidParams.Add(request.NewErrParamRequired("Name"))
  9797. }
  9798. if s.Name != nil && len(*s.Name) < 1 {
  9799. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  9800. }
  9801. if s.Scope == nil {
  9802. invalidParams.Add(request.NewErrParamRequired("Scope"))
  9803. }
  9804. if invalidParams.Len() > 0 {
  9805. return invalidParams
  9806. }
  9807. return nil
  9808. }
  9809. // SetId sets the Id field's value.
  9810. func (s *GetManagedRuleSetInput) SetId(v string) *GetManagedRuleSetInput {
  9811. s.Id = &v
  9812. return s
  9813. }
  9814. // SetName sets the Name field's value.
  9815. func (s *GetManagedRuleSetInput) SetName(v string) *GetManagedRuleSetInput {
  9816. s.Name = &v
  9817. return s
  9818. }
  9819. // SetScope sets the Scope field's value.
  9820. func (s *GetManagedRuleSetInput) SetScope(v string) *GetManagedRuleSetInput {
  9821. s.Scope = &v
  9822. return s
  9823. }
  9824. type GetManagedRuleSetOutput struct {
  9825. _ struct{} `type:"structure"`
  9826. // A token used for optimistic locking. WAF returns a token to your get and
  9827. // list requests, to mark the state of the entity at the time of the request.
  9828. // To make changes to the entity associated with the token, you provide the
  9829. // token to operations like update and delete. WAF uses the token to ensure
  9830. // that no changes have been made to the entity since you last retrieved it.
  9831. // If a change has been made, the update fails with a WAFOptimisticLockException.
  9832. // If this happens, perform another get, and use the new token returned by that
  9833. // operation.
  9834. LockToken *string `min:"1" type:"string"`
  9835. // The managed rule set that you requested.
  9836. ManagedRuleSet *ManagedRuleSet `type:"structure"`
  9837. }
  9838. // String returns the string representation.
  9839. //
  9840. // API parameter values that are decorated as "sensitive" in the API will not
  9841. // be included in the string output. The member name will be present, but the
  9842. // value will be replaced with "sensitive".
  9843. func (s GetManagedRuleSetOutput) String() string {
  9844. return awsutil.Prettify(s)
  9845. }
  9846. // GoString returns the string representation.
  9847. //
  9848. // API parameter values that are decorated as "sensitive" in the API will not
  9849. // be included in the string output. The member name will be present, but the
  9850. // value will be replaced with "sensitive".
  9851. func (s GetManagedRuleSetOutput) GoString() string {
  9852. return s.String()
  9853. }
  9854. // SetLockToken sets the LockToken field's value.
  9855. func (s *GetManagedRuleSetOutput) SetLockToken(v string) *GetManagedRuleSetOutput {
  9856. s.LockToken = &v
  9857. return s
  9858. }
  9859. // SetManagedRuleSet sets the ManagedRuleSet field's value.
  9860. func (s *GetManagedRuleSetOutput) SetManagedRuleSet(v *ManagedRuleSet) *GetManagedRuleSetOutput {
  9861. s.ManagedRuleSet = v
  9862. return s
  9863. }
  9864. type GetMobileSdkReleaseInput struct {
  9865. _ struct{} `type:"structure"`
  9866. // The device platform.
  9867. //
  9868. // Platform is a required field
  9869. Platform *string `type:"string" required:"true" enum:"Platform"`
  9870. // The release version. For the latest available version, specify LATEST.
  9871. //
  9872. // ReleaseVersion is a required field
  9873. ReleaseVersion *string `min:"1" type:"string" required:"true"`
  9874. }
  9875. // String returns the string representation.
  9876. //
  9877. // API parameter values that are decorated as "sensitive" in the API will not
  9878. // be included in the string output. The member name will be present, but the
  9879. // value will be replaced with "sensitive".
  9880. func (s GetMobileSdkReleaseInput) String() string {
  9881. return awsutil.Prettify(s)
  9882. }
  9883. // GoString returns the string representation.
  9884. //
  9885. // API parameter values that are decorated as "sensitive" in the API will not
  9886. // be included in the string output. The member name will be present, but the
  9887. // value will be replaced with "sensitive".
  9888. func (s GetMobileSdkReleaseInput) GoString() string {
  9889. return s.String()
  9890. }
  9891. // Validate inspects the fields of the type to determine if they are valid.
  9892. func (s *GetMobileSdkReleaseInput) Validate() error {
  9893. invalidParams := request.ErrInvalidParams{Context: "GetMobileSdkReleaseInput"}
  9894. if s.Platform == nil {
  9895. invalidParams.Add(request.NewErrParamRequired("Platform"))
  9896. }
  9897. if s.ReleaseVersion == nil {
  9898. invalidParams.Add(request.NewErrParamRequired("ReleaseVersion"))
  9899. }
  9900. if s.ReleaseVersion != nil && len(*s.ReleaseVersion) < 1 {
  9901. invalidParams.Add(request.NewErrParamMinLen("ReleaseVersion", 1))
  9902. }
  9903. if invalidParams.Len() > 0 {
  9904. return invalidParams
  9905. }
  9906. return nil
  9907. }
  9908. // SetPlatform sets the Platform field's value.
  9909. func (s *GetMobileSdkReleaseInput) SetPlatform(v string) *GetMobileSdkReleaseInput {
  9910. s.Platform = &v
  9911. return s
  9912. }
  9913. // SetReleaseVersion sets the ReleaseVersion field's value.
  9914. func (s *GetMobileSdkReleaseInput) SetReleaseVersion(v string) *GetMobileSdkReleaseInput {
  9915. s.ReleaseVersion = &v
  9916. return s
  9917. }
  9918. type GetMobileSdkReleaseOutput struct {
  9919. _ struct{} `type:"structure"`
  9920. // Information for a specified SDK release, including release notes and tags.
  9921. MobileSdkRelease *MobileSdkRelease `type:"structure"`
  9922. }
  9923. // String returns the string representation.
  9924. //
  9925. // API parameter values that are decorated as "sensitive" in the API will not
  9926. // be included in the string output. The member name will be present, but the
  9927. // value will be replaced with "sensitive".
  9928. func (s GetMobileSdkReleaseOutput) String() string {
  9929. return awsutil.Prettify(s)
  9930. }
  9931. // GoString returns the string representation.
  9932. //
  9933. // API parameter values that are decorated as "sensitive" in the API will not
  9934. // be included in the string output. The member name will be present, but the
  9935. // value will be replaced with "sensitive".
  9936. func (s GetMobileSdkReleaseOutput) GoString() string {
  9937. return s.String()
  9938. }
  9939. // SetMobileSdkRelease sets the MobileSdkRelease field's value.
  9940. func (s *GetMobileSdkReleaseOutput) SetMobileSdkRelease(v *MobileSdkRelease) *GetMobileSdkReleaseOutput {
  9941. s.MobileSdkRelease = v
  9942. return s
  9943. }
  9944. type GetPermissionPolicyInput struct {
  9945. _ struct{} `type:"structure"`
  9946. // The Amazon Resource Name (ARN) of the rule group for which you want to get
  9947. // the policy.
  9948. //
  9949. // ResourceArn is a required field
  9950. ResourceArn *string `min:"20" type:"string" required:"true"`
  9951. }
  9952. // String returns the string representation.
  9953. //
  9954. // API parameter values that are decorated as "sensitive" in the API will not
  9955. // be included in the string output. The member name will be present, but the
  9956. // value will be replaced with "sensitive".
  9957. func (s GetPermissionPolicyInput) String() string {
  9958. return awsutil.Prettify(s)
  9959. }
  9960. // GoString returns the string representation.
  9961. //
  9962. // API parameter values that are decorated as "sensitive" in the API will not
  9963. // be included in the string output. The member name will be present, but the
  9964. // value will be replaced with "sensitive".
  9965. func (s GetPermissionPolicyInput) GoString() string {
  9966. return s.String()
  9967. }
  9968. // Validate inspects the fields of the type to determine if they are valid.
  9969. func (s *GetPermissionPolicyInput) Validate() error {
  9970. invalidParams := request.ErrInvalidParams{Context: "GetPermissionPolicyInput"}
  9971. if s.ResourceArn == nil {
  9972. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  9973. }
  9974. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  9975. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  9976. }
  9977. if invalidParams.Len() > 0 {
  9978. return invalidParams
  9979. }
  9980. return nil
  9981. }
  9982. // SetResourceArn sets the ResourceArn field's value.
  9983. func (s *GetPermissionPolicyInput) SetResourceArn(v string) *GetPermissionPolicyInput {
  9984. s.ResourceArn = &v
  9985. return s
  9986. }
  9987. type GetPermissionPolicyOutput struct {
  9988. _ struct{} `type:"structure"`
  9989. // The IAM policy that is attached to the specified rule group.
  9990. Policy *string `min:"1" type:"string"`
  9991. }
  9992. // String returns the string representation.
  9993. //
  9994. // API parameter values that are decorated as "sensitive" in the API will not
  9995. // be included in the string output. The member name will be present, but the
  9996. // value will be replaced with "sensitive".
  9997. func (s GetPermissionPolicyOutput) String() string {
  9998. return awsutil.Prettify(s)
  9999. }
  10000. // GoString returns the string representation.
  10001. //
  10002. // API parameter values that are decorated as "sensitive" in the API will not
  10003. // be included in the string output. The member name will be present, but the
  10004. // value will be replaced with "sensitive".
  10005. func (s GetPermissionPolicyOutput) GoString() string {
  10006. return s.String()
  10007. }
  10008. // SetPolicy sets the Policy field's value.
  10009. func (s *GetPermissionPolicyOutput) SetPolicy(v string) *GetPermissionPolicyOutput {
  10010. s.Policy = &v
  10011. return s
  10012. }
  10013. type GetRateBasedStatementManagedKeysInput struct {
  10014. _ struct{} `type:"structure"`
  10015. // The name of the rule group reference statement in your web ACL. This is required
  10016. // only when you have the rate-based rule nested inside a rule group.
  10017. RuleGroupRuleName *string `min:"1" type:"string"`
  10018. // The name of the rate-based rule to get the keys for. If you have the rule
  10019. // defined inside a rule group that you're using in your web ACL, also provide
  10020. // the name of the rule group reference statement in the request parameter RuleGroupRuleName.
  10021. //
  10022. // RuleName is a required field
  10023. RuleName *string `min:"1" type:"string" required:"true"`
  10024. // Specifies whether this is for an Amazon CloudFront distribution or for a
  10025. // regional application. A regional application can be an Application Load Balancer
  10026. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  10027. // Cognito user pool.
  10028. //
  10029. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  10030. // as follows:
  10031. //
  10032. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  10033. // --region=us-east-1.
  10034. //
  10035. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  10036. //
  10037. // Scope is a required field
  10038. Scope *string `type:"string" required:"true" enum:"Scope"`
  10039. // The unique identifier for the web ACL. This ID is returned in the responses
  10040. // to create and list commands. You provide it to operations like update and
  10041. // delete.
  10042. //
  10043. // WebACLId is a required field
  10044. WebACLId *string `min:"1" type:"string" required:"true"`
  10045. // The name of the web ACL. You cannot change the name of a web ACL after you
  10046. // create it.
  10047. //
  10048. // WebACLName is a required field
  10049. WebACLName *string `min:"1" type:"string" required:"true"`
  10050. }
  10051. // String returns the string representation.
  10052. //
  10053. // API parameter values that are decorated as "sensitive" in the API will not
  10054. // be included in the string output. The member name will be present, but the
  10055. // value will be replaced with "sensitive".
  10056. func (s GetRateBasedStatementManagedKeysInput) String() string {
  10057. return awsutil.Prettify(s)
  10058. }
  10059. // GoString returns the string representation.
  10060. //
  10061. // API parameter values that are decorated as "sensitive" in the API will not
  10062. // be included in the string output. The member name will be present, but the
  10063. // value will be replaced with "sensitive".
  10064. func (s GetRateBasedStatementManagedKeysInput) GoString() string {
  10065. return s.String()
  10066. }
  10067. // Validate inspects the fields of the type to determine if they are valid.
  10068. func (s *GetRateBasedStatementManagedKeysInput) Validate() error {
  10069. invalidParams := request.ErrInvalidParams{Context: "GetRateBasedStatementManagedKeysInput"}
  10070. if s.RuleGroupRuleName != nil && len(*s.RuleGroupRuleName) < 1 {
  10071. invalidParams.Add(request.NewErrParamMinLen("RuleGroupRuleName", 1))
  10072. }
  10073. if s.RuleName == nil {
  10074. invalidParams.Add(request.NewErrParamRequired("RuleName"))
  10075. }
  10076. if s.RuleName != nil && len(*s.RuleName) < 1 {
  10077. invalidParams.Add(request.NewErrParamMinLen("RuleName", 1))
  10078. }
  10079. if s.Scope == nil {
  10080. invalidParams.Add(request.NewErrParamRequired("Scope"))
  10081. }
  10082. if s.WebACLId == nil {
  10083. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  10084. }
  10085. if s.WebACLId != nil && len(*s.WebACLId) < 1 {
  10086. invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
  10087. }
  10088. if s.WebACLName == nil {
  10089. invalidParams.Add(request.NewErrParamRequired("WebACLName"))
  10090. }
  10091. if s.WebACLName != nil && len(*s.WebACLName) < 1 {
  10092. invalidParams.Add(request.NewErrParamMinLen("WebACLName", 1))
  10093. }
  10094. if invalidParams.Len() > 0 {
  10095. return invalidParams
  10096. }
  10097. return nil
  10098. }
  10099. // SetRuleGroupRuleName sets the RuleGroupRuleName field's value.
  10100. func (s *GetRateBasedStatementManagedKeysInput) SetRuleGroupRuleName(v string) *GetRateBasedStatementManagedKeysInput {
  10101. s.RuleGroupRuleName = &v
  10102. return s
  10103. }
  10104. // SetRuleName sets the RuleName field's value.
  10105. func (s *GetRateBasedStatementManagedKeysInput) SetRuleName(v string) *GetRateBasedStatementManagedKeysInput {
  10106. s.RuleName = &v
  10107. return s
  10108. }
  10109. // SetScope sets the Scope field's value.
  10110. func (s *GetRateBasedStatementManagedKeysInput) SetScope(v string) *GetRateBasedStatementManagedKeysInput {
  10111. s.Scope = &v
  10112. return s
  10113. }
  10114. // SetWebACLId sets the WebACLId field's value.
  10115. func (s *GetRateBasedStatementManagedKeysInput) SetWebACLId(v string) *GetRateBasedStatementManagedKeysInput {
  10116. s.WebACLId = &v
  10117. return s
  10118. }
  10119. // SetWebACLName sets the WebACLName field's value.
  10120. func (s *GetRateBasedStatementManagedKeysInput) SetWebACLName(v string) *GetRateBasedStatementManagedKeysInput {
  10121. s.WebACLName = &v
  10122. return s
  10123. }
  10124. type GetRateBasedStatementManagedKeysOutput struct {
  10125. _ struct{} `type:"structure"`
  10126. // The keys that are of Internet Protocol version 4 (IPv4).
  10127. ManagedKeysIPV4 *RateBasedStatementManagedKeysIPSet `type:"structure"`
  10128. // The keys that are of Internet Protocol version 6 (IPv6).
  10129. ManagedKeysIPV6 *RateBasedStatementManagedKeysIPSet `type:"structure"`
  10130. }
  10131. // String returns the string representation.
  10132. //
  10133. // API parameter values that are decorated as "sensitive" in the API will not
  10134. // be included in the string output. The member name will be present, but the
  10135. // value will be replaced with "sensitive".
  10136. func (s GetRateBasedStatementManagedKeysOutput) String() string {
  10137. return awsutil.Prettify(s)
  10138. }
  10139. // GoString returns the string representation.
  10140. //
  10141. // API parameter values that are decorated as "sensitive" in the API will not
  10142. // be included in the string output. The member name will be present, but the
  10143. // value will be replaced with "sensitive".
  10144. func (s GetRateBasedStatementManagedKeysOutput) GoString() string {
  10145. return s.String()
  10146. }
  10147. // SetManagedKeysIPV4 sets the ManagedKeysIPV4 field's value.
  10148. func (s *GetRateBasedStatementManagedKeysOutput) SetManagedKeysIPV4(v *RateBasedStatementManagedKeysIPSet) *GetRateBasedStatementManagedKeysOutput {
  10149. s.ManagedKeysIPV4 = v
  10150. return s
  10151. }
  10152. // SetManagedKeysIPV6 sets the ManagedKeysIPV6 field's value.
  10153. func (s *GetRateBasedStatementManagedKeysOutput) SetManagedKeysIPV6(v *RateBasedStatementManagedKeysIPSet) *GetRateBasedStatementManagedKeysOutput {
  10154. s.ManagedKeysIPV6 = v
  10155. return s
  10156. }
  10157. type GetRegexPatternSetInput struct {
  10158. _ struct{} `type:"structure"`
  10159. // A unique identifier for the set. This ID is returned in the responses to
  10160. // create and list commands. You provide it to operations like update and delete.
  10161. //
  10162. // Id is a required field
  10163. Id *string `min:"1" type:"string" required:"true"`
  10164. // The name of the set. You cannot change the name after you create the set.
  10165. //
  10166. // Name is a required field
  10167. Name *string `min:"1" type:"string" required:"true"`
  10168. // Specifies whether this is for an Amazon CloudFront distribution or for a
  10169. // regional application. A regional application can be an Application Load Balancer
  10170. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  10171. // Cognito user pool.
  10172. //
  10173. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  10174. // as follows:
  10175. //
  10176. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  10177. // --region=us-east-1.
  10178. //
  10179. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  10180. //
  10181. // Scope is a required field
  10182. Scope *string `type:"string" required:"true" enum:"Scope"`
  10183. }
  10184. // String returns the string representation.
  10185. //
  10186. // API parameter values that are decorated as "sensitive" in the API will not
  10187. // be included in the string output. The member name will be present, but the
  10188. // value will be replaced with "sensitive".
  10189. func (s GetRegexPatternSetInput) String() string {
  10190. return awsutil.Prettify(s)
  10191. }
  10192. // GoString returns the string representation.
  10193. //
  10194. // API parameter values that are decorated as "sensitive" in the API will not
  10195. // be included in the string output. The member name will be present, but the
  10196. // value will be replaced with "sensitive".
  10197. func (s GetRegexPatternSetInput) GoString() string {
  10198. return s.String()
  10199. }
  10200. // Validate inspects the fields of the type to determine if they are valid.
  10201. func (s *GetRegexPatternSetInput) Validate() error {
  10202. invalidParams := request.ErrInvalidParams{Context: "GetRegexPatternSetInput"}
  10203. if s.Id == nil {
  10204. invalidParams.Add(request.NewErrParamRequired("Id"))
  10205. }
  10206. if s.Id != nil && len(*s.Id) < 1 {
  10207. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  10208. }
  10209. if s.Name == nil {
  10210. invalidParams.Add(request.NewErrParamRequired("Name"))
  10211. }
  10212. if s.Name != nil && len(*s.Name) < 1 {
  10213. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  10214. }
  10215. if s.Scope == nil {
  10216. invalidParams.Add(request.NewErrParamRequired("Scope"))
  10217. }
  10218. if invalidParams.Len() > 0 {
  10219. return invalidParams
  10220. }
  10221. return nil
  10222. }
  10223. // SetId sets the Id field's value.
  10224. func (s *GetRegexPatternSetInput) SetId(v string) *GetRegexPatternSetInput {
  10225. s.Id = &v
  10226. return s
  10227. }
  10228. // SetName sets the Name field's value.
  10229. func (s *GetRegexPatternSetInput) SetName(v string) *GetRegexPatternSetInput {
  10230. s.Name = &v
  10231. return s
  10232. }
  10233. // SetScope sets the Scope field's value.
  10234. func (s *GetRegexPatternSetInput) SetScope(v string) *GetRegexPatternSetInput {
  10235. s.Scope = &v
  10236. return s
  10237. }
  10238. type GetRegexPatternSetOutput struct {
  10239. _ struct{} `type:"structure"`
  10240. // A token used for optimistic locking. WAF returns a token to your get and
  10241. // list requests, to mark the state of the entity at the time of the request.
  10242. // To make changes to the entity associated with the token, you provide the
  10243. // token to operations like update and delete. WAF uses the token to ensure
  10244. // that no changes have been made to the entity since you last retrieved it.
  10245. // If a change has been made, the update fails with a WAFOptimisticLockException.
  10246. // If this happens, perform another get, and use the new token returned by that
  10247. // operation.
  10248. LockToken *string `min:"1" type:"string"`
  10249. // Contains one or more regular expressions.
  10250. //
  10251. // WAF assigns an ARN to each RegexPatternSet that you create. To use a set
  10252. // in a rule, you provide the ARN to the Rule statement RegexPatternSetReferenceStatement.
  10253. RegexPatternSet *RegexPatternSet `type:"structure"`
  10254. }
  10255. // String returns the string representation.
  10256. //
  10257. // API parameter values that are decorated as "sensitive" in the API will not
  10258. // be included in the string output. The member name will be present, but the
  10259. // value will be replaced with "sensitive".
  10260. func (s GetRegexPatternSetOutput) String() string {
  10261. return awsutil.Prettify(s)
  10262. }
  10263. // GoString returns the string representation.
  10264. //
  10265. // API parameter values that are decorated as "sensitive" in the API will not
  10266. // be included in the string output. The member name will be present, but the
  10267. // value will be replaced with "sensitive".
  10268. func (s GetRegexPatternSetOutput) GoString() string {
  10269. return s.String()
  10270. }
  10271. // SetLockToken sets the LockToken field's value.
  10272. func (s *GetRegexPatternSetOutput) SetLockToken(v string) *GetRegexPatternSetOutput {
  10273. s.LockToken = &v
  10274. return s
  10275. }
  10276. // SetRegexPatternSet sets the RegexPatternSet field's value.
  10277. func (s *GetRegexPatternSetOutput) SetRegexPatternSet(v *RegexPatternSet) *GetRegexPatternSetOutput {
  10278. s.RegexPatternSet = v
  10279. return s
  10280. }
  10281. type GetRuleGroupInput struct {
  10282. _ struct{} `type:"structure"`
  10283. // The Amazon Resource Name (ARN) of the entity.
  10284. ARN *string `min:"20" type:"string"`
  10285. // A unique identifier for the rule group. This ID is returned in the responses
  10286. // to create and list commands. You provide it to operations like update and
  10287. // delete.
  10288. Id *string `min:"1" type:"string"`
  10289. // The name of the rule group. You cannot change the name of a rule group after
  10290. // you create it.
  10291. Name *string `min:"1" type:"string"`
  10292. // Specifies whether this is for an Amazon CloudFront distribution or for a
  10293. // regional application. A regional application can be an Application Load Balancer
  10294. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  10295. // Cognito user pool.
  10296. //
  10297. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  10298. // as follows:
  10299. //
  10300. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  10301. // --region=us-east-1.
  10302. //
  10303. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  10304. Scope *string `type:"string" enum:"Scope"`
  10305. }
  10306. // String returns the string representation.
  10307. //
  10308. // API parameter values that are decorated as "sensitive" in the API will not
  10309. // be included in the string output. The member name will be present, but the
  10310. // value will be replaced with "sensitive".
  10311. func (s GetRuleGroupInput) String() string {
  10312. return awsutil.Prettify(s)
  10313. }
  10314. // GoString returns the string representation.
  10315. //
  10316. // API parameter values that are decorated as "sensitive" in the API will not
  10317. // be included in the string output. The member name will be present, but the
  10318. // value will be replaced with "sensitive".
  10319. func (s GetRuleGroupInput) GoString() string {
  10320. return s.String()
  10321. }
  10322. // Validate inspects the fields of the type to determine if they are valid.
  10323. func (s *GetRuleGroupInput) Validate() error {
  10324. invalidParams := request.ErrInvalidParams{Context: "GetRuleGroupInput"}
  10325. if s.ARN != nil && len(*s.ARN) < 20 {
  10326. invalidParams.Add(request.NewErrParamMinLen("ARN", 20))
  10327. }
  10328. if s.Id != nil && len(*s.Id) < 1 {
  10329. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  10330. }
  10331. if s.Name != nil && len(*s.Name) < 1 {
  10332. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  10333. }
  10334. if invalidParams.Len() > 0 {
  10335. return invalidParams
  10336. }
  10337. return nil
  10338. }
  10339. // SetARN sets the ARN field's value.
  10340. func (s *GetRuleGroupInput) SetARN(v string) *GetRuleGroupInput {
  10341. s.ARN = &v
  10342. return s
  10343. }
  10344. // SetId sets the Id field's value.
  10345. func (s *GetRuleGroupInput) SetId(v string) *GetRuleGroupInput {
  10346. s.Id = &v
  10347. return s
  10348. }
  10349. // SetName sets the Name field's value.
  10350. func (s *GetRuleGroupInput) SetName(v string) *GetRuleGroupInput {
  10351. s.Name = &v
  10352. return s
  10353. }
  10354. // SetScope sets the Scope field's value.
  10355. func (s *GetRuleGroupInput) SetScope(v string) *GetRuleGroupInput {
  10356. s.Scope = &v
  10357. return s
  10358. }
  10359. type GetRuleGroupOutput struct {
  10360. _ struct{} `type:"structure"`
  10361. // A token used for optimistic locking. WAF returns a token to your get and
  10362. // list requests, to mark the state of the entity at the time of the request.
  10363. // To make changes to the entity associated with the token, you provide the
  10364. // token to operations like update and delete. WAF uses the token to ensure
  10365. // that no changes have been made to the entity since you last retrieved it.
  10366. // If a change has been made, the update fails with a WAFOptimisticLockException.
  10367. // If this happens, perform another get, and use the new token returned by that
  10368. // operation.
  10369. LockToken *string `min:"1" type:"string"`
  10370. // A rule group defines a collection of rules to inspect and control web requests
  10371. // that you can use in a WebACL. When you create a rule group, you define an
  10372. // immutable capacity limit. If you update a rule group, you must stay within
  10373. // the capacity. This allows others to reuse the rule group with confidence
  10374. // in its capacity requirements.
  10375. RuleGroup *RuleGroup `type:"structure"`
  10376. }
  10377. // String returns the string representation.
  10378. //
  10379. // API parameter values that are decorated as "sensitive" in the API will not
  10380. // be included in the string output. The member name will be present, but the
  10381. // value will be replaced with "sensitive".
  10382. func (s GetRuleGroupOutput) String() string {
  10383. return awsutil.Prettify(s)
  10384. }
  10385. // GoString returns the string representation.
  10386. //
  10387. // API parameter values that are decorated as "sensitive" in the API will not
  10388. // be included in the string output. The member name will be present, but the
  10389. // value will be replaced with "sensitive".
  10390. func (s GetRuleGroupOutput) GoString() string {
  10391. return s.String()
  10392. }
  10393. // SetLockToken sets the LockToken field's value.
  10394. func (s *GetRuleGroupOutput) SetLockToken(v string) *GetRuleGroupOutput {
  10395. s.LockToken = &v
  10396. return s
  10397. }
  10398. // SetRuleGroup sets the RuleGroup field's value.
  10399. func (s *GetRuleGroupOutput) SetRuleGroup(v *RuleGroup) *GetRuleGroupOutput {
  10400. s.RuleGroup = v
  10401. return s
  10402. }
  10403. type GetSampledRequestsInput struct {
  10404. _ struct{} `type:"structure"`
  10405. // The number of requests that you want WAF to return from among the first 5,000
  10406. // requests that your Amazon Web Services resource received during the time
  10407. // range. If your resource received fewer requests than the value of MaxItems,
  10408. // GetSampledRequests returns information about all of them.
  10409. //
  10410. // MaxItems is a required field
  10411. MaxItems *int64 `min:"1" type:"long" required:"true"`
  10412. // The metric name assigned to the Rule or RuleGroup dimension for which you
  10413. // want a sample of requests.
  10414. //
  10415. // RuleMetricName is a required field
  10416. RuleMetricName *string `min:"1" type:"string" required:"true"`
  10417. // Specifies whether this is for an Amazon CloudFront distribution or for a
  10418. // regional application. A regional application can be an Application Load Balancer
  10419. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  10420. // Cognito user pool.
  10421. //
  10422. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  10423. // as follows:
  10424. //
  10425. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  10426. // --region=us-east-1.
  10427. //
  10428. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  10429. //
  10430. // Scope is a required field
  10431. Scope *string `type:"string" required:"true" enum:"Scope"`
  10432. // The start date and time and the end date and time of the range for which
  10433. // you want GetSampledRequests to return a sample of requests. You must specify
  10434. // the times in Coordinated Universal Time (UTC) format. UTC format includes
  10435. // the special designator, Z. For example, "2016-09-27T14:50Z". You can specify
  10436. // any time range in the previous three hours. If you specify a start time that's
  10437. // earlier than three hours ago, WAF sets it to three hours ago.
  10438. //
  10439. // TimeWindow is a required field
  10440. TimeWindow *TimeWindow `type:"structure" required:"true"`
  10441. // The Amazon resource name (ARN) of the WebACL for which you want a sample
  10442. // of requests.
  10443. //
  10444. // WebAclArn is a required field
  10445. WebAclArn *string `min:"20" type:"string" required:"true"`
  10446. }
  10447. // String returns the string representation.
  10448. //
  10449. // API parameter values that are decorated as "sensitive" in the API will not
  10450. // be included in the string output. The member name will be present, but the
  10451. // value will be replaced with "sensitive".
  10452. func (s GetSampledRequestsInput) String() string {
  10453. return awsutil.Prettify(s)
  10454. }
  10455. // GoString returns the string representation.
  10456. //
  10457. // API parameter values that are decorated as "sensitive" in the API will not
  10458. // be included in the string output. The member name will be present, but the
  10459. // value will be replaced with "sensitive".
  10460. func (s GetSampledRequestsInput) GoString() string {
  10461. return s.String()
  10462. }
  10463. // Validate inspects the fields of the type to determine if they are valid.
  10464. func (s *GetSampledRequestsInput) Validate() error {
  10465. invalidParams := request.ErrInvalidParams{Context: "GetSampledRequestsInput"}
  10466. if s.MaxItems == nil {
  10467. invalidParams.Add(request.NewErrParamRequired("MaxItems"))
  10468. }
  10469. if s.MaxItems != nil && *s.MaxItems < 1 {
  10470. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  10471. }
  10472. if s.RuleMetricName == nil {
  10473. invalidParams.Add(request.NewErrParamRequired("RuleMetricName"))
  10474. }
  10475. if s.RuleMetricName != nil && len(*s.RuleMetricName) < 1 {
  10476. invalidParams.Add(request.NewErrParamMinLen("RuleMetricName", 1))
  10477. }
  10478. if s.Scope == nil {
  10479. invalidParams.Add(request.NewErrParamRequired("Scope"))
  10480. }
  10481. if s.TimeWindow == nil {
  10482. invalidParams.Add(request.NewErrParamRequired("TimeWindow"))
  10483. }
  10484. if s.WebAclArn == nil {
  10485. invalidParams.Add(request.NewErrParamRequired("WebAclArn"))
  10486. }
  10487. if s.WebAclArn != nil && len(*s.WebAclArn) < 20 {
  10488. invalidParams.Add(request.NewErrParamMinLen("WebAclArn", 20))
  10489. }
  10490. if s.TimeWindow != nil {
  10491. if err := s.TimeWindow.Validate(); err != nil {
  10492. invalidParams.AddNested("TimeWindow", err.(request.ErrInvalidParams))
  10493. }
  10494. }
  10495. if invalidParams.Len() > 0 {
  10496. return invalidParams
  10497. }
  10498. return nil
  10499. }
  10500. // SetMaxItems sets the MaxItems field's value.
  10501. func (s *GetSampledRequestsInput) SetMaxItems(v int64) *GetSampledRequestsInput {
  10502. s.MaxItems = &v
  10503. return s
  10504. }
  10505. // SetRuleMetricName sets the RuleMetricName field's value.
  10506. func (s *GetSampledRequestsInput) SetRuleMetricName(v string) *GetSampledRequestsInput {
  10507. s.RuleMetricName = &v
  10508. return s
  10509. }
  10510. // SetScope sets the Scope field's value.
  10511. func (s *GetSampledRequestsInput) SetScope(v string) *GetSampledRequestsInput {
  10512. s.Scope = &v
  10513. return s
  10514. }
  10515. // SetTimeWindow sets the TimeWindow field's value.
  10516. func (s *GetSampledRequestsInput) SetTimeWindow(v *TimeWindow) *GetSampledRequestsInput {
  10517. s.TimeWindow = v
  10518. return s
  10519. }
  10520. // SetWebAclArn sets the WebAclArn field's value.
  10521. func (s *GetSampledRequestsInput) SetWebAclArn(v string) *GetSampledRequestsInput {
  10522. s.WebAclArn = &v
  10523. return s
  10524. }
  10525. type GetSampledRequestsOutput struct {
  10526. _ struct{} `type:"structure"`
  10527. // The total number of requests from which GetSampledRequests got a sample of
  10528. // MaxItems requests. If PopulationSize is less than MaxItems, the sample includes
  10529. // every request that your Amazon Web Services resource received during the
  10530. // specified time range.
  10531. PopulationSize *int64 `type:"long"`
  10532. // A complex type that contains detailed information about each of the requests
  10533. // in the sample.
  10534. SampledRequests []*SampledHTTPRequest `type:"list"`
  10535. // Usually, TimeWindow is the time range that you specified in the GetSampledRequests
  10536. // request. However, if your Amazon Web Services resource received more than
  10537. // 5,000 requests during the time range that you specified in the request, GetSampledRequests
  10538. // returns the time range for the first 5,000 requests. Times are in Coordinated
  10539. // Universal Time (UTC) format.
  10540. TimeWindow *TimeWindow `type:"structure"`
  10541. }
  10542. // String returns the string representation.
  10543. //
  10544. // API parameter values that are decorated as "sensitive" in the API will not
  10545. // be included in the string output. The member name will be present, but the
  10546. // value will be replaced with "sensitive".
  10547. func (s GetSampledRequestsOutput) String() string {
  10548. return awsutil.Prettify(s)
  10549. }
  10550. // GoString returns the string representation.
  10551. //
  10552. // API parameter values that are decorated as "sensitive" in the API will not
  10553. // be included in the string output. The member name will be present, but the
  10554. // value will be replaced with "sensitive".
  10555. func (s GetSampledRequestsOutput) GoString() string {
  10556. return s.String()
  10557. }
  10558. // SetPopulationSize sets the PopulationSize field's value.
  10559. func (s *GetSampledRequestsOutput) SetPopulationSize(v int64) *GetSampledRequestsOutput {
  10560. s.PopulationSize = &v
  10561. return s
  10562. }
  10563. // SetSampledRequests sets the SampledRequests field's value.
  10564. func (s *GetSampledRequestsOutput) SetSampledRequests(v []*SampledHTTPRequest) *GetSampledRequestsOutput {
  10565. s.SampledRequests = v
  10566. return s
  10567. }
  10568. // SetTimeWindow sets the TimeWindow field's value.
  10569. func (s *GetSampledRequestsOutput) SetTimeWindow(v *TimeWindow) *GetSampledRequestsOutput {
  10570. s.TimeWindow = v
  10571. return s
  10572. }
  10573. type GetWebACLForResourceInput struct {
  10574. _ struct{} `type:"structure"`
  10575. // The Amazon Resource Name (ARN) of the resource whose web ACL you want to
  10576. // retrieve.
  10577. //
  10578. // The ARN must be in one of the following formats:
  10579. //
  10580. // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
  10581. //
  10582. // * For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
  10583. //
  10584. // * For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId
  10585. //
  10586. // * For an Amazon Cognito user pool: arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
  10587. //
  10588. // ResourceArn is a required field
  10589. ResourceArn *string `min:"20" type:"string" required:"true"`
  10590. }
  10591. // String returns the string representation.
  10592. //
  10593. // API parameter values that are decorated as "sensitive" in the API will not
  10594. // be included in the string output. The member name will be present, but the
  10595. // value will be replaced with "sensitive".
  10596. func (s GetWebACLForResourceInput) String() string {
  10597. return awsutil.Prettify(s)
  10598. }
  10599. // GoString returns the string representation.
  10600. //
  10601. // API parameter values that are decorated as "sensitive" in the API will not
  10602. // be included in the string output. The member name will be present, but the
  10603. // value will be replaced with "sensitive".
  10604. func (s GetWebACLForResourceInput) GoString() string {
  10605. return s.String()
  10606. }
  10607. // Validate inspects the fields of the type to determine if they are valid.
  10608. func (s *GetWebACLForResourceInput) Validate() error {
  10609. invalidParams := request.ErrInvalidParams{Context: "GetWebACLForResourceInput"}
  10610. if s.ResourceArn == nil {
  10611. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  10612. }
  10613. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  10614. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  10615. }
  10616. if invalidParams.Len() > 0 {
  10617. return invalidParams
  10618. }
  10619. return nil
  10620. }
  10621. // SetResourceArn sets the ResourceArn field's value.
  10622. func (s *GetWebACLForResourceInput) SetResourceArn(v string) *GetWebACLForResourceInput {
  10623. s.ResourceArn = &v
  10624. return s
  10625. }
  10626. type GetWebACLForResourceOutput struct {
  10627. _ struct{} `type:"structure"`
  10628. // The web ACL that is associated with the resource. If there is no associated
  10629. // resource, WAF returns a null web ACL.
  10630. WebACL *WebACL `type:"structure"`
  10631. }
  10632. // String returns the string representation.
  10633. //
  10634. // API parameter values that are decorated as "sensitive" in the API will not
  10635. // be included in the string output. The member name will be present, but the
  10636. // value will be replaced with "sensitive".
  10637. func (s GetWebACLForResourceOutput) String() string {
  10638. return awsutil.Prettify(s)
  10639. }
  10640. // GoString returns the string representation.
  10641. //
  10642. // API parameter values that are decorated as "sensitive" in the API will not
  10643. // be included in the string output. The member name will be present, but the
  10644. // value will be replaced with "sensitive".
  10645. func (s GetWebACLForResourceOutput) GoString() string {
  10646. return s.String()
  10647. }
  10648. // SetWebACL sets the WebACL field's value.
  10649. func (s *GetWebACLForResourceOutput) SetWebACL(v *WebACL) *GetWebACLForResourceOutput {
  10650. s.WebACL = v
  10651. return s
  10652. }
  10653. type GetWebACLInput struct {
  10654. _ struct{} `type:"structure"`
  10655. // The unique identifier for the web ACL. This ID is returned in the responses
  10656. // to create and list commands. You provide it to operations like update and
  10657. // delete.
  10658. //
  10659. // Id is a required field
  10660. Id *string `min:"1" type:"string" required:"true"`
  10661. // The name of the web ACL. You cannot change the name of a web ACL after you
  10662. // create it.
  10663. //
  10664. // Name is a required field
  10665. Name *string `min:"1" type:"string" required:"true"`
  10666. // Specifies whether this is for an Amazon CloudFront distribution or for a
  10667. // regional application. A regional application can be an Application Load Balancer
  10668. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  10669. // Cognito user pool.
  10670. //
  10671. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  10672. // as follows:
  10673. //
  10674. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  10675. // --region=us-east-1.
  10676. //
  10677. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  10678. //
  10679. // Scope is a required field
  10680. Scope *string `type:"string" required:"true" enum:"Scope"`
  10681. }
  10682. // String returns the string representation.
  10683. //
  10684. // API parameter values that are decorated as "sensitive" in the API will not
  10685. // be included in the string output. The member name will be present, but the
  10686. // value will be replaced with "sensitive".
  10687. func (s GetWebACLInput) String() string {
  10688. return awsutil.Prettify(s)
  10689. }
  10690. // GoString returns the string representation.
  10691. //
  10692. // API parameter values that are decorated as "sensitive" in the API will not
  10693. // be included in the string output. The member name will be present, but the
  10694. // value will be replaced with "sensitive".
  10695. func (s GetWebACLInput) GoString() string {
  10696. return s.String()
  10697. }
  10698. // Validate inspects the fields of the type to determine if they are valid.
  10699. func (s *GetWebACLInput) Validate() error {
  10700. invalidParams := request.ErrInvalidParams{Context: "GetWebACLInput"}
  10701. if s.Id == nil {
  10702. invalidParams.Add(request.NewErrParamRequired("Id"))
  10703. }
  10704. if s.Id != nil && len(*s.Id) < 1 {
  10705. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  10706. }
  10707. if s.Name == nil {
  10708. invalidParams.Add(request.NewErrParamRequired("Name"))
  10709. }
  10710. if s.Name != nil && len(*s.Name) < 1 {
  10711. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  10712. }
  10713. if s.Scope == nil {
  10714. invalidParams.Add(request.NewErrParamRequired("Scope"))
  10715. }
  10716. if invalidParams.Len() > 0 {
  10717. return invalidParams
  10718. }
  10719. return nil
  10720. }
  10721. // SetId sets the Id field's value.
  10722. func (s *GetWebACLInput) SetId(v string) *GetWebACLInput {
  10723. s.Id = &v
  10724. return s
  10725. }
  10726. // SetName sets the Name field's value.
  10727. func (s *GetWebACLInput) SetName(v string) *GetWebACLInput {
  10728. s.Name = &v
  10729. return s
  10730. }
  10731. // SetScope sets the Scope field's value.
  10732. func (s *GetWebACLInput) SetScope(v string) *GetWebACLInput {
  10733. s.Scope = &v
  10734. return s
  10735. }
  10736. type GetWebACLOutput struct {
  10737. _ struct{} `type:"structure"`
  10738. // The URL to use in SDK integrations with Amazon Web Services managed rule
  10739. // groups. For example, you can use the integration SDKs with the account takeover
  10740. // prevention managed rule group AWSManagedRulesATPRuleSet. This is only populated
  10741. // if you are using a rule group in your web ACL that integrates with your applications
  10742. // in this way. For more information, see WAF client application integration
  10743. // (https://docs.aws.amazon.com/waf/latest/developerguide/waf-application-integration.html)
  10744. // in the WAF Developer Guide.
  10745. ApplicationIntegrationURL *string `type:"string"`
  10746. // A token used for optimistic locking. WAF returns a token to your get and
  10747. // list requests, to mark the state of the entity at the time of the request.
  10748. // To make changes to the entity associated with the token, you provide the
  10749. // token to operations like update and delete. WAF uses the token to ensure
  10750. // that no changes have been made to the entity since you last retrieved it.
  10751. // If a change has been made, the update fails with a WAFOptimisticLockException.
  10752. // If this happens, perform another get, and use the new token returned by that
  10753. // operation.
  10754. LockToken *string `min:"1" type:"string"`
  10755. // The web ACL specification. You can modify the settings in this web ACL and
  10756. // use it to update this web ACL or create a new one.
  10757. WebACL *WebACL `type:"structure"`
  10758. }
  10759. // String returns the string representation.
  10760. //
  10761. // API parameter values that are decorated as "sensitive" in the API will not
  10762. // be included in the string output. The member name will be present, but the
  10763. // value will be replaced with "sensitive".
  10764. func (s GetWebACLOutput) String() string {
  10765. return awsutil.Prettify(s)
  10766. }
  10767. // GoString returns the string representation.
  10768. //
  10769. // API parameter values that are decorated as "sensitive" in the API will not
  10770. // be included in the string output. The member name will be present, but the
  10771. // value will be replaced with "sensitive".
  10772. func (s GetWebACLOutput) GoString() string {
  10773. return s.String()
  10774. }
  10775. // SetApplicationIntegrationURL sets the ApplicationIntegrationURL field's value.
  10776. func (s *GetWebACLOutput) SetApplicationIntegrationURL(v string) *GetWebACLOutput {
  10777. s.ApplicationIntegrationURL = &v
  10778. return s
  10779. }
  10780. // SetLockToken sets the LockToken field's value.
  10781. func (s *GetWebACLOutput) SetLockToken(v string) *GetWebACLOutput {
  10782. s.LockToken = &v
  10783. return s
  10784. }
  10785. // SetWebACL sets the WebACL field's value.
  10786. func (s *GetWebACLOutput) SetWebACL(v *WebACL) *GetWebACLOutput {
  10787. s.WebACL = v
  10788. return s
  10789. }
  10790. // Part of the response from GetSampledRequests. This is a complex type that
  10791. // appears as Headers in the response syntax. HTTPHeader contains the names
  10792. // and values of all of the headers that appear in one of the web requests.
  10793. type HTTPHeader struct {
  10794. _ struct{} `type:"structure"`
  10795. // The name of the HTTP header.
  10796. Name *string `type:"string"`
  10797. // The value of the HTTP header.
  10798. Value *string `type:"string"`
  10799. }
  10800. // String returns the string representation.
  10801. //
  10802. // API parameter values that are decorated as "sensitive" in the API will not
  10803. // be included in the string output. The member name will be present, but the
  10804. // value will be replaced with "sensitive".
  10805. func (s HTTPHeader) String() string {
  10806. return awsutil.Prettify(s)
  10807. }
  10808. // GoString returns the string representation.
  10809. //
  10810. // API parameter values that are decorated as "sensitive" in the API will not
  10811. // be included in the string output. The member name will be present, but the
  10812. // value will be replaced with "sensitive".
  10813. func (s HTTPHeader) GoString() string {
  10814. return s.String()
  10815. }
  10816. // SetName sets the Name field's value.
  10817. func (s *HTTPHeader) SetName(v string) *HTTPHeader {
  10818. s.Name = &v
  10819. return s
  10820. }
  10821. // SetValue sets the Value field's value.
  10822. func (s *HTTPHeader) SetValue(v string) *HTTPHeader {
  10823. s.Value = &v
  10824. return s
  10825. }
  10826. // Part of the response from GetSampledRequests. This is a complex type that
  10827. // appears as Request in the response syntax. HTTPRequest contains information
  10828. // about one of the web requests.
  10829. type HTTPRequest struct {
  10830. _ struct{} `type:"structure"`
  10831. // The IP address that the request originated from. If the web ACL is associated
  10832. // with a CloudFront distribution, this is the value of one of the following
  10833. // fields in CloudFront access logs:
  10834. //
  10835. // * c-ip, if the viewer did not use an HTTP proxy or a load balancer to
  10836. // send the request
  10837. //
  10838. // * x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer
  10839. // to send the request
  10840. ClientIP *string `type:"string"`
  10841. // The two-letter country code for the country that the request originated from.
  10842. // For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2
  10843. // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
  10844. Country *string `type:"string"`
  10845. // The HTTP version specified in the sampled web request, for example, HTTP/1.1.
  10846. HTTPVersion *string `type:"string"`
  10847. // A complex type that contains the name and value for each header in the sampled
  10848. // web request.
  10849. Headers []*HTTPHeader `type:"list"`
  10850. // The HTTP method specified in the sampled web request.
  10851. Method *string `type:"string"`
  10852. // The URI path of the request, which identifies the resource, for example,
  10853. // /images/daily-ad.jpg.
  10854. URI *string `type:"string"`
  10855. }
  10856. // String returns the string representation.
  10857. //
  10858. // API parameter values that are decorated as "sensitive" in the API will not
  10859. // be included in the string output. The member name will be present, but the
  10860. // value will be replaced with "sensitive".
  10861. func (s HTTPRequest) String() string {
  10862. return awsutil.Prettify(s)
  10863. }
  10864. // GoString returns the string representation.
  10865. //
  10866. // API parameter values that are decorated as "sensitive" in the API will not
  10867. // be included in the string output. The member name will be present, but the
  10868. // value will be replaced with "sensitive".
  10869. func (s HTTPRequest) GoString() string {
  10870. return s.String()
  10871. }
  10872. // SetClientIP sets the ClientIP field's value.
  10873. func (s *HTTPRequest) SetClientIP(v string) *HTTPRequest {
  10874. s.ClientIP = &v
  10875. return s
  10876. }
  10877. // SetCountry sets the Country field's value.
  10878. func (s *HTTPRequest) SetCountry(v string) *HTTPRequest {
  10879. s.Country = &v
  10880. return s
  10881. }
  10882. // SetHTTPVersion sets the HTTPVersion field's value.
  10883. func (s *HTTPRequest) SetHTTPVersion(v string) *HTTPRequest {
  10884. s.HTTPVersion = &v
  10885. return s
  10886. }
  10887. // SetHeaders sets the Headers field's value.
  10888. func (s *HTTPRequest) SetHeaders(v []*HTTPHeader) *HTTPRequest {
  10889. s.Headers = v
  10890. return s
  10891. }
  10892. // SetMethod sets the Method field's value.
  10893. func (s *HTTPRequest) SetMethod(v string) *HTTPRequest {
  10894. s.Method = &v
  10895. return s
  10896. }
  10897. // SetURI sets the URI field's value.
  10898. func (s *HTTPRequest) SetURI(v string) *HTTPRequest {
  10899. s.URI = &v
  10900. return s
  10901. }
  10902. // The filter to use to identify the subset of headers to inspect in a web request.
  10903. //
  10904. // You must specify exactly one setting: either All, IncludedHeaders, or ExcludedHeaders.
  10905. //
  10906. // Example JSON: "MatchPattern": { "ExcludedHeaders": {"KeyToExclude1", "KeyToExclude2"}
  10907. // }
  10908. type HeaderMatchPattern struct {
  10909. _ struct{} `type:"structure"`
  10910. // Inspect all headers.
  10911. All *All `type:"structure"`
  10912. // Inspect only the headers whose keys don't match any of the strings specified
  10913. // here.
  10914. ExcludedHeaders []*string `min:"1" type:"list"`
  10915. // Inspect only the headers that have a key that matches one of the strings
  10916. // specified here.
  10917. IncludedHeaders []*string `min:"1" type:"list"`
  10918. }
  10919. // String returns the string representation.
  10920. //
  10921. // API parameter values that are decorated as "sensitive" in the API will not
  10922. // be included in the string output. The member name will be present, but the
  10923. // value will be replaced with "sensitive".
  10924. func (s HeaderMatchPattern) String() string {
  10925. return awsutil.Prettify(s)
  10926. }
  10927. // GoString returns the string representation.
  10928. //
  10929. // API parameter values that are decorated as "sensitive" in the API will not
  10930. // be included in the string output. The member name will be present, but the
  10931. // value will be replaced with "sensitive".
  10932. func (s HeaderMatchPattern) GoString() string {
  10933. return s.String()
  10934. }
  10935. // Validate inspects the fields of the type to determine if they are valid.
  10936. func (s *HeaderMatchPattern) Validate() error {
  10937. invalidParams := request.ErrInvalidParams{Context: "HeaderMatchPattern"}
  10938. if s.ExcludedHeaders != nil && len(s.ExcludedHeaders) < 1 {
  10939. invalidParams.Add(request.NewErrParamMinLen("ExcludedHeaders", 1))
  10940. }
  10941. if s.IncludedHeaders != nil && len(s.IncludedHeaders) < 1 {
  10942. invalidParams.Add(request.NewErrParamMinLen("IncludedHeaders", 1))
  10943. }
  10944. if invalidParams.Len() > 0 {
  10945. return invalidParams
  10946. }
  10947. return nil
  10948. }
  10949. // SetAll sets the All field's value.
  10950. func (s *HeaderMatchPattern) SetAll(v *All) *HeaderMatchPattern {
  10951. s.All = v
  10952. return s
  10953. }
  10954. // SetExcludedHeaders sets the ExcludedHeaders field's value.
  10955. func (s *HeaderMatchPattern) SetExcludedHeaders(v []*string) *HeaderMatchPattern {
  10956. s.ExcludedHeaders = v
  10957. return s
  10958. }
  10959. // SetIncludedHeaders sets the IncludedHeaders field's value.
  10960. func (s *HeaderMatchPattern) SetIncludedHeaders(v []*string) *HeaderMatchPattern {
  10961. s.IncludedHeaders = v
  10962. return s
  10963. }
  10964. // Inspect all headers in the web request. You can specify the parts of the
  10965. // headers to inspect and you can narrow the set of headers to inspect by including
  10966. // or excluding specific keys.
  10967. //
  10968. // This is used to indicate the web request component to inspect, in the FieldToMatch
  10969. // specification.
  10970. //
  10971. // If you want to inspect just the value of a single header, use the SingleHeader
  10972. // FieldToMatch setting instead.
  10973. //
  10974. // Example JSON: "Headers": { "MatchPattern": { "All": {} }, "MatchScope": "KEY",
  10975. // "OversizeHandling": "MATCH" }
  10976. type Headers struct {
  10977. _ struct{} `type:"structure"`
  10978. // The filter to use to identify the subset of headers to inspect in a web request.
  10979. //
  10980. // You must specify exactly one setting: either All, IncludedHeaders, or ExcludedHeaders.
  10981. //
  10982. // Example JSON: "MatchPattern": { "ExcludedHeaders": {"KeyToExclude1", "KeyToExclude2"}
  10983. // }
  10984. //
  10985. // MatchPattern is a required field
  10986. MatchPattern *HeaderMatchPattern `type:"structure" required:"true"`
  10987. // The parts of the headers to match with the rule inspection criteria. If you
  10988. // specify All, WAF inspects both keys and values.
  10989. //
  10990. // MatchScope is a required field
  10991. MatchScope *string `type:"string" required:"true" enum:"MapMatchScope"`
  10992. // What WAF should do if the headers of the request are larger than WAF can
  10993. // inspect. WAF does not support inspecting the entire contents of request headers
  10994. // when they exceed 8 KB (8192 bytes) or 200 total headers. The underlying host
  10995. // service forwards a maximum of 200 headers and at most 8 KB of header contents
  10996. // to WAF.
  10997. //
  10998. // The options for oversize handling are the following:
  10999. //
  11000. // * CONTINUE - Inspect the headers normally, according to the rule inspection
  11001. // criteria.
  11002. //
  11003. // * MATCH - Treat the web request as matching the rule statement. WAF applies
  11004. // the rule action to the request.
  11005. //
  11006. // * NO_MATCH - Treat the web request as not matching the rule statement.
  11007. //
  11008. // OversizeHandling is a required field
  11009. OversizeHandling *string `type:"string" required:"true" enum:"OversizeHandling"`
  11010. }
  11011. // String returns the string representation.
  11012. //
  11013. // API parameter values that are decorated as "sensitive" in the API will not
  11014. // be included in the string output. The member name will be present, but the
  11015. // value will be replaced with "sensitive".
  11016. func (s Headers) String() string {
  11017. return awsutil.Prettify(s)
  11018. }
  11019. // GoString returns the string representation.
  11020. //
  11021. // API parameter values that are decorated as "sensitive" in the API will not
  11022. // be included in the string output. The member name will be present, but the
  11023. // value will be replaced with "sensitive".
  11024. func (s Headers) GoString() string {
  11025. return s.String()
  11026. }
  11027. // Validate inspects the fields of the type to determine if they are valid.
  11028. func (s *Headers) Validate() error {
  11029. invalidParams := request.ErrInvalidParams{Context: "Headers"}
  11030. if s.MatchPattern == nil {
  11031. invalidParams.Add(request.NewErrParamRequired("MatchPattern"))
  11032. }
  11033. if s.MatchScope == nil {
  11034. invalidParams.Add(request.NewErrParamRequired("MatchScope"))
  11035. }
  11036. if s.OversizeHandling == nil {
  11037. invalidParams.Add(request.NewErrParamRequired("OversizeHandling"))
  11038. }
  11039. if s.MatchPattern != nil {
  11040. if err := s.MatchPattern.Validate(); err != nil {
  11041. invalidParams.AddNested("MatchPattern", err.(request.ErrInvalidParams))
  11042. }
  11043. }
  11044. if invalidParams.Len() > 0 {
  11045. return invalidParams
  11046. }
  11047. return nil
  11048. }
  11049. // SetMatchPattern sets the MatchPattern field's value.
  11050. func (s *Headers) SetMatchPattern(v *HeaderMatchPattern) *Headers {
  11051. s.MatchPattern = v
  11052. return s
  11053. }
  11054. // SetMatchScope sets the MatchScope field's value.
  11055. func (s *Headers) SetMatchScope(v string) *Headers {
  11056. s.MatchScope = &v
  11057. return s
  11058. }
  11059. // SetOversizeHandling sets the OversizeHandling field's value.
  11060. func (s *Headers) SetOversizeHandling(v string) *Headers {
  11061. s.OversizeHandling = &v
  11062. return s
  11063. }
  11064. // Contains zero or more IP addresses or blocks of IP addresses specified in
  11065. // Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and
  11066. // IPv6 CIDR ranges except for /0. For information about CIDR notation, see
  11067. // the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  11068. //
  11069. // WAF assigns an ARN to each IPSet that you create. To use an IP set in a rule,
  11070. // you provide the ARN to the Rule statement IPSetReferenceStatement.
  11071. type IPSet struct {
  11072. _ struct{} `type:"structure"`
  11073. // The Amazon Resource Name (ARN) of the entity.
  11074. //
  11075. // ARN is a required field
  11076. ARN *string `min:"20" type:"string" required:"true"`
  11077. // Contains an array of strings that specifies zero or more IP addresses or
  11078. // blocks of IP addresses. All addresses must be specified using Classless Inter-Domain
  11079. // Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except
  11080. // for /0.
  11081. //
  11082. // Example address strings:
  11083. //
  11084. // * To configure WAF to allow, block, or count requests that originated
  11085. // from the IP address 192.0.2.44, specify 192.0.2.44/32.
  11086. //
  11087. // * To configure WAF to allow, block, or count requests that originated
  11088. // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.
  11089. //
  11090. // * To configure WAF to allow, block, or count requests that originated
  11091. // from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.
  11092. //
  11093. // * To configure WAF to allow, block, or count requests that originated
  11094. // from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff,
  11095. // specify 1111:0000:0000:0000:0000:0000:0000:0000/64.
  11096. //
  11097. // For more information about CIDR notation, see the Wikipedia entry Classless
  11098. // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  11099. //
  11100. // Example JSON Addresses specifications:
  11101. //
  11102. // * Empty array: "Addresses": []
  11103. //
  11104. // * Array with one address: "Addresses": ["192.0.2.44/32"]
  11105. //
  11106. // * Array with three addresses: "Addresses": ["192.0.2.44/32", "192.0.2.0/24",
  11107. // "192.0.0.0/16"]
  11108. //
  11109. // * INVALID specification: "Addresses": [""] INVALID
  11110. //
  11111. // Addresses is a required field
  11112. Addresses []*string `type:"list" required:"true"`
  11113. // A description of the IP set that helps with identification.
  11114. Description *string `min:"1" type:"string"`
  11115. // The version of the IP addresses, either IPV4 or IPV6.
  11116. //
  11117. // IPAddressVersion is a required field
  11118. IPAddressVersion *string `type:"string" required:"true" enum:"IPAddressVersion"`
  11119. // A unique identifier for the set. This ID is returned in the responses to
  11120. // create and list commands. You provide it to operations like update and delete.
  11121. //
  11122. // Id is a required field
  11123. Id *string `min:"1" type:"string" required:"true"`
  11124. // The name of the IP set. You cannot change the name of an IPSet after you
  11125. // create it.
  11126. //
  11127. // Name is a required field
  11128. Name *string `min:"1" type:"string" required:"true"`
  11129. }
  11130. // String returns the string representation.
  11131. //
  11132. // API parameter values that are decorated as "sensitive" in the API will not
  11133. // be included in the string output. The member name will be present, but the
  11134. // value will be replaced with "sensitive".
  11135. func (s IPSet) String() string {
  11136. return awsutil.Prettify(s)
  11137. }
  11138. // GoString returns the string representation.
  11139. //
  11140. // API parameter values that are decorated as "sensitive" in the API will not
  11141. // be included in the string output. The member name will be present, but the
  11142. // value will be replaced with "sensitive".
  11143. func (s IPSet) GoString() string {
  11144. return s.String()
  11145. }
  11146. // SetARN sets the ARN field's value.
  11147. func (s *IPSet) SetARN(v string) *IPSet {
  11148. s.ARN = &v
  11149. return s
  11150. }
  11151. // SetAddresses sets the Addresses field's value.
  11152. func (s *IPSet) SetAddresses(v []*string) *IPSet {
  11153. s.Addresses = v
  11154. return s
  11155. }
  11156. // SetDescription sets the Description field's value.
  11157. func (s *IPSet) SetDescription(v string) *IPSet {
  11158. s.Description = &v
  11159. return s
  11160. }
  11161. // SetIPAddressVersion sets the IPAddressVersion field's value.
  11162. func (s *IPSet) SetIPAddressVersion(v string) *IPSet {
  11163. s.IPAddressVersion = &v
  11164. return s
  11165. }
  11166. // SetId sets the Id field's value.
  11167. func (s *IPSet) SetId(v string) *IPSet {
  11168. s.Id = &v
  11169. return s
  11170. }
  11171. // SetName sets the Name field's value.
  11172. func (s *IPSet) SetName(v string) *IPSet {
  11173. s.Name = &v
  11174. return s
  11175. }
  11176. // The configuration for inspecting IP addresses in an HTTP header that you
  11177. // specify, instead of using the IP address that's reported by the web request
  11178. // origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify
  11179. // any header name.
  11180. //
  11181. // If the specified header isn't present in the request, WAF doesn't apply the
  11182. // rule to the web request at all.
  11183. //
  11184. // This configuration is used only for IPSetReferenceStatement. For GeoMatchStatement
  11185. // and RateBasedStatement, use ForwardedIPConfig instead.
  11186. type IPSetForwardedIPConfig struct {
  11187. _ struct{} `type:"structure"`
  11188. // The match status to assign to the web request if the request doesn't have
  11189. // a valid IP address in the specified position.
  11190. //
  11191. // If the specified header isn't present in the request, WAF doesn't apply the
  11192. // rule to the web request at all.
  11193. //
  11194. // You can specify the following fallback behaviors:
  11195. //
  11196. // * MATCH - Treat the web request as matching the rule statement. WAF applies
  11197. // the rule action to the request.
  11198. //
  11199. // * NO_MATCH - Treat the web request as not matching the rule statement.
  11200. //
  11201. // FallbackBehavior is a required field
  11202. FallbackBehavior *string `type:"string" required:"true" enum:"FallbackBehavior"`
  11203. // The name of the HTTP header to use for the IP address. For example, to use
  11204. // the X-Forwarded-For (XFF) header, set this to X-Forwarded-For.
  11205. //
  11206. // If the specified header isn't present in the request, WAF doesn't apply the
  11207. // rule to the web request at all.
  11208. //
  11209. // HeaderName is a required field
  11210. HeaderName *string `min:"1" type:"string" required:"true"`
  11211. // The position in the header to search for the IP address. The header can contain
  11212. // IP addresses of the original client and also of proxies. For example, the
  11213. // header value could be 10.1.1.1, 127.0.0.0, 10.10.10.10 where the first IP
  11214. // address identifies the original client and the rest identify proxies that
  11215. // the request went through.
  11216. //
  11217. // The options for this setting are the following:
  11218. //
  11219. // * FIRST - Inspect the first IP address in the list of IP addresses in
  11220. // the header. This is usually the client's original IP.
  11221. //
  11222. // * LAST - Inspect the last IP address in the list of IP addresses in the
  11223. // header.
  11224. //
  11225. // * ANY - Inspect all IP addresses in the header for a match. If the header
  11226. // contains more than 10 IP addresses, WAF inspects the last 10.
  11227. //
  11228. // Position is a required field
  11229. Position *string `type:"string" required:"true" enum:"ForwardedIPPosition"`
  11230. }
  11231. // String returns the string representation.
  11232. //
  11233. // API parameter values that are decorated as "sensitive" in the API will not
  11234. // be included in the string output. The member name will be present, but the
  11235. // value will be replaced with "sensitive".
  11236. func (s IPSetForwardedIPConfig) String() string {
  11237. return awsutil.Prettify(s)
  11238. }
  11239. // GoString returns the string representation.
  11240. //
  11241. // API parameter values that are decorated as "sensitive" in the API will not
  11242. // be included in the string output. The member name will be present, but the
  11243. // value will be replaced with "sensitive".
  11244. func (s IPSetForwardedIPConfig) GoString() string {
  11245. return s.String()
  11246. }
  11247. // Validate inspects the fields of the type to determine if they are valid.
  11248. func (s *IPSetForwardedIPConfig) Validate() error {
  11249. invalidParams := request.ErrInvalidParams{Context: "IPSetForwardedIPConfig"}
  11250. if s.FallbackBehavior == nil {
  11251. invalidParams.Add(request.NewErrParamRequired("FallbackBehavior"))
  11252. }
  11253. if s.HeaderName == nil {
  11254. invalidParams.Add(request.NewErrParamRequired("HeaderName"))
  11255. }
  11256. if s.HeaderName != nil && len(*s.HeaderName) < 1 {
  11257. invalidParams.Add(request.NewErrParamMinLen("HeaderName", 1))
  11258. }
  11259. if s.Position == nil {
  11260. invalidParams.Add(request.NewErrParamRequired("Position"))
  11261. }
  11262. if invalidParams.Len() > 0 {
  11263. return invalidParams
  11264. }
  11265. return nil
  11266. }
  11267. // SetFallbackBehavior sets the FallbackBehavior field's value.
  11268. func (s *IPSetForwardedIPConfig) SetFallbackBehavior(v string) *IPSetForwardedIPConfig {
  11269. s.FallbackBehavior = &v
  11270. return s
  11271. }
  11272. // SetHeaderName sets the HeaderName field's value.
  11273. func (s *IPSetForwardedIPConfig) SetHeaderName(v string) *IPSetForwardedIPConfig {
  11274. s.HeaderName = &v
  11275. return s
  11276. }
  11277. // SetPosition sets the Position field's value.
  11278. func (s *IPSetForwardedIPConfig) SetPosition(v string) *IPSetForwardedIPConfig {
  11279. s.Position = &v
  11280. return s
  11281. }
  11282. // A rule statement used to detect web requests coming from particular IP addresses
  11283. // or address ranges. To use this, create an IPSet that specifies the addresses
  11284. // you want to detect, then use the ARN of that set in this statement. To create
  11285. // an IP set, see CreateIPSet.
  11286. //
  11287. // Each IP set rule statement references an IP set. You create and maintain
  11288. // the set independent of your rules. This allows you to use the single set
  11289. // in multiple rules. When you update the referenced set, WAF automatically
  11290. // updates all rules that reference it.
  11291. type IPSetReferenceStatement struct {
  11292. _ struct{} `type:"structure"`
  11293. // The Amazon Resource Name (ARN) of the IPSet that this statement references.
  11294. //
  11295. // ARN is a required field
  11296. ARN *string `min:"20" type:"string" required:"true"`
  11297. // The configuration for inspecting IP addresses in an HTTP header that you
  11298. // specify, instead of using the IP address that's reported by the web request
  11299. // origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify
  11300. // any header name.
  11301. //
  11302. // If the specified header isn't present in the request, WAF doesn't apply the
  11303. // rule to the web request at all.
  11304. IPSetForwardedIPConfig *IPSetForwardedIPConfig `type:"structure"`
  11305. }
  11306. // String returns the string representation.
  11307. //
  11308. // API parameter values that are decorated as "sensitive" in the API will not
  11309. // be included in the string output. The member name will be present, but the
  11310. // value will be replaced with "sensitive".
  11311. func (s IPSetReferenceStatement) String() string {
  11312. return awsutil.Prettify(s)
  11313. }
  11314. // GoString returns the string representation.
  11315. //
  11316. // API parameter values that are decorated as "sensitive" in the API will not
  11317. // be included in the string output. The member name will be present, but the
  11318. // value will be replaced with "sensitive".
  11319. func (s IPSetReferenceStatement) GoString() string {
  11320. return s.String()
  11321. }
  11322. // Validate inspects the fields of the type to determine if they are valid.
  11323. func (s *IPSetReferenceStatement) Validate() error {
  11324. invalidParams := request.ErrInvalidParams{Context: "IPSetReferenceStatement"}
  11325. if s.ARN == nil {
  11326. invalidParams.Add(request.NewErrParamRequired("ARN"))
  11327. }
  11328. if s.ARN != nil && len(*s.ARN) < 20 {
  11329. invalidParams.Add(request.NewErrParamMinLen("ARN", 20))
  11330. }
  11331. if s.IPSetForwardedIPConfig != nil {
  11332. if err := s.IPSetForwardedIPConfig.Validate(); err != nil {
  11333. invalidParams.AddNested("IPSetForwardedIPConfig", err.(request.ErrInvalidParams))
  11334. }
  11335. }
  11336. if invalidParams.Len() > 0 {
  11337. return invalidParams
  11338. }
  11339. return nil
  11340. }
  11341. // SetARN sets the ARN field's value.
  11342. func (s *IPSetReferenceStatement) SetARN(v string) *IPSetReferenceStatement {
  11343. s.ARN = &v
  11344. return s
  11345. }
  11346. // SetIPSetForwardedIPConfig sets the IPSetForwardedIPConfig field's value.
  11347. func (s *IPSetReferenceStatement) SetIPSetForwardedIPConfig(v *IPSetForwardedIPConfig) *IPSetReferenceStatement {
  11348. s.IPSetForwardedIPConfig = v
  11349. return s
  11350. }
  11351. // High-level information about an IPSet, returned by operations like create
  11352. // and list. This provides information like the ID, that you can use to retrieve
  11353. // and manage an IPSet, and the ARN, that you provide to the IPSetReferenceStatement
  11354. // to use the address set in a Rule.
  11355. type IPSetSummary struct {
  11356. _ struct{} `type:"structure"`
  11357. // The Amazon Resource Name (ARN) of the entity.
  11358. ARN *string `min:"20" type:"string"`
  11359. // A description of the IP set that helps with identification.
  11360. Description *string `min:"1" type:"string"`
  11361. // A unique identifier for the set. This ID is returned in the responses to
  11362. // create and list commands. You provide it to operations like update and delete.
  11363. Id *string `min:"1" type:"string"`
  11364. // A token used for optimistic locking. WAF returns a token to your get and
  11365. // list requests, to mark the state of the entity at the time of the request.
  11366. // To make changes to the entity associated with the token, you provide the
  11367. // token to operations like update and delete. WAF uses the token to ensure
  11368. // that no changes have been made to the entity since you last retrieved it.
  11369. // If a change has been made, the update fails with a WAFOptimisticLockException.
  11370. // If this happens, perform another get, and use the new token returned by that
  11371. // operation.
  11372. LockToken *string `min:"1" type:"string"`
  11373. // The name of the IP set. You cannot change the name of an IPSet after you
  11374. // create it.
  11375. Name *string `min:"1" type:"string"`
  11376. }
  11377. // String returns the string representation.
  11378. //
  11379. // API parameter values that are decorated as "sensitive" in the API will not
  11380. // be included in the string output. The member name will be present, but the
  11381. // value will be replaced with "sensitive".
  11382. func (s IPSetSummary) String() string {
  11383. return awsutil.Prettify(s)
  11384. }
  11385. // GoString returns the string representation.
  11386. //
  11387. // API parameter values that are decorated as "sensitive" in the API will not
  11388. // be included in the string output. The member name will be present, but the
  11389. // value will be replaced with "sensitive".
  11390. func (s IPSetSummary) GoString() string {
  11391. return s.String()
  11392. }
  11393. // SetARN sets the ARN field's value.
  11394. func (s *IPSetSummary) SetARN(v string) *IPSetSummary {
  11395. s.ARN = &v
  11396. return s
  11397. }
  11398. // SetDescription sets the Description field's value.
  11399. func (s *IPSetSummary) SetDescription(v string) *IPSetSummary {
  11400. s.Description = &v
  11401. return s
  11402. }
  11403. // SetId sets the Id field's value.
  11404. func (s *IPSetSummary) SetId(v string) *IPSetSummary {
  11405. s.Id = &v
  11406. return s
  11407. }
  11408. // SetLockToken sets the LockToken field's value.
  11409. func (s *IPSetSummary) SetLockToken(v string) *IPSetSummary {
  11410. s.LockToken = &v
  11411. return s
  11412. }
  11413. // SetName sets the Name field's value.
  11414. func (s *IPSetSummary) SetName(v string) *IPSetSummary {
  11415. s.Name = &v
  11416. return s
  11417. }
  11418. // Used for CAPTCHA and challenge token settings. Determines how long a CAPTCHA
  11419. // or challenge timestamp remains valid after WAF updates it for a successful
  11420. // CAPTCHA or challenge response.
  11421. type ImmunityTimeProperty struct {
  11422. _ struct{} `type:"structure"`
  11423. // The amount of time, in seconds, that a CAPTCHA or challenge timestamp is
  11424. // considered valid by WAF. The default setting is 300.
  11425. //
  11426. // For the Challenge action, the minimum setting is 300.
  11427. //
  11428. // ImmunityTime is a required field
  11429. ImmunityTime *int64 `min:"60" type:"long" required:"true"`
  11430. }
  11431. // String returns the string representation.
  11432. //
  11433. // API parameter values that are decorated as "sensitive" in the API will not
  11434. // be included in the string output. The member name will be present, but the
  11435. // value will be replaced with "sensitive".
  11436. func (s ImmunityTimeProperty) String() string {
  11437. return awsutil.Prettify(s)
  11438. }
  11439. // GoString returns the string representation.
  11440. //
  11441. // API parameter values that are decorated as "sensitive" in the API will not
  11442. // be included in the string output. The member name will be present, but the
  11443. // value will be replaced with "sensitive".
  11444. func (s ImmunityTimeProperty) GoString() string {
  11445. return s.String()
  11446. }
  11447. // Validate inspects the fields of the type to determine if they are valid.
  11448. func (s *ImmunityTimeProperty) Validate() error {
  11449. invalidParams := request.ErrInvalidParams{Context: "ImmunityTimeProperty"}
  11450. if s.ImmunityTime == nil {
  11451. invalidParams.Add(request.NewErrParamRequired("ImmunityTime"))
  11452. }
  11453. if s.ImmunityTime != nil && *s.ImmunityTime < 60 {
  11454. invalidParams.Add(request.NewErrParamMinValue("ImmunityTime", 60))
  11455. }
  11456. if invalidParams.Len() > 0 {
  11457. return invalidParams
  11458. }
  11459. return nil
  11460. }
  11461. // SetImmunityTime sets the ImmunityTime field's value.
  11462. func (s *ImmunityTimeProperty) SetImmunityTime(v int64) *ImmunityTimeProperty {
  11463. s.ImmunityTime = &v
  11464. return s
  11465. }
  11466. // Inspect the body of the web request as JSON. The body immediately follows
  11467. // the request headers.
  11468. //
  11469. // This is used to indicate the web request component to inspect, in the FieldToMatch
  11470. // specification.
  11471. //
  11472. // Use the specifications in this object to indicate which parts of the JSON
  11473. // body to inspect using the rule's inspection criteria. WAF inspects only the
  11474. // parts of the JSON that result from the matches that you indicate.
  11475. //
  11476. // Example JSON: "JsonBody": { "MatchPattern": { "All": {} }, "MatchScope":
  11477. // "ALL" }
  11478. type JsonBody struct {
  11479. _ struct{} `type:"structure"`
  11480. // What WAF should do if it fails to completely parse the JSON body. The options
  11481. // are the following:
  11482. //
  11483. // * EVALUATE_AS_STRING - Inspect the body as plain text. WAF applies the
  11484. // text transformations and inspection criteria that you defined for the
  11485. // JSON inspection to the body text string.
  11486. //
  11487. // * MATCH - Treat the web request as matching the rule statement. WAF applies
  11488. // the rule action to the request.
  11489. //
  11490. // * NO_MATCH - Treat the web request as not matching the rule statement.
  11491. //
  11492. // If you don't provide this setting, WAF parses and evaluates the content only
  11493. // up to the first parsing failure that it encounters.
  11494. //
  11495. // WAF does its best to parse the entire JSON body, but might be forced to stop
  11496. // for reasons such as invalid characters, duplicate keys, truncation, and any
  11497. // content whose root node isn't an object or an array.
  11498. //
  11499. // WAF parses the JSON in the following examples as two valid key, value pairs:
  11500. //
  11501. // * Missing comma: {"key1":"value1""key2":"value2"}
  11502. //
  11503. // * Missing colon: {"key1":"value1","key2""value2"}
  11504. //
  11505. // * Extra colons: {"key1"::"value1","key2""value2"}
  11506. InvalidFallbackBehavior *string `type:"string" enum:"BodyParsingFallbackBehavior"`
  11507. // The patterns to look for in the JSON body. WAF inspects the results of these
  11508. // pattern matches against the rule inspection criteria.
  11509. //
  11510. // MatchPattern is a required field
  11511. MatchPattern *JsonMatchPattern `type:"structure" required:"true"`
  11512. // The parts of the JSON to match against using the MatchPattern. If you specify
  11513. // All, WAF matches against keys and values.
  11514. //
  11515. // MatchScope is a required field
  11516. MatchScope *string `type:"string" required:"true" enum:"JsonMatchScope"`
  11517. // What WAF should do if the body is larger than WAF can inspect. WAF does not
  11518. // support inspecting the entire contents of the body of a web request when
  11519. // the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body
  11520. // are forwarded to WAF by the underlying host service.
  11521. //
  11522. // The options for oversize handling are the following:
  11523. //
  11524. // * CONTINUE - Inspect the body normally, according to the rule inspection
  11525. // criteria.
  11526. //
  11527. // * MATCH - Treat the web request as matching the rule statement. WAF applies
  11528. // the rule action to the request.
  11529. //
  11530. // * NO_MATCH - Treat the web request as not matching the rule statement.
  11531. //
  11532. // You can combine the MATCH or NO_MATCH settings for oversize handling with
  11533. // your rule and web ACL action settings, so that you block any request whose
  11534. // body is over 8 KB.
  11535. //
  11536. // Default: CONTINUE
  11537. OversizeHandling *string `type:"string" enum:"OversizeHandling"`
  11538. }
  11539. // String returns the string representation.
  11540. //
  11541. // API parameter values that are decorated as "sensitive" in the API will not
  11542. // be included in the string output. The member name will be present, but the
  11543. // value will be replaced with "sensitive".
  11544. func (s JsonBody) String() string {
  11545. return awsutil.Prettify(s)
  11546. }
  11547. // GoString returns the string representation.
  11548. //
  11549. // API parameter values that are decorated as "sensitive" in the API will not
  11550. // be included in the string output. The member name will be present, but the
  11551. // value will be replaced with "sensitive".
  11552. func (s JsonBody) GoString() string {
  11553. return s.String()
  11554. }
  11555. // Validate inspects the fields of the type to determine if they are valid.
  11556. func (s *JsonBody) Validate() error {
  11557. invalidParams := request.ErrInvalidParams{Context: "JsonBody"}
  11558. if s.MatchPattern == nil {
  11559. invalidParams.Add(request.NewErrParamRequired("MatchPattern"))
  11560. }
  11561. if s.MatchScope == nil {
  11562. invalidParams.Add(request.NewErrParamRequired("MatchScope"))
  11563. }
  11564. if s.MatchPattern != nil {
  11565. if err := s.MatchPattern.Validate(); err != nil {
  11566. invalidParams.AddNested("MatchPattern", err.(request.ErrInvalidParams))
  11567. }
  11568. }
  11569. if invalidParams.Len() > 0 {
  11570. return invalidParams
  11571. }
  11572. return nil
  11573. }
  11574. // SetInvalidFallbackBehavior sets the InvalidFallbackBehavior field's value.
  11575. func (s *JsonBody) SetInvalidFallbackBehavior(v string) *JsonBody {
  11576. s.InvalidFallbackBehavior = &v
  11577. return s
  11578. }
  11579. // SetMatchPattern sets the MatchPattern field's value.
  11580. func (s *JsonBody) SetMatchPattern(v *JsonMatchPattern) *JsonBody {
  11581. s.MatchPattern = v
  11582. return s
  11583. }
  11584. // SetMatchScope sets the MatchScope field's value.
  11585. func (s *JsonBody) SetMatchScope(v string) *JsonBody {
  11586. s.MatchScope = &v
  11587. return s
  11588. }
  11589. // SetOversizeHandling sets the OversizeHandling field's value.
  11590. func (s *JsonBody) SetOversizeHandling(v string) *JsonBody {
  11591. s.OversizeHandling = &v
  11592. return s
  11593. }
  11594. // The patterns to look for in the JSON body. WAF inspects the results of these
  11595. // pattern matches against the rule inspection criteria. This is used with the
  11596. // FieldToMatch option JsonBody.
  11597. type JsonMatchPattern struct {
  11598. _ struct{} `type:"structure"`
  11599. // Match all of the elements. See also MatchScope in JsonBody.
  11600. //
  11601. // You must specify either this setting or the IncludedPaths setting, but not
  11602. // both.
  11603. All *All `type:"structure"`
  11604. // Match only the specified include paths. See also MatchScope in JsonBody.
  11605. //
  11606. // Provide the include paths using JSON Pointer syntax. For example, "IncludedPaths":
  11607. // ["/dogs/0/name", "/dogs/1/name"]. For information about this syntax, see
  11608. // the Internet Engineering Task Force (IETF) documentation JavaScript Object
  11609. // Notation (JSON) Pointer (https://tools.ietf.org/html/rfc6901).
  11610. //
  11611. // You must specify either this setting or the All setting, but not both.
  11612. //
  11613. // Don't use this option to include all paths. Instead, use the All setting.
  11614. IncludedPaths []*string `min:"1" type:"list"`
  11615. }
  11616. // String returns the string representation.
  11617. //
  11618. // API parameter values that are decorated as "sensitive" in the API will not
  11619. // be included in the string output. The member name will be present, but the
  11620. // value will be replaced with "sensitive".
  11621. func (s JsonMatchPattern) String() string {
  11622. return awsutil.Prettify(s)
  11623. }
  11624. // GoString returns the string representation.
  11625. //
  11626. // API parameter values that are decorated as "sensitive" in the API will not
  11627. // be included in the string output. The member name will be present, but the
  11628. // value will be replaced with "sensitive".
  11629. func (s JsonMatchPattern) GoString() string {
  11630. return s.String()
  11631. }
  11632. // Validate inspects the fields of the type to determine if they are valid.
  11633. func (s *JsonMatchPattern) Validate() error {
  11634. invalidParams := request.ErrInvalidParams{Context: "JsonMatchPattern"}
  11635. if s.IncludedPaths != nil && len(s.IncludedPaths) < 1 {
  11636. invalidParams.Add(request.NewErrParamMinLen("IncludedPaths", 1))
  11637. }
  11638. if invalidParams.Len() > 0 {
  11639. return invalidParams
  11640. }
  11641. return nil
  11642. }
  11643. // SetAll sets the All field's value.
  11644. func (s *JsonMatchPattern) SetAll(v *All) *JsonMatchPattern {
  11645. s.All = v
  11646. return s
  11647. }
  11648. // SetIncludedPaths sets the IncludedPaths field's value.
  11649. func (s *JsonMatchPattern) SetIncludedPaths(v []*string) *JsonMatchPattern {
  11650. s.IncludedPaths = v
  11651. return s
  11652. }
  11653. // A single label container. This is used as an element of a label array in
  11654. // multiple contexts, for example, in RuleLabels inside a Rule and in Labels
  11655. // inside a SampledHTTPRequest.
  11656. type Label struct {
  11657. _ struct{} `type:"structure"`
  11658. // The label string.
  11659. //
  11660. // Name is a required field
  11661. Name *string `min:"1" type:"string" required:"true"`
  11662. }
  11663. // String returns the string representation.
  11664. //
  11665. // API parameter values that are decorated as "sensitive" in the API will not
  11666. // be included in the string output. The member name will be present, but the
  11667. // value will be replaced with "sensitive".
  11668. func (s Label) String() string {
  11669. return awsutil.Prettify(s)
  11670. }
  11671. // GoString returns the string representation.
  11672. //
  11673. // API parameter values that are decorated as "sensitive" in the API will not
  11674. // be included in the string output. The member name will be present, but the
  11675. // value will be replaced with "sensitive".
  11676. func (s Label) GoString() string {
  11677. return s.String()
  11678. }
  11679. // Validate inspects the fields of the type to determine if they are valid.
  11680. func (s *Label) Validate() error {
  11681. invalidParams := request.ErrInvalidParams{Context: "Label"}
  11682. if s.Name == nil {
  11683. invalidParams.Add(request.NewErrParamRequired("Name"))
  11684. }
  11685. if s.Name != nil && len(*s.Name) < 1 {
  11686. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  11687. }
  11688. if invalidParams.Len() > 0 {
  11689. return invalidParams
  11690. }
  11691. return nil
  11692. }
  11693. // SetName sets the Name field's value.
  11694. func (s *Label) SetName(v string) *Label {
  11695. s.Name = &v
  11696. return s
  11697. }
  11698. // A rule statement to match against labels that have been added to the web
  11699. // request by rules that have already run in the web ACL.
  11700. //
  11701. // The label match statement provides the label or namespace string to search
  11702. // for. The label string can represent a part or all of the fully qualified
  11703. // label name that had been added to the web request. Fully qualified labels
  11704. // have a prefix, optional namespaces, and label name. The prefix identifies
  11705. // the rule group or web ACL context of the rule that added the label. If you
  11706. // do not provide the fully qualified name in your label match string, WAF performs
  11707. // the search for labels that were added in the same context as the label match
  11708. // statement.
  11709. type LabelMatchStatement struct {
  11710. _ struct{} `type:"structure"`
  11711. // The string to match against. The setting you provide for this depends on
  11712. // the match statement's Scope setting:
  11713. //
  11714. // * If the Scope indicates LABEL, then this specification must include the
  11715. // name and can include any number of preceding namespace specifications
  11716. // and prefix up to providing the fully qualified label name.
  11717. //
  11718. // * If the Scope indicates NAMESPACE, then this specification can include
  11719. // any number of contiguous namespace strings, and can include the entire
  11720. // label namespace prefix from the rule group or web ACL where the label
  11721. // originates.
  11722. //
  11723. // Labels are case sensitive and components of a label must be separated by
  11724. // colon, for example NS1:NS2:name.
  11725. //
  11726. // Key is a required field
  11727. Key *string `min:"1" type:"string" required:"true"`
  11728. // Specify whether you want to match using the label name or just the namespace.
  11729. //
  11730. // Scope is a required field
  11731. Scope *string `type:"string" required:"true" enum:"LabelMatchScope"`
  11732. }
  11733. // String returns the string representation.
  11734. //
  11735. // API parameter values that are decorated as "sensitive" in the API will not
  11736. // be included in the string output. The member name will be present, but the
  11737. // value will be replaced with "sensitive".
  11738. func (s LabelMatchStatement) String() string {
  11739. return awsutil.Prettify(s)
  11740. }
  11741. // GoString returns the string representation.
  11742. //
  11743. // API parameter values that are decorated as "sensitive" in the API will not
  11744. // be included in the string output. The member name will be present, but the
  11745. // value will be replaced with "sensitive".
  11746. func (s LabelMatchStatement) GoString() string {
  11747. return s.String()
  11748. }
  11749. // Validate inspects the fields of the type to determine if they are valid.
  11750. func (s *LabelMatchStatement) Validate() error {
  11751. invalidParams := request.ErrInvalidParams{Context: "LabelMatchStatement"}
  11752. if s.Key == nil {
  11753. invalidParams.Add(request.NewErrParamRequired("Key"))
  11754. }
  11755. if s.Key != nil && len(*s.Key) < 1 {
  11756. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11757. }
  11758. if s.Scope == nil {
  11759. invalidParams.Add(request.NewErrParamRequired("Scope"))
  11760. }
  11761. if invalidParams.Len() > 0 {
  11762. return invalidParams
  11763. }
  11764. return nil
  11765. }
  11766. // SetKey sets the Key field's value.
  11767. func (s *LabelMatchStatement) SetKey(v string) *LabelMatchStatement {
  11768. s.Key = &v
  11769. return s
  11770. }
  11771. // SetScope sets the Scope field's value.
  11772. func (s *LabelMatchStatement) SetScope(v string) *LabelMatchStatement {
  11773. s.Scope = &v
  11774. return s
  11775. }
  11776. // A single label name condition for a Condition in a logging filter.
  11777. type LabelNameCondition struct {
  11778. _ struct{} `type:"structure"`
  11779. // The label name that a log record must contain in order to meet the condition.
  11780. // This must be a fully qualified label name. Fully qualified labels have a
  11781. // prefix, optional namespaces, and label name. The prefix identifies the rule
  11782. // group or web ACL context of the rule that added the label.
  11783. //
  11784. // LabelName is a required field
  11785. LabelName *string `min:"1" type:"string" required:"true"`
  11786. }
  11787. // String returns the string representation.
  11788. //
  11789. // API parameter values that are decorated as "sensitive" in the API will not
  11790. // be included in the string output. The member name will be present, but the
  11791. // value will be replaced with "sensitive".
  11792. func (s LabelNameCondition) String() string {
  11793. return awsutil.Prettify(s)
  11794. }
  11795. // GoString returns the string representation.
  11796. //
  11797. // API parameter values that are decorated as "sensitive" in the API will not
  11798. // be included in the string output. The member name will be present, but the
  11799. // value will be replaced with "sensitive".
  11800. func (s LabelNameCondition) GoString() string {
  11801. return s.String()
  11802. }
  11803. // Validate inspects the fields of the type to determine if they are valid.
  11804. func (s *LabelNameCondition) Validate() error {
  11805. invalidParams := request.ErrInvalidParams{Context: "LabelNameCondition"}
  11806. if s.LabelName == nil {
  11807. invalidParams.Add(request.NewErrParamRequired("LabelName"))
  11808. }
  11809. if s.LabelName != nil && len(*s.LabelName) < 1 {
  11810. invalidParams.Add(request.NewErrParamMinLen("LabelName", 1))
  11811. }
  11812. if invalidParams.Len() > 0 {
  11813. return invalidParams
  11814. }
  11815. return nil
  11816. }
  11817. // SetLabelName sets the LabelName field's value.
  11818. func (s *LabelNameCondition) SetLabelName(v string) *LabelNameCondition {
  11819. s.LabelName = &v
  11820. return s
  11821. }
  11822. // List of labels used by one or more of the rules of a RuleGroup. This summary
  11823. // object is used for the following rule group lists:
  11824. //
  11825. // - AvailableLabels - Labels that rules add to matching requests. These
  11826. // labels are defined in the RuleLabels for a Rule.
  11827. //
  11828. // - ConsumedLabels - Labels that rules match against. These labels are defined
  11829. // in a LabelMatchStatement specification, in the Statement definition of
  11830. // a rule.
  11831. type LabelSummary struct {
  11832. _ struct{} `type:"structure"`
  11833. // An individual label specification.
  11834. Name *string `min:"1" type:"string"`
  11835. }
  11836. // String returns the string representation.
  11837. //
  11838. // API parameter values that are decorated as "sensitive" in the API will not
  11839. // be included in the string output. The member name will be present, but the
  11840. // value will be replaced with "sensitive".
  11841. func (s LabelSummary) String() string {
  11842. return awsutil.Prettify(s)
  11843. }
  11844. // GoString returns the string representation.
  11845. //
  11846. // API parameter values that are decorated as "sensitive" in the API will not
  11847. // be included in the string output. The member name will be present, but the
  11848. // value will be replaced with "sensitive".
  11849. func (s LabelSummary) GoString() string {
  11850. return s.String()
  11851. }
  11852. // SetName sets the Name field's value.
  11853. func (s *LabelSummary) SetName(v string) *LabelSummary {
  11854. s.Name = &v
  11855. return s
  11856. }
  11857. type ListAvailableManagedRuleGroupVersionsInput struct {
  11858. _ struct{} `type:"structure"`
  11859. // The maximum number of objects that you want WAF to return for this request.
  11860. // If more objects are available, in the response, WAF provides a NextMarker
  11861. // value that you can use in a subsequent call to get the next batch of objects.
  11862. Limit *int64 `min:"1" type:"integer"`
  11863. // The name of the managed rule group. You use this, along with the vendor name,
  11864. // to identify the rule group.
  11865. //
  11866. // Name is a required field
  11867. Name *string `min:"1" type:"string" required:"true"`
  11868. // When you request a list of objects with a Limit setting, if the number of
  11869. // objects that are still available for retrieval exceeds the limit, WAF returns
  11870. // a NextMarker value in the response. To retrieve the next batch of objects,
  11871. // provide the marker from the prior call in your next request.
  11872. NextMarker *string `min:"1" type:"string"`
  11873. // Specifies whether this is for an Amazon CloudFront distribution or for a
  11874. // regional application. A regional application can be an Application Load Balancer
  11875. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  11876. // Cognito user pool.
  11877. //
  11878. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  11879. // as follows:
  11880. //
  11881. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  11882. // --region=us-east-1.
  11883. //
  11884. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  11885. //
  11886. // Scope is a required field
  11887. Scope *string `type:"string" required:"true" enum:"Scope"`
  11888. // The name of the managed rule group vendor. You use this, along with the rule
  11889. // group name, to identify the rule group.
  11890. //
  11891. // VendorName is a required field
  11892. VendorName *string `min:"1" type:"string" required:"true"`
  11893. }
  11894. // String returns the string representation.
  11895. //
  11896. // API parameter values that are decorated as "sensitive" in the API will not
  11897. // be included in the string output. The member name will be present, but the
  11898. // value will be replaced with "sensitive".
  11899. func (s ListAvailableManagedRuleGroupVersionsInput) String() string {
  11900. return awsutil.Prettify(s)
  11901. }
  11902. // GoString returns the string representation.
  11903. //
  11904. // API parameter values that are decorated as "sensitive" in the API will not
  11905. // be included in the string output. The member name will be present, but the
  11906. // value will be replaced with "sensitive".
  11907. func (s ListAvailableManagedRuleGroupVersionsInput) GoString() string {
  11908. return s.String()
  11909. }
  11910. // Validate inspects the fields of the type to determine if they are valid.
  11911. func (s *ListAvailableManagedRuleGroupVersionsInput) Validate() error {
  11912. invalidParams := request.ErrInvalidParams{Context: "ListAvailableManagedRuleGroupVersionsInput"}
  11913. if s.Limit != nil && *s.Limit < 1 {
  11914. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  11915. }
  11916. if s.Name == nil {
  11917. invalidParams.Add(request.NewErrParamRequired("Name"))
  11918. }
  11919. if s.Name != nil && len(*s.Name) < 1 {
  11920. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  11921. }
  11922. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  11923. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  11924. }
  11925. if s.Scope == nil {
  11926. invalidParams.Add(request.NewErrParamRequired("Scope"))
  11927. }
  11928. if s.VendorName == nil {
  11929. invalidParams.Add(request.NewErrParamRequired("VendorName"))
  11930. }
  11931. if s.VendorName != nil && len(*s.VendorName) < 1 {
  11932. invalidParams.Add(request.NewErrParamMinLen("VendorName", 1))
  11933. }
  11934. if invalidParams.Len() > 0 {
  11935. return invalidParams
  11936. }
  11937. return nil
  11938. }
  11939. // SetLimit sets the Limit field's value.
  11940. func (s *ListAvailableManagedRuleGroupVersionsInput) SetLimit(v int64) *ListAvailableManagedRuleGroupVersionsInput {
  11941. s.Limit = &v
  11942. return s
  11943. }
  11944. // SetName sets the Name field's value.
  11945. func (s *ListAvailableManagedRuleGroupVersionsInput) SetName(v string) *ListAvailableManagedRuleGroupVersionsInput {
  11946. s.Name = &v
  11947. return s
  11948. }
  11949. // SetNextMarker sets the NextMarker field's value.
  11950. func (s *ListAvailableManagedRuleGroupVersionsInput) SetNextMarker(v string) *ListAvailableManagedRuleGroupVersionsInput {
  11951. s.NextMarker = &v
  11952. return s
  11953. }
  11954. // SetScope sets the Scope field's value.
  11955. func (s *ListAvailableManagedRuleGroupVersionsInput) SetScope(v string) *ListAvailableManagedRuleGroupVersionsInput {
  11956. s.Scope = &v
  11957. return s
  11958. }
  11959. // SetVendorName sets the VendorName field's value.
  11960. func (s *ListAvailableManagedRuleGroupVersionsInput) SetVendorName(v string) *ListAvailableManagedRuleGroupVersionsInput {
  11961. s.VendorName = &v
  11962. return s
  11963. }
  11964. type ListAvailableManagedRuleGroupVersionsOutput struct {
  11965. _ struct{} `type:"structure"`
  11966. // The name of the version that's currently set as the default.
  11967. CurrentDefaultVersion *string `min:"1" type:"string"`
  11968. // When you request a list of objects with a Limit setting, if the number of
  11969. // objects that are still available for retrieval exceeds the limit, WAF returns
  11970. // a NextMarker value in the response. To retrieve the next batch of objects,
  11971. // provide the marker from the prior call in your next request.
  11972. NextMarker *string `min:"1" type:"string"`
  11973. // The versions that are currently available for the specified managed rule
  11974. // group.
  11975. Versions []*ManagedRuleGroupVersion `type:"list"`
  11976. }
  11977. // String returns the string representation.
  11978. //
  11979. // API parameter values that are decorated as "sensitive" in the API will not
  11980. // be included in the string output. The member name will be present, but the
  11981. // value will be replaced with "sensitive".
  11982. func (s ListAvailableManagedRuleGroupVersionsOutput) String() string {
  11983. return awsutil.Prettify(s)
  11984. }
  11985. // GoString returns the string representation.
  11986. //
  11987. // API parameter values that are decorated as "sensitive" in the API will not
  11988. // be included in the string output. The member name will be present, but the
  11989. // value will be replaced with "sensitive".
  11990. func (s ListAvailableManagedRuleGroupVersionsOutput) GoString() string {
  11991. return s.String()
  11992. }
  11993. // SetCurrentDefaultVersion sets the CurrentDefaultVersion field's value.
  11994. func (s *ListAvailableManagedRuleGroupVersionsOutput) SetCurrentDefaultVersion(v string) *ListAvailableManagedRuleGroupVersionsOutput {
  11995. s.CurrentDefaultVersion = &v
  11996. return s
  11997. }
  11998. // SetNextMarker sets the NextMarker field's value.
  11999. func (s *ListAvailableManagedRuleGroupVersionsOutput) SetNextMarker(v string) *ListAvailableManagedRuleGroupVersionsOutput {
  12000. s.NextMarker = &v
  12001. return s
  12002. }
  12003. // SetVersions sets the Versions field's value.
  12004. func (s *ListAvailableManagedRuleGroupVersionsOutput) SetVersions(v []*ManagedRuleGroupVersion) *ListAvailableManagedRuleGroupVersionsOutput {
  12005. s.Versions = v
  12006. return s
  12007. }
  12008. type ListAvailableManagedRuleGroupsInput struct {
  12009. _ struct{} `type:"structure"`
  12010. // The maximum number of objects that you want WAF to return for this request.
  12011. // If more objects are available, in the response, WAF provides a NextMarker
  12012. // value that you can use in a subsequent call to get the next batch of objects.
  12013. Limit *int64 `min:"1" type:"integer"`
  12014. // When you request a list of objects with a Limit setting, if the number of
  12015. // objects that are still available for retrieval exceeds the limit, WAF returns
  12016. // a NextMarker value in the response. To retrieve the next batch of objects,
  12017. // provide the marker from the prior call in your next request.
  12018. NextMarker *string `min:"1" type:"string"`
  12019. // Specifies whether this is for an Amazon CloudFront distribution or for a
  12020. // regional application. A regional application can be an Application Load Balancer
  12021. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  12022. // Cognito user pool.
  12023. //
  12024. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  12025. // as follows:
  12026. //
  12027. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  12028. // --region=us-east-1.
  12029. //
  12030. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  12031. //
  12032. // Scope is a required field
  12033. Scope *string `type:"string" required:"true" enum:"Scope"`
  12034. }
  12035. // String returns the string representation.
  12036. //
  12037. // API parameter values that are decorated as "sensitive" in the API will not
  12038. // be included in the string output. The member name will be present, but the
  12039. // value will be replaced with "sensitive".
  12040. func (s ListAvailableManagedRuleGroupsInput) String() string {
  12041. return awsutil.Prettify(s)
  12042. }
  12043. // GoString returns the string representation.
  12044. //
  12045. // API parameter values that are decorated as "sensitive" in the API will not
  12046. // be included in the string output. The member name will be present, but the
  12047. // value will be replaced with "sensitive".
  12048. func (s ListAvailableManagedRuleGroupsInput) GoString() string {
  12049. return s.String()
  12050. }
  12051. // Validate inspects the fields of the type to determine if they are valid.
  12052. func (s *ListAvailableManagedRuleGroupsInput) Validate() error {
  12053. invalidParams := request.ErrInvalidParams{Context: "ListAvailableManagedRuleGroupsInput"}
  12054. if s.Limit != nil && *s.Limit < 1 {
  12055. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  12056. }
  12057. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  12058. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  12059. }
  12060. if s.Scope == nil {
  12061. invalidParams.Add(request.NewErrParamRequired("Scope"))
  12062. }
  12063. if invalidParams.Len() > 0 {
  12064. return invalidParams
  12065. }
  12066. return nil
  12067. }
  12068. // SetLimit sets the Limit field's value.
  12069. func (s *ListAvailableManagedRuleGroupsInput) SetLimit(v int64) *ListAvailableManagedRuleGroupsInput {
  12070. s.Limit = &v
  12071. return s
  12072. }
  12073. // SetNextMarker sets the NextMarker field's value.
  12074. func (s *ListAvailableManagedRuleGroupsInput) SetNextMarker(v string) *ListAvailableManagedRuleGroupsInput {
  12075. s.NextMarker = &v
  12076. return s
  12077. }
  12078. // SetScope sets the Scope field's value.
  12079. func (s *ListAvailableManagedRuleGroupsInput) SetScope(v string) *ListAvailableManagedRuleGroupsInput {
  12080. s.Scope = &v
  12081. return s
  12082. }
  12083. type ListAvailableManagedRuleGroupsOutput struct {
  12084. _ struct{} `type:"structure"`
  12085. ManagedRuleGroups []*ManagedRuleGroupSummary `type:"list"`
  12086. // When you request a list of objects with a Limit setting, if the number of
  12087. // objects that are still available for retrieval exceeds the limit, WAF returns
  12088. // a NextMarker value in the response. To retrieve the next batch of objects,
  12089. // provide the marker from the prior call in your next request.
  12090. NextMarker *string `min:"1" type:"string"`
  12091. }
  12092. // String returns the string representation.
  12093. //
  12094. // API parameter values that are decorated as "sensitive" in the API will not
  12095. // be included in the string output. The member name will be present, but the
  12096. // value will be replaced with "sensitive".
  12097. func (s ListAvailableManagedRuleGroupsOutput) String() string {
  12098. return awsutil.Prettify(s)
  12099. }
  12100. // GoString returns the string representation.
  12101. //
  12102. // API parameter values that are decorated as "sensitive" in the API will not
  12103. // be included in the string output. The member name will be present, but the
  12104. // value will be replaced with "sensitive".
  12105. func (s ListAvailableManagedRuleGroupsOutput) GoString() string {
  12106. return s.String()
  12107. }
  12108. // SetManagedRuleGroups sets the ManagedRuleGroups field's value.
  12109. func (s *ListAvailableManagedRuleGroupsOutput) SetManagedRuleGroups(v []*ManagedRuleGroupSummary) *ListAvailableManagedRuleGroupsOutput {
  12110. s.ManagedRuleGroups = v
  12111. return s
  12112. }
  12113. // SetNextMarker sets the NextMarker field's value.
  12114. func (s *ListAvailableManagedRuleGroupsOutput) SetNextMarker(v string) *ListAvailableManagedRuleGroupsOutput {
  12115. s.NextMarker = &v
  12116. return s
  12117. }
  12118. type ListIPSetsInput struct {
  12119. _ struct{} `type:"structure"`
  12120. // The maximum number of objects that you want WAF to return for this request.
  12121. // If more objects are available, in the response, WAF provides a NextMarker
  12122. // value that you can use in a subsequent call to get the next batch of objects.
  12123. Limit *int64 `min:"1" type:"integer"`
  12124. // When you request a list of objects with a Limit setting, if the number of
  12125. // objects that are still available for retrieval exceeds the limit, WAF returns
  12126. // a NextMarker value in the response. To retrieve the next batch of objects,
  12127. // provide the marker from the prior call in your next request.
  12128. NextMarker *string `min:"1" type:"string"`
  12129. // Specifies whether this is for an Amazon CloudFront distribution or for a
  12130. // regional application. A regional application can be an Application Load Balancer
  12131. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  12132. // Cognito user pool.
  12133. //
  12134. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  12135. // as follows:
  12136. //
  12137. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  12138. // --region=us-east-1.
  12139. //
  12140. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  12141. //
  12142. // Scope is a required field
  12143. Scope *string `type:"string" required:"true" enum:"Scope"`
  12144. }
  12145. // String returns the string representation.
  12146. //
  12147. // API parameter values that are decorated as "sensitive" in the API will not
  12148. // be included in the string output. The member name will be present, but the
  12149. // value will be replaced with "sensitive".
  12150. func (s ListIPSetsInput) String() string {
  12151. return awsutil.Prettify(s)
  12152. }
  12153. // GoString returns the string representation.
  12154. //
  12155. // API parameter values that are decorated as "sensitive" in the API will not
  12156. // be included in the string output. The member name will be present, but the
  12157. // value will be replaced with "sensitive".
  12158. func (s ListIPSetsInput) GoString() string {
  12159. return s.String()
  12160. }
  12161. // Validate inspects the fields of the type to determine if they are valid.
  12162. func (s *ListIPSetsInput) Validate() error {
  12163. invalidParams := request.ErrInvalidParams{Context: "ListIPSetsInput"}
  12164. if s.Limit != nil && *s.Limit < 1 {
  12165. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  12166. }
  12167. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  12168. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  12169. }
  12170. if s.Scope == nil {
  12171. invalidParams.Add(request.NewErrParamRequired("Scope"))
  12172. }
  12173. if invalidParams.Len() > 0 {
  12174. return invalidParams
  12175. }
  12176. return nil
  12177. }
  12178. // SetLimit sets the Limit field's value.
  12179. func (s *ListIPSetsInput) SetLimit(v int64) *ListIPSetsInput {
  12180. s.Limit = &v
  12181. return s
  12182. }
  12183. // SetNextMarker sets the NextMarker field's value.
  12184. func (s *ListIPSetsInput) SetNextMarker(v string) *ListIPSetsInput {
  12185. s.NextMarker = &v
  12186. return s
  12187. }
  12188. // SetScope sets the Scope field's value.
  12189. func (s *ListIPSetsInput) SetScope(v string) *ListIPSetsInput {
  12190. s.Scope = &v
  12191. return s
  12192. }
  12193. type ListIPSetsOutput struct {
  12194. _ struct{} `type:"structure"`
  12195. // Array of IPSets. This may not be the full list of IPSets that you have defined.
  12196. // See the Limit specification for this request.
  12197. IPSets []*IPSetSummary `type:"list"`
  12198. // When you request a list of objects with a Limit setting, if the number of
  12199. // objects that are still available for retrieval exceeds the limit, WAF returns
  12200. // a NextMarker value in the response. To retrieve the next batch of objects,
  12201. // provide the marker from the prior call in your next request.
  12202. NextMarker *string `min:"1" type:"string"`
  12203. }
  12204. // String returns the string representation.
  12205. //
  12206. // API parameter values that are decorated as "sensitive" in the API will not
  12207. // be included in the string output. The member name will be present, but the
  12208. // value will be replaced with "sensitive".
  12209. func (s ListIPSetsOutput) String() string {
  12210. return awsutil.Prettify(s)
  12211. }
  12212. // GoString returns the string representation.
  12213. //
  12214. // API parameter values that are decorated as "sensitive" in the API will not
  12215. // be included in the string output. The member name will be present, but the
  12216. // value will be replaced with "sensitive".
  12217. func (s ListIPSetsOutput) GoString() string {
  12218. return s.String()
  12219. }
  12220. // SetIPSets sets the IPSets field's value.
  12221. func (s *ListIPSetsOutput) SetIPSets(v []*IPSetSummary) *ListIPSetsOutput {
  12222. s.IPSets = v
  12223. return s
  12224. }
  12225. // SetNextMarker sets the NextMarker field's value.
  12226. func (s *ListIPSetsOutput) SetNextMarker(v string) *ListIPSetsOutput {
  12227. s.NextMarker = &v
  12228. return s
  12229. }
  12230. type ListLoggingConfigurationsInput struct {
  12231. _ struct{} `type:"structure"`
  12232. // The maximum number of objects that you want WAF to return for this request.
  12233. // If more objects are available, in the response, WAF provides a NextMarker
  12234. // value that you can use in a subsequent call to get the next batch of objects.
  12235. Limit *int64 `min:"1" type:"integer"`
  12236. // When you request a list of objects with a Limit setting, if the number of
  12237. // objects that are still available for retrieval exceeds the limit, WAF returns
  12238. // a NextMarker value in the response. To retrieve the next batch of objects,
  12239. // provide the marker from the prior call in your next request.
  12240. NextMarker *string `min:"1" type:"string"`
  12241. // Specifies whether this is for an Amazon CloudFront distribution or for a
  12242. // regional application. A regional application can be an Application Load Balancer
  12243. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  12244. // Cognito user pool.
  12245. //
  12246. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  12247. // as follows:
  12248. //
  12249. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  12250. // --region=us-east-1.
  12251. //
  12252. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  12253. //
  12254. // Scope is a required field
  12255. Scope *string `type:"string" required:"true" enum:"Scope"`
  12256. }
  12257. // String returns the string representation.
  12258. //
  12259. // API parameter values that are decorated as "sensitive" in the API will not
  12260. // be included in the string output. The member name will be present, but the
  12261. // value will be replaced with "sensitive".
  12262. func (s ListLoggingConfigurationsInput) String() string {
  12263. return awsutil.Prettify(s)
  12264. }
  12265. // GoString returns the string representation.
  12266. //
  12267. // API parameter values that are decorated as "sensitive" in the API will not
  12268. // be included in the string output. The member name will be present, but the
  12269. // value will be replaced with "sensitive".
  12270. func (s ListLoggingConfigurationsInput) GoString() string {
  12271. return s.String()
  12272. }
  12273. // Validate inspects the fields of the type to determine if they are valid.
  12274. func (s *ListLoggingConfigurationsInput) Validate() error {
  12275. invalidParams := request.ErrInvalidParams{Context: "ListLoggingConfigurationsInput"}
  12276. if s.Limit != nil && *s.Limit < 1 {
  12277. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  12278. }
  12279. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  12280. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  12281. }
  12282. if s.Scope == nil {
  12283. invalidParams.Add(request.NewErrParamRequired("Scope"))
  12284. }
  12285. if invalidParams.Len() > 0 {
  12286. return invalidParams
  12287. }
  12288. return nil
  12289. }
  12290. // SetLimit sets the Limit field's value.
  12291. func (s *ListLoggingConfigurationsInput) SetLimit(v int64) *ListLoggingConfigurationsInput {
  12292. s.Limit = &v
  12293. return s
  12294. }
  12295. // SetNextMarker sets the NextMarker field's value.
  12296. func (s *ListLoggingConfigurationsInput) SetNextMarker(v string) *ListLoggingConfigurationsInput {
  12297. s.NextMarker = &v
  12298. return s
  12299. }
  12300. // SetScope sets the Scope field's value.
  12301. func (s *ListLoggingConfigurationsInput) SetScope(v string) *ListLoggingConfigurationsInput {
  12302. s.Scope = &v
  12303. return s
  12304. }
  12305. type ListLoggingConfigurationsOutput struct {
  12306. _ struct{} `type:"structure"`
  12307. LoggingConfigurations []*LoggingConfiguration `type:"list"`
  12308. // When you request a list of objects with a Limit setting, if the number of
  12309. // objects that are still available for retrieval exceeds the limit, WAF returns
  12310. // a NextMarker value in the response. To retrieve the next batch of objects,
  12311. // provide the marker from the prior call in your next request.
  12312. NextMarker *string `min:"1" type:"string"`
  12313. }
  12314. // String returns the string representation.
  12315. //
  12316. // API parameter values that are decorated as "sensitive" in the API will not
  12317. // be included in the string output. The member name will be present, but the
  12318. // value will be replaced with "sensitive".
  12319. func (s ListLoggingConfigurationsOutput) String() string {
  12320. return awsutil.Prettify(s)
  12321. }
  12322. // GoString returns the string representation.
  12323. //
  12324. // API parameter values that are decorated as "sensitive" in the API will not
  12325. // be included in the string output. The member name will be present, but the
  12326. // value will be replaced with "sensitive".
  12327. func (s ListLoggingConfigurationsOutput) GoString() string {
  12328. return s.String()
  12329. }
  12330. // SetLoggingConfigurations sets the LoggingConfigurations field's value.
  12331. func (s *ListLoggingConfigurationsOutput) SetLoggingConfigurations(v []*LoggingConfiguration) *ListLoggingConfigurationsOutput {
  12332. s.LoggingConfigurations = v
  12333. return s
  12334. }
  12335. // SetNextMarker sets the NextMarker field's value.
  12336. func (s *ListLoggingConfigurationsOutput) SetNextMarker(v string) *ListLoggingConfigurationsOutput {
  12337. s.NextMarker = &v
  12338. return s
  12339. }
  12340. type ListManagedRuleSetsInput struct {
  12341. _ struct{} `type:"structure"`
  12342. // The maximum number of objects that you want WAF to return for this request.
  12343. // If more objects are available, in the response, WAF provides a NextMarker
  12344. // value that you can use in a subsequent call to get the next batch of objects.
  12345. Limit *int64 `min:"1" type:"integer"`
  12346. // When you request a list of objects with a Limit setting, if the number of
  12347. // objects that are still available for retrieval exceeds the limit, WAF returns
  12348. // a NextMarker value in the response. To retrieve the next batch of objects,
  12349. // provide the marker from the prior call in your next request.
  12350. NextMarker *string `min:"1" type:"string"`
  12351. // Specifies whether this is for an Amazon CloudFront distribution or for a
  12352. // regional application. A regional application can be an Application Load Balancer
  12353. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  12354. // Cognito user pool.
  12355. //
  12356. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  12357. // as follows:
  12358. //
  12359. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  12360. // --region=us-east-1.
  12361. //
  12362. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  12363. //
  12364. // Scope is a required field
  12365. Scope *string `type:"string" required:"true" enum:"Scope"`
  12366. }
  12367. // String returns the string representation.
  12368. //
  12369. // API parameter values that are decorated as "sensitive" in the API will not
  12370. // be included in the string output. The member name will be present, but the
  12371. // value will be replaced with "sensitive".
  12372. func (s ListManagedRuleSetsInput) String() string {
  12373. return awsutil.Prettify(s)
  12374. }
  12375. // GoString returns the string representation.
  12376. //
  12377. // API parameter values that are decorated as "sensitive" in the API will not
  12378. // be included in the string output. The member name will be present, but the
  12379. // value will be replaced with "sensitive".
  12380. func (s ListManagedRuleSetsInput) GoString() string {
  12381. return s.String()
  12382. }
  12383. // Validate inspects the fields of the type to determine if they are valid.
  12384. func (s *ListManagedRuleSetsInput) Validate() error {
  12385. invalidParams := request.ErrInvalidParams{Context: "ListManagedRuleSetsInput"}
  12386. if s.Limit != nil && *s.Limit < 1 {
  12387. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  12388. }
  12389. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  12390. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  12391. }
  12392. if s.Scope == nil {
  12393. invalidParams.Add(request.NewErrParamRequired("Scope"))
  12394. }
  12395. if invalidParams.Len() > 0 {
  12396. return invalidParams
  12397. }
  12398. return nil
  12399. }
  12400. // SetLimit sets the Limit field's value.
  12401. func (s *ListManagedRuleSetsInput) SetLimit(v int64) *ListManagedRuleSetsInput {
  12402. s.Limit = &v
  12403. return s
  12404. }
  12405. // SetNextMarker sets the NextMarker field's value.
  12406. func (s *ListManagedRuleSetsInput) SetNextMarker(v string) *ListManagedRuleSetsInput {
  12407. s.NextMarker = &v
  12408. return s
  12409. }
  12410. // SetScope sets the Scope field's value.
  12411. func (s *ListManagedRuleSetsInput) SetScope(v string) *ListManagedRuleSetsInput {
  12412. s.Scope = &v
  12413. return s
  12414. }
  12415. type ListManagedRuleSetsOutput struct {
  12416. _ struct{} `type:"structure"`
  12417. // Your managed rule sets.
  12418. ManagedRuleSets []*ManagedRuleSetSummary `type:"list"`
  12419. // When you request a list of objects with a Limit setting, if the number of
  12420. // objects that are still available for retrieval exceeds the limit, WAF returns
  12421. // a NextMarker value in the response. To retrieve the next batch of objects,
  12422. // provide the marker from the prior call in your next request.
  12423. NextMarker *string `min:"1" type:"string"`
  12424. }
  12425. // String returns the string representation.
  12426. //
  12427. // API parameter values that are decorated as "sensitive" in the API will not
  12428. // be included in the string output. The member name will be present, but the
  12429. // value will be replaced with "sensitive".
  12430. func (s ListManagedRuleSetsOutput) String() string {
  12431. return awsutil.Prettify(s)
  12432. }
  12433. // GoString returns the string representation.
  12434. //
  12435. // API parameter values that are decorated as "sensitive" in the API will not
  12436. // be included in the string output. The member name will be present, but the
  12437. // value will be replaced with "sensitive".
  12438. func (s ListManagedRuleSetsOutput) GoString() string {
  12439. return s.String()
  12440. }
  12441. // SetManagedRuleSets sets the ManagedRuleSets field's value.
  12442. func (s *ListManagedRuleSetsOutput) SetManagedRuleSets(v []*ManagedRuleSetSummary) *ListManagedRuleSetsOutput {
  12443. s.ManagedRuleSets = v
  12444. return s
  12445. }
  12446. // SetNextMarker sets the NextMarker field's value.
  12447. func (s *ListManagedRuleSetsOutput) SetNextMarker(v string) *ListManagedRuleSetsOutput {
  12448. s.NextMarker = &v
  12449. return s
  12450. }
  12451. type ListMobileSdkReleasesInput struct {
  12452. _ struct{} `type:"structure"`
  12453. // The maximum number of objects that you want WAF to return for this request.
  12454. // If more objects are available, in the response, WAF provides a NextMarker
  12455. // value that you can use in a subsequent call to get the next batch of objects.
  12456. Limit *int64 `min:"1" type:"integer"`
  12457. // When you request a list of objects with a Limit setting, if the number of
  12458. // objects that are still available for retrieval exceeds the limit, WAF returns
  12459. // a NextMarker value in the response. To retrieve the next batch of objects,
  12460. // provide the marker from the prior call in your next request.
  12461. NextMarker *string `min:"1" type:"string"`
  12462. // The device platform to retrieve the list for.
  12463. //
  12464. // Platform is a required field
  12465. Platform *string `type:"string" required:"true" enum:"Platform"`
  12466. }
  12467. // String returns the string representation.
  12468. //
  12469. // API parameter values that are decorated as "sensitive" in the API will not
  12470. // be included in the string output. The member name will be present, but the
  12471. // value will be replaced with "sensitive".
  12472. func (s ListMobileSdkReleasesInput) String() string {
  12473. return awsutil.Prettify(s)
  12474. }
  12475. // GoString returns the string representation.
  12476. //
  12477. // API parameter values that are decorated as "sensitive" in the API will not
  12478. // be included in the string output. The member name will be present, but the
  12479. // value will be replaced with "sensitive".
  12480. func (s ListMobileSdkReleasesInput) GoString() string {
  12481. return s.String()
  12482. }
  12483. // Validate inspects the fields of the type to determine if they are valid.
  12484. func (s *ListMobileSdkReleasesInput) Validate() error {
  12485. invalidParams := request.ErrInvalidParams{Context: "ListMobileSdkReleasesInput"}
  12486. if s.Limit != nil && *s.Limit < 1 {
  12487. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  12488. }
  12489. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  12490. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  12491. }
  12492. if s.Platform == nil {
  12493. invalidParams.Add(request.NewErrParamRequired("Platform"))
  12494. }
  12495. if invalidParams.Len() > 0 {
  12496. return invalidParams
  12497. }
  12498. return nil
  12499. }
  12500. // SetLimit sets the Limit field's value.
  12501. func (s *ListMobileSdkReleasesInput) SetLimit(v int64) *ListMobileSdkReleasesInput {
  12502. s.Limit = &v
  12503. return s
  12504. }
  12505. // SetNextMarker sets the NextMarker field's value.
  12506. func (s *ListMobileSdkReleasesInput) SetNextMarker(v string) *ListMobileSdkReleasesInput {
  12507. s.NextMarker = &v
  12508. return s
  12509. }
  12510. // SetPlatform sets the Platform field's value.
  12511. func (s *ListMobileSdkReleasesInput) SetPlatform(v string) *ListMobileSdkReleasesInput {
  12512. s.Platform = &v
  12513. return s
  12514. }
  12515. type ListMobileSdkReleasesOutput struct {
  12516. _ struct{} `type:"structure"`
  12517. // When you request a list of objects with a Limit setting, if the number of
  12518. // objects that are still available for retrieval exceeds the limit, WAF returns
  12519. // a NextMarker value in the response. To retrieve the next batch of objects,
  12520. // provide the marker from the prior call in your next request.
  12521. NextMarker *string `min:"1" type:"string"`
  12522. // High level information for the available SDK releases.
  12523. ReleaseSummaries []*ReleaseSummary `type:"list"`
  12524. }
  12525. // String returns the string representation.
  12526. //
  12527. // API parameter values that are decorated as "sensitive" in the API will not
  12528. // be included in the string output. The member name will be present, but the
  12529. // value will be replaced with "sensitive".
  12530. func (s ListMobileSdkReleasesOutput) String() string {
  12531. return awsutil.Prettify(s)
  12532. }
  12533. // GoString returns the string representation.
  12534. //
  12535. // API parameter values that are decorated as "sensitive" in the API will not
  12536. // be included in the string output. The member name will be present, but the
  12537. // value will be replaced with "sensitive".
  12538. func (s ListMobileSdkReleasesOutput) GoString() string {
  12539. return s.String()
  12540. }
  12541. // SetNextMarker sets the NextMarker field's value.
  12542. func (s *ListMobileSdkReleasesOutput) SetNextMarker(v string) *ListMobileSdkReleasesOutput {
  12543. s.NextMarker = &v
  12544. return s
  12545. }
  12546. // SetReleaseSummaries sets the ReleaseSummaries field's value.
  12547. func (s *ListMobileSdkReleasesOutput) SetReleaseSummaries(v []*ReleaseSummary) *ListMobileSdkReleasesOutput {
  12548. s.ReleaseSummaries = v
  12549. return s
  12550. }
  12551. type ListRegexPatternSetsInput struct {
  12552. _ struct{} `type:"structure"`
  12553. // The maximum number of objects that you want WAF to return for this request.
  12554. // If more objects are available, in the response, WAF provides a NextMarker
  12555. // value that you can use in a subsequent call to get the next batch of objects.
  12556. Limit *int64 `min:"1" type:"integer"`
  12557. // When you request a list of objects with a Limit setting, if the number of
  12558. // objects that are still available for retrieval exceeds the limit, WAF returns
  12559. // a NextMarker value in the response. To retrieve the next batch of objects,
  12560. // provide the marker from the prior call in your next request.
  12561. NextMarker *string `min:"1" type:"string"`
  12562. // Specifies whether this is for an Amazon CloudFront distribution or for a
  12563. // regional application. A regional application can be an Application Load Balancer
  12564. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  12565. // Cognito user pool.
  12566. //
  12567. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  12568. // as follows:
  12569. //
  12570. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  12571. // --region=us-east-1.
  12572. //
  12573. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  12574. //
  12575. // Scope is a required field
  12576. Scope *string `type:"string" required:"true" enum:"Scope"`
  12577. }
  12578. // String returns the string representation.
  12579. //
  12580. // API parameter values that are decorated as "sensitive" in the API will not
  12581. // be included in the string output. The member name will be present, but the
  12582. // value will be replaced with "sensitive".
  12583. func (s ListRegexPatternSetsInput) String() string {
  12584. return awsutil.Prettify(s)
  12585. }
  12586. // GoString returns the string representation.
  12587. //
  12588. // API parameter values that are decorated as "sensitive" in the API will not
  12589. // be included in the string output. The member name will be present, but the
  12590. // value will be replaced with "sensitive".
  12591. func (s ListRegexPatternSetsInput) GoString() string {
  12592. return s.String()
  12593. }
  12594. // Validate inspects the fields of the type to determine if they are valid.
  12595. func (s *ListRegexPatternSetsInput) Validate() error {
  12596. invalidParams := request.ErrInvalidParams{Context: "ListRegexPatternSetsInput"}
  12597. if s.Limit != nil && *s.Limit < 1 {
  12598. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  12599. }
  12600. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  12601. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  12602. }
  12603. if s.Scope == nil {
  12604. invalidParams.Add(request.NewErrParamRequired("Scope"))
  12605. }
  12606. if invalidParams.Len() > 0 {
  12607. return invalidParams
  12608. }
  12609. return nil
  12610. }
  12611. // SetLimit sets the Limit field's value.
  12612. func (s *ListRegexPatternSetsInput) SetLimit(v int64) *ListRegexPatternSetsInput {
  12613. s.Limit = &v
  12614. return s
  12615. }
  12616. // SetNextMarker sets the NextMarker field's value.
  12617. func (s *ListRegexPatternSetsInput) SetNextMarker(v string) *ListRegexPatternSetsInput {
  12618. s.NextMarker = &v
  12619. return s
  12620. }
  12621. // SetScope sets the Scope field's value.
  12622. func (s *ListRegexPatternSetsInput) SetScope(v string) *ListRegexPatternSetsInput {
  12623. s.Scope = &v
  12624. return s
  12625. }
  12626. type ListRegexPatternSetsOutput struct {
  12627. _ struct{} `type:"structure"`
  12628. // When you request a list of objects with a Limit setting, if the number of
  12629. // objects that are still available for retrieval exceeds the limit, WAF returns
  12630. // a NextMarker value in the response. To retrieve the next batch of objects,
  12631. // provide the marker from the prior call in your next request.
  12632. NextMarker *string `min:"1" type:"string"`
  12633. RegexPatternSets []*RegexPatternSetSummary `type:"list"`
  12634. }
  12635. // String returns the string representation.
  12636. //
  12637. // API parameter values that are decorated as "sensitive" in the API will not
  12638. // be included in the string output. The member name will be present, but the
  12639. // value will be replaced with "sensitive".
  12640. func (s ListRegexPatternSetsOutput) String() string {
  12641. return awsutil.Prettify(s)
  12642. }
  12643. // GoString returns the string representation.
  12644. //
  12645. // API parameter values that are decorated as "sensitive" in the API will not
  12646. // be included in the string output. The member name will be present, but the
  12647. // value will be replaced with "sensitive".
  12648. func (s ListRegexPatternSetsOutput) GoString() string {
  12649. return s.String()
  12650. }
  12651. // SetNextMarker sets the NextMarker field's value.
  12652. func (s *ListRegexPatternSetsOutput) SetNextMarker(v string) *ListRegexPatternSetsOutput {
  12653. s.NextMarker = &v
  12654. return s
  12655. }
  12656. // SetRegexPatternSets sets the RegexPatternSets field's value.
  12657. func (s *ListRegexPatternSetsOutput) SetRegexPatternSets(v []*RegexPatternSetSummary) *ListRegexPatternSetsOutput {
  12658. s.RegexPatternSets = v
  12659. return s
  12660. }
  12661. type ListResourcesForWebACLInput struct {
  12662. _ struct{} `type:"structure"`
  12663. // Used for web ACLs that are scoped for regional applications. A regional application
  12664. // can be an Application Load Balancer (ALB), an Amazon API Gateway REST API,
  12665. // an AppSync GraphQL API, or an Amazon Cognito user pool.
  12666. //
  12667. // If you don't provide a resource type, the call uses the resource type APPLICATION_LOAD_BALANCER.
  12668. //
  12669. // Default: APPLICATION_LOAD_BALANCER
  12670. ResourceType *string `type:"string" enum:"ResourceType"`
  12671. // The Amazon Resource Name (ARN) of the web ACL.
  12672. //
  12673. // WebACLArn is a required field
  12674. WebACLArn *string `min:"20" type:"string" required:"true"`
  12675. }
  12676. // String returns the string representation.
  12677. //
  12678. // API parameter values that are decorated as "sensitive" in the API will not
  12679. // be included in the string output. The member name will be present, but the
  12680. // value will be replaced with "sensitive".
  12681. func (s ListResourcesForWebACLInput) String() string {
  12682. return awsutil.Prettify(s)
  12683. }
  12684. // GoString returns the string representation.
  12685. //
  12686. // API parameter values that are decorated as "sensitive" in the API will not
  12687. // be included in the string output. The member name will be present, but the
  12688. // value will be replaced with "sensitive".
  12689. func (s ListResourcesForWebACLInput) GoString() string {
  12690. return s.String()
  12691. }
  12692. // Validate inspects the fields of the type to determine if they are valid.
  12693. func (s *ListResourcesForWebACLInput) Validate() error {
  12694. invalidParams := request.ErrInvalidParams{Context: "ListResourcesForWebACLInput"}
  12695. if s.WebACLArn == nil {
  12696. invalidParams.Add(request.NewErrParamRequired("WebACLArn"))
  12697. }
  12698. if s.WebACLArn != nil && len(*s.WebACLArn) < 20 {
  12699. invalidParams.Add(request.NewErrParamMinLen("WebACLArn", 20))
  12700. }
  12701. if invalidParams.Len() > 0 {
  12702. return invalidParams
  12703. }
  12704. return nil
  12705. }
  12706. // SetResourceType sets the ResourceType field's value.
  12707. func (s *ListResourcesForWebACLInput) SetResourceType(v string) *ListResourcesForWebACLInput {
  12708. s.ResourceType = &v
  12709. return s
  12710. }
  12711. // SetWebACLArn sets the WebACLArn field's value.
  12712. func (s *ListResourcesForWebACLInput) SetWebACLArn(v string) *ListResourcesForWebACLInput {
  12713. s.WebACLArn = &v
  12714. return s
  12715. }
  12716. type ListResourcesForWebACLOutput struct {
  12717. _ struct{} `type:"structure"`
  12718. // The array of Amazon Resource Names (ARNs) of the associated resources.
  12719. ResourceArns []*string `type:"list"`
  12720. }
  12721. // String returns the string representation.
  12722. //
  12723. // API parameter values that are decorated as "sensitive" in the API will not
  12724. // be included in the string output. The member name will be present, but the
  12725. // value will be replaced with "sensitive".
  12726. func (s ListResourcesForWebACLOutput) String() string {
  12727. return awsutil.Prettify(s)
  12728. }
  12729. // GoString returns the string representation.
  12730. //
  12731. // API parameter values that are decorated as "sensitive" in the API will not
  12732. // be included in the string output. The member name will be present, but the
  12733. // value will be replaced with "sensitive".
  12734. func (s ListResourcesForWebACLOutput) GoString() string {
  12735. return s.String()
  12736. }
  12737. // SetResourceArns sets the ResourceArns field's value.
  12738. func (s *ListResourcesForWebACLOutput) SetResourceArns(v []*string) *ListResourcesForWebACLOutput {
  12739. s.ResourceArns = v
  12740. return s
  12741. }
  12742. type ListRuleGroupsInput struct {
  12743. _ struct{} `type:"structure"`
  12744. // The maximum number of objects that you want WAF to return for this request.
  12745. // If more objects are available, in the response, WAF provides a NextMarker
  12746. // value that you can use in a subsequent call to get the next batch of objects.
  12747. Limit *int64 `min:"1" type:"integer"`
  12748. // When you request a list of objects with a Limit setting, if the number of
  12749. // objects that are still available for retrieval exceeds the limit, WAF returns
  12750. // a NextMarker value in the response. To retrieve the next batch of objects,
  12751. // provide the marker from the prior call in your next request.
  12752. NextMarker *string `min:"1" type:"string"`
  12753. // Specifies whether this is for an Amazon CloudFront distribution or for a
  12754. // regional application. A regional application can be an Application Load Balancer
  12755. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  12756. // Cognito user pool.
  12757. //
  12758. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  12759. // as follows:
  12760. //
  12761. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  12762. // --region=us-east-1.
  12763. //
  12764. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  12765. //
  12766. // Scope is a required field
  12767. Scope *string `type:"string" required:"true" enum:"Scope"`
  12768. }
  12769. // String returns the string representation.
  12770. //
  12771. // API parameter values that are decorated as "sensitive" in the API will not
  12772. // be included in the string output. The member name will be present, but the
  12773. // value will be replaced with "sensitive".
  12774. func (s ListRuleGroupsInput) String() string {
  12775. return awsutil.Prettify(s)
  12776. }
  12777. // GoString returns the string representation.
  12778. //
  12779. // API parameter values that are decorated as "sensitive" in the API will not
  12780. // be included in the string output. The member name will be present, but the
  12781. // value will be replaced with "sensitive".
  12782. func (s ListRuleGroupsInput) GoString() string {
  12783. return s.String()
  12784. }
  12785. // Validate inspects the fields of the type to determine if they are valid.
  12786. func (s *ListRuleGroupsInput) Validate() error {
  12787. invalidParams := request.ErrInvalidParams{Context: "ListRuleGroupsInput"}
  12788. if s.Limit != nil && *s.Limit < 1 {
  12789. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  12790. }
  12791. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  12792. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  12793. }
  12794. if s.Scope == nil {
  12795. invalidParams.Add(request.NewErrParamRequired("Scope"))
  12796. }
  12797. if invalidParams.Len() > 0 {
  12798. return invalidParams
  12799. }
  12800. return nil
  12801. }
  12802. // SetLimit sets the Limit field's value.
  12803. func (s *ListRuleGroupsInput) SetLimit(v int64) *ListRuleGroupsInput {
  12804. s.Limit = &v
  12805. return s
  12806. }
  12807. // SetNextMarker sets the NextMarker field's value.
  12808. func (s *ListRuleGroupsInput) SetNextMarker(v string) *ListRuleGroupsInput {
  12809. s.NextMarker = &v
  12810. return s
  12811. }
  12812. // SetScope sets the Scope field's value.
  12813. func (s *ListRuleGroupsInput) SetScope(v string) *ListRuleGroupsInput {
  12814. s.Scope = &v
  12815. return s
  12816. }
  12817. type ListRuleGroupsOutput struct {
  12818. _ struct{} `type:"structure"`
  12819. // When you request a list of objects with a Limit setting, if the number of
  12820. // objects that are still available for retrieval exceeds the limit, WAF returns
  12821. // a NextMarker value in the response. To retrieve the next batch of objects,
  12822. // provide the marker from the prior call in your next request.
  12823. NextMarker *string `min:"1" type:"string"`
  12824. RuleGroups []*RuleGroupSummary `type:"list"`
  12825. }
  12826. // String returns the string representation.
  12827. //
  12828. // API parameter values that are decorated as "sensitive" in the API will not
  12829. // be included in the string output. The member name will be present, but the
  12830. // value will be replaced with "sensitive".
  12831. func (s ListRuleGroupsOutput) String() string {
  12832. return awsutil.Prettify(s)
  12833. }
  12834. // GoString returns the string representation.
  12835. //
  12836. // API parameter values that are decorated as "sensitive" in the API will not
  12837. // be included in the string output. The member name will be present, but the
  12838. // value will be replaced with "sensitive".
  12839. func (s ListRuleGroupsOutput) GoString() string {
  12840. return s.String()
  12841. }
  12842. // SetNextMarker sets the NextMarker field's value.
  12843. func (s *ListRuleGroupsOutput) SetNextMarker(v string) *ListRuleGroupsOutput {
  12844. s.NextMarker = &v
  12845. return s
  12846. }
  12847. // SetRuleGroups sets the RuleGroups field's value.
  12848. func (s *ListRuleGroupsOutput) SetRuleGroups(v []*RuleGroupSummary) *ListRuleGroupsOutput {
  12849. s.RuleGroups = v
  12850. return s
  12851. }
  12852. type ListTagsForResourceInput struct {
  12853. _ struct{} `type:"structure"`
  12854. // The maximum number of objects that you want WAF to return for this request.
  12855. // If more objects are available, in the response, WAF provides a NextMarker
  12856. // value that you can use in a subsequent call to get the next batch of objects.
  12857. Limit *int64 `min:"1" type:"integer"`
  12858. // When you request a list of objects with a Limit setting, if the number of
  12859. // objects that are still available for retrieval exceeds the limit, WAF returns
  12860. // a NextMarker value in the response. To retrieve the next batch of objects,
  12861. // provide the marker from the prior call in your next request.
  12862. NextMarker *string `min:"1" type:"string"`
  12863. // The Amazon Resource Name (ARN) of the resource.
  12864. //
  12865. // ResourceARN is a required field
  12866. ResourceARN *string `min:"20" type:"string" required:"true"`
  12867. }
  12868. // String returns the string representation.
  12869. //
  12870. // API parameter values that are decorated as "sensitive" in the API will not
  12871. // be included in the string output. The member name will be present, but the
  12872. // value will be replaced with "sensitive".
  12873. func (s ListTagsForResourceInput) String() string {
  12874. return awsutil.Prettify(s)
  12875. }
  12876. // GoString returns the string representation.
  12877. //
  12878. // API parameter values that are decorated as "sensitive" in the API will not
  12879. // be included in the string output. The member name will be present, but the
  12880. // value will be replaced with "sensitive".
  12881. func (s ListTagsForResourceInput) GoString() string {
  12882. return s.String()
  12883. }
  12884. // Validate inspects the fields of the type to determine if they are valid.
  12885. func (s *ListTagsForResourceInput) Validate() error {
  12886. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  12887. if s.Limit != nil && *s.Limit < 1 {
  12888. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  12889. }
  12890. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  12891. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  12892. }
  12893. if s.ResourceARN == nil {
  12894. invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
  12895. }
  12896. if s.ResourceARN != nil && len(*s.ResourceARN) < 20 {
  12897. invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 20))
  12898. }
  12899. if invalidParams.Len() > 0 {
  12900. return invalidParams
  12901. }
  12902. return nil
  12903. }
  12904. // SetLimit sets the Limit field's value.
  12905. func (s *ListTagsForResourceInput) SetLimit(v int64) *ListTagsForResourceInput {
  12906. s.Limit = &v
  12907. return s
  12908. }
  12909. // SetNextMarker sets the NextMarker field's value.
  12910. func (s *ListTagsForResourceInput) SetNextMarker(v string) *ListTagsForResourceInput {
  12911. s.NextMarker = &v
  12912. return s
  12913. }
  12914. // SetResourceARN sets the ResourceARN field's value.
  12915. func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput {
  12916. s.ResourceARN = &v
  12917. return s
  12918. }
  12919. type ListTagsForResourceOutput struct {
  12920. _ struct{} `type:"structure"`
  12921. // When you request a list of objects with a Limit setting, if the number of
  12922. // objects that are still available for retrieval exceeds the limit, WAF returns
  12923. // a NextMarker value in the response. To retrieve the next batch of objects,
  12924. // provide the marker from the prior call in your next request.
  12925. NextMarker *string `min:"1" type:"string"`
  12926. // The collection of tagging definitions for the resource.
  12927. TagInfoForResource *TagInfoForResource `type:"structure"`
  12928. }
  12929. // String returns the string representation.
  12930. //
  12931. // API parameter values that are decorated as "sensitive" in the API will not
  12932. // be included in the string output. The member name will be present, but the
  12933. // value will be replaced with "sensitive".
  12934. func (s ListTagsForResourceOutput) String() string {
  12935. return awsutil.Prettify(s)
  12936. }
  12937. // GoString returns the string representation.
  12938. //
  12939. // API parameter values that are decorated as "sensitive" in the API will not
  12940. // be included in the string output. The member name will be present, but the
  12941. // value will be replaced with "sensitive".
  12942. func (s ListTagsForResourceOutput) GoString() string {
  12943. return s.String()
  12944. }
  12945. // SetNextMarker sets the NextMarker field's value.
  12946. func (s *ListTagsForResourceOutput) SetNextMarker(v string) *ListTagsForResourceOutput {
  12947. s.NextMarker = &v
  12948. return s
  12949. }
  12950. // SetTagInfoForResource sets the TagInfoForResource field's value.
  12951. func (s *ListTagsForResourceOutput) SetTagInfoForResource(v *TagInfoForResource) *ListTagsForResourceOutput {
  12952. s.TagInfoForResource = v
  12953. return s
  12954. }
  12955. type ListWebACLsInput struct {
  12956. _ struct{} `type:"structure"`
  12957. // The maximum number of objects that you want WAF to return for this request.
  12958. // If more objects are available, in the response, WAF provides a NextMarker
  12959. // value that you can use in a subsequent call to get the next batch of objects.
  12960. Limit *int64 `min:"1" type:"integer"`
  12961. // When you request a list of objects with a Limit setting, if the number of
  12962. // objects that are still available for retrieval exceeds the limit, WAF returns
  12963. // a NextMarker value in the response. To retrieve the next batch of objects,
  12964. // provide the marker from the prior call in your next request.
  12965. NextMarker *string `min:"1" type:"string"`
  12966. // Specifies whether this is for an Amazon CloudFront distribution or for a
  12967. // regional application. A regional application can be an Application Load Balancer
  12968. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  12969. // Cognito user pool.
  12970. //
  12971. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  12972. // as follows:
  12973. //
  12974. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  12975. // --region=us-east-1.
  12976. //
  12977. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  12978. //
  12979. // Scope is a required field
  12980. Scope *string `type:"string" required:"true" enum:"Scope"`
  12981. }
  12982. // String returns the string representation.
  12983. //
  12984. // API parameter values that are decorated as "sensitive" in the API will not
  12985. // be included in the string output. The member name will be present, but the
  12986. // value will be replaced with "sensitive".
  12987. func (s ListWebACLsInput) String() string {
  12988. return awsutil.Prettify(s)
  12989. }
  12990. // GoString returns the string representation.
  12991. //
  12992. // API parameter values that are decorated as "sensitive" in the API will not
  12993. // be included in the string output. The member name will be present, but the
  12994. // value will be replaced with "sensitive".
  12995. func (s ListWebACLsInput) GoString() string {
  12996. return s.String()
  12997. }
  12998. // Validate inspects the fields of the type to determine if they are valid.
  12999. func (s *ListWebACLsInput) Validate() error {
  13000. invalidParams := request.ErrInvalidParams{Context: "ListWebACLsInput"}
  13001. if s.Limit != nil && *s.Limit < 1 {
  13002. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  13003. }
  13004. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  13005. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  13006. }
  13007. if s.Scope == nil {
  13008. invalidParams.Add(request.NewErrParamRequired("Scope"))
  13009. }
  13010. if invalidParams.Len() > 0 {
  13011. return invalidParams
  13012. }
  13013. return nil
  13014. }
  13015. // SetLimit sets the Limit field's value.
  13016. func (s *ListWebACLsInput) SetLimit(v int64) *ListWebACLsInput {
  13017. s.Limit = &v
  13018. return s
  13019. }
  13020. // SetNextMarker sets the NextMarker field's value.
  13021. func (s *ListWebACLsInput) SetNextMarker(v string) *ListWebACLsInput {
  13022. s.NextMarker = &v
  13023. return s
  13024. }
  13025. // SetScope sets the Scope field's value.
  13026. func (s *ListWebACLsInput) SetScope(v string) *ListWebACLsInput {
  13027. s.Scope = &v
  13028. return s
  13029. }
  13030. type ListWebACLsOutput struct {
  13031. _ struct{} `type:"structure"`
  13032. // When you request a list of objects with a Limit setting, if the number of
  13033. // objects that are still available for retrieval exceeds the limit, WAF returns
  13034. // a NextMarker value in the response. To retrieve the next batch of objects,
  13035. // provide the marker from the prior call in your next request.
  13036. NextMarker *string `min:"1" type:"string"`
  13037. WebACLs []*WebACLSummary `type:"list"`
  13038. }
  13039. // String returns the string representation.
  13040. //
  13041. // API parameter values that are decorated as "sensitive" in the API will not
  13042. // be included in the string output. The member name will be present, but the
  13043. // value will be replaced with "sensitive".
  13044. func (s ListWebACLsOutput) String() string {
  13045. return awsutil.Prettify(s)
  13046. }
  13047. // GoString returns the string representation.
  13048. //
  13049. // API parameter values that are decorated as "sensitive" in the API will not
  13050. // be included in the string output. The member name will be present, but the
  13051. // value will be replaced with "sensitive".
  13052. func (s ListWebACLsOutput) GoString() string {
  13053. return s.String()
  13054. }
  13055. // SetNextMarker sets the NextMarker field's value.
  13056. func (s *ListWebACLsOutput) SetNextMarker(v string) *ListWebACLsOutput {
  13057. s.NextMarker = &v
  13058. return s
  13059. }
  13060. // SetWebACLs sets the WebACLs field's value.
  13061. func (s *ListWebACLsOutput) SetWebACLs(v []*WebACLSummary) *ListWebACLsOutput {
  13062. s.WebACLs = v
  13063. return s
  13064. }
  13065. // Defines an association between logging destinations and a web ACL resource,
  13066. // for logging from WAF. As part of the association, you can specify parts of
  13067. // the standard logging fields to keep out of the logs and you can specify filters
  13068. // so that you log only a subset of the logging records.
  13069. //
  13070. // You can define one logging destination per web ACL.
  13071. //
  13072. // You can access information about the traffic that WAF inspects using the
  13073. // following steps:
  13074. //
  13075. // Create your logging destination. You can use an Amazon CloudWatch Logs log
  13076. // group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon
  13077. // Kinesis Data Firehose.
  13078. //
  13079. // The name that you give the destination must start with aws-waf-logs-. Depending
  13080. // on the type of destination, you might need to configure additional settings
  13081. // or permissions.
  13082. //
  13083. // For configuration requirements and pricing information for each destination
  13084. // type, see Logging web ACL traffic (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
  13085. // in the WAF Developer Guide.
  13086. //
  13087. // Associate your logging destination to your web ACL using a PutLoggingConfiguration
  13088. // request.
  13089. //
  13090. // When you successfully enable logging using a PutLoggingConfiguration request,
  13091. // WAF creates an additional role or policy that is required to write logs to
  13092. // the logging destination. For an Amazon CloudWatch Logs log group, WAF creates
  13093. // a resource policy on the log group. For an Amazon S3 bucket, WAF creates
  13094. // a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked
  13095. // role.
  13096. //
  13097. // For additional information about web ACL logging, see Logging web ACL traffic
  13098. // information (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
  13099. // in the WAF Developer Guide.
  13100. type LoggingConfiguration struct {
  13101. _ struct{} `type:"structure"`
  13102. // The logging destination configuration that you want to associate with the
  13103. // web ACL.
  13104. //
  13105. // You can associate one logging destination to a web ACL.
  13106. //
  13107. // LogDestinationConfigs is a required field
  13108. LogDestinationConfigs []*string `min:"1" type:"list" required:"true"`
  13109. // Filtering that specifies which web requests are kept in the logs and which
  13110. // are dropped. You can filter on the rule action and on the web request labels
  13111. // that were applied by matching rules during web ACL evaluation.
  13112. LoggingFilter *LoggingFilter `type:"structure"`
  13113. // Indicates whether the logging configuration was created by Firewall Manager,
  13114. // as part of an WAF policy configuration. If true, only Firewall Manager can
  13115. // modify or delete the configuration.
  13116. ManagedByFirewallManager *bool `type:"boolean"`
  13117. // The parts of the request that you want to keep out of the logs. For example,
  13118. // if you redact the SingleHeader field, the HEADER field in the logs will be
  13119. // xxx.
  13120. //
  13121. // You can specify only the following fields for redaction: UriPath, QueryString,
  13122. // SingleHeader, Method, and JsonBody.
  13123. RedactedFields []*FieldToMatch `type:"list"`
  13124. // The Amazon Resource Name (ARN) of the web ACL that you want to associate
  13125. // with LogDestinationConfigs.
  13126. //
  13127. // ResourceArn is a required field
  13128. ResourceArn *string `min:"20" type:"string" required:"true"`
  13129. }
  13130. // String returns the string representation.
  13131. //
  13132. // API parameter values that are decorated as "sensitive" in the API will not
  13133. // be included in the string output. The member name will be present, but the
  13134. // value will be replaced with "sensitive".
  13135. func (s LoggingConfiguration) String() string {
  13136. return awsutil.Prettify(s)
  13137. }
  13138. // GoString returns the string representation.
  13139. //
  13140. // API parameter values that are decorated as "sensitive" in the API will not
  13141. // be included in the string output. The member name will be present, but the
  13142. // value will be replaced with "sensitive".
  13143. func (s LoggingConfiguration) GoString() string {
  13144. return s.String()
  13145. }
  13146. // Validate inspects the fields of the type to determine if they are valid.
  13147. func (s *LoggingConfiguration) Validate() error {
  13148. invalidParams := request.ErrInvalidParams{Context: "LoggingConfiguration"}
  13149. if s.LogDestinationConfigs == nil {
  13150. invalidParams.Add(request.NewErrParamRequired("LogDestinationConfigs"))
  13151. }
  13152. if s.LogDestinationConfigs != nil && len(s.LogDestinationConfigs) < 1 {
  13153. invalidParams.Add(request.NewErrParamMinLen("LogDestinationConfigs", 1))
  13154. }
  13155. if s.ResourceArn == nil {
  13156. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  13157. }
  13158. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  13159. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  13160. }
  13161. if s.LoggingFilter != nil {
  13162. if err := s.LoggingFilter.Validate(); err != nil {
  13163. invalidParams.AddNested("LoggingFilter", err.(request.ErrInvalidParams))
  13164. }
  13165. }
  13166. if s.RedactedFields != nil {
  13167. for i, v := range s.RedactedFields {
  13168. if v == nil {
  13169. continue
  13170. }
  13171. if err := v.Validate(); err != nil {
  13172. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RedactedFields", i), err.(request.ErrInvalidParams))
  13173. }
  13174. }
  13175. }
  13176. if invalidParams.Len() > 0 {
  13177. return invalidParams
  13178. }
  13179. return nil
  13180. }
  13181. // SetLogDestinationConfigs sets the LogDestinationConfigs field's value.
  13182. func (s *LoggingConfiguration) SetLogDestinationConfigs(v []*string) *LoggingConfiguration {
  13183. s.LogDestinationConfigs = v
  13184. return s
  13185. }
  13186. // SetLoggingFilter sets the LoggingFilter field's value.
  13187. func (s *LoggingConfiguration) SetLoggingFilter(v *LoggingFilter) *LoggingConfiguration {
  13188. s.LoggingFilter = v
  13189. return s
  13190. }
  13191. // SetManagedByFirewallManager sets the ManagedByFirewallManager field's value.
  13192. func (s *LoggingConfiguration) SetManagedByFirewallManager(v bool) *LoggingConfiguration {
  13193. s.ManagedByFirewallManager = &v
  13194. return s
  13195. }
  13196. // SetRedactedFields sets the RedactedFields field's value.
  13197. func (s *LoggingConfiguration) SetRedactedFields(v []*FieldToMatch) *LoggingConfiguration {
  13198. s.RedactedFields = v
  13199. return s
  13200. }
  13201. // SetResourceArn sets the ResourceArn field's value.
  13202. func (s *LoggingConfiguration) SetResourceArn(v string) *LoggingConfiguration {
  13203. s.ResourceArn = &v
  13204. return s
  13205. }
  13206. // Filtering that specifies which web requests are kept in the logs and which
  13207. // are dropped, defined for a web ACL's LoggingConfiguration.
  13208. //
  13209. // You can filter on the rule action and on the web request labels that were
  13210. // applied by matching rules during web ACL evaluation.
  13211. type LoggingFilter struct {
  13212. _ struct{} `type:"structure"`
  13213. // Default handling for logs that don't match any of the specified filtering
  13214. // conditions.
  13215. //
  13216. // DefaultBehavior is a required field
  13217. DefaultBehavior *string `type:"string" required:"true" enum:"FilterBehavior"`
  13218. // The filters that you want to apply to the logs.
  13219. //
  13220. // Filters is a required field
  13221. Filters []*Filter `min:"1" type:"list" required:"true"`
  13222. }
  13223. // String returns the string representation.
  13224. //
  13225. // API parameter values that are decorated as "sensitive" in the API will not
  13226. // be included in the string output. The member name will be present, but the
  13227. // value will be replaced with "sensitive".
  13228. func (s LoggingFilter) String() string {
  13229. return awsutil.Prettify(s)
  13230. }
  13231. // GoString returns the string representation.
  13232. //
  13233. // API parameter values that are decorated as "sensitive" in the API will not
  13234. // be included in the string output. The member name will be present, but the
  13235. // value will be replaced with "sensitive".
  13236. func (s LoggingFilter) GoString() string {
  13237. return s.String()
  13238. }
  13239. // Validate inspects the fields of the type to determine if they are valid.
  13240. func (s *LoggingFilter) Validate() error {
  13241. invalidParams := request.ErrInvalidParams{Context: "LoggingFilter"}
  13242. if s.DefaultBehavior == nil {
  13243. invalidParams.Add(request.NewErrParamRequired("DefaultBehavior"))
  13244. }
  13245. if s.Filters == nil {
  13246. invalidParams.Add(request.NewErrParamRequired("Filters"))
  13247. }
  13248. if s.Filters != nil && len(s.Filters) < 1 {
  13249. invalidParams.Add(request.NewErrParamMinLen("Filters", 1))
  13250. }
  13251. if s.Filters != nil {
  13252. for i, v := range s.Filters {
  13253. if v == nil {
  13254. continue
  13255. }
  13256. if err := v.Validate(); err != nil {
  13257. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams))
  13258. }
  13259. }
  13260. }
  13261. if invalidParams.Len() > 0 {
  13262. return invalidParams
  13263. }
  13264. return nil
  13265. }
  13266. // SetDefaultBehavior sets the DefaultBehavior field's value.
  13267. func (s *LoggingFilter) SetDefaultBehavior(v string) *LoggingFilter {
  13268. s.DefaultBehavior = &v
  13269. return s
  13270. }
  13271. // SetFilters sets the Filters field's value.
  13272. func (s *LoggingFilter) SetFilters(v []*Filter) *LoggingFilter {
  13273. s.Filters = v
  13274. return s
  13275. }
  13276. // Additional information that's used by a managed rule group. Many managed
  13277. // rule groups don't require this.
  13278. //
  13279. // Use the AWSManagedRulesBotControlRuleSet configuration object to configure
  13280. // the protection level that you want the Bot Control rule group to use.
  13281. //
  13282. // For example specifications, see the examples section of CreateWebACL.
  13283. type ManagedRuleGroupConfig struct {
  13284. _ struct{} `type:"structure"`
  13285. // Additional configuration for using the Bot Control managed rule group. Use
  13286. // this to specify the inspection level that you want to use. For information
  13287. // about using the Bot Control managed rule group, see WAF Bot Control rule
  13288. // group (https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)
  13289. // and WAF Bot Control (https://docs.aws.amazon.com/waf/latest/developerguide/waf-bot-control.html)
  13290. // in the WAF Developer Guide.
  13291. AWSManagedRulesBotControlRuleSet *AWSManagedRulesBotControlRuleSet `type:"structure"`
  13292. // The path of the login endpoint for your application. For example, for the
  13293. // URL https://example.com/web/login, you would provide the path /web/login.
  13294. LoginPath *string `min:"1" type:"string"`
  13295. // Details about your login page password field.
  13296. PasswordField *PasswordField `type:"structure"`
  13297. // The payload type for your login endpoint, either JSON or form encoded.
  13298. PayloadType *string `type:"string" enum:"PayloadType"`
  13299. // Details about your login page username field.
  13300. UsernameField *UsernameField `type:"structure"`
  13301. }
  13302. // String returns the string representation.
  13303. //
  13304. // API parameter values that are decorated as "sensitive" in the API will not
  13305. // be included in the string output. The member name will be present, but the
  13306. // value will be replaced with "sensitive".
  13307. func (s ManagedRuleGroupConfig) String() string {
  13308. return awsutil.Prettify(s)
  13309. }
  13310. // GoString returns the string representation.
  13311. //
  13312. // API parameter values that are decorated as "sensitive" in the API will not
  13313. // be included in the string output. The member name will be present, but the
  13314. // value will be replaced with "sensitive".
  13315. func (s ManagedRuleGroupConfig) GoString() string {
  13316. return s.String()
  13317. }
  13318. // Validate inspects the fields of the type to determine if they are valid.
  13319. func (s *ManagedRuleGroupConfig) Validate() error {
  13320. invalidParams := request.ErrInvalidParams{Context: "ManagedRuleGroupConfig"}
  13321. if s.LoginPath != nil && len(*s.LoginPath) < 1 {
  13322. invalidParams.Add(request.NewErrParamMinLen("LoginPath", 1))
  13323. }
  13324. if s.AWSManagedRulesBotControlRuleSet != nil {
  13325. if err := s.AWSManagedRulesBotControlRuleSet.Validate(); err != nil {
  13326. invalidParams.AddNested("AWSManagedRulesBotControlRuleSet", err.(request.ErrInvalidParams))
  13327. }
  13328. }
  13329. if s.PasswordField != nil {
  13330. if err := s.PasswordField.Validate(); err != nil {
  13331. invalidParams.AddNested("PasswordField", err.(request.ErrInvalidParams))
  13332. }
  13333. }
  13334. if s.UsernameField != nil {
  13335. if err := s.UsernameField.Validate(); err != nil {
  13336. invalidParams.AddNested("UsernameField", err.(request.ErrInvalidParams))
  13337. }
  13338. }
  13339. if invalidParams.Len() > 0 {
  13340. return invalidParams
  13341. }
  13342. return nil
  13343. }
  13344. // SetAWSManagedRulesBotControlRuleSet sets the AWSManagedRulesBotControlRuleSet field's value.
  13345. func (s *ManagedRuleGroupConfig) SetAWSManagedRulesBotControlRuleSet(v *AWSManagedRulesBotControlRuleSet) *ManagedRuleGroupConfig {
  13346. s.AWSManagedRulesBotControlRuleSet = v
  13347. return s
  13348. }
  13349. // SetLoginPath sets the LoginPath field's value.
  13350. func (s *ManagedRuleGroupConfig) SetLoginPath(v string) *ManagedRuleGroupConfig {
  13351. s.LoginPath = &v
  13352. return s
  13353. }
  13354. // SetPasswordField sets the PasswordField field's value.
  13355. func (s *ManagedRuleGroupConfig) SetPasswordField(v *PasswordField) *ManagedRuleGroupConfig {
  13356. s.PasswordField = v
  13357. return s
  13358. }
  13359. // SetPayloadType sets the PayloadType field's value.
  13360. func (s *ManagedRuleGroupConfig) SetPayloadType(v string) *ManagedRuleGroupConfig {
  13361. s.PayloadType = &v
  13362. return s
  13363. }
  13364. // SetUsernameField sets the UsernameField field's value.
  13365. func (s *ManagedRuleGroupConfig) SetUsernameField(v *UsernameField) *ManagedRuleGroupConfig {
  13366. s.UsernameField = v
  13367. return s
  13368. }
  13369. // A rule statement used to run the rules that are defined in a managed rule
  13370. // group. To use this, provide the vendor name and the name of the rule group
  13371. // in this statement. You can retrieve the required names by calling ListAvailableManagedRuleGroups.
  13372. //
  13373. // You cannot nest a ManagedRuleGroupStatement, for example for use inside a
  13374. // NotStatement or OrStatement. It can only be referenced as a top-level statement
  13375. // within a rule.
  13376. //
  13377. // You are charged additional fees when you use the WAF Bot Control managed
  13378. // rule group AWSManagedRulesBotControlRuleSet or the WAF Fraud Control account
  13379. // takeover prevention (ATP) managed rule group AWSManagedRulesATPRuleSet. For
  13380. // more information, see WAF Pricing (http://aws.amazon.com/waf/pricing/).
  13381. type ManagedRuleGroupStatement struct {
  13382. _ struct{} `type:"structure"`
  13383. // Rules in the referenced rule group whose actions are set to Count.
  13384. //
  13385. // Instead of this option, use RuleActionOverrides. It accepts any valid action
  13386. // setting, including Count.
  13387. ExcludedRules []*ExcludedRule `type:"list"`
  13388. // Additional information that's used by a managed rule group. Many managed
  13389. // rule groups don't require this.
  13390. //
  13391. // Use the AWSManagedRulesBotControlRuleSet configuration object to configure
  13392. // the protection level that you want the Bot Control rule group to use.
  13393. ManagedRuleGroupConfigs []*ManagedRuleGroupConfig `min:"1" type:"list"`
  13394. // The name of the managed rule group. You use this, along with the vendor name,
  13395. // to identify the rule group.
  13396. //
  13397. // Name is a required field
  13398. Name *string `min:"1" type:"string" required:"true"`
  13399. // Action settings to use in the place of the rule actions that are configured
  13400. // inside the rule group. You specify one override for each rule whose action
  13401. // you want to change.
  13402. //
  13403. // You can use overrides for testing, for example you can override all of rule
  13404. // actions to Count and then monitor the resulting count metrics to understand
  13405. // how the rule group would handle your web traffic. You can also permanently
  13406. // override some or all actions, to modify how the rule group manages your web
  13407. // traffic.
  13408. RuleActionOverrides []*RuleActionOverride `min:"1" type:"list"`
  13409. // An optional nested statement that narrows the scope of the web requests that
  13410. // are evaluated by the managed rule group. Requests are only evaluated by the
  13411. // rule group if they match the scope-down statement. You can use any nestable
  13412. // Statement in the scope-down statement, and you can nest statements at any
  13413. // level, the same as you can for a rule statement.
  13414. ScopeDownStatement *Statement `type:"structure"`
  13415. // The name of the managed rule group vendor. You use this, along with the rule
  13416. // group name, to identify the rule group.
  13417. //
  13418. // VendorName is a required field
  13419. VendorName *string `min:"1" type:"string" required:"true"`
  13420. // The version of the managed rule group to use. If you specify this, the version
  13421. // setting is fixed until you change it. If you don't specify this, WAF uses
  13422. // the vendor's default version, and then keeps the version at the vendor's
  13423. // default when the vendor updates the managed rule group settings.
  13424. Version *string `min:"1" type:"string"`
  13425. }
  13426. // String returns the string representation.
  13427. //
  13428. // API parameter values that are decorated as "sensitive" in the API will not
  13429. // be included in the string output. The member name will be present, but the
  13430. // value will be replaced with "sensitive".
  13431. func (s ManagedRuleGroupStatement) String() string {
  13432. return awsutil.Prettify(s)
  13433. }
  13434. // GoString returns the string representation.
  13435. //
  13436. // API parameter values that are decorated as "sensitive" in the API will not
  13437. // be included in the string output. The member name will be present, but the
  13438. // value will be replaced with "sensitive".
  13439. func (s ManagedRuleGroupStatement) GoString() string {
  13440. return s.String()
  13441. }
  13442. // Validate inspects the fields of the type to determine if they are valid.
  13443. func (s *ManagedRuleGroupStatement) Validate() error {
  13444. invalidParams := request.ErrInvalidParams{Context: "ManagedRuleGroupStatement"}
  13445. if s.ManagedRuleGroupConfigs != nil && len(s.ManagedRuleGroupConfigs) < 1 {
  13446. invalidParams.Add(request.NewErrParamMinLen("ManagedRuleGroupConfigs", 1))
  13447. }
  13448. if s.Name == nil {
  13449. invalidParams.Add(request.NewErrParamRequired("Name"))
  13450. }
  13451. if s.Name != nil && len(*s.Name) < 1 {
  13452. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  13453. }
  13454. if s.RuleActionOverrides != nil && len(s.RuleActionOverrides) < 1 {
  13455. invalidParams.Add(request.NewErrParamMinLen("RuleActionOverrides", 1))
  13456. }
  13457. if s.VendorName == nil {
  13458. invalidParams.Add(request.NewErrParamRequired("VendorName"))
  13459. }
  13460. if s.VendorName != nil && len(*s.VendorName) < 1 {
  13461. invalidParams.Add(request.NewErrParamMinLen("VendorName", 1))
  13462. }
  13463. if s.Version != nil && len(*s.Version) < 1 {
  13464. invalidParams.Add(request.NewErrParamMinLen("Version", 1))
  13465. }
  13466. if s.ExcludedRules != nil {
  13467. for i, v := range s.ExcludedRules {
  13468. if v == nil {
  13469. continue
  13470. }
  13471. if err := v.Validate(); err != nil {
  13472. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExcludedRules", i), err.(request.ErrInvalidParams))
  13473. }
  13474. }
  13475. }
  13476. if s.ManagedRuleGroupConfigs != nil {
  13477. for i, v := range s.ManagedRuleGroupConfigs {
  13478. if v == nil {
  13479. continue
  13480. }
  13481. if err := v.Validate(); err != nil {
  13482. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ManagedRuleGroupConfigs", i), err.(request.ErrInvalidParams))
  13483. }
  13484. }
  13485. }
  13486. if s.RuleActionOverrides != nil {
  13487. for i, v := range s.RuleActionOverrides {
  13488. if v == nil {
  13489. continue
  13490. }
  13491. if err := v.Validate(); err != nil {
  13492. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RuleActionOverrides", i), err.(request.ErrInvalidParams))
  13493. }
  13494. }
  13495. }
  13496. if s.ScopeDownStatement != nil {
  13497. if err := s.ScopeDownStatement.Validate(); err != nil {
  13498. invalidParams.AddNested("ScopeDownStatement", err.(request.ErrInvalidParams))
  13499. }
  13500. }
  13501. if invalidParams.Len() > 0 {
  13502. return invalidParams
  13503. }
  13504. return nil
  13505. }
  13506. // SetExcludedRules sets the ExcludedRules field's value.
  13507. func (s *ManagedRuleGroupStatement) SetExcludedRules(v []*ExcludedRule) *ManagedRuleGroupStatement {
  13508. s.ExcludedRules = v
  13509. return s
  13510. }
  13511. // SetManagedRuleGroupConfigs sets the ManagedRuleGroupConfigs field's value.
  13512. func (s *ManagedRuleGroupStatement) SetManagedRuleGroupConfigs(v []*ManagedRuleGroupConfig) *ManagedRuleGroupStatement {
  13513. s.ManagedRuleGroupConfigs = v
  13514. return s
  13515. }
  13516. // SetName sets the Name field's value.
  13517. func (s *ManagedRuleGroupStatement) SetName(v string) *ManagedRuleGroupStatement {
  13518. s.Name = &v
  13519. return s
  13520. }
  13521. // SetRuleActionOverrides sets the RuleActionOverrides field's value.
  13522. func (s *ManagedRuleGroupStatement) SetRuleActionOverrides(v []*RuleActionOverride) *ManagedRuleGroupStatement {
  13523. s.RuleActionOverrides = v
  13524. return s
  13525. }
  13526. // SetScopeDownStatement sets the ScopeDownStatement field's value.
  13527. func (s *ManagedRuleGroupStatement) SetScopeDownStatement(v *Statement) *ManagedRuleGroupStatement {
  13528. s.ScopeDownStatement = v
  13529. return s
  13530. }
  13531. // SetVendorName sets the VendorName field's value.
  13532. func (s *ManagedRuleGroupStatement) SetVendorName(v string) *ManagedRuleGroupStatement {
  13533. s.VendorName = &v
  13534. return s
  13535. }
  13536. // SetVersion sets the Version field's value.
  13537. func (s *ManagedRuleGroupStatement) SetVersion(v string) *ManagedRuleGroupStatement {
  13538. s.Version = &v
  13539. return s
  13540. }
  13541. // High-level information about a managed rule group, returned by ListAvailableManagedRuleGroups.
  13542. // This provides information like the name and vendor name, that you provide
  13543. // when you add a ManagedRuleGroupStatement to a web ACL. Managed rule groups
  13544. // include Amazon Web Services Managed Rules rule groups, which are free of
  13545. // charge to WAF customers, and Amazon Web Services Marketplace managed rule
  13546. // groups, which you can subscribe to through Amazon Web Services Marketplace.
  13547. type ManagedRuleGroupSummary struct {
  13548. _ struct{} `type:"structure"`
  13549. // The description of the managed rule group, provided by Amazon Web Services
  13550. // Managed Rules or the Amazon Web Services Marketplace seller who manages it.
  13551. Description *string `min:"1" type:"string"`
  13552. // The name of the managed rule group. You use this, along with the vendor name,
  13553. // to identify the rule group.
  13554. Name *string `min:"1" type:"string"`
  13555. // The name of the managed rule group vendor. You use this, along with the rule
  13556. // group name, to identify the rule group.
  13557. VendorName *string `min:"1" type:"string"`
  13558. // Indicates whether the managed rule group is versioned. If it is, you can
  13559. // retrieve the versions list by calling ListAvailableManagedRuleGroupVersions.
  13560. VersioningSupported *bool `type:"boolean"`
  13561. }
  13562. // String returns the string representation.
  13563. //
  13564. // API parameter values that are decorated as "sensitive" in the API will not
  13565. // be included in the string output. The member name will be present, but the
  13566. // value will be replaced with "sensitive".
  13567. func (s ManagedRuleGroupSummary) String() string {
  13568. return awsutil.Prettify(s)
  13569. }
  13570. // GoString returns the string representation.
  13571. //
  13572. // API parameter values that are decorated as "sensitive" in the API will not
  13573. // be included in the string output. The member name will be present, but the
  13574. // value will be replaced with "sensitive".
  13575. func (s ManagedRuleGroupSummary) GoString() string {
  13576. return s.String()
  13577. }
  13578. // SetDescription sets the Description field's value.
  13579. func (s *ManagedRuleGroupSummary) SetDescription(v string) *ManagedRuleGroupSummary {
  13580. s.Description = &v
  13581. return s
  13582. }
  13583. // SetName sets the Name field's value.
  13584. func (s *ManagedRuleGroupSummary) SetName(v string) *ManagedRuleGroupSummary {
  13585. s.Name = &v
  13586. return s
  13587. }
  13588. // SetVendorName sets the VendorName field's value.
  13589. func (s *ManagedRuleGroupSummary) SetVendorName(v string) *ManagedRuleGroupSummary {
  13590. s.VendorName = &v
  13591. return s
  13592. }
  13593. // SetVersioningSupported sets the VersioningSupported field's value.
  13594. func (s *ManagedRuleGroupSummary) SetVersioningSupported(v bool) *ManagedRuleGroupSummary {
  13595. s.VersioningSupported = &v
  13596. return s
  13597. }
  13598. // Describes a single version of a managed rule group.
  13599. type ManagedRuleGroupVersion struct {
  13600. _ struct{} `type:"structure"`
  13601. // The date and time that the managed rule group owner updated the rule group
  13602. // version information.
  13603. LastUpdateTimestamp *time.Time `type:"timestamp"`
  13604. // The version name.
  13605. Name *string `min:"1" type:"string"`
  13606. }
  13607. // String returns the string representation.
  13608. //
  13609. // API parameter values that are decorated as "sensitive" in the API will not
  13610. // be included in the string output. The member name will be present, but the
  13611. // value will be replaced with "sensitive".
  13612. func (s ManagedRuleGroupVersion) String() string {
  13613. return awsutil.Prettify(s)
  13614. }
  13615. // GoString returns the string representation.
  13616. //
  13617. // API parameter values that are decorated as "sensitive" in the API will not
  13618. // be included in the string output. The member name will be present, but the
  13619. // value will be replaced with "sensitive".
  13620. func (s ManagedRuleGroupVersion) GoString() string {
  13621. return s.String()
  13622. }
  13623. // SetLastUpdateTimestamp sets the LastUpdateTimestamp field's value.
  13624. func (s *ManagedRuleGroupVersion) SetLastUpdateTimestamp(v time.Time) *ManagedRuleGroupVersion {
  13625. s.LastUpdateTimestamp = &v
  13626. return s
  13627. }
  13628. // SetName sets the Name field's value.
  13629. func (s *ManagedRuleGroupVersion) SetName(v string) *ManagedRuleGroupVersion {
  13630. s.Name = &v
  13631. return s
  13632. }
  13633. // A set of rules that is managed by Amazon Web Services and Amazon Web Services
  13634. // Marketplace sellers to provide versioned managed rule groups for customers
  13635. // of WAF.
  13636. //
  13637. // This is intended for use only by vendors of managed rule sets. Vendors are
  13638. // Amazon Web Services and Amazon Web Services Marketplace sellers.
  13639. //
  13640. // Vendors, you can use the managed rule set APIs to provide controlled rollout
  13641. // of your versioned managed rule group offerings for your customers. The APIs
  13642. // are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and
  13643. // UpdateManagedRuleSetVersionExpiryDate.
  13644. type ManagedRuleSet struct {
  13645. _ struct{} `type:"structure"`
  13646. // The Amazon Resource Name (ARN) of the entity.
  13647. //
  13648. // ARN is a required field
  13649. ARN *string `min:"20" type:"string" required:"true"`
  13650. // A description of the set that helps with identification.
  13651. Description *string `min:"1" type:"string"`
  13652. // A unique identifier for the managed rule set. The ID is returned in the responses
  13653. // to commands like list. You provide it to operations like get and update.
  13654. //
  13655. // Id is a required field
  13656. Id *string `min:"1" type:"string" required:"true"`
  13657. // The label namespace prefix for the managed rule groups that are offered to
  13658. // customers from this managed rule set. All labels that are added by rules
  13659. // in the managed rule group have this prefix.
  13660. //
  13661. // * The syntax for the label namespace prefix for a managed rule group is
  13662. // the following: awswaf:managed:<vendor>:<rule group name>:
  13663. //
  13664. // * When a rule with a label matches a web request, WAF adds the fully qualified
  13665. // label to the request. A fully qualified label is made up of the label
  13666. // namespace from the rule group or web ACL where the rule is defined and
  13667. // the label from the rule, separated by a colon: <label namespace>:<label
  13668. // from rule>
  13669. LabelNamespace *string `min:"1" type:"string"`
  13670. // The name of the managed rule set. You use this, along with the rule set ID,
  13671. // to identify the rule set.
  13672. //
  13673. // This name is assigned to the corresponding managed rule group, which your
  13674. // customers can access and use.
  13675. //
  13676. // Name is a required field
  13677. Name *string `min:"1" type:"string" required:"true"`
  13678. // The versions of this managed rule set that are available for use by customers.
  13679. PublishedVersions map[string]*ManagedRuleSetVersion `type:"map"`
  13680. // The version that you would like your customers to use.
  13681. RecommendedVersion *string `min:"1" type:"string"`
  13682. }
  13683. // String returns the string representation.
  13684. //
  13685. // API parameter values that are decorated as "sensitive" in the API will not
  13686. // be included in the string output. The member name will be present, but the
  13687. // value will be replaced with "sensitive".
  13688. func (s ManagedRuleSet) String() string {
  13689. return awsutil.Prettify(s)
  13690. }
  13691. // GoString returns the string representation.
  13692. //
  13693. // API parameter values that are decorated as "sensitive" in the API will not
  13694. // be included in the string output. The member name will be present, but the
  13695. // value will be replaced with "sensitive".
  13696. func (s ManagedRuleSet) GoString() string {
  13697. return s.String()
  13698. }
  13699. // SetARN sets the ARN field's value.
  13700. func (s *ManagedRuleSet) SetARN(v string) *ManagedRuleSet {
  13701. s.ARN = &v
  13702. return s
  13703. }
  13704. // SetDescription sets the Description field's value.
  13705. func (s *ManagedRuleSet) SetDescription(v string) *ManagedRuleSet {
  13706. s.Description = &v
  13707. return s
  13708. }
  13709. // SetId sets the Id field's value.
  13710. func (s *ManagedRuleSet) SetId(v string) *ManagedRuleSet {
  13711. s.Id = &v
  13712. return s
  13713. }
  13714. // SetLabelNamespace sets the LabelNamespace field's value.
  13715. func (s *ManagedRuleSet) SetLabelNamespace(v string) *ManagedRuleSet {
  13716. s.LabelNamespace = &v
  13717. return s
  13718. }
  13719. // SetName sets the Name field's value.
  13720. func (s *ManagedRuleSet) SetName(v string) *ManagedRuleSet {
  13721. s.Name = &v
  13722. return s
  13723. }
  13724. // SetPublishedVersions sets the PublishedVersions field's value.
  13725. func (s *ManagedRuleSet) SetPublishedVersions(v map[string]*ManagedRuleSetVersion) *ManagedRuleSet {
  13726. s.PublishedVersions = v
  13727. return s
  13728. }
  13729. // SetRecommendedVersion sets the RecommendedVersion field's value.
  13730. func (s *ManagedRuleSet) SetRecommendedVersion(v string) *ManagedRuleSet {
  13731. s.RecommendedVersion = &v
  13732. return s
  13733. }
  13734. // High-level information for a managed rule set.
  13735. //
  13736. // This is intended for use only by vendors of managed rule sets. Vendors are
  13737. // Amazon Web Services and Amazon Web Services Marketplace sellers.
  13738. //
  13739. // Vendors, you can use the managed rule set APIs to provide controlled rollout
  13740. // of your versioned managed rule group offerings for your customers. The APIs
  13741. // are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and
  13742. // UpdateManagedRuleSetVersionExpiryDate.
  13743. type ManagedRuleSetSummary struct {
  13744. _ struct{} `type:"structure"`
  13745. // The Amazon Resource Name (ARN) of the entity.
  13746. ARN *string `min:"20" type:"string"`
  13747. // A description of the set that helps with identification.
  13748. Description *string `min:"1" type:"string"`
  13749. // A unique identifier for the managed rule set. The ID is returned in the responses
  13750. // to commands like list. You provide it to operations like get and update.
  13751. Id *string `min:"1" type:"string"`
  13752. // The label namespace prefix for the managed rule groups that are offered to
  13753. // customers from this managed rule set. All labels that are added by rules
  13754. // in the managed rule group have this prefix.
  13755. //
  13756. // * The syntax for the label namespace prefix for a managed rule group is
  13757. // the following: awswaf:managed:<vendor>:<rule group name>:
  13758. //
  13759. // * When a rule with a label matches a web request, WAF adds the fully qualified
  13760. // label to the request. A fully qualified label is made up of the label
  13761. // namespace from the rule group or web ACL where the rule is defined and
  13762. // the label from the rule, separated by a colon: <label namespace>:<label
  13763. // from rule>
  13764. LabelNamespace *string `min:"1" type:"string"`
  13765. // A token used for optimistic locking. WAF returns a token to your get and
  13766. // list requests, to mark the state of the entity at the time of the request.
  13767. // To make changes to the entity associated with the token, you provide the
  13768. // token to operations like update and delete. WAF uses the token to ensure
  13769. // that no changes have been made to the entity since you last retrieved it.
  13770. // If a change has been made, the update fails with a WAFOptimisticLockException.
  13771. // If this happens, perform another get, and use the new token returned by that
  13772. // operation.
  13773. LockToken *string `min:"1" type:"string"`
  13774. // The name of the managed rule set. You use this, along with the rule set ID,
  13775. // to identify the rule set.
  13776. //
  13777. // This name is assigned to the corresponding managed rule group, which your
  13778. // customers can access and use.
  13779. Name *string `min:"1" type:"string"`
  13780. }
  13781. // String returns the string representation.
  13782. //
  13783. // API parameter values that are decorated as "sensitive" in the API will not
  13784. // be included in the string output. The member name will be present, but the
  13785. // value will be replaced with "sensitive".
  13786. func (s ManagedRuleSetSummary) String() string {
  13787. return awsutil.Prettify(s)
  13788. }
  13789. // GoString returns the string representation.
  13790. //
  13791. // API parameter values that are decorated as "sensitive" in the API will not
  13792. // be included in the string output. The member name will be present, but the
  13793. // value will be replaced with "sensitive".
  13794. func (s ManagedRuleSetSummary) GoString() string {
  13795. return s.String()
  13796. }
  13797. // SetARN sets the ARN field's value.
  13798. func (s *ManagedRuleSetSummary) SetARN(v string) *ManagedRuleSetSummary {
  13799. s.ARN = &v
  13800. return s
  13801. }
  13802. // SetDescription sets the Description field's value.
  13803. func (s *ManagedRuleSetSummary) SetDescription(v string) *ManagedRuleSetSummary {
  13804. s.Description = &v
  13805. return s
  13806. }
  13807. // SetId sets the Id field's value.
  13808. func (s *ManagedRuleSetSummary) SetId(v string) *ManagedRuleSetSummary {
  13809. s.Id = &v
  13810. return s
  13811. }
  13812. // SetLabelNamespace sets the LabelNamespace field's value.
  13813. func (s *ManagedRuleSetSummary) SetLabelNamespace(v string) *ManagedRuleSetSummary {
  13814. s.LabelNamespace = &v
  13815. return s
  13816. }
  13817. // SetLockToken sets the LockToken field's value.
  13818. func (s *ManagedRuleSetSummary) SetLockToken(v string) *ManagedRuleSetSummary {
  13819. s.LockToken = &v
  13820. return s
  13821. }
  13822. // SetName sets the Name field's value.
  13823. func (s *ManagedRuleSetSummary) SetName(v string) *ManagedRuleSetSummary {
  13824. s.Name = &v
  13825. return s
  13826. }
  13827. // Information for a single version of a managed rule set.
  13828. //
  13829. // This is intended for use only by vendors of managed rule sets. Vendors are
  13830. // Amazon Web Services and Amazon Web Services Marketplace sellers.
  13831. //
  13832. // Vendors, you can use the managed rule set APIs to provide controlled rollout
  13833. // of your versioned managed rule group offerings for your customers. The APIs
  13834. // are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and
  13835. // UpdateManagedRuleSetVersionExpiryDate.
  13836. type ManagedRuleSetVersion struct {
  13837. _ struct{} `type:"structure"`
  13838. // The Amazon Resource Name (ARN) of the vendor rule group that's used to define
  13839. // the published version of your managed rule group.
  13840. AssociatedRuleGroupArn *string `min:"20" type:"string"`
  13841. // The web ACL capacity units (WCUs) required for this rule group.
  13842. //
  13843. // WAF uses WCUs to calculate and control the operating resources that are used
  13844. // to run your rules, rule groups, and web ACLs. WAF calculates capacity differently
  13845. // for each rule type, to reflect the relative cost of each rule. Simple rules
  13846. // that cost little to run use fewer WCUs than more complex rules that use more
  13847. // processing power. Rule group capacity is fixed at creation, which helps users
  13848. // plan their web ACL WCU usage when they use a rule group. The WCU limit for
  13849. // web ACLs is 1,500.
  13850. Capacity *int64 `min:"1" type:"long"`
  13851. // The time that this version is set to expire.
  13852. //
  13853. // Times are in Coordinated Universal Time (UTC) format. UTC format includes
  13854. // the special designator, Z. For example, "2016-09-27T14:50Z".
  13855. ExpiryTimestamp *time.Time `type:"timestamp"`
  13856. // The amount of time you expect this version of your managed rule group to
  13857. // last, in days.
  13858. ForecastedLifetime *int64 `min:"1" type:"integer"`
  13859. // The last time that you updated this version.
  13860. //
  13861. // Times are in Coordinated Universal Time (UTC) format. UTC format includes
  13862. // the special designator, Z. For example, "2016-09-27T14:50Z".
  13863. LastUpdateTimestamp *time.Time `type:"timestamp"`
  13864. // The time that you first published this version.
  13865. //
  13866. // Times are in Coordinated Universal Time (UTC) format. UTC format includes
  13867. // the special designator, Z. For example, "2016-09-27T14:50Z".
  13868. PublishTimestamp *time.Time `type:"timestamp"`
  13869. }
  13870. // String returns the string representation.
  13871. //
  13872. // API parameter values that are decorated as "sensitive" in the API will not
  13873. // be included in the string output. The member name will be present, but the
  13874. // value will be replaced with "sensitive".
  13875. func (s ManagedRuleSetVersion) String() string {
  13876. return awsutil.Prettify(s)
  13877. }
  13878. // GoString returns the string representation.
  13879. //
  13880. // API parameter values that are decorated as "sensitive" in the API will not
  13881. // be included in the string output. The member name will be present, but the
  13882. // value will be replaced with "sensitive".
  13883. func (s ManagedRuleSetVersion) GoString() string {
  13884. return s.String()
  13885. }
  13886. // SetAssociatedRuleGroupArn sets the AssociatedRuleGroupArn field's value.
  13887. func (s *ManagedRuleSetVersion) SetAssociatedRuleGroupArn(v string) *ManagedRuleSetVersion {
  13888. s.AssociatedRuleGroupArn = &v
  13889. return s
  13890. }
  13891. // SetCapacity sets the Capacity field's value.
  13892. func (s *ManagedRuleSetVersion) SetCapacity(v int64) *ManagedRuleSetVersion {
  13893. s.Capacity = &v
  13894. return s
  13895. }
  13896. // SetExpiryTimestamp sets the ExpiryTimestamp field's value.
  13897. func (s *ManagedRuleSetVersion) SetExpiryTimestamp(v time.Time) *ManagedRuleSetVersion {
  13898. s.ExpiryTimestamp = &v
  13899. return s
  13900. }
  13901. // SetForecastedLifetime sets the ForecastedLifetime field's value.
  13902. func (s *ManagedRuleSetVersion) SetForecastedLifetime(v int64) *ManagedRuleSetVersion {
  13903. s.ForecastedLifetime = &v
  13904. return s
  13905. }
  13906. // SetLastUpdateTimestamp sets the LastUpdateTimestamp field's value.
  13907. func (s *ManagedRuleSetVersion) SetLastUpdateTimestamp(v time.Time) *ManagedRuleSetVersion {
  13908. s.LastUpdateTimestamp = &v
  13909. return s
  13910. }
  13911. // SetPublishTimestamp sets the PublishTimestamp field's value.
  13912. func (s *ManagedRuleSetVersion) SetPublishTimestamp(v time.Time) *ManagedRuleSetVersion {
  13913. s.PublishTimestamp = &v
  13914. return s
  13915. }
  13916. // Inspect the HTTP method of the web request. The method indicates the type
  13917. // of operation that the request is asking the origin to perform.
  13918. //
  13919. // This is used only in the FieldToMatch specification for some web request
  13920. // component types.
  13921. //
  13922. // JSON specification: "Method": {}
  13923. type Method struct {
  13924. _ struct{} `type:"structure"`
  13925. }
  13926. // String returns the string representation.
  13927. //
  13928. // API parameter values that are decorated as "sensitive" in the API will not
  13929. // be included in the string output. The member name will be present, but the
  13930. // value will be replaced with "sensitive".
  13931. func (s Method) String() string {
  13932. return awsutil.Prettify(s)
  13933. }
  13934. // GoString returns the string representation.
  13935. //
  13936. // API parameter values that are decorated as "sensitive" in the API will not
  13937. // be included in the string output. The member name will be present, but the
  13938. // value will be replaced with "sensitive".
  13939. func (s Method) GoString() string {
  13940. return s.String()
  13941. }
  13942. // Information for a release of the mobile SDK, including release notes and
  13943. // tags.
  13944. //
  13945. // The mobile SDK is not generally available. Customers who have access to the
  13946. // mobile SDK can use it to establish and manage WAF tokens for use in HTTP(S)
  13947. // requests from a mobile device to WAF. For more information, see WAF client
  13948. // application integration (https://docs.aws.amazon.com/waf/latest/developerguide/waf-application-integration.html)
  13949. // in the WAF Developer Guide.
  13950. type MobileSdkRelease struct {
  13951. _ struct{} `type:"structure"`
  13952. // Notes describing the release.
  13953. ReleaseNotes *string `type:"string"`
  13954. // The release version.
  13955. ReleaseVersion *string `min:"1" type:"string"`
  13956. // Tags that are associated with the release.
  13957. Tags []*Tag `min:"1" type:"list"`
  13958. // The timestamp of the release.
  13959. Timestamp *time.Time `type:"timestamp"`
  13960. }
  13961. // String returns the string representation.
  13962. //
  13963. // API parameter values that are decorated as "sensitive" in the API will not
  13964. // be included in the string output. The member name will be present, but the
  13965. // value will be replaced with "sensitive".
  13966. func (s MobileSdkRelease) String() string {
  13967. return awsutil.Prettify(s)
  13968. }
  13969. // GoString returns the string representation.
  13970. //
  13971. // API parameter values that are decorated as "sensitive" in the API will not
  13972. // be included in the string output. The member name will be present, but the
  13973. // value will be replaced with "sensitive".
  13974. func (s MobileSdkRelease) GoString() string {
  13975. return s.String()
  13976. }
  13977. // SetReleaseNotes sets the ReleaseNotes field's value.
  13978. func (s *MobileSdkRelease) SetReleaseNotes(v string) *MobileSdkRelease {
  13979. s.ReleaseNotes = &v
  13980. return s
  13981. }
  13982. // SetReleaseVersion sets the ReleaseVersion field's value.
  13983. func (s *MobileSdkRelease) SetReleaseVersion(v string) *MobileSdkRelease {
  13984. s.ReleaseVersion = &v
  13985. return s
  13986. }
  13987. // SetTags sets the Tags field's value.
  13988. func (s *MobileSdkRelease) SetTags(v []*Tag) *MobileSdkRelease {
  13989. s.Tags = v
  13990. return s
  13991. }
  13992. // SetTimestamp sets the Timestamp field's value.
  13993. func (s *MobileSdkRelease) SetTimestamp(v time.Time) *MobileSdkRelease {
  13994. s.Timestamp = &v
  13995. return s
  13996. }
  13997. // Specifies that WAF should do nothing. This is used for the OverrideAction
  13998. // setting on a Rule when the rule uses a rule group reference statement.
  13999. //
  14000. // This is used in the context of other settings, for example to specify values
  14001. // for RuleAction and web ACL DefaultAction.
  14002. //
  14003. // JSON specification: "None": {}
  14004. type NoneAction struct {
  14005. _ struct{} `type:"structure"`
  14006. }
  14007. // String returns the string representation.
  14008. //
  14009. // API parameter values that are decorated as "sensitive" in the API will not
  14010. // be included in the string output. The member name will be present, but the
  14011. // value will be replaced with "sensitive".
  14012. func (s NoneAction) String() string {
  14013. return awsutil.Prettify(s)
  14014. }
  14015. // GoString returns the string representation.
  14016. //
  14017. // API parameter values that are decorated as "sensitive" in the API will not
  14018. // be included in the string output. The member name will be present, but the
  14019. // value will be replaced with "sensitive".
  14020. func (s NoneAction) GoString() string {
  14021. return s.String()
  14022. }
  14023. // A logical rule statement used to negate the results of another rule statement.
  14024. // You provide one Statement within the NotStatement.
  14025. type NotStatement struct {
  14026. _ struct{} `type:"structure"`
  14027. // The statement to negate. You can use any statement that can be nested.
  14028. //
  14029. // Statement is a required field
  14030. Statement *Statement `type:"structure" required:"true"`
  14031. }
  14032. // String returns the string representation.
  14033. //
  14034. // API parameter values that are decorated as "sensitive" in the API will not
  14035. // be included in the string output. The member name will be present, but the
  14036. // value will be replaced with "sensitive".
  14037. func (s NotStatement) String() string {
  14038. return awsutil.Prettify(s)
  14039. }
  14040. // GoString returns the string representation.
  14041. //
  14042. // API parameter values that are decorated as "sensitive" in the API will not
  14043. // be included in the string output. The member name will be present, but the
  14044. // value will be replaced with "sensitive".
  14045. func (s NotStatement) GoString() string {
  14046. return s.String()
  14047. }
  14048. // Validate inspects the fields of the type to determine if they are valid.
  14049. func (s *NotStatement) Validate() error {
  14050. invalidParams := request.ErrInvalidParams{Context: "NotStatement"}
  14051. if s.Statement == nil {
  14052. invalidParams.Add(request.NewErrParamRequired("Statement"))
  14053. }
  14054. if s.Statement != nil {
  14055. if err := s.Statement.Validate(); err != nil {
  14056. invalidParams.AddNested("Statement", err.(request.ErrInvalidParams))
  14057. }
  14058. }
  14059. if invalidParams.Len() > 0 {
  14060. return invalidParams
  14061. }
  14062. return nil
  14063. }
  14064. // SetStatement sets the Statement field's value.
  14065. func (s *NotStatement) SetStatement(v *Statement) *NotStatement {
  14066. s.Statement = v
  14067. return s
  14068. }
  14069. // A logical rule statement used to combine other rule statements with OR logic.
  14070. // You provide more than one Statement within the OrStatement.
  14071. type OrStatement struct {
  14072. _ struct{} `type:"structure"`
  14073. // The statements to combine with OR logic. You can use any statements that
  14074. // can be nested.
  14075. //
  14076. // Statements is a required field
  14077. Statements []*Statement `type:"list" required:"true"`
  14078. }
  14079. // String returns the string representation.
  14080. //
  14081. // API parameter values that are decorated as "sensitive" in the API will not
  14082. // be included in the string output. The member name will be present, but the
  14083. // value will be replaced with "sensitive".
  14084. func (s OrStatement) String() string {
  14085. return awsutil.Prettify(s)
  14086. }
  14087. // GoString returns the string representation.
  14088. //
  14089. // API parameter values that are decorated as "sensitive" in the API will not
  14090. // be included in the string output. The member name will be present, but the
  14091. // value will be replaced with "sensitive".
  14092. func (s OrStatement) GoString() string {
  14093. return s.String()
  14094. }
  14095. // Validate inspects the fields of the type to determine if they are valid.
  14096. func (s *OrStatement) Validate() error {
  14097. invalidParams := request.ErrInvalidParams{Context: "OrStatement"}
  14098. if s.Statements == nil {
  14099. invalidParams.Add(request.NewErrParamRequired("Statements"))
  14100. }
  14101. if s.Statements != nil {
  14102. for i, v := range s.Statements {
  14103. if v == nil {
  14104. continue
  14105. }
  14106. if err := v.Validate(); err != nil {
  14107. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Statements", i), err.(request.ErrInvalidParams))
  14108. }
  14109. }
  14110. }
  14111. if invalidParams.Len() > 0 {
  14112. return invalidParams
  14113. }
  14114. return nil
  14115. }
  14116. // SetStatements sets the Statements field's value.
  14117. func (s *OrStatement) SetStatements(v []*Statement) *OrStatement {
  14118. s.Statements = v
  14119. return s
  14120. }
  14121. // The action to use in the place of the action that results from the rule group
  14122. // evaluation. Set the override action to none to leave the result of the rule
  14123. // group alone. Set it to count to override the result to count only.
  14124. //
  14125. // You can only use this for rule statements that reference a rule group, like
  14126. // RuleGroupReferenceStatement and ManagedRuleGroupStatement.
  14127. //
  14128. // This option is usually set to none. It does not affect how the rules in the
  14129. // rule group are evaluated. If you want the rules in the rule group to only
  14130. // count matches, do not use this and instead use the rule action override option,
  14131. // with Count action, in your rule group reference statement settings.
  14132. type OverrideAction struct {
  14133. _ struct{} `type:"structure"`
  14134. // Override the rule group evaluation result to count only.
  14135. //
  14136. // This option is usually set to none. It does not affect how the rules in the
  14137. // rule group are evaluated. If you want the rules in the rule group to only
  14138. // count matches, do not use this and instead use the rule action override option,
  14139. // with Count action, in your rule group reference statement settings.
  14140. Count *CountAction `type:"structure"`
  14141. // Don't override the rule group evaluation result. This is the most common
  14142. // setting.
  14143. None *NoneAction `type:"structure"`
  14144. }
  14145. // String returns the string representation.
  14146. //
  14147. // API parameter values that are decorated as "sensitive" in the API will not
  14148. // be included in the string output. The member name will be present, but the
  14149. // value will be replaced with "sensitive".
  14150. func (s OverrideAction) String() string {
  14151. return awsutil.Prettify(s)
  14152. }
  14153. // GoString returns the string representation.
  14154. //
  14155. // API parameter values that are decorated as "sensitive" in the API will not
  14156. // be included in the string output. The member name will be present, but the
  14157. // value will be replaced with "sensitive".
  14158. func (s OverrideAction) GoString() string {
  14159. return s.String()
  14160. }
  14161. // Validate inspects the fields of the type to determine if they are valid.
  14162. func (s *OverrideAction) Validate() error {
  14163. invalidParams := request.ErrInvalidParams{Context: "OverrideAction"}
  14164. if s.Count != nil {
  14165. if err := s.Count.Validate(); err != nil {
  14166. invalidParams.AddNested("Count", err.(request.ErrInvalidParams))
  14167. }
  14168. }
  14169. if invalidParams.Len() > 0 {
  14170. return invalidParams
  14171. }
  14172. return nil
  14173. }
  14174. // SetCount sets the Count field's value.
  14175. func (s *OverrideAction) SetCount(v *CountAction) *OverrideAction {
  14176. s.Count = v
  14177. return s
  14178. }
  14179. // SetNone sets the None field's value.
  14180. func (s *OverrideAction) SetNone(v *NoneAction) *OverrideAction {
  14181. s.None = v
  14182. return s
  14183. }
  14184. // Details about your login page password field, used in a ManagedRuleGroupConfig.
  14185. type PasswordField struct {
  14186. _ struct{} `type:"structure"`
  14187. // The name of the password field. For example /form/password.
  14188. //
  14189. // Identifier is a required field
  14190. Identifier *string `min:"1" type:"string" required:"true"`
  14191. }
  14192. // String returns the string representation.
  14193. //
  14194. // API parameter values that are decorated as "sensitive" in the API will not
  14195. // be included in the string output. The member name will be present, but the
  14196. // value will be replaced with "sensitive".
  14197. func (s PasswordField) String() string {
  14198. return awsutil.Prettify(s)
  14199. }
  14200. // GoString returns the string representation.
  14201. //
  14202. // API parameter values that are decorated as "sensitive" in the API will not
  14203. // be included in the string output. The member name will be present, but the
  14204. // value will be replaced with "sensitive".
  14205. func (s PasswordField) GoString() string {
  14206. return s.String()
  14207. }
  14208. // Validate inspects the fields of the type to determine if they are valid.
  14209. func (s *PasswordField) Validate() error {
  14210. invalidParams := request.ErrInvalidParams{Context: "PasswordField"}
  14211. if s.Identifier == nil {
  14212. invalidParams.Add(request.NewErrParamRequired("Identifier"))
  14213. }
  14214. if s.Identifier != nil && len(*s.Identifier) < 1 {
  14215. invalidParams.Add(request.NewErrParamMinLen("Identifier", 1))
  14216. }
  14217. if invalidParams.Len() > 0 {
  14218. return invalidParams
  14219. }
  14220. return nil
  14221. }
  14222. // SetIdentifier sets the Identifier field's value.
  14223. func (s *PasswordField) SetIdentifier(v string) *PasswordField {
  14224. s.Identifier = &v
  14225. return s
  14226. }
  14227. type PutLoggingConfigurationInput struct {
  14228. _ struct{} `type:"structure"`
  14229. // Defines an association between logging destinations and a web ACL resource,
  14230. // for logging from WAF. As part of the association, you can specify parts of
  14231. // the standard logging fields to keep out of the logs and you can specify filters
  14232. // so that you log only a subset of the logging records.
  14233. //
  14234. // You can define one logging destination per web ACL.
  14235. //
  14236. // You can access information about the traffic that WAF inspects using the
  14237. // following steps:
  14238. //
  14239. // Create your logging destination. You can use an Amazon CloudWatch Logs log
  14240. // group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon
  14241. // Kinesis Data Firehose.
  14242. //
  14243. // The name that you give the destination must start with aws-waf-logs-. Depending
  14244. // on the type of destination, you might need to configure additional settings
  14245. // or permissions.
  14246. //
  14247. // For configuration requirements and pricing information for each destination
  14248. // type, see Logging web ACL traffic (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
  14249. // in the WAF Developer Guide.
  14250. //
  14251. // Associate your logging destination to your web ACL using a PutLoggingConfiguration
  14252. // request.
  14253. //
  14254. // When you successfully enable logging using a PutLoggingConfiguration request,
  14255. // WAF creates an additional role or policy that is required to write logs to
  14256. // the logging destination. For an Amazon CloudWatch Logs log group, WAF creates
  14257. // a resource policy on the log group. For an Amazon S3 bucket, WAF creates
  14258. // a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked
  14259. // role.
  14260. //
  14261. // For additional information about web ACL logging, see Logging web ACL traffic
  14262. // information (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
  14263. // in the WAF Developer Guide.
  14264. //
  14265. // LoggingConfiguration is a required field
  14266. LoggingConfiguration *LoggingConfiguration `type:"structure" required:"true"`
  14267. }
  14268. // String returns the string representation.
  14269. //
  14270. // API parameter values that are decorated as "sensitive" in the API will not
  14271. // be included in the string output. The member name will be present, but the
  14272. // value will be replaced with "sensitive".
  14273. func (s PutLoggingConfigurationInput) String() string {
  14274. return awsutil.Prettify(s)
  14275. }
  14276. // GoString returns the string representation.
  14277. //
  14278. // API parameter values that are decorated as "sensitive" in the API will not
  14279. // be included in the string output. The member name will be present, but the
  14280. // value will be replaced with "sensitive".
  14281. func (s PutLoggingConfigurationInput) GoString() string {
  14282. return s.String()
  14283. }
  14284. // Validate inspects the fields of the type to determine if they are valid.
  14285. func (s *PutLoggingConfigurationInput) Validate() error {
  14286. invalidParams := request.ErrInvalidParams{Context: "PutLoggingConfigurationInput"}
  14287. if s.LoggingConfiguration == nil {
  14288. invalidParams.Add(request.NewErrParamRequired("LoggingConfiguration"))
  14289. }
  14290. if s.LoggingConfiguration != nil {
  14291. if err := s.LoggingConfiguration.Validate(); err != nil {
  14292. invalidParams.AddNested("LoggingConfiguration", err.(request.ErrInvalidParams))
  14293. }
  14294. }
  14295. if invalidParams.Len() > 0 {
  14296. return invalidParams
  14297. }
  14298. return nil
  14299. }
  14300. // SetLoggingConfiguration sets the LoggingConfiguration field's value.
  14301. func (s *PutLoggingConfigurationInput) SetLoggingConfiguration(v *LoggingConfiguration) *PutLoggingConfigurationInput {
  14302. s.LoggingConfiguration = v
  14303. return s
  14304. }
  14305. type PutLoggingConfigurationOutput struct {
  14306. _ struct{} `type:"structure"`
  14307. // Defines an association between logging destinations and a web ACL resource,
  14308. // for logging from WAF. As part of the association, you can specify parts of
  14309. // the standard logging fields to keep out of the logs and you can specify filters
  14310. // so that you log only a subset of the logging records.
  14311. //
  14312. // You can define one logging destination per web ACL.
  14313. //
  14314. // You can access information about the traffic that WAF inspects using the
  14315. // following steps:
  14316. //
  14317. // Create your logging destination. You can use an Amazon CloudWatch Logs log
  14318. // group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon
  14319. // Kinesis Data Firehose.
  14320. //
  14321. // The name that you give the destination must start with aws-waf-logs-. Depending
  14322. // on the type of destination, you might need to configure additional settings
  14323. // or permissions.
  14324. //
  14325. // For configuration requirements and pricing information for each destination
  14326. // type, see Logging web ACL traffic (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
  14327. // in the WAF Developer Guide.
  14328. //
  14329. // Associate your logging destination to your web ACL using a PutLoggingConfiguration
  14330. // request.
  14331. //
  14332. // When you successfully enable logging using a PutLoggingConfiguration request,
  14333. // WAF creates an additional role or policy that is required to write logs to
  14334. // the logging destination. For an Amazon CloudWatch Logs log group, WAF creates
  14335. // a resource policy on the log group. For an Amazon S3 bucket, WAF creates
  14336. // a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked
  14337. // role.
  14338. //
  14339. // For additional information about web ACL logging, see Logging web ACL traffic
  14340. // information (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
  14341. // in the WAF Developer Guide.
  14342. LoggingConfiguration *LoggingConfiguration `type:"structure"`
  14343. }
  14344. // String returns the string representation.
  14345. //
  14346. // API parameter values that are decorated as "sensitive" in the API will not
  14347. // be included in the string output. The member name will be present, but the
  14348. // value will be replaced with "sensitive".
  14349. func (s PutLoggingConfigurationOutput) String() string {
  14350. return awsutil.Prettify(s)
  14351. }
  14352. // GoString returns the string representation.
  14353. //
  14354. // API parameter values that are decorated as "sensitive" in the API will not
  14355. // be included in the string output. The member name will be present, but the
  14356. // value will be replaced with "sensitive".
  14357. func (s PutLoggingConfigurationOutput) GoString() string {
  14358. return s.String()
  14359. }
  14360. // SetLoggingConfiguration sets the LoggingConfiguration field's value.
  14361. func (s *PutLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfiguration) *PutLoggingConfigurationOutput {
  14362. s.LoggingConfiguration = v
  14363. return s
  14364. }
  14365. type PutManagedRuleSetVersionsInput struct {
  14366. _ struct{} `type:"structure"`
  14367. // A unique identifier for the managed rule set. The ID is returned in the responses
  14368. // to commands like list. You provide it to operations like get and update.
  14369. //
  14370. // Id is a required field
  14371. Id *string `min:"1" type:"string" required:"true"`
  14372. // A token used for optimistic locking. WAF returns a token to your get and
  14373. // list requests, to mark the state of the entity at the time of the request.
  14374. // To make changes to the entity associated with the token, you provide the
  14375. // token to operations like update and delete. WAF uses the token to ensure
  14376. // that no changes have been made to the entity since you last retrieved it.
  14377. // If a change has been made, the update fails with a WAFOptimisticLockException.
  14378. // If this happens, perform another get, and use the new token returned by that
  14379. // operation.
  14380. //
  14381. // LockToken is a required field
  14382. LockToken *string `min:"1" type:"string" required:"true"`
  14383. // The name of the managed rule set. You use this, along with the rule set ID,
  14384. // to identify the rule set.
  14385. //
  14386. // This name is assigned to the corresponding managed rule group, which your
  14387. // customers can access and use.
  14388. //
  14389. // Name is a required field
  14390. Name *string `min:"1" type:"string" required:"true"`
  14391. // The version of the named managed rule group that you'd like your customers
  14392. // to choose, from among your version offerings.
  14393. RecommendedVersion *string `min:"1" type:"string"`
  14394. // Specifies whether this is for an Amazon CloudFront distribution or for a
  14395. // regional application. A regional application can be an Application Load Balancer
  14396. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  14397. // Cognito user pool.
  14398. //
  14399. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  14400. // as follows:
  14401. //
  14402. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  14403. // --region=us-east-1.
  14404. //
  14405. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  14406. //
  14407. // Scope is a required field
  14408. Scope *string `type:"string" required:"true" enum:"Scope"`
  14409. // The versions of the named managed rule group that you want to offer to your
  14410. // customers.
  14411. VersionsToPublish map[string]*VersionToPublish `type:"map"`
  14412. }
  14413. // String returns the string representation.
  14414. //
  14415. // API parameter values that are decorated as "sensitive" in the API will not
  14416. // be included in the string output. The member name will be present, but the
  14417. // value will be replaced with "sensitive".
  14418. func (s PutManagedRuleSetVersionsInput) String() string {
  14419. return awsutil.Prettify(s)
  14420. }
  14421. // GoString returns the string representation.
  14422. //
  14423. // API parameter values that are decorated as "sensitive" in the API will not
  14424. // be included in the string output. The member name will be present, but the
  14425. // value will be replaced with "sensitive".
  14426. func (s PutManagedRuleSetVersionsInput) GoString() string {
  14427. return s.String()
  14428. }
  14429. // Validate inspects the fields of the type to determine if they are valid.
  14430. func (s *PutManagedRuleSetVersionsInput) Validate() error {
  14431. invalidParams := request.ErrInvalidParams{Context: "PutManagedRuleSetVersionsInput"}
  14432. if s.Id == nil {
  14433. invalidParams.Add(request.NewErrParamRequired("Id"))
  14434. }
  14435. if s.Id != nil && len(*s.Id) < 1 {
  14436. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  14437. }
  14438. if s.LockToken == nil {
  14439. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  14440. }
  14441. if s.LockToken != nil && len(*s.LockToken) < 1 {
  14442. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  14443. }
  14444. if s.Name == nil {
  14445. invalidParams.Add(request.NewErrParamRequired("Name"))
  14446. }
  14447. if s.Name != nil && len(*s.Name) < 1 {
  14448. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  14449. }
  14450. if s.RecommendedVersion != nil && len(*s.RecommendedVersion) < 1 {
  14451. invalidParams.Add(request.NewErrParamMinLen("RecommendedVersion", 1))
  14452. }
  14453. if s.Scope == nil {
  14454. invalidParams.Add(request.NewErrParamRequired("Scope"))
  14455. }
  14456. if s.VersionsToPublish != nil {
  14457. for i, v := range s.VersionsToPublish {
  14458. if v == nil {
  14459. continue
  14460. }
  14461. if err := v.Validate(); err != nil {
  14462. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VersionsToPublish", i), err.(request.ErrInvalidParams))
  14463. }
  14464. }
  14465. }
  14466. if invalidParams.Len() > 0 {
  14467. return invalidParams
  14468. }
  14469. return nil
  14470. }
  14471. // SetId sets the Id field's value.
  14472. func (s *PutManagedRuleSetVersionsInput) SetId(v string) *PutManagedRuleSetVersionsInput {
  14473. s.Id = &v
  14474. return s
  14475. }
  14476. // SetLockToken sets the LockToken field's value.
  14477. func (s *PutManagedRuleSetVersionsInput) SetLockToken(v string) *PutManagedRuleSetVersionsInput {
  14478. s.LockToken = &v
  14479. return s
  14480. }
  14481. // SetName sets the Name field's value.
  14482. func (s *PutManagedRuleSetVersionsInput) SetName(v string) *PutManagedRuleSetVersionsInput {
  14483. s.Name = &v
  14484. return s
  14485. }
  14486. // SetRecommendedVersion sets the RecommendedVersion field's value.
  14487. func (s *PutManagedRuleSetVersionsInput) SetRecommendedVersion(v string) *PutManagedRuleSetVersionsInput {
  14488. s.RecommendedVersion = &v
  14489. return s
  14490. }
  14491. // SetScope sets the Scope field's value.
  14492. func (s *PutManagedRuleSetVersionsInput) SetScope(v string) *PutManagedRuleSetVersionsInput {
  14493. s.Scope = &v
  14494. return s
  14495. }
  14496. // SetVersionsToPublish sets the VersionsToPublish field's value.
  14497. func (s *PutManagedRuleSetVersionsInput) SetVersionsToPublish(v map[string]*VersionToPublish) *PutManagedRuleSetVersionsInput {
  14498. s.VersionsToPublish = v
  14499. return s
  14500. }
  14501. type PutManagedRuleSetVersionsOutput struct {
  14502. _ struct{} `type:"structure"`
  14503. // A token used for optimistic locking. WAF returns a token to your get and
  14504. // list requests, to mark the state of the entity at the time of the request.
  14505. // To make changes to the entity associated with the token, you provide the
  14506. // token to operations like update and delete. WAF uses the token to ensure
  14507. // that no changes have been made to the entity since you last retrieved it.
  14508. // If a change has been made, the update fails with a WAFOptimisticLockException.
  14509. // If this happens, perform another get, and use the new token returned by that
  14510. // operation.
  14511. NextLockToken *string `min:"1" type:"string"`
  14512. }
  14513. // String returns the string representation.
  14514. //
  14515. // API parameter values that are decorated as "sensitive" in the API will not
  14516. // be included in the string output. The member name will be present, but the
  14517. // value will be replaced with "sensitive".
  14518. func (s PutManagedRuleSetVersionsOutput) String() string {
  14519. return awsutil.Prettify(s)
  14520. }
  14521. // GoString returns the string representation.
  14522. //
  14523. // API parameter values that are decorated as "sensitive" in the API will not
  14524. // be included in the string output. The member name will be present, but the
  14525. // value will be replaced with "sensitive".
  14526. func (s PutManagedRuleSetVersionsOutput) GoString() string {
  14527. return s.String()
  14528. }
  14529. // SetNextLockToken sets the NextLockToken field's value.
  14530. func (s *PutManagedRuleSetVersionsOutput) SetNextLockToken(v string) *PutManagedRuleSetVersionsOutput {
  14531. s.NextLockToken = &v
  14532. return s
  14533. }
  14534. type PutPermissionPolicyInput struct {
  14535. _ struct{} `type:"structure"`
  14536. // The policy to attach to the specified rule group.
  14537. //
  14538. // The policy specifications must conform to the following:
  14539. //
  14540. // * The policy must be composed using IAM Policy version 2012-10-17 or version
  14541. // 2015-01-01.
  14542. //
  14543. // * The policy must include specifications for Effect, Action, and Principal.
  14544. //
  14545. // * Effect must specify Allow.
  14546. //
  14547. // * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups
  14548. // and may optionally specify wafv2:GetRuleGroup. WAF rejects any extra actions
  14549. // or wildcard actions in the policy.
  14550. //
  14551. // * The policy must not include a Resource parameter.
  14552. //
  14553. // For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html).
  14554. //
  14555. // Policy is a required field
  14556. Policy *string `min:"1" type:"string" required:"true"`
  14557. // The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach
  14558. // the policy.
  14559. //
  14560. // ResourceArn is a required field
  14561. ResourceArn *string `min:"20" type:"string" required:"true"`
  14562. }
  14563. // String returns the string representation.
  14564. //
  14565. // API parameter values that are decorated as "sensitive" in the API will not
  14566. // be included in the string output. The member name will be present, but the
  14567. // value will be replaced with "sensitive".
  14568. func (s PutPermissionPolicyInput) String() string {
  14569. return awsutil.Prettify(s)
  14570. }
  14571. // GoString returns the string representation.
  14572. //
  14573. // API parameter values that are decorated as "sensitive" in the API will not
  14574. // be included in the string output. The member name will be present, but the
  14575. // value will be replaced with "sensitive".
  14576. func (s PutPermissionPolicyInput) GoString() string {
  14577. return s.String()
  14578. }
  14579. // Validate inspects the fields of the type to determine if they are valid.
  14580. func (s *PutPermissionPolicyInput) Validate() error {
  14581. invalidParams := request.ErrInvalidParams{Context: "PutPermissionPolicyInput"}
  14582. if s.Policy == nil {
  14583. invalidParams.Add(request.NewErrParamRequired("Policy"))
  14584. }
  14585. if s.Policy != nil && len(*s.Policy) < 1 {
  14586. invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
  14587. }
  14588. if s.ResourceArn == nil {
  14589. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  14590. }
  14591. if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
  14592. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
  14593. }
  14594. if invalidParams.Len() > 0 {
  14595. return invalidParams
  14596. }
  14597. return nil
  14598. }
  14599. // SetPolicy sets the Policy field's value.
  14600. func (s *PutPermissionPolicyInput) SetPolicy(v string) *PutPermissionPolicyInput {
  14601. s.Policy = &v
  14602. return s
  14603. }
  14604. // SetResourceArn sets the ResourceArn field's value.
  14605. func (s *PutPermissionPolicyInput) SetResourceArn(v string) *PutPermissionPolicyInput {
  14606. s.ResourceArn = &v
  14607. return s
  14608. }
  14609. type PutPermissionPolicyOutput struct {
  14610. _ struct{} `type:"structure"`
  14611. }
  14612. // String returns the string representation.
  14613. //
  14614. // API parameter values that are decorated as "sensitive" in the API will not
  14615. // be included in the string output. The member name will be present, but the
  14616. // value will be replaced with "sensitive".
  14617. func (s PutPermissionPolicyOutput) String() string {
  14618. return awsutil.Prettify(s)
  14619. }
  14620. // GoString returns the string representation.
  14621. //
  14622. // API parameter values that are decorated as "sensitive" in the API will not
  14623. // be included in the string output. The member name will be present, but the
  14624. // value will be replaced with "sensitive".
  14625. func (s PutPermissionPolicyOutput) GoString() string {
  14626. return s.String()
  14627. }
  14628. // Inspect the query string of the web request. This is the part of a URL that
  14629. // appears after a ? character, if any.
  14630. //
  14631. // This is used only in the FieldToMatch specification for some web request
  14632. // component types.
  14633. //
  14634. // JSON specification: "QueryString": {}
  14635. type QueryString struct {
  14636. _ struct{} `type:"structure"`
  14637. }
  14638. // String returns the string representation.
  14639. //
  14640. // API parameter values that are decorated as "sensitive" in the API will not
  14641. // be included in the string output. The member name will be present, but the
  14642. // value will be replaced with "sensitive".
  14643. func (s QueryString) String() string {
  14644. return awsutil.Prettify(s)
  14645. }
  14646. // GoString returns the string representation.
  14647. //
  14648. // API parameter values that are decorated as "sensitive" in the API will not
  14649. // be included in the string output. The member name will be present, but the
  14650. // value will be replaced with "sensitive".
  14651. func (s QueryString) GoString() string {
  14652. return s.String()
  14653. }
  14654. // A rate-based rule tracks the rate of requests for each originating IP address,
  14655. // and triggers the rule action when the rate exceeds a limit that you specify
  14656. // on the number of requests in any 5-minute time span. You can use this to
  14657. // put a temporary block on requests from an IP address that is sending excessive
  14658. // requests.
  14659. //
  14660. // WAF tracks and manages web requests separately for each instance of a rate-based
  14661. // rule that you use. For example, if you provide the same rate-based rule settings
  14662. // in two web ACLs, each of the two rule statements represents a separate instance
  14663. // of the rate-based rule and gets its own tracking and management by WAF. If
  14664. // you define a rate-based rule inside a rule group, and then use that rule
  14665. // group in multiple places, each use creates a separate instance of the rate-based
  14666. // rule that gets its own tracking and management by WAF.
  14667. //
  14668. // When the rule action triggers, WAF blocks additional requests from the IP
  14669. // address until the request rate falls below the limit.
  14670. //
  14671. // You can optionally nest another statement inside the rate-based statement,
  14672. // to narrow the scope of the rule so that it only counts requests that match
  14673. // the nested statement. For example, based on recent requests that you have
  14674. // seen from an attacker, you might create a rate-based rule with a nested AND
  14675. // rule statement that contains the following nested statements:
  14676. //
  14677. // - An IP match statement with an IP set that specified the address 192.0.2.44.
  14678. //
  14679. // - A string match statement that searches in the User-Agent header for
  14680. // the string BadBot.
  14681. //
  14682. // In this rate-based rule, you also define a rate limit. For this example,
  14683. // the rate limit is 1,000. Requests that meet the criteria of both of the nested
  14684. // statements are counted. If the count exceeds 1,000 requests per five minutes,
  14685. // the rule action triggers. Requests that do not meet the criteria of both
  14686. // of the nested statements are not counted towards the rate limit and are not
  14687. // affected by this rule.
  14688. //
  14689. // You cannot nest a RateBasedStatement inside another statement, for example
  14690. // inside a NotStatement or OrStatement. You can define a RateBasedStatement
  14691. // inside a web ACL and inside a rule group.
  14692. type RateBasedStatement struct {
  14693. _ struct{} `type:"structure"`
  14694. // Setting that indicates how to aggregate the request counts. The options are
  14695. // the following:
  14696. //
  14697. // * IP - Aggregate the request counts on the IP address from the web request
  14698. // origin.
  14699. //
  14700. // * FORWARDED_IP - Aggregate the request counts on the first IP address
  14701. // in an HTTP header. If you use this, configure the ForwardedIPConfig, to
  14702. // specify the header to use.
  14703. //
  14704. // AggregateKeyType is a required field
  14705. AggregateKeyType *string `type:"string" required:"true" enum:"RateBasedStatementAggregateKeyType"`
  14706. // The configuration for inspecting IP addresses in an HTTP header that you
  14707. // specify, instead of using the IP address that's reported by the web request
  14708. // origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify
  14709. // any header name.
  14710. //
  14711. // If the specified header isn't present in the request, WAF doesn't apply the
  14712. // rule to the web request at all.
  14713. //
  14714. // This is required if AggregateKeyType is set to FORWARDED_IP.
  14715. ForwardedIPConfig *ForwardedIPConfig `type:"structure"`
  14716. // The limit on requests per 5-minute period for a single originating IP address.
  14717. // If the statement includes a ScopeDownStatement, this limit is applied only
  14718. // to the requests that match the statement.
  14719. //
  14720. // Limit is a required field
  14721. Limit *int64 `min:"100" type:"long" required:"true"`
  14722. // An optional nested statement that narrows the scope of the web requests that
  14723. // are evaluated by the rate-based statement. Requests are only tracked by the
  14724. // rate-based statement if they match the scope-down statement. You can use
  14725. // any nestable Statement in the scope-down statement, and you can nest statements
  14726. // at any level, the same as you can for a rule statement.
  14727. ScopeDownStatement *Statement `type:"structure"`
  14728. }
  14729. // String returns the string representation.
  14730. //
  14731. // API parameter values that are decorated as "sensitive" in the API will not
  14732. // be included in the string output. The member name will be present, but the
  14733. // value will be replaced with "sensitive".
  14734. func (s RateBasedStatement) String() string {
  14735. return awsutil.Prettify(s)
  14736. }
  14737. // GoString returns the string representation.
  14738. //
  14739. // API parameter values that are decorated as "sensitive" in the API will not
  14740. // be included in the string output. The member name will be present, but the
  14741. // value will be replaced with "sensitive".
  14742. func (s RateBasedStatement) GoString() string {
  14743. return s.String()
  14744. }
  14745. // Validate inspects the fields of the type to determine if they are valid.
  14746. func (s *RateBasedStatement) Validate() error {
  14747. invalidParams := request.ErrInvalidParams{Context: "RateBasedStatement"}
  14748. if s.AggregateKeyType == nil {
  14749. invalidParams.Add(request.NewErrParamRequired("AggregateKeyType"))
  14750. }
  14751. if s.Limit == nil {
  14752. invalidParams.Add(request.NewErrParamRequired("Limit"))
  14753. }
  14754. if s.Limit != nil && *s.Limit < 100 {
  14755. invalidParams.Add(request.NewErrParamMinValue("Limit", 100))
  14756. }
  14757. if s.ForwardedIPConfig != nil {
  14758. if err := s.ForwardedIPConfig.Validate(); err != nil {
  14759. invalidParams.AddNested("ForwardedIPConfig", err.(request.ErrInvalidParams))
  14760. }
  14761. }
  14762. if s.ScopeDownStatement != nil {
  14763. if err := s.ScopeDownStatement.Validate(); err != nil {
  14764. invalidParams.AddNested("ScopeDownStatement", err.(request.ErrInvalidParams))
  14765. }
  14766. }
  14767. if invalidParams.Len() > 0 {
  14768. return invalidParams
  14769. }
  14770. return nil
  14771. }
  14772. // SetAggregateKeyType sets the AggregateKeyType field's value.
  14773. func (s *RateBasedStatement) SetAggregateKeyType(v string) *RateBasedStatement {
  14774. s.AggregateKeyType = &v
  14775. return s
  14776. }
  14777. // SetForwardedIPConfig sets the ForwardedIPConfig field's value.
  14778. func (s *RateBasedStatement) SetForwardedIPConfig(v *ForwardedIPConfig) *RateBasedStatement {
  14779. s.ForwardedIPConfig = v
  14780. return s
  14781. }
  14782. // SetLimit sets the Limit field's value.
  14783. func (s *RateBasedStatement) SetLimit(v int64) *RateBasedStatement {
  14784. s.Limit = &v
  14785. return s
  14786. }
  14787. // SetScopeDownStatement sets the ScopeDownStatement field's value.
  14788. func (s *RateBasedStatement) SetScopeDownStatement(v *Statement) *RateBasedStatement {
  14789. s.ScopeDownStatement = v
  14790. return s
  14791. }
  14792. // The set of IP addresses that are currently blocked for a RateBasedStatement.
  14793. type RateBasedStatementManagedKeysIPSet struct {
  14794. _ struct{} `type:"structure"`
  14795. // The IP addresses that are currently blocked.
  14796. Addresses []*string `type:"list"`
  14797. // The version of the IP addresses, either IPV4 or IPV6.
  14798. IPAddressVersion *string `type:"string" enum:"IPAddressVersion"`
  14799. }
  14800. // String returns the string representation.
  14801. //
  14802. // API parameter values that are decorated as "sensitive" in the API will not
  14803. // be included in the string output. The member name will be present, but the
  14804. // value will be replaced with "sensitive".
  14805. func (s RateBasedStatementManagedKeysIPSet) String() string {
  14806. return awsutil.Prettify(s)
  14807. }
  14808. // GoString returns the string representation.
  14809. //
  14810. // API parameter values that are decorated as "sensitive" in the API will not
  14811. // be included in the string output. The member name will be present, but the
  14812. // value will be replaced with "sensitive".
  14813. func (s RateBasedStatementManagedKeysIPSet) GoString() string {
  14814. return s.String()
  14815. }
  14816. // SetAddresses sets the Addresses field's value.
  14817. func (s *RateBasedStatementManagedKeysIPSet) SetAddresses(v []*string) *RateBasedStatementManagedKeysIPSet {
  14818. s.Addresses = v
  14819. return s
  14820. }
  14821. // SetIPAddressVersion sets the IPAddressVersion field's value.
  14822. func (s *RateBasedStatementManagedKeysIPSet) SetIPAddressVersion(v string) *RateBasedStatementManagedKeysIPSet {
  14823. s.IPAddressVersion = &v
  14824. return s
  14825. }
  14826. // A single regular expression. This is used in a RegexPatternSet.
  14827. type Regex struct {
  14828. _ struct{} `type:"structure"`
  14829. // The string representing the regular expression.
  14830. RegexString *string `min:"1" type:"string"`
  14831. }
  14832. // String returns the string representation.
  14833. //
  14834. // API parameter values that are decorated as "sensitive" in the API will not
  14835. // be included in the string output. The member name will be present, but the
  14836. // value will be replaced with "sensitive".
  14837. func (s Regex) String() string {
  14838. return awsutil.Prettify(s)
  14839. }
  14840. // GoString returns the string representation.
  14841. //
  14842. // API parameter values that are decorated as "sensitive" in the API will not
  14843. // be included in the string output. The member name will be present, but the
  14844. // value will be replaced with "sensitive".
  14845. func (s Regex) GoString() string {
  14846. return s.String()
  14847. }
  14848. // Validate inspects the fields of the type to determine if they are valid.
  14849. func (s *Regex) Validate() error {
  14850. invalidParams := request.ErrInvalidParams{Context: "Regex"}
  14851. if s.RegexString != nil && len(*s.RegexString) < 1 {
  14852. invalidParams.Add(request.NewErrParamMinLen("RegexString", 1))
  14853. }
  14854. if invalidParams.Len() > 0 {
  14855. return invalidParams
  14856. }
  14857. return nil
  14858. }
  14859. // SetRegexString sets the RegexString field's value.
  14860. func (s *Regex) SetRegexString(v string) *Regex {
  14861. s.RegexString = &v
  14862. return s
  14863. }
  14864. // A rule statement used to search web request components for a match against
  14865. // a single regular expression.
  14866. type RegexMatchStatement struct {
  14867. _ struct{} `type:"structure"`
  14868. // The part of the web request that you want WAF to inspect.
  14869. //
  14870. // FieldToMatch is a required field
  14871. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  14872. // The string representing the regular expression.
  14873. //
  14874. // RegexString is a required field
  14875. RegexString *string `min:"1" type:"string" required:"true"`
  14876. // Text transformations eliminate some of the unusual formatting that attackers
  14877. // use in web requests in an effort to bypass detection. If you specify one
  14878. // or more transformations in a rule statement, WAF performs all transformations
  14879. // on the content of the request component identified by FieldToMatch, starting
  14880. // from the lowest priority setting, before inspecting the content for a match.
  14881. //
  14882. // TextTransformations is a required field
  14883. TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"`
  14884. }
  14885. // String returns the string representation.
  14886. //
  14887. // API parameter values that are decorated as "sensitive" in the API will not
  14888. // be included in the string output. The member name will be present, but the
  14889. // value will be replaced with "sensitive".
  14890. func (s RegexMatchStatement) String() string {
  14891. return awsutil.Prettify(s)
  14892. }
  14893. // GoString returns the string representation.
  14894. //
  14895. // API parameter values that are decorated as "sensitive" in the API will not
  14896. // be included in the string output. The member name will be present, but the
  14897. // value will be replaced with "sensitive".
  14898. func (s RegexMatchStatement) GoString() string {
  14899. return s.String()
  14900. }
  14901. // Validate inspects the fields of the type to determine if they are valid.
  14902. func (s *RegexMatchStatement) Validate() error {
  14903. invalidParams := request.ErrInvalidParams{Context: "RegexMatchStatement"}
  14904. if s.FieldToMatch == nil {
  14905. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  14906. }
  14907. if s.RegexString == nil {
  14908. invalidParams.Add(request.NewErrParamRequired("RegexString"))
  14909. }
  14910. if s.RegexString != nil && len(*s.RegexString) < 1 {
  14911. invalidParams.Add(request.NewErrParamMinLen("RegexString", 1))
  14912. }
  14913. if s.TextTransformations == nil {
  14914. invalidParams.Add(request.NewErrParamRequired("TextTransformations"))
  14915. }
  14916. if s.TextTransformations != nil && len(s.TextTransformations) < 1 {
  14917. invalidParams.Add(request.NewErrParamMinLen("TextTransformations", 1))
  14918. }
  14919. if s.FieldToMatch != nil {
  14920. if err := s.FieldToMatch.Validate(); err != nil {
  14921. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  14922. }
  14923. }
  14924. if s.TextTransformations != nil {
  14925. for i, v := range s.TextTransformations {
  14926. if v == nil {
  14927. continue
  14928. }
  14929. if err := v.Validate(); err != nil {
  14930. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TextTransformations", i), err.(request.ErrInvalidParams))
  14931. }
  14932. }
  14933. }
  14934. if invalidParams.Len() > 0 {
  14935. return invalidParams
  14936. }
  14937. return nil
  14938. }
  14939. // SetFieldToMatch sets the FieldToMatch field's value.
  14940. func (s *RegexMatchStatement) SetFieldToMatch(v *FieldToMatch) *RegexMatchStatement {
  14941. s.FieldToMatch = v
  14942. return s
  14943. }
  14944. // SetRegexString sets the RegexString field's value.
  14945. func (s *RegexMatchStatement) SetRegexString(v string) *RegexMatchStatement {
  14946. s.RegexString = &v
  14947. return s
  14948. }
  14949. // SetTextTransformations sets the TextTransformations field's value.
  14950. func (s *RegexMatchStatement) SetTextTransformations(v []*TextTransformation) *RegexMatchStatement {
  14951. s.TextTransformations = v
  14952. return s
  14953. }
  14954. // Contains one or more regular expressions.
  14955. //
  14956. // WAF assigns an ARN to each RegexPatternSet that you create. To use a set
  14957. // in a rule, you provide the ARN to the Rule statement RegexPatternSetReferenceStatement.
  14958. type RegexPatternSet struct {
  14959. _ struct{} `type:"structure"`
  14960. // The Amazon Resource Name (ARN) of the entity.
  14961. ARN *string `min:"20" type:"string"`
  14962. // A description of the set that helps with identification.
  14963. Description *string `min:"1" type:"string"`
  14964. // A unique identifier for the set. This ID is returned in the responses to
  14965. // create and list commands. You provide it to operations like update and delete.
  14966. Id *string `min:"1" type:"string"`
  14967. // The name of the set. You cannot change the name after you create the set.
  14968. Name *string `min:"1" type:"string"`
  14969. // The regular expression patterns in the set.
  14970. RegularExpressionList []*Regex `type:"list"`
  14971. }
  14972. // String returns the string representation.
  14973. //
  14974. // API parameter values that are decorated as "sensitive" in the API will not
  14975. // be included in the string output. The member name will be present, but the
  14976. // value will be replaced with "sensitive".
  14977. func (s RegexPatternSet) String() string {
  14978. return awsutil.Prettify(s)
  14979. }
  14980. // GoString returns the string representation.
  14981. //
  14982. // API parameter values that are decorated as "sensitive" in the API will not
  14983. // be included in the string output. The member name will be present, but the
  14984. // value will be replaced with "sensitive".
  14985. func (s RegexPatternSet) GoString() string {
  14986. return s.String()
  14987. }
  14988. // SetARN sets the ARN field's value.
  14989. func (s *RegexPatternSet) SetARN(v string) *RegexPatternSet {
  14990. s.ARN = &v
  14991. return s
  14992. }
  14993. // SetDescription sets the Description field's value.
  14994. func (s *RegexPatternSet) SetDescription(v string) *RegexPatternSet {
  14995. s.Description = &v
  14996. return s
  14997. }
  14998. // SetId sets the Id field's value.
  14999. func (s *RegexPatternSet) SetId(v string) *RegexPatternSet {
  15000. s.Id = &v
  15001. return s
  15002. }
  15003. // SetName sets the Name field's value.
  15004. func (s *RegexPatternSet) SetName(v string) *RegexPatternSet {
  15005. s.Name = &v
  15006. return s
  15007. }
  15008. // SetRegularExpressionList sets the RegularExpressionList field's value.
  15009. func (s *RegexPatternSet) SetRegularExpressionList(v []*Regex) *RegexPatternSet {
  15010. s.RegularExpressionList = v
  15011. return s
  15012. }
  15013. // A rule statement used to search web request components for matches with regular
  15014. // expressions. To use this, create a RegexPatternSet that specifies the expressions
  15015. // that you want to detect, then use the ARN of that set in this statement.
  15016. // A web request matches the pattern set rule statement if the request component
  15017. // matches any of the patterns in the set. To create a regex pattern set, see
  15018. // CreateRegexPatternSet.
  15019. //
  15020. // Each regex pattern set rule statement references a regex pattern set. You
  15021. // create and maintain the set independent of your rules. This allows you to
  15022. // use the single set in multiple rules. When you update the referenced set,
  15023. // WAF automatically updates all rules that reference it.
  15024. type RegexPatternSetReferenceStatement struct {
  15025. _ struct{} `type:"structure"`
  15026. // The Amazon Resource Name (ARN) of the RegexPatternSet that this statement
  15027. // references.
  15028. //
  15029. // ARN is a required field
  15030. ARN *string `min:"20" type:"string" required:"true"`
  15031. // The part of the web request that you want WAF to inspect.
  15032. //
  15033. // FieldToMatch is a required field
  15034. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  15035. // Text transformations eliminate some of the unusual formatting that attackers
  15036. // use in web requests in an effort to bypass detection. If you specify one
  15037. // or more transformations in a rule statement, WAF performs all transformations
  15038. // on the content of the request component identified by FieldToMatch, starting
  15039. // from the lowest priority setting, before inspecting the content for a match.
  15040. //
  15041. // TextTransformations is a required field
  15042. TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"`
  15043. }
  15044. // String returns the string representation.
  15045. //
  15046. // API parameter values that are decorated as "sensitive" in the API will not
  15047. // be included in the string output. The member name will be present, but the
  15048. // value will be replaced with "sensitive".
  15049. func (s RegexPatternSetReferenceStatement) String() string {
  15050. return awsutil.Prettify(s)
  15051. }
  15052. // GoString returns the string representation.
  15053. //
  15054. // API parameter values that are decorated as "sensitive" in the API will not
  15055. // be included in the string output. The member name will be present, but the
  15056. // value will be replaced with "sensitive".
  15057. func (s RegexPatternSetReferenceStatement) GoString() string {
  15058. return s.String()
  15059. }
  15060. // Validate inspects the fields of the type to determine if they are valid.
  15061. func (s *RegexPatternSetReferenceStatement) Validate() error {
  15062. invalidParams := request.ErrInvalidParams{Context: "RegexPatternSetReferenceStatement"}
  15063. if s.ARN == nil {
  15064. invalidParams.Add(request.NewErrParamRequired("ARN"))
  15065. }
  15066. if s.ARN != nil && len(*s.ARN) < 20 {
  15067. invalidParams.Add(request.NewErrParamMinLen("ARN", 20))
  15068. }
  15069. if s.FieldToMatch == nil {
  15070. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  15071. }
  15072. if s.TextTransformations == nil {
  15073. invalidParams.Add(request.NewErrParamRequired("TextTransformations"))
  15074. }
  15075. if s.TextTransformations != nil && len(s.TextTransformations) < 1 {
  15076. invalidParams.Add(request.NewErrParamMinLen("TextTransformations", 1))
  15077. }
  15078. if s.FieldToMatch != nil {
  15079. if err := s.FieldToMatch.Validate(); err != nil {
  15080. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  15081. }
  15082. }
  15083. if s.TextTransformations != nil {
  15084. for i, v := range s.TextTransformations {
  15085. if v == nil {
  15086. continue
  15087. }
  15088. if err := v.Validate(); err != nil {
  15089. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TextTransformations", i), err.(request.ErrInvalidParams))
  15090. }
  15091. }
  15092. }
  15093. if invalidParams.Len() > 0 {
  15094. return invalidParams
  15095. }
  15096. return nil
  15097. }
  15098. // SetARN sets the ARN field's value.
  15099. func (s *RegexPatternSetReferenceStatement) SetARN(v string) *RegexPatternSetReferenceStatement {
  15100. s.ARN = &v
  15101. return s
  15102. }
  15103. // SetFieldToMatch sets the FieldToMatch field's value.
  15104. func (s *RegexPatternSetReferenceStatement) SetFieldToMatch(v *FieldToMatch) *RegexPatternSetReferenceStatement {
  15105. s.FieldToMatch = v
  15106. return s
  15107. }
  15108. // SetTextTransformations sets the TextTransformations field's value.
  15109. func (s *RegexPatternSetReferenceStatement) SetTextTransformations(v []*TextTransformation) *RegexPatternSetReferenceStatement {
  15110. s.TextTransformations = v
  15111. return s
  15112. }
  15113. // High-level information about a RegexPatternSet, returned by operations like
  15114. // create and list. This provides information like the ID, that you can use
  15115. // to retrieve and manage a RegexPatternSet, and the ARN, that you provide to
  15116. // the RegexPatternSetReferenceStatement to use the pattern set in a Rule.
  15117. type RegexPatternSetSummary struct {
  15118. _ struct{} `type:"structure"`
  15119. // The Amazon Resource Name (ARN) of the entity.
  15120. ARN *string `min:"20" type:"string"`
  15121. // A description of the set that helps with identification.
  15122. Description *string `min:"1" type:"string"`
  15123. // A unique identifier for the set. This ID is returned in the responses to
  15124. // create and list commands. You provide it to operations like update and delete.
  15125. Id *string `min:"1" type:"string"`
  15126. // A token used for optimistic locking. WAF returns a token to your get and
  15127. // list requests, to mark the state of the entity at the time of the request.
  15128. // To make changes to the entity associated with the token, you provide the
  15129. // token to operations like update and delete. WAF uses the token to ensure
  15130. // that no changes have been made to the entity since you last retrieved it.
  15131. // If a change has been made, the update fails with a WAFOptimisticLockException.
  15132. // If this happens, perform another get, and use the new token returned by that
  15133. // operation.
  15134. LockToken *string `min:"1" type:"string"`
  15135. // The name of the data type instance. You cannot change the name after you
  15136. // create the instance.
  15137. Name *string `min:"1" type:"string"`
  15138. }
  15139. // String returns the string representation.
  15140. //
  15141. // API parameter values that are decorated as "sensitive" in the API will not
  15142. // be included in the string output. The member name will be present, but the
  15143. // value will be replaced with "sensitive".
  15144. func (s RegexPatternSetSummary) String() string {
  15145. return awsutil.Prettify(s)
  15146. }
  15147. // GoString returns the string representation.
  15148. //
  15149. // API parameter values that are decorated as "sensitive" in the API will not
  15150. // be included in the string output. The member name will be present, but the
  15151. // value will be replaced with "sensitive".
  15152. func (s RegexPatternSetSummary) GoString() string {
  15153. return s.String()
  15154. }
  15155. // SetARN sets the ARN field's value.
  15156. func (s *RegexPatternSetSummary) SetARN(v string) *RegexPatternSetSummary {
  15157. s.ARN = &v
  15158. return s
  15159. }
  15160. // SetDescription sets the Description field's value.
  15161. func (s *RegexPatternSetSummary) SetDescription(v string) *RegexPatternSetSummary {
  15162. s.Description = &v
  15163. return s
  15164. }
  15165. // SetId sets the Id field's value.
  15166. func (s *RegexPatternSetSummary) SetId(v string) *RegexPatternSetSummary {
  15167. s.Id = &v
  15168. return s
  15169. }
  15170. // SetLockToken sets the LockToken field's value.
  15171. func (s *RegexPatternSetSummary) SetLockToken(v string) *RegexPatternSetSummary {
  15172. s.LockToken = &v
  15173. return s
  15174. }
  15175. // SetName sets the Name field's value.
  15176. func (s *RegexPatternSetSummary) SetName(v string) *RegexPatternSetSummary {
  15177. s.Name = &v
  15178. return s
  15179. }
  15180. // High level information for an SDK release.
  15181. type ReleaseSummary struct {
  15182. _ struct{} `type:"structure"`
  15183. // The release version.
  15184. ReleaseVersion *string `min:"1" type:"string"`
  15185. // The timestamp of the release.
  15186. Timestamp *time.Time `type:"timestamp"`
  15187. }
  15188. // String returns the string representation.
  15189. //
  15190. // API parameter values that are decorated as "sensitive" in the API will not
  15191. // be included in the string output. The member name will be present, but the
  15192. // value will be replaced with "sensitive".
  15193. func (s ReleaseSummary) String() string {
  15194. return awsutil.Prettify(s)
  15195. }
  15196. // GoString returns the string representation.
  15197. //
  15198. // API parameter values that are decorated as "sensitive" in the API will not
  15199. // be included in the string output. The member name will be present, but the
  15200. // value will be replaced with "sensitive".
  15201. func (s ReleaseSummary) GoString() string {
  15202. return s.String()
  15203. }
  15204. // SetReleaseVersion sets the ReleaseVersion field's value.
  15205. func (s *ReleaseSummary) SetReleaseVersion(v string) *ReleaseSummary {
  15206. s.ReleaseVersion = &v
  15207. return s
  15208. }
  15209. // SetTimestamp sets the Timestamp field's value.
  15210. func (s *ReleaseSummary) SetTimestamp(v time.Time) *ReleaseSummary {
  15211. s.Timestamp = &v
  15212. return s
  15213. }
  15214. // A single rule, which you can use in a WebACL or RuleGroup to identify web
  15215. // requests that you want to allow, block, or count. Each rule includes one
  15216. // top-level Statement that WAF uses to identify matching web requests, and
  15217. // parameters that govern how WAF handles them.
  15218. type Rule struct {
  15219. _ struct{} `type:"structure"`
  15220. // The action that WAF should take on a web request when it matches the rule
  15221. // statement. Settings at the web ACL level can override the rule action setting.
  15222. //
  15223. // This is used only for rules whose statements do not reference a rule group.
  15224. // Rule statements that reference a rule group include RuleGroupReferenceStatement
  15225. // and ManagedRuleGroupStatement.
  15226. //
  15227. // You must specify either this Action setting or the rule OverrideAction setting,
  15228. // but not both:
  15229. //
  15230. // * If the rule statement does not reference a rule group, use this rule
  15231. // action setting and not the rule override action setting.
  15232. //
  15233. // * If the rule statement references a rule group, use the override action
  15234. // setting and not this action setting.
  15235. Action *RuleAction `type:"structure"`
  15236. // Specifies how WAF should handle CAPTCHA evaluations. If you don't specify
  15237. // this, WAF uses the CAPTCHA configuration that's defined for the web ACL.
  15238. CaptchaConfig *CaptchaConfig `type:"structure"`
  15239. // Specifies how WAF should handle Challenge evaluations. If you don't specify
  15240. // this, WAF uses the challenge configuration that's defined for the web ACL.
  15241. ChallengeConfig *ChallengeConfig `type:"structure"`
  15242. // The name of the rule. You can't change the name of a Rule after you create
  15243. // it.
  15244. //
  15245. // Name is a required field
  15246. Name *string `min:"1" type:"string" required:"true"`
  15247. // The action to use in the place of the action that results from the rule group
  15248. // evaluation. Set the override action to none to leave the result of the rule
  15249. // group alone. Set it to count to override the result to count only.
  15250. //
  15251. // You can only use this for rule statements that reference a rule group, like
  15252. // RuleGroupReferenceStatement and ManagedRuleGroupStatement.
  15253. //
  15254. // This option is usually set to none. It does not affect how the rules in the
  15255. // rule group are evaluated. If you want the rules in the rule group to only
  15256. // count matches, do not use this and instead use the rule action override option,
  15257. // with Count action, in your rule group reference statement settings.
  15258. OverrideAction *OverrideAction `type:"structure"`
  15259. // If you define more than one Rule in a WebACL, WAF evaluates each request
  15260. // against the Rules in order based on the value of Priority. WAF processes
  15261. // rules with lower priority first. The priorities don't need to be consecutive,
  15262. // but they must all be different.
  15263. //
  15264. // Priority is a required field
  15265. Priority *int64 `type:"integer" required:"true"`
  15266. // Labels to apply to web requests that match the rule match statement. WAF
  15267. // applies fully qualified labels to matching web requests. A fully qualified
  15268. // label is the concatenation of a label namespace and a rule label. The rule's
  15269. // rule group or web ACL defines the label namespace.
  15270. //
  15271. // Rules that run after this rule in the web ACL can match against these labels
  15272. // using a LabelMatchStatement.
  15273. //
  15274. // For each label, provide a case-sensitive string containing optional namespaces
  15275. // and a label name, according to the following guidelines:
  15276. //
  15277. // * Separate each component of the label with a colon.
  15278. //
  15279. // * Each namespace or name can have up to 128 characters.
  15280. //
  15281. // * You can specify up to 5 namespaces in a label.
  15282. //
  15283. // * Don't use the following reserved words in your label specification:
  15284. // aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.
  15285. //
  15286. // For example, myLabelName or nameSpace1:nameSpace2:myLabelName.
  15287. RuleLabels []*Label `type:"list"`
  15288. // The WAF processing statement for the rule, for example ByteMatchStatement
  15289. // or SizeConstraintStatement.
  15290. //
  15291. // Statement is a required field
  15292. Statement *Statement `type:"structure" required:"true"`
  15293. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  15294. //
  15295. // VisibilityConfig is a required field
  15296. VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
  15297. }
  15298. // String returns the string representation.
  15299. //
  15300. // API parameter values that are decorated as "sensitive" in the API will not
  15301. // be included in the string output. The member name will be present, but the
  15302. // value will be replaced with "sensitive".
  15303. func (s Rule) String() string {
  15304. return awsutil.Prettify(s)
  15305. }
  15306. // GoString returns the string representation.
  15307. //
  15308. // API parameter values that are decorated as "sensitive" in the API will not
  15309. // be included in the string output. The member name will be present, but the
  15310. // value will be replaced with "sensitive".
  15311. func (s Rule) GoString() string {
  15312. return s.String()
  15313. }
  15314. // Validate inspects the fields of the type to determine if they are valid.
  15315. func (s *Rule) Validate() error {
  15316. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  15317. if s.Name == nil {
  15318. invalidParams.Add(request.NewErrParamRequired("Name"))
  15319. }
  15320. if s.Name != nil && len(*s.Name) < 1 {
  15321. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  15322. }
  15323. if s.Priority == nil {
  15324. invalidParams.Add(request.NewErrParamRequired("Priority"))
  15325. }
  15326. if s.Statement == nil {
  15327. invalidParams.Add(request.NewErrParamRequired("Statement"))
  15328. }
  15329. if s.VisibilityConfig == nil {
  15330. invalidParams.Add(request.NewErrParamRequired("VisibilityConfig"))
  15331. }
  15332. if s.Action != nil {
  15333. if err := s.Action.Validate(); err != nil {
  15334. invalidParams.AddNested("Action", err.(request.ErrInvalidParams))
  15335. }
  15336. }
  15337. if s.CaptchaConfig != nil {
  15338. if err := s.CaptchaConfig.Validate(); err != nil {
  15339. invalidParams.AddNested("CaptchaConfig", err.(request.ErrInvalidParams))
  15340. }
  15341. }
  15342. if s.ChallengeConfig != nil {
  15343. if err := s.ChallengeConfig.Validate(); err != nil {
  15344. invalidParams.AddNested("ChallengeConfig", err.(request.ErrInvalidParams))
  15345. }
  15346. }
  15347. if s.OverrideAction != nil {
  15348. if err := s.OverrideAction.Validate(); err != nil {
  15349. invalidParams.AddNested("OverrideAction", err.(request.ErrInvalidParams))
  15350. }
  15351. }
  15352. if s.RuleLabels != nil {
  15353. for i, v := range s.RuleLabels {
  15354. if v == nil {
  15355. continue
  15356. }
  15357. if err := v.Validate(); err != nil {
  15358. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RuleLabels", i), err.(request.ErrInvalidParams))
  15359. }
  15360. }
  15361. }
  15362. if s.Statement != nil {
  15363. if err := s.Statement.Validate(); err != nil {
  15364. invalidParams.AddNested("Statement", err.(request.ErrInvalidParams))
  15365. }
  15366. }
  15367. if s.VisibilityConfig != nil {
  15368. if err := s.VisibilityConfig.Validate(); err != nil {
  15369. invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams))
  15370. }
  15371. }
  15372. if invalidParams.Len() > 0 {
  15373. return invalidParams
  15374. }
  15375. return nil
  15376. }
  15377. // SetAction sets the Action field's value.
  15378. func (s *Rule) SetAction(v *RuleAction) *Rule {
  15379. s.Action = v
  15380. return s
  15381. }
  15382. // SetCaptchaConfig sets the CaptchaConfig field's value.
  15383. func (s *Rule) SetCaptchaConfig(v *CaptchaConfig) *Rule {
  15384. s.CaptchaConfig = v
  15385. return s
  15386. }
  15387. // SetChallengeConfig sets the ChallengeConfig field's value.
  15388. func (s *Rule) SetChallengeConfig(v *ChallengeConfig) *Rule {
  15389. s.ChallengeConfig = v
  15390. return s
  15391. }
  15392. // SetName sets the Name field's value.
  15393. func (s *Rule) SetName(v string) *Rule {
  15394. s.Name = &v
  15395. return s
  15396. }
  15397. // SetOverrideAction sets the OverrideAction field's value.
  15398. func (s *Rule) SetOverrideAction(v *OverrideAction) *Rule {
  15399. s.OverrideAction = v
  15400. return s
  15401. }
  15402. // SetPriority sets the Priority field's value.
  15403. func (s *Rule) SetPriority(v int64) *Rule {
  15404. s.Priority = &v
  15405. return s
  15406. }
  15407. // SetRuleLabels sets the RuleLabels field's value.
  15408. func (s *Rule) SetRuleLabels(v []*Label) *Rule {
  15409. s.RuleLabels = v
  15410. return s
  15411. }
  15412. // SetStatement sets the Statement field's value.
  15413. func (s *Rule) SetStatement(v *Statement) *Rule {
  15414. s.Statement = v
  15415. return s
  15416. }
  15417. // SetVisibilityConfig sets the VisibilityConfig field's value.
  15418. func (s *Rule) SetVisibilityConfig(v *VisibilityConfig) *Rule {
  15419. s.VisibilityConfig = v
  15420. return s
  15421. }
  15422. // The action that WAF should take on a web request when it matches a rule's
  15423. // statement. Settings at the web ACL level can override the rule action setting.
  15424. type RuleAction struct {
  15425. _ struct{} `type:"structure"`
  15426. // Instructs WAF to allow the web request.
  15427. Allow *AllowAction `type:"structure"`
  15428. // Instructs WAF to block the web request.
  15429. Block *BlockAction `type:"structure"`
  15430. // Instructs WAF to run a CAPTCHA check against the web request.
  15431. Captcha *CaptchaAction `type:"structure"`
  15432. // Instructs WAF to run a Challenge check against the web request.
  15433. Challenge *ChallengeAction `type:"structure"`
  15434. // Instructs WAF to count the web request and then continue evaluating the request
  15435. // using the remaining rules in the web ACL.
  15436. Count *CountAction `type:"structure"`
  15437. }
  15438. // String returns the string representation.
  15439. //
  15440. // API parameter values that are decorated as "sensitive" in the API will not
  15441. // be included in the string output. The member name will be present, but the
  15442. // value will be replaced with "sensitive".
  15443. func (s RuleAction) String() string {
  15444. return awsutil.Prettify(s)
  15445. }
  15446. // GoString returns the string representation.
  15447. //
  15448. // API parameter values that are decorated as "sensitive" in the API will not
  15449. // be included in the string output. The member name will be present, but the
  15450. // value will be replaced with "sensitive".
  15451. func (s RuleAction) GoString() string {
  15452. return s.String()
  15453. }
  15454. // Validate inspects the fields of the type to determine if they are valid.
  15455. func (s *RuleAction) Validate() error {
  15456. invalidParams := request.ErrInvalidParams{Context: "RuleAction"}
  15457. if s.Allow != nil {
  15458. if err := s.Allow.Validate(); err != nil {
  15459. invalidParams.AddNested("Allow", err.(request.ErrInvalidParams))
  15460. }
  15461. }
  15462. if s.Block != nil {
  15463. if err := s.Block.Validate(); err != nil {
  15464. invalidParams.AddNested("Block", err.(request.ErrInvalidParams))
  15465. }
  15466. }
  15467. if s.Captcha != nil {
  15468. if err := s.Captcha.Validate(); err != nil {
  15469. invalidParams.AddNested("Captcha", err.(request.ErrInvalidParams))
  15470. }
  15471. }
  15472. if s.Challenge != nil {
  15473. if err := s.Challenge.Validate(); err != nil {
  15474. invalidParams.AddNested("Challenge", err.(request.ErrInvalidParams))
  15475. }
  15476. }
  15477. if s.Count != nil {
  15478. if err := s.Count.Validate(); err != nil {
  15479. invalidParams.AddNested("Count", err.(request.ErrInvalidParams))
  15480. }
  15481. }
  15482. if invalidParams.Len() > 0 {
  15483. return invalidParams
  15484. }
  15485. return nil
  15486. }
  15487. // SetAllow sets the Allow field's value.
  15488. func (s *RuleAction) SetAllow(v *AllowAction) *RuleAction {
  15489. s.Allow = v
  15490. return s
  15491. }
  15492. // SetBlock sets the Block field's value.
  15493. func (s *RuleAction) SetBlock(v *BlockAction) *RuleAction {
  15494. s.Block = v
  15495. return s
  15496. }
  15497. // SetCaptcha sets the Captcha field's value.
  15498. func (s *RuleAction) SetCaptcha(v *CaptchaAction) *RuleAction {
  15499. s.Captcha = v
  15500. return s
  15501. }
  15502. // SetChallenge sets the Challenge field's value.
  15503. func (s *RuleAction) SetChallenge(v *ChallengeAction) *RuleAction {
  15504. s.Challenge = v
  15505. return s
  15506. }
  15507. // SetCount sets the Count field's value.
  15508. func (s *RuleAction) SetCount(v *CountAction) *RuleAction {
  15509. s.Count = v
  15510. return s
  15511. }
  15512. // Action setting to use in the place of a rule action that is configured inside
  15513. // the rule group. You specify one override for each rule whose action you want
  15514. // to change.
  15515. //
  15516. // You can use overrides for testing, for example you can override all of rule
  15517. // actions to Count and then monitor the resulting count metrics to understand
  15518. // how the rule group would handle your web traffic. You can also permanently
  15519. // override some or all actions, to modify how the rule group manages your web
  15520. // traffic.
  15521. type RuleActionOverride struct {
  15522. _ struct{} `type:"structure"`
  15523. // The override action to use, in place of the configured action of the rule
  15524. // in the rule group.
  15525. //
  15526. // ActionToUse is a required field
  15527. ActionToUse *RuleAction `type:"structure" required:"true"`
  15528. // The name of the rule to override.
  15529. //
  15530. // Name is a required field
  15531. Name *string `min:"1" type:"string" required:"true"`
  15532. }
  15533. // String returns the string representation.
  15534. //
  15535. // API parameter values that are decorated as "sensitive" in the API will not
  15536. // be included in the string output. The member name will be present, but the
  15537. // value will be replaced with "sensitive".
  15538. func (s RuleActionOverride) String() string {
  15539. return awsutil.Prettify(s)
  15540. }
  15541. // GoString returns the string representation.
  15542. //
  15543. // API parameter values that are decorated as "sensitive" in the API will not
  15544. // be included in the string output. The member name will be present, but the
  15545. // value will be replaced with "sensitive".
  15546. func (s RuleActionOverride) GoString() string {
  15547. return s.String()
  15548. }
  15549. // Validate inspects the fields of the type to determine if they are valid.
  15550. func (s *RuleActionOverride) Validate() error {
  15551. invalidParams := request.ErrInvalidParams{Context: "RuleActionOverride"}
  15552. if s.ActionToUse == nil {
  15553. invalidParams.Add(request.NewErrParamRequired("ActionToUse"))
  15554. }
  15555. if s.Name == nil {
  15556. invalidParams.Add(request.NewErrParamRequired("Name"))
  15557. }
  15558. if s.Name != nil && len(*s.Name) < 1 {
  15559. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  15560. }
  15561. if s.ActionToUse != nil {
  15562. if err := s.ActionToUse.Validate(); err != nil {
  15563. invalidParams.AddNested("ActionToUse", err.(request.ErrInvalidParams))
  15564. }
  15565. }
  15566. if invalidParams.Len() > 0 {
  15567. return invalidParams
  15568. }
  15569. return nil
  15570. }
  15571. // SetActionToUse sets the ActionToUse field's value.
  15572. func (s *RuleActionOverride) SetActionToUse(v *RuleAction) *RuleActionOverride {
  15573. s.ActionToUse = v
  15574. return s
  15575. }
  15576. // SetName sets the Name field's value.
  15577. func (s *RuleActionOverride) SetName(v string) *RuleActionOverride {
  15578. s.Name = &v
  15579. return s
  15580. }
  15581. // A rule group defines a collection of rules to inspect and control web requests
  15582. // that you can use in a WebACL. When you create a rule group, you define an
  15583. // immutable capacity limit. If you update a rule group, you must stay within
  15584. // the capacity. This allows others to reuse the rule group with confidence
  15585. // in its capacity requirements.
  15586. type RuleGroup struct {
  15587. _ struct{} `type:"structure"`
  15588. // The Amazon Resource Name (ARN) of the entity.
  15589. //
  15590. // ARN is a required field
  15591. ARN *string `min:"20" type:"string" required:"true"`
  15592. // The labels that one or more rules in this rule group add to matching web
  15593. // requests. These labels are defined in the RuleLabels for a Rule.
  15594. AvailableLabels []*LabelSummary `type:"list"`
  15595. // The web ACL capacity units (WCUs) required for this rule group.
  15596. //
  15597. // When you create your own rule group, you define this, and you cannot change
  15598. // it after creation. When you add or modify the rules in a rule group, WAF
  15599. // enforces this limit. You can check the capacity for a set of rules using
  15600. // CheckCapacity.
  15601. //
  15602. // WAF uses WCUs to calculate and control the operating resources that are used
  15603. // to run your rules, rule groups, and web ACLs. WAF calculates capacity differently
  15604. // for each rule type, to reflect the relative cost of each rule. Simple rules
  15605. // that cost little to run use fewer WCUs than more complex rules that use more
  15606. // processing power. Rule group capacity is fixed at creation, which helps users
  15607. // plan their web ACL WCU usage when they use a rule group. The WCU limit for
  15608. // web ACLs is 1,500.
  15609. //
  15610. // Capacity is a required field
  15611. Capacity *int64 `min:"1" type:"long" required:"true"`
  15612. // The labels that one or more rules in this rule group match against in label
  15613. // match statements. These labels are defined in a LabelMatchStatement specification,
  15614. // in the Statement definition of a rule.
  15615. ConsumedLabels []*LabelSummary `type:"list"`
  15616. // A map of custom response keys and content bodies. When you create a rule
  15617. // with a block action, you can send a custom response to the web request. You
  15618. // define these for the rule group, and then use them in the rules that you
  15619. // define in the rule group.
  15620. //
  15621. // For information about customizing web requests and responses, see Customizing
  15622. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  15623. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  15624. //
  15625. // For information about the limits on count and size for custom request and
  15626. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  15627. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  15628. CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"`
  15629. // A description of the rule group that helps with identification.
  15630. Description *string `min:"1" type:"string"`
  15631. // A unique identifier for the rule group. This ID is returned in the responses
  15632. // to create and list commands. You provide it to operations like update and
  15633. // delete.
  15634. //
  15635. // Id is a required field
  15636. Id *string `min:"1" type:"string" required:"true"`
  15637. // The label namespace prefix for this rule group. All labels added by rules
  15638. // in this rule group have this prefix.
  15639. //
  15640. // * The syntax for the label namespace prefix for your rule groups is the
  15641. // following: awswaf:<account ID>:rulegroup:<rule group name>:
  15642. //
  15643. // * When a rule with a label matches a web request, WAF adds the fully qualified
  15644. // label to the request. A fully qualified label is made up of the label
  15645. // namespace from the rule group or web ACL where the rule is defined and
  15646. // the label from the rule, separated by a colon: <label namespace>:<label
  15647. // from rule>
  15648. LabelNamespace *string `min:"1" type:"string"`
  15649. // The name of the rule group. You cannot change the name of a rule group after
  15650. // you create it.
  15651. //
  15652. // Name is a required field
  15653. Name *string `min:"1" type:"string" required:"true"`
  15654. // The Rule statements used to identify the web requests that you want to allow,
  15655. // block, or count. Each rule includes one top-level statement that WAF uses
  15656. // to identify matching web requests, and parameters that govern how WAF handles
  15657. // them.
  15658. Rules []*Rule `type:"list"`
  15659. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  15660. //
  15661. // VisibilityConfig is a required field
  15662. VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
  15663. }
  15664. // String returns the string representation.
  15665. //
  15666. // API parameter values that are decorated as "sensitive" in the API will not
  15667. // be included in the string output. The member name will be present, but the
  15668. // value will be replaced with "sensitive".
  15669. func (s RuleGroup) String() string {
  15670. return awsutil.Prettify(s)
  15671. }
  15672. // GoString returns the string representation.
  15673. //
  15674. // API parameter values that are decorated as "sensitive" in the API will not
  15675. // be included in the string output. The member name will be present, but the
  15676. // value will be replaced with "sensitive".
  15677. func (s RuleGroup) GoString() string {
  15678. return s.String()
  15679. }
  15680. // SetARN sets the ARN field's value.
  15681. func (s *RuleGroup) SetARN(v string) *RuleGroup {
  15682. s.ARN = &v
  15683. return s
  15684. }
  15685. // SetAvailableLabels sets the AvailableLabels field's value.
  15686. func (s *RuleGroup) SetAvailableLabels(v []*LabelSummary) *RuleGroup {
  15687. s.AvailableLabels = v
  15688. return s
  15689. }
  15690. // SetCapacity sets the Capacity field's value.
  15691. func (s *RuleGroup) SetCapacity(v int64) *RuleGroup {
  15692. s.Capacity = &v
  15693. return s
  15694. }
  15695. // SetConsumedLabels sets the ConsumedLabels field's value.
  15696. func (s *RuleGroup) SetConsumedLabels(v []*LabelSummary) *RuleGroup {
  15697. s.ConsumedLabels = v
  15698. return s
  15699. }
  15700. // SetCustomResponseBodies sets the CustomResponseBodies field's value.
  15701. func (s *RuleGroup) SetCustomResponseBodies(v map[string]*CustomResponseBody) *RuleGroup {
  15702. s.CustomResponseBodies = v
  15703. return s
  15704. }
  15705. // SetDescription sets the Description field's value.
  15706. func (s *RuleGroup) SetDescription(v string) *RuleGroup {
  15707. s.Description = &v
  15708. return s
  15709. }
  15710. // SetId sets the Id field's value.
  15711. func (s *RuleGroup) SetId(v string) *RuleGroup {
  15712. s.Id = &v
  15713. return s
  15714. }
  15715. // SetLabelNamespace sets the LabelNamespace field's value.
  15716. func (s *RuleGroup) SetLabelNamespace(v string) *RuleGroup {
  15717. s.LabelNamespace = &v
  15718. return s
  15719. }
  15720. // SetName sets the Name field's value.
  15721. func (s *RuleGroup) SetName(v string) *RuleGroup {
  15722. s.Name = &v
  15723. return s
  15724. }
  15725. // SetRules sets the Rules field's value.
  15726. func (s *RuleGroup) SetRules(v []*Rule) *RuleGroup {
  15727. s.Rules = v
  15728. return s
  15729. }
  15730. // SetVisibilityConfig sets the VisibilityConfig field's value.
  15731. func (s *RuleGroup) SetVisibilityConfig(v *VisibilityConfig) *RuleGroup {
  15732. s.VisibilityConfig = v
  15733. return s
  15734. }
  15735. // A rule statement used to run the rules that are defined in a RuleGroup. To
  15736. // use this, create a rule group with your rules, then provide the ARN of the
  15737. // rule group in this statement.
  15738. //
  15739. // You cannot nest a RuleGroupReferenceStatement, for example for use inside
  15740. // a NotStatement or OrStatement. You can only use a rule group reference statement
  15741. // at the top level inside a web ACL.
  15742. type RuleGroupReferenceStatement struct {
  15743. _ struct{} `type:"structure"`
  15744. // The Amazon Resource Name (ARN) of the entity.
  15745. //
  15746. // ARN is a required field
  15747. ARN *string `min:"20" type:"string" required:"true"`
  15748. // Rules in the referenced rule group whose actions are set to Count.
  15749. //
  15750. // Instead of this option, use RuleActionOverrides. It accepts any valid action
  15751. // setting, including Count.
  15752. ExcludedRules []*ExcludedRule `type:"list"`
  15753. // Action settings to use in the place of the rule actions that are configured
  15754. // inside the rule group. You specify one override for each rule whose action
  15755. // you want to change.
  15756. //
  15757. // You can use overrides for testing, for example you can override all of rule
  15758. // actions to Count and then monitor the resulting count metrics to understand
  15759. // how the rule group would handle your web traffic. You can also permanently
  15760. // override some or all actions, to modify how the rule group manages your web
  15761. // traffic.
  15762. RuleActionOverrides []*RuleActionOverride `min:"1" type:"list"`
  15763. }
  15764. // String returns the string representation.
  15765. //
  15766. // API parameter values that are decorated as "sensitive" in the API will not
  15767. // be included in the string output. The member name will be present, but the
  15768. // value will be replaced with "sensitive".
  15769. func (s RuleGroupReferenceStatement) String() string {
  15770. return awsutil.Prettify(s)
  15771. }
  15772. // GoString returns the string representation.
  15773. //
  15774. // API parameter values that are decorated as "sensitive" in the API will not
  15775. // be included in the string output. The member name will be present, but the
  15776. // value will be replaced with "sensitive".
  15777. func (s RuleGroupReferenceStatement) GoString() string {
  15778. return s.String()
  15779. }
  15780. // Validate inspects the fields of the type to determine if they are valid.
  15781. func (s *RuleGroupReferenceStatement) Validate() error {
  15782. invalidParams := request.ErrInvalidParams{Context: "RuleGroupReferenceStatement"}
  15783. if s.ARN == nil {
  15784. invalidParams.Add(request.NewErrParamRequired("ARN"))
  15785. }
  15786. if s.ARN != nil && len(*s.ARN) < 20 {
  15787. invalidParams.Add(request.NewErrParamMinLen("ARN", 20))
  15788. }
  15789. if s.RuleActionOverrides != nil && len(s.RuleActionOverrides) < 1 {
  15790. invalidParams.Add(request.NewErrParamMinLen("RuleActionOverrides", 1))
  15791. }
  15792. if s.ExcludedRules != nil {
  15793. for i, v := range s.ExcludedRules {
  15794. if v == nil {
  15795. continue
  15796. }
  15797. if err := v.Validate(); err != nil {
  15798. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExcludedRules", i), err.(request.ErrInvalidParams))
  15799. }
  15800. }
  15801. }
  15802. if s.RuleActionOverrides != nil {
  15803. for i, v := range s.RuleActionOverrides {
  15804. if v == nil {
  15805. continue
  15806. }
  15807. if err := v.Validate(); err != nil {
  15808. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RuleActionOverrides", i), err.(request.ErrInvalidParams))
  15809. }
  15810. }
  15811. }
  15812. if invalidParams.Len() > 0 {
  15813. return invalidParams
  15814. }
  15815. return nil
  15816. }
  15817. // SetARN sets the ARN field's value.
  15818. func (s *RuleGroupReferenceStatement) SetARN(v string) *RuleGroupReferenceStatement {
  15819. s.ARN = &v
  15820. return s
  15821. }
  15822. // SetExcludedRules sets the ExcludedRules field's value.
  15823. func (s *RuleGroupReferenceStatement) SetExcludedRules(v []*ExcludedRule) *RuleGroupReferenceStatement {
  15824. s.ExcludedRules = v
  15825. return s
  15826. }
  15827. // SetRuleActionOverrides sets the RuleActionOverrides field's value.
  15828. func (s *RuleGroupReferenceStatement) SetRuleActionOverrides(v []*RuleActionOverride) *RuleGroupReferenceStatement {
  15829. s.RuleActionOverrides = v
  15830. return s
  15831. }
  15832. // High-level information about a RuleGroup, returned by operations like create
  15833. // and list. This provides information like the ID, that you can use to retrieve
  15834. // and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement
  15835. // to use the rule group in a Rule.
  15836. type RuleGroupSummary struct {
  15837. _ struct{} `type:"structure"`
  15838. // The Amazon Resource Name (ARN) of the entity.
  15839. ARN *string `min:"20" type:"string"`
  15840. // A description of the rule group that helps with identification.
  15841. Description *string `min:"1" type:"string"`
  15842. // A unique identifier for the rule group. This ID is returned in the responses
  15843. // to create and list commands. You provide it to operations like update and
  15844. // delete.
  15845. Id *string `min:"1" type:"string"`
  15846. // A token used for optimistic locking. WAF returns a token to your get and
  15847. // list requests, to mark the state of the entity at the time of the request.
  15848. // To make changes to the entity associated with the token, you provide the
  15849. // token to operations like update and delete. WAF uses the token to ensure
  15850. // that no changes have been made to the entity since you last retrieved it.
  15851. // If a change has been made, the update fails with a WAFOptimisticLockException.
  15852. // If this happens, perform another get, and use the new token returned by that
  15853. // operation.
  15854. LockToken *string `min:"1" type:"string"`
  15855. // The name of the data type instance. You cannot change the name after you
  15856. // create the instance.
  15857. Name *string `min:"1" type:"string"`
  15858. }
  15859. // String returns the string representation.
  15860. //
  15861. // API parameter values that are decorated as "sensitive" in the API will not
  15862. // be included in the string output. The member name will be present, but the
  15863. // value will be replaced with "sensitive".
  15864. func (s RuleGroupSummary) String() string {
  15865. return awsutil.Prettify(s)
  15866. }
  15867. // GoString returns the string representation.
  15868. //
  15869. // API parameter values that are decorated as "sensitive" in the API will not
  15870. // be included in the string output. The member name will be present, but the
  15871. // value will be replaced with "sensitive".
  15872. func (s RuleGroupSummary) GoString() string {
  15873. return s.String()
  15874. }
  15875. // SetARN sets the ARN field's value.
  15876. func (s *RuleGroupSummary) SetARN(v string) *RuleGroupSummary {
  15877. s.ARN = &v
  15878. return s
  15879. }
  15880. // SetDescription sets the Description field's value.
  15881. func (s *RuleGroupSummary) SetDescription(v string) *RuleGroupSummary {
  15882. s.Description = &v
  15883. return s
  15884. }
  15885. // SetId sets the Id field's value.
  15886. func (s *RuleGroupSummary) SetId(v string) *RuleGroupSummary {
  15887. s.Id = &v
  15888. return s
  15889. }
  15890. // SetLockToken sets the LockToken field's value.
  15891. func (s *RuleGroupSummary) SetLockToken(v string) *RuleGroupSummary {
  15892. s.LockToken = &v
  15893. return s
  15894. }
  15895. // SetName sets the Name field's value.
  15896. func (s *RuleGroupSummary) SetName(v string) *RuleGroupSummary {
  15897. s.Name = &v
  15898. return s
  15899. }
  15900. // High-level information about a Rule, returned by operations like DescribeManagedRuleGroup.
  15901. // This provides information like the ID, that you can use to retrieve and manage
  15902. // a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement
  15903. // to use the rule group in a Rule.
  15904. type RuleSummary struct {
  15905. _ struct{} `type:"structure"`
  15906. // The action that WAF should take on a web request when it matches a rule's
  15907. // statement. Settings at the web ACL level can override the rule action setting.
  15908. Action *RuleAction `type:"structure"`
  15909. // The name of the rule.
  15910. Name *string `min:"1" type:"string"`
  15911. }
  15912. // String returns the string representation.
  15913. //
  15914. // API parameter values that are decorated as "sensitive" in the API will not
  15915. // be included in the string output. The member name will be present, but the
  15916. // value will be replaced with "sensitive".
  15917. func (s RuleSummary) String() string {
  15918. return awsutil.Prettify(s)
  15919. }
  15920. // GoString returns the string representation.
  15921. //
  15922. // API parameter values that are decorated as "sensitive" in the API will not
  15923. // be included in the string output. The member name will be present, but the
  15924. // value will be replaced with "sensitive".
  15925. func (s RuleSummary) GoString() string {
  15926. return s.String()
  15927. }
  15928. // SetAction sets the Action field's value.
  15929. func (s *RuleSummary) SetAction(v *RuleAction) *RuleSummary {
  15930. s.Action = v
  15931. return s
  15932. }
  15933. // SetName sets the Name field's value.
  15934. func (s *RuleSummary) SetName(v string) *RuleSummary {
  15935. s.Name = &v
  15936. return s
  15937. }
  15938. // Represents a single sampled web request. The response from GetSampledRequests
  15939. // includes a SampledHTTPRequests complex type that appears as SampledRequests
  15940. // in the response syntax. SampledHTTPRequests contains an array of SampledHTTPRequest
  15941. // objects.
  15942. type SampledHTTPRequest struct {
  15943. _ struct{} `type:"structure"`
  15944. // The action that WAF applied to the request.
  15945. Action *string `type:"string"`
  15946. // The CAPTCHA response for the request.
  15947. CaptchaResponse *CaptchaResponse `type:"structure"`
  15948. // The Challenge response for the request.
  15949. ChallengeResponse *ChallengeResponse `type:"structure"`
  15950. // Labels applied to the web request by matching rules. WAF applies fully qualified
  15951. // labels to matching web requests. A fully qualified label is the concatenation
  15952. // of a label namespace and a rule label. The rule's rule group or web ACL defines
  15953. // the label namespace.
  15954. //
  15955. // For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA
  15956. // or awswaf:managed:aws:managed-rule-set:header:encoding:utf8.
  15957. Labels []*Label `type:"list"`
  15958. // Used only for rule group rules that have a rule action override in place
  15959. // in the web ACL. This is the action that the rule group rule is configured
  15960. // for, and not the action that was applied to the request. The action that
  15961. // WAF applied is the Action value.
  15962. OverriddenAction *string `type:"string"`
  15963. // A complex type that contains detailed information about the request.
  15964. //
  15965. // Request is a required field
  15966. Request *HTTPRequest `type:"structure" required:"true"`
  15967. // Custom request headers inserted by WAF into the request, according to the
  15968. // custom request configuration for the matching rule action.
  15969. RequestHeadersInserted []*HTTPHeader `type:"list"`
  15970. // The response code that was sent for the request.
  15971. ResponseCodeSent *int64 `min:"200" type:"integer"`
  15972. // The name of the Rule that the request matched. For managed rule groups, the
  15973. // format for this name is <vendor name>#<managed rule group name>#<rule name>.
  15974. // For your own rule groups, the format for this name is <rule group name>#<rule
  15975. // name>. If the rule is not in a rule group, this field is absent.
  15976. RuleNameWithinRuleGroup *string `min:"1" type:"string"`
  15977. // The time at which WAF received the request from your Amazon Web Services
  15978. // resource, in Unix time format (in seconds).
  15979. Timestamp *time.Time `type:"timestamp"`
  15980. // A value that indicates how one result in the response relates proportionally
  15981. // to other results in the response. For example, a result that has a weight
  15982. // of 2 represents roughly twice as many web requests as a result that has a
  15983. // weight of 1.
  15984. //
  15985. // Weight is a required field
  15986. Weight *int64 `type:"long" required:"true"`
  15987. }
  15988. // String returns the string representation.
  15989. //
  15990. // API parameter values that are decorated as "sensitive" in the API will not
  15991. // be included in the string output. The member name will be present, but the
  15992. // value will be replaced with "sensitive".
  15993. func (s SampledHTTPRequest) String() string {
  15994. return awsutil.Prettify(s)
  15995. }
  15996. // GoString returns the string representation.
  15997. //
  15998. // API parameter values that are decorated as "sensitive" in the API will not
  15999. // be included in the string output. The member name will be present, but the
  16000. // value will be replaced with "sensitive".
  16001. func (s SampledHTTPRequest) GoString() string {
  16002. return s.String()
  16003. }
  16004. // SetAction sets the Action field's value.
  16005. func (s *SampledHTTPRequest) SetAction(v string) *SampledHTTPRequest {
  16006. s.Action = &v
  16007. return s
  16008. }
  16009. // SetCaptchaResponse sets the CaptchaResponse field's value.
  16010. func (s *SampledHTTPRequest) SetCaptchaResponse(v *CaptchaResponse) *SampledHTTPRequest {
  16011. s.CaptchaResponse = v
  16012. return s
  16013. }
  16014. // SetChallengeResponse sets the ChallengeResponse field's value.
  16015. func (s *SampledHTTPRequest) SetChallengeResponse(v *ChallengeResponse) *SampledHTTPRequest {
  16016. s.ChallengeResponse = v
  16017. return s
  16018. }
  16019. // SetLabels sets the Labels field's value.
  16020. func (s *SampledHTTPRequest) SetLabels(v []*Label) *SampledHTTPRequest {
  16021. s.Labels = v
  16022. return s
  16023. }
  16024. // SetOverriddenAction sets the OverriddenAction field's value.
  16025. func (s *SampledHTTPRequest) SetOverriddenAction(v string) *SampledHTTPRequest {
  16026. s.OverriddenAction = &v
  16027. return s
  16028. }
  16029. // SetRequest sets the Request field's value.
  16030. func (s *SampledHTTPRequest) SetRequest(v *HTTPRequest) *SampledHTTPRequest {
  16031. s.Request = v
  16032. return s
  16033. }
  16034. // SetRequestHeadersInserted sets the RequestHeadersInserted field's value.
  16035. func (s *SampledHTTPRequest) SetRequestHeadersInserted(v []*HTTPHeader) *SampledHTTPRequest {
  16036. s.RequestHeadersInserted = v
  16037. return s
  16038. }
  16039. // SetResponseCodeSent sets the ResponseCodeSent field's value.
  16040. func (s *SampledHTTPRequest) SetResponseCodeSent(v int64) *SampledHTTPRequest {
  16041. s.ResponseCodeSent = &v
  16042. return s
  16043. }
  16044. // SetRuleNameWithinRuleGroup sets the RuleNameWithinRuleGroup field's value.
  16045. func (s *SampledHTTPRequest) SetRuleNameWithinRuleGroup(v string) *SampledHTTPRequest {
  16046. s.RuleNameWithinRuleGroup = &v
  16047. return s
  16048. }
  16049. // SetTimestamp sets the Timestamp field's value.
  16050. func (s *SampledHTTPRequest) SetTimestamp(v time.Time) *SampledHTTPRequest {
  16051. s.Timestamp = &v
  16052. return s
  16053. }
  16054. // SetWeight sets the Weight field's value.
  16055. func (s *SampledHTTPRequest) SetWeight(v int64) *SampledHTTPRequest {
  16056. s.Weight = &v
  16057. return s
  16058. }
  16059. // Inspect one of the headers in the web request, identified by name, for example,
  16060. // User-Agent or Referer. The name isn't case sensitive.
  16061. //
  16062. // You can filter and inspect all headers with the FieldToMatch setting Headers.
  16063. //
  16064. // This is used to indicate the web request component to inspect, in the FieldToMatch
  16065. // specification.
  16066. //
  16067. // Example JSON: "SingleHeader": { "Name": "haystack" }
  16068. type SingleHeader struct {
  16069. _ struct{} `type:"structure"`
  16070. // The name of the query header to inspect.
  16071. //
  16072. // Name is a required field
  16073. Name *string `min:"1" type:"string" required:"true"`
  16074. }
  16075. // String returns the string representation.
  16076. //
  16077. // API parameter values that are decorated as "sensitive" in the API will not
  16078. // be included in the string output. The member name will be present, but the
  16079. // value will be replaced with "sensitive".
  16080. func (s SingleHeader) String() string {
  16081. return awsutil.Prettify(s)
  16082. }
  16083. // GoString returns the string representation.
  16084. //
  16085. // API parameter values that are decorated as "sensitive" in the API will not
  16086. // be included in the string output. The member name will be present, but the
  16087. // value will be replaced with "sensitive".
  16088. func (s SingleHeader) GoString() string {
  16089. return s.String()
  16090. }
  16091. // Validate inspects the fields of the type to determine if they are valid.
  16092. func (s *SingleHeader) Validate() error {
  16093. invalidParams := request.ErrInvalidParams{Context: "SingleHeader"}
  16094. if s.Name == nil {
  16095. invalidParams.Add(request.NewErrParamRequired("Name"))
  16096. }
  16097. if s.Name != nil && len(*s.Name) < 1 {
  16098. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  16099. }
  16100. if invalidParams.Len() > 0 {
  16101. return invalidParams
  16102. }
  16103. return nil
  16104. }
  16105. // SetName sets the Name field's value.
  16106. func (s *SingleHeader) SetName(v string) *SingleHeader {
  16107. s.Name = &v
  16108. return s
  16109. }
  16110. // Inspect one query argument in the web request, identified by name, for example
  16111. // UserName or SalesRegion. The name isn't case sensitive.
  16112. //
  16113. // This is used to indicate the web request component to inspect, in the FieldToMatch
  16114. // specification.
  16115. //
  16116. // Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
  16117. type SingleQueryArgument struct {
  16118. _ struct{} `type:"structure"`
  16119. // The name of the query argument to inspect.
  16120. //
  16121. // Name is a required field
  16122. Name *string `min:"1" type:"string" required:"true"`
  16123. }
  16124. // String returns the string representation.
  16125. //
  16126. // API parameter values that are decorated as "sensitive" in the API will not
  16127. // be included in the string output. The member name will be present, but the
  16128. // value will be replaced with "sensitive".
  16129. func (s SingleQueryArgument) String() string {
  16130. return awsutil.Prettify(s)
  16131. }
  16132. // GoString returns the string representation.
  16133. //
  16134. // API parameter values that are decorated as "sensitive" in the API will not
  16135. // be included in the string output. The member name will be present, but the
  16136. // value will be replaced with "sensitive".
  16137. func (s SingleQueryArgument) GoString() string {
  16138. return s.String()
  16139. }
  16140. // Validate inspects the fields of the type to determine if they are valid.
  16141. func (s *SingleQueryArgument) Validate() error {
  16142. invalidParams := request.ErrInvalidParams{Context: "SingleQueryArgument"}
  16143. if s.Name == nil {
  16144. invalidParams.Add(request.NewErrParamRequired("Name"))
  16145. }
  16146. if s.Name != nil && len(*s.Name) < 1 {
  16147. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  16148. }
  16149. if invalidParams.Len() > 0 {
  16150. return invalidParams
  16151. }
  16152. return nil
  16153. }
  16154. // SetName sets the Name field's value.
  16155. func (s *SingleQueryArgument) SetName(v string) *SingleQueryArgument {
  16156. s.Name = &v
  16157. return s
  16158. }
  16159. // A rule statement that compares a number of bytes against the size of a request
  16160. // component, using a comparison operator, such as greater than (>) or less
  16161. // than (<). For example, you can use a size constraint statement to look for
  16162. // query strings that are longer than 100 bytes.
  16163. //
  16164. // If you configure WAF to inspect the request body, WAF inspects only the first
  16165. // 8192 bytes (8 KB). If the request body for your web requests never exceeds
  16166. // 8192 bytes, you could use a size constraint statement to block requests that
  16167. // have a request body greater than 8192 bytes.
  16168. //
  16169. // If you choose URI for the value of Part of the request to filter on, the
  16170. // slash (/) in the URI counts as one character. For example, the URI /logo.jpg
  16171. // is nine characters long.
  16172. type SizeConstraintStatement struct {
  16173. _ struct{} `type:"structure"`
  16174. // The operator to use to compare the request part to the size setting.
  16175. //
  16176. // ComparisonOperator is a required field
  16177. ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
  16178. // The part of the web request that you want WAF to inspect.
  16179. //
  16180. // FieldToMatch is a required field
  16181. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  16182. // The size, in byte, to compare to the request part, after any transformations.
  16183. //
  16184. // Size is a required field
  16185. Size *int64 `type:"long" required:"true"`
  16186. // Text transformations eliminate some of the unusual formatting that attackers
  16187. // use in web requests in an effort to bypass detection. If you specify one
  16188. // or more transformations in a rule statement, WAF performs all transformations
  16189. // on the content of the request component identified by FieldToMatch, starting
  16190. // from the lowest priority setting, before inspecting the content for a match.
  16191. //
  16192. // TextTransformations is a required field
  16193. TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"`
  16194. }
  16195. // String returns the string representation.
  16196. //
  16197. // API parameter values that are decorated as "sensitive" in the API will not
  16198. // be included in the string output. The member name will be present, but the
  16199. // value will be replaced with "sensitive".
  16200. func (s SizeConstraintStatement) String() string {
  16201. return awsutil.Prettify(s)
  16202. }
  16203. // GoString returns the string representation.
  16204. //
  16205. // API parameter values that are decorated as "sensitive" in the API will not
  16206. // be included in the string output. The member name will be present, but the
  16207. // value will be replaced with "sensitive".
  16208. func (s SizeConstraintStatement) GoString() string {
  16209. return s.String()
  16210. }
  16211. // Validate inspects the fields of the type to determine if they are valid.
  16212. func (s *SizeConstraintStatement) Validate() error {
  16213. invalidParams := request.ErrInvalidParams{Context: "SizeConstraintStatement"}
  16214. if s.ComparisonOperator == nil {
  16215. invalidParams.Add(request.NewErrParamRequired("ComparisonOperator"))
  16216. }
  16217. if s.FieldToMatch == nil {
  16218. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  16219. }
  16220. if s.Size == nil {
  16221. invalidParams.Add(request.NewErrParamRequired("Size"))
  16222. }
  16223. if s.TextTransformations == nil {
  16224. invalidParams.Add(request.NewErrParamRequired("TextTransformations"))
  16225. }
  16226. if s.TextTransformations != nil && len(s.TextTransformations) < 1 {
  16227. invalidParams.Add(request.NewErrParamMinLen("TextTransformations", 1))
  16228. }
  16229. if s.FieldToMatch != nil {
  16230. if err := s.FieldToMatch.Validate(); err != nil {
  16231. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  16232. }
  16233. }
  16234. if s.TextTransformations != nil {
  16235. for i, v := range s.TextTransformations {
  16236. if v == nil {
  16237. continue
  16238. }
  16239. if err := v.Validate(); err != nil {
  16240. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TextTransformations", i), err.(request.ErrInvalidParams))
  16241. }
  16242. }
  16243. }
  16244. if invalidParams.Len() > 0 {
  16245. return invalidParams
  16246. }
  16247. return nil
  16248. }
  16249. // SetComparisonOperator sets the ComparisonOperator field's value.
  16250. func (s *SizeConstraintStatement) SetComparisonOperator(v string) *SizeConstraintStatement {
  16251. s.ComparisonOperator = &v
  16252. return s
  16253. }
  16254. // SetFieldToMatch sets the FieldToMatch field's value.
  16255. func (s *SizeConstraintStatement) SetFieldToMatch(v *FieldToMatch) *SizeConstraintStatement {
  16256. s.FieldToMatch = v
  16257. return s
  16258. }
  16259. // SetSize sets the Size field's value.
  16260. func (s *SizeConstraintStatement) SetSize(v int64) *SizeConstraintStatement {
  16261. s.Size = &v
  16262. return s
  16263. }
  16264. // SetTextTransformations sets the TextTransformations field's value.
  16265. func (s *SizeConstraintStatement) SetTextTransformations(v []*TextTransformation) *SizeConstraintStatement {
  16266. s.TextTransformations = v
  16267. return s
  16268. }
  16269. // A rule statement that inspects for malicious SQL code. Attackers insert malicious
  16270. // SQL code into web requests to do things like modify your database or extract
  16271. // data from it.
  16272. type SqliMatchStatement struct {
  16273. _ struct{} `type:"structure"`
  16274. // The part of the web request that you want WAF to inspect.
  16275. //
  16276. // FieldToMatch is a required field
  16277. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  16278. // The sensitivity that you want WAF to use to inspect for SQL injection attacks.
  16279. //
  16280. // HIGH detects more attacks, but might generate more false positives, especially
  16281. // if your web requests frequently contain unusual strings. For information
  16282. // about identifying and mitigating false positives, see Testing and tuning
  16283. // (https://docs.aws.amazon.com/waf/latest/developerguide/web-acl-testing.html)
  16284. // in the WAF Developer Guide.
  16285. //
  16286. // LOW is generally a better choice for resources that already have other protections
  16287. // against SQL injection attacks or that have a low tolerance for false positives.
  16288. //
  16289. // Default: LOW
  16290. SensitivityLevel *string `type:"string" enum:"SensitivityLevel"`
  16291. // Text transformations eliminate some of the unusual formatting that attackers
  16292. // use in web requests in an effort to bypass detection. If you specify one
  16293. // or more transformations in a rule statement, WAF performs all transformations
  16294. // on the content of the request component identified by FieldToMatch, starting
  16295. // from the lowest priority setting, before inspecting the content for a match.
  16296. //
  16297. // TextTransformations is a required field
  16298. TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"`
  16299. }
  16300. // String returns the string representation.
  16301. //
  16302. // API parameter values that are decorated as "sensitive" in the API will not
  16303. // be included in the string output. The member name will be present, but the
  16304. // value will be replaced with "sensitive".
  16305. func (s SqliMatchStatement) String() string {
  16306. return awsutil.Prettify(s)
  16307. }
  16308. // GoString returns the string representation.
  16309. //
  16310. // API parameter values that are decorated as "sensitive" in the API will not
  16311. // be included in the string output. The member name will be present, but the
  16312. // value will be replaced with "sensitive".
  16313. func (s SqliMatchStatement) GoString() string {
  16314. return s.String()
  16315. }
  16316. // Validate inspects the fields of the type to determine if they are valid.
  16317. func (s *SqliMatchStatement) Validate() error {
  16318. invalidParams := request.ErrInvalidParams{Context: "SqliMatchStatement"}
  16319. if s.FieldToMatch == nil {
  16320. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  16321. }
  16322. if s.TextTransformations == nil {
  16323. invalidParams.Add(request.NewErrParamRequired("TextTransformations"))
  16324. }
  16325. if s.TextTransformations != nil && len(s.TextTransformations) < 1 {
  16326. invalidParams.Add(request.NewErrParamMinLen("TextTransformations", 1))
  16327. }
  16328. if s.FieldToMatch != nil {
  16329. if err := s.FieldToMatch.Validate(); err != nil {
  16330. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  16331. }
  16332. }
  16333. if s.TextTransformations != nil {
  16334. for i, v := range s.TextTransformations {
  16335. if v == nil {
  16336. continue
  16337. }
  16338. if err := v.Validate(); err != nil {
  16339. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TextTransformations", i), err.(request.ErrInvalidParams))
  16340. }
  16341. }
  16342. }
  16343. if invalidParams.Len() > 0 {
  16344. return invalidParams
  16345. }
  16346. return nil
  16347. }
  16348. // SetFieldToMatch sets the FieldToMatch field's value.
  16349. func (s *SqliMatchStatement) SetFieldToMatch(v *FieldToMatch) *SqliMatchStatement {
  16350. s.FieldToMatch = v
  16351. return s
  16352. }
  16353. // SetSensitivityLevel sets the SensitivityLevel field's value.
  16354. func (s *SqliMatchStatement) SetSensitivityLevel(v string) *SqliMatchStatement {
  16355. s.SensitivityLevel = &v
  16356. return s
  16357. }
  16358. // SetTextTransformations sets the TextTransformations field's value.
  16359. func (s *SqliMatchStatement) SetTextTransformations(v []*TextTransformation) *SqliMatchStatement {
  16360. s.TextTransformations = v
  16361. return s
  16362. }
  16363. // The processing guidance for a Rule, used by WAF to determine whether a web
  16364. // request matches the rule.
  16365. //
  16366. // For example specifications, see the examples section of CreateWebACL.
  16367. type Statement struct {
  16368. _ struct{} `type:"structure"`
  16369. // A logical rule statement used to combine other rule statements with AND logic.
  16370. // You provide more than one Statement within the AndStatement.
  16371. AndStatement *AndStatement `type:"structure"`
  16372. // A rule statement that defines a string match search for WAF to apply to web
  16373. // requests. The byte match statement provides the bytes to search for, the
  16374. // location in requests that you want WAF to search, and other settings. The
  16375. // bytes to search for are typically a string that corresponds with ASCII characters.
  16376. // In the WAF console and the developer guide, this is called a string match
  16377. // statement.
  16378. ByteMatchStatement *ByteMatchStatement `type:"structure"`
  16379. // A rule statement that labels web requests by country and region and that
  16380. // matches against web requests based on country code. A geo match rule labels
  16381. // every request that it inspects regardless of whether it finds a match.
  16382. //
  16383. // * To manage requests only by country, you can use this statement by itself
  16384. // and specify the countries that you want to match against in the CountryCodes
  16385. // array.
  16386. //
  16387. // * Otherwise, configure your geo match rule with Count action so that it
  16388. // only labels requests. Then, add one or more label match rules to run after
  16389. // the geo match rule and configure them to match against the geographic
  16390. // labels and handle the requests as needed.
  16391. //
  16392. // WAF labels requests using the alpha-2 country and region codes from the International
  16393. // Organization for Standardization (ISO) 3166 standard. WAF determines the
  16394. // codes using either the IP address in the web request origin or, if you specify
  16395. // it, the address in the geo match ForwardedIPConfig.
  16396. //
  16397. // If you use the web request origin, the label formats are awswaf:clientip:geo:region:<ISO
  16398. // country code>-<ISO region code> and awswaf:clientip:geo:country:<ISO country
  16399. // code>.
  16400. //
  16401. // If you use a forwarded IP address, the label formats are awswaf:forwardedip:geo:region:<ISO
  16402. // country code>-<ISO region code> and awswaf:forwardedip:geo:country:<ISO country
  16403. // code>.
  16404. //
  16405. // For additional details, see Geographic match rule statement (https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-geo-match.html)
  16406. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  16407. GeoMatchStatement *GeoMatchStatement `type:"structure"`
  16408. // A rule statement used to detect web requests coming from particular IP addresses
  16409. // or address ranges. To use this, create an IPSet that specifies the addresses
  16410. // you want to detect, then use the ARN of that set in this statement. To create
  16411. // an IP set, see CreateIPSet.
  16412. //
  16413. // Each IP set rule statement references an IP set. You create and maintain
  16414. // the set independent of your rules. This allows you to use the single set
  16415. // in multiple rules. When you update the referenced set, WAF automatically
  16416. // updates all rules that reference it.
  16417. IPSetReferenceStatement *IPSetReferenceStatement `type:"structure"`
  16418. // A rule statement to match against labels that have been added to the web
  16419. // request by rules that have already run in the web ACL.
  16420. //
  16421. // The label match statement provides the label or namespace string to search
  16422. // for. The label string can represent a part or all of the fully qualified
  16423. // label name that had been added to the web request. Fully qualified labels
  16424. // have a prefix, optional namespaces, and label name. The prefix identifies
  16425. // the rule group or web ACL context of the rule that added the label. If you
  16426. // do not provide the fully qualified name in your label match string, WAF performs
  16427. // the search for labels that were added in the same context as the label match
  16428. // statement.
  16429. LabelMatchStatement *LabelMatchStatement `type:"structure"`
  16430. // A rule statement used to run the rules that are defined in a managed rule
  16431. // group. To use this, provide the vendor name and the name of the rule group
  16432. // in this statement. You can retrieve the required names by calling ListAvailableManagedRuleGroups.
  16433. //
  16434. // You cannot nest a ManagedRuleGroupStatement, for example for use inside a
  16435. // NotStatement or OrStatement. It can only be referenced as a top-level statement
  16436. // within a rule.
  16437. //
  16438. // You are charged additional fees when you use the WAF Bot Control managed
  16439. // rule group AWSManagedRulesBotControlRuleSet or the WAF Fraud Control account
  16440. // takeover prevention (ATP) managed rule group AWSManagedRulesATPRuleSet. For
  16441. // more information, see WAF Pricing (http://aws.amazon.com/waf/pricing/).
  16442. ManagedRuleGroupStatement *ManagedRuleGroupStatement `type:"structure"`
  16443. // A logical rule statement used to negate the results of another rule statement.
  16444. // You provide one Statement within the NotStatement.
  16445. NotStatement *NotStatement `type:"structure"`
  16446. // A logical rule statement used to combine other rule statements with OR logic.
  16447. // You provide more than one Statement within the OrStatement.
  16448. OrStatement *OrStatement `type:"structure"`
  16449. // A rate-based rule tracks the rate of requests for each originating IP address,
  16450. // and triggers the rule action when the rate exceeds a limit that you specify
  16451. // on the number of requests in any 5-minute time span. You can use this to
  16452. // put a temporary block on requests from an IP address that is sending excessive
  16453. // requests.
  16454. //
  16455. // WAF tracks and manages web requests separately for each instance of a rate-based
  16456. // rule that you use. For example, if you provide the same rate-based rule settings
  16457. // in two web ACLs, each of the two rule statements represents a separate instance
  16458. // of the rate-based rule and gets its own tracking and management by WAF. If
  16459. // you define a rate-based rule inside a rule group, and then use that rule
  16460. // group in multiple places, each use creates a separate instance of the rate-based
  16461. // rule that gets its own tracking and management by WAF.
  16462. //
  16463. // When the rule action triggers, WAF blocks additional requests from the IP
  16464. // address until the request rate falls below the limit.
  16465. //
  16466. // You can optionally nest another statement inside the rate-based statement,
  16467. // to narrow the scope of the rule so that it only counts requests that match
  16468. // the nested statement. For example, based on recent requests that you have
  16469. // seen from an attacker, you might create a rate-based rule with a nested AND
  16470. // rule statement that contains the following nested statements:
  16471. //
  16472. // * An IP match statement with an IP set that specified the address 192.0.2.44.
  16473. //
  16474. // * A string match statement that searches in the User-Agent header for
  16475. // the string BadBot.
  16476. //
  16477. // In this rate-based rule, you also define a rate limit. For this example,
  16478. // the rate limit is 1,000. Requests that meet the criteria of both of the nested
  16479. // statements are counted. If the count exceeds 1,000 requests per five minutes,
  16480. // the rule action triggers. Requests that do not meet the criteria of both
  16481. // of the nested statements are not counted towards the rate limit and are not
  16482. // affected by this rule.
  16483. //
  16484. // You cannot nest a RateBasedStatement inside another statement, for example
  16485. // inside a NotStatement or OrStatement. You can define a RateBasedStatement
  16486. // inside a web ACL and inside a rule group.
  16487. RateBasedStatement *RateBasedStatement `type:"structure"`
  16488. // A rule statement used to search web request components for a match against
  16489. // a single regular expression.
  16490. RegexMatchStatement *RegexMatchStatement `type:"structure"`
  16491. // A rule statement used to search web request components for matches with regular
  16492. // expressions. To use this, create a RegexPatternSet that specifies the expressions
  16493. // that you want to detect, then use the ARN of that set in this statement.
  16494. // A web request matches the pattern set rule statement if the request component
  16495. // matches any of the patterns in the set. To create a regex pattern set, see
  16496. // CreateRegexPatternSet.
  16497. //
  16498. // Each regex pattern set rule statement references a regex pattern set. You
  16499. // create and maintain the set independent of your rules. This allows you to
  16500. // use the single set in multiple rules. When you update the referenced set,
  16501. // WAF automatically updates all rules that reference it.
  16502. RegexPatternSetReferenceStatement *RegexPatternSetReferenceStatement `type:"structure"`
  16503. // A rule statement used to run the rules that are defined in a RuleGroup. To
  16504. // use this, create a rule group with your rules, then provide the ARN of the
  16505. // rule group in this statement.
  16506. //
  16507. // You cannot nest a RuleGroupReferenceStatement, for example for use inside
  16508. // a NotStatement or OrStatement. You can only use a rule group reference statement
  16509. // at the top level inside a web ACL.
  16510. RuleGroupReferenceStatement *RuleGroupReferenceStatement `type:"structure"`
  16511. // A rule statement that compares a number of bytes against the size of a request
  16512. // component, using a comparison operator, such as greater than (>) or less
  16513. // than (<). For example, you can use a size constraint statement to look for
  16514. // query strings that are longer than 100 bytes.
  16515. //
  16516. // If you configure WAF to inspect the request body, WAF inspects only the first
  16517. // 8192 bytes (8 KB). If the request body for your web requests never exceeds
  16518. // 8192 bytes, you could use a size constraint statement to block requests that
  16519. // have a request body greater than 8192 bytes.
  16520. //
  16521. // If you choose URI for the value of Part of the request to filter on, the
  16522. // slash (/) in the URI counts as one character. For example, the URI /logo.jpg
  16523. // is nine characters long.
  16524. SizeConstraintStatement *SizeConstraintStatement `type:"structure"`
  16525. // A rule statement that inspects for malicious SQL code. Attackers insert malicious
  16526. // SQL code into web requests to do things like modify your database or extract
  16527. // data from it.
  16528. SqliMatchStatement *SqliMatchStatement `type:"structure"`
  16529. // A rule statement that inspects for cross-site scripting (XSS) attacks. In
  16530. // XSS attacks, the attacker uses vulnerabilities in a benign website as a vehicle
  16531. // to inject malicious client-site scripts into other legitimate web browsers.
  16532. XssMatchStatement *XssMatchStatement `type:"structure"`
  16533. }
  16534. // String returns the string representation.
  16535. //
  16536. // API parameter values that are decorated as "sensitive" in the API will not
  16537. // be included in the string output. The member name will be present, but the
  16538. // value will be replaced with "sensitive".
  16539. func (s Statement) String() string {
  16540. return awsutil.Prettify(s)
  16541. }
  16542. // GoString returns the string representation.
  16543. //
  16544. // API parameter values that are decorated as "sensitive" in the API will not
  16545. // be included in the string output. The member name will be present, but the
  16546. // value will be replaced with "sensitive".
  16547. func (s Statement) GoString() string {
  16548. return s.String()
  16549. }
  16550. // Validate inspects the fields of the type to determine if they are valid.
  16551. func (s *Statement) Validate() error {
  16552. invalidParams := request.ErrInvalidParams{Context: "Statement"}
  16553. if s.AndStatement != nil {
  16554. if err := s.AndStatement.Validate(); err != nil {
  16555. invalidParams.AddNested("AndStatement", err.(request.ErrInvalidParams))
  16556. }
  16557. }
  16558. if s.ByteMatchStatement != nil {
  16559. if err := s.ByteMatchStatement.Validate(); err != nil {
  16560. invalidParams.AddNested("ByteMatchStatement", err.(request.ErrInvalidParams))
  16561. }
  16562. }
  16563. if s.GeoMatchStatement != nil {
  16564. if err := s.GeoMatchStatement.Validate(); err != nil {
  16565. invalidParams.AddNested("GeoMatchStatement", err.(request.ErrInvalidParams))
  16566. }
  16567. }
  16568. if s.IPSetReferenceStatement != nil {
  16569. if err := s.IPSetReferenceStatement.Validate(); err != nil {
  16570. invalidParams.AddNested("IPSetReferenceStatement", err.(request.ErrInvalidParams))
  16571. }
  16572. }
  16573. if s.LabelMatchStatement != nil {
  16574. if err := s.LabelMatchStatement.Validate(); err != nil {
  16575. invalidParams.AddNested("LabelMatchStatement", err.(request.ErrInvalidParams))
  16576. }
  16577. }
  16578. if s.ManagedRuleGroupStatement != nil {
  16579. if err := s.ManagedRuleGroupStatement.Validate(); err != nil {
  16580. invalidParams.AddNested("ManagedRuleGroupStatement", err.(request.ErrInvalidParams))
  16581. }
  16582. }
  16583. if s.NotStatement != nil {
  16584. if err := s.NotStatement.Validate(); err != nil {
  16585. invalidParams.AddNested("NotStatement", err.(request.ErrInvalidParams))
  16586. }
  16587. }
  16588. if s.OrStatement != nil {
  16589. if err := s.OrStatement.Validate(); err != nil {
  16590. invalidParams.AddNested("OrStatement", err.(request.ErrInvalidParams))
  16591. }
  16592. }
  16593. if s.RateBasedStatement != nil {
  16594. if err := s.RateBasedStatement.Validate(); err != nil {
  16595. invalidParams.AddNested("RateBasedStatement", err.(request.ErrInvalidParams))
  16596. }
  16597. }
  16598. if s.RegexMatchStatement != nil {
  16599. if err := s.RegexMatchStatement.Validate(); err != nil {
  16600. invalidParams.AddNested("RegexMatchStatement", err.(request.ErrInvalidParams))
  16601. }
  16602. }
  16603. if s.RegexPatternSetReferenceStatement != nil {
  16604. if err := s.RegexPatternSetReferenceStatement.Validate(); err != nil {
  16605. invalidParams.AddNested("RegexPatternSetReferenceStatement", err.(request.ErrInvalidParams))
  16606. }
  16607. }
  16608. if s.RuleGroupReferenceStatement != nil {
  16609. if err := s.RuleGroupReferenceStatement.Validate(); err != nil {
  16610. invalidParams.AddNested("RuleGroupReferenceStatement", err.(request.ErrInvalidParams))
  16611. }
  16612. }
  16613. if s.SizeConstraintStatement != nil {
  16614. if err := s.SizeConstraintStatement.Validate(); err != nil {
  16615. invalidParams.AddNested("SizeConstraintStatement", err.(request.ErrInvalidParams))
  16616. }
  16617. }
  16618. if s.SqliMatchStatement != nil {
  16619. if err := s.SqliMatchStatement.Validate(); err != nil {
  16620. invalidParams.AddNested("SqliMatchStatement", err.(request.ErrInvalidParams))
  16621. }
  16622. }
  16623. if s.XssMatchStatement != nil {
  16624. if err := s.XssMatchStatement.Validate(); err != nil {
  16625. invalidParams.AddNested("XssMatchStatement", err.(request.ErrInvalidParams))
  16626. }
  16627. }
  16628. if invalidParams.Len() > 0 {
  16629. return invalidParams
  16630. }
  16631. return nil
  16632. }
  16633. // SetAndStatement sets the AndStatement field's value.
  16634. func (s *Statement) SetAndStatement(v *AndStatement) *Statement {
  16635. s.AndStatement = v
  16636. return s
  16637. }
  16638. // SetByteMatchStatement sets the ByteMatchStatement field's value.
  16639. func (s *Statement) SetByteMatchStatement(v *ByteMatchStatement) *Statement {
  16640. s.ByteMatchStatement = v
  16641. return s
  16642. }
  16643. // SetGeoMatchStatement sets the GeoMatchStatement field's value.
  16644. func (s *Statement) SetGeoMatchStatement(v *GeoMatchStatement) *Statement {
  16645. s.GeoMatchStatement = v
  16646. return s
  16647. }
  16648. // SetIPSetReferenceStatement sets the IPSetReferenceStatement field's value.
  16649. func (s *Statement) SetIPSetReferenceStatement(v *IPSetReferenceStatement) *Statement {
  16650. s.IPSetReferenceStatement = v
  16651. return s
  16652. }
  16653. // SetLabelMatchStatement sets the LabelMatchStatement field's value.
  16654. func (s *Statement) SetLabelMatchStatement(v *LabelMatchStatement) *Statement {
  16655. s.LabelMatchStatement = v
  16656. return s
  16657. }
  16658. // SetManagedRuleGroupStatement sets the ManagedRuleGroupStatement field's value.
  16659. func (s *Statement) SetManagedRuleGroupStatement(v *ManagedRuleGroupStatement) *Statement {
  16660. s.ManagedRuleGroupStatement = v
  16661. return s
  16662. }
  16663. // SetNotStatement sets the NotStatement field's value.
  16664. func (s *Statement) SetNotStatement(v *NotStatement) *Statement {
  16665. s.NotStatement = v
  16666. return s
  16667. }
  16668. // SetOrStatement sets the OrStatement field's value.
  16669. func (s *Statement) SetOrStatement(v *OrStatement) *Statement {
  16670. s.OrStatement = v
  16671. return s
  16672. }
  16673. // SetRateBasedStatement sets the RateBasedStatement field's value.
  16674. func (s *Statement) SetRateBasedStatement(v *RateBasedStatement) *Statement {
  16675. s.RateBasedStatement = v
  16676. return s
  16677. }
  16678. // SetRegexMatchStatement sets the RegexMatchStatement field's value.
  16679. func (s *Statement) SetRegexMatchStatement(v *RegexMatchStatement) *Statement {
  16680. s.RegexMatchStatement = v
  16681. return s
  16682. }
  16683. // SetRegexPatternSetReferenceStatement sets the RegexPatternSetReferenceStatement field's value.
  16684. func (s *Statement) SetRegexPatternSetReferenceStatement(v *RegexPatternSetReferenceStatement) *Statement {
  16685. s.RegexPatternSetReferenceStatement = v
  16686. return s
  16687. }
  16688. // SetRuleGroupReferenceStatement sets the RuleGroupReferenceStatement field's value.
  16689. func (s *Statement) SetRuleGroupReferenceStatement(v *RuleGroupReferenceStatement) *Statement {
  16690. s.RuleGroupReferenceStatement = v
  16691. return s
  16692. }
  16693. // SetSizeConstraintStatement sets the SizeConstraintStatement field's value.
  16694. func (s *Statement) SetSizeConstraintStatement(v *SizeConstraintStatement) *Statement {
  16695. s.SizeConstraintStatement = v
  16696. return s
  16697. }
  16698. // SetSqliMatchStatement sets the SqliMatchStatement field's value.
  16699. func (s *Statement) SetSqliMatchStatement(v *SqliMatchStatement) *Statement {
  16700. s.SqliMatchStatement = v
  16701. return s
  16702. }
  16703. // SetXssMatchStatement sets the XssMatchStatement field's value.
  16704. func (s *Statement) SetXssMatchStatement(v *XssMatchStatement) *Statement {
  16705. s.XssMatchStatement = v
  16706. return s
  16707. }
  16708. // A tag associated with an Amazon Web Services resource. Tags are key:value
  16709. // pairs that you can use to categorize and manage your resources, for purposes
  16710. // like billing or other management. Typically, the tag key represents a category,
  16711. // such as "environment", and the tag value represents a specific value within
  16712. // that category, such as "test," "development," or "production". Or you might
  16713. // set the tag key to "customer" and the value to the customer name or ID. You
  16714. // can specify one or more tags to add to each Amazon Web Services resource,
  16715. // up to 50 tags for a resource.
  16716. //
  16717. // You can tag the Amazon Web Services resources that you manage through WAF:
  16718. // web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage
  16719. // or view tags through the WAF console.
  16720. type Tag struct {
  16721. _ struct{} `type:"structure"`
  16722. // Part of the key:value pair that defines a tag. You can use a tag key to describe
  16723. // a category of information, such as "customer." Tag keys are case-sensitive.
  16724. //
  16725. // Key is a required field
  16726. Key *string `min:"1" type:"string" required:"true"`
  16727. // Part of the key:value pair that defines a tag. You can use a tag value to
  16728. // describe a specific value within a category, such as "companyA" or "companyB."
  16729. // Tag values are case-sensitive.
  16730. //
  16731. // Value is a required field
  16732. Value *string `type:"string" required:"true"`
  16733. }
  16734. // String returns the string representation.
  16735. //
  16736. // API parameter values that are decorated as "sensitive" in the API will not
  16737. // be included in the string output. The member name will be present, but the
  16738. // value will be replaced with "sensitive".
  16739. func (s Tag) String() string {
  16740. return awsutil.Prettify(s)
  16741. }
  16742. // GoString returns the string representation.
  16743. //
  16744. // API parameter values that are decorated as "sensitive" in the API will not
  16745. // be included in the string output. The member name will be present, but the
  16746. // value will be replaced with "sensitive".
  16747. func (s Tag) GoString() string {
  16748. return s.String()
  16749. }
  16750. // Validate inspects the fields of the type to determine if they are valid.
  16751. func (s *Tag) Validate() error {
  16752. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  16753. if s.Key == nil {
  16754. invalidParams.Add(request.NewErrParamRequired("Key"))
  16755. }
  16756. if s.Key != nil && len(*s.Key) < 1 {
  16757. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16758. }
  16759. if s.Value == nil {
  16760. invalidParams.Add(request.NewErrParamRequired("Value"))
  16761. }
  16762. if invalidParams.Len() > 0 {
  16763. return invalidParams
  16764. }
  16765. return nil
  16766. }
  16767. // SetKey sets the Key field's value.
  16768. func (s *Tag) SetKey(v string) *Tag {
  16769. s.Key = &v
  16770. return s
  16771. }
  16772. // SetValue sets the Value field's value.
  16773. func (s *Tag) SetValue(v string) *Tag {
  16774. s.Value = &v
  16775. return s
  16776. }
  16777. // The collection of tagging definitions for an Amazon Web Services resource.
  16778. // Tags are key:value pairs that you can use to categorize and manage your resources,
  16779. // for purposes like billing or other management. Typically, the tag key represents
  16780. // a category, such as "environment", and the tag value represents a specific
  16781. // value within that category, such as "test," "development," or "production".
  16782. // Or you might set the tag key to "customer" and the value to the customer
  16783. // name or ID. You can specify one or more tags to add to each Amazon Web Services
  16784. // resource, up to 50 tags for a resource.
  16785. //
  16786. // You can tag the Amazon Web Services resources that you manage through WAF:
  16787. // web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage
  16788. // or view tags through the WAF console.
  16789. type TagInfoForResource struct {
  16790. _ struct{} `type:"structure"`
  16791. // The Amazon Resource Name (ARN) of the resource.
  16792. ResourceARN *string `min:"20" type:"string"`
  16793. // The array of Tag objects defined for the resource.
  16794. TagList []*Tag `min:"1" type:"list"`
  16795. }
  16796. // String returns the string representation.
  16797. //
  16798. // API parameter values that are decorated as "sensitive" in the API will not
  16799. // be included in the string output. The member name will be present, but the
  16800. // value will be replaced with "sensitive".
  16801. func (s TagInfoForResource) String() string {
  16802. return awsutil.Prettify(s)
  16803. }
  16804. // GoString returns the string representation.
  16805. //
  16806. // API parameter values that are decorated as "sensitive" in the API will not
  16807. // be included in the string output. The member name will be present, but the
  16808. // value will be replaced with "sensitive".
  16809. func (s TagInfoForResource) GoString() string {
  16810. return s.String()
  16811. }
  16812. // SetResourceARN sets the ResourceARN field's value.
  16813. func (s *TagInfoForResource) SetResourceARN(v string) *TagInfoForResource {
  16814. s.ResourceARN = &v
  16815. return s
  16816. }
  16817. // SetTagList sets the TagList field's value.
  16818. func (s *TagInfoForResource) SetTagList(v []*Tag) *TagInfoForResource {
  16819. s.TagList = v
  16820. return s
  16821. }
  16822. type TagResourceInput struct {
  16823. _ struct{} `type:"structure"`
  16824. // The Amazon Resource Name (ARN) of the resource.
  16825. //
  16826. // ResourceARN is a required field
  16827. ResourceARN *string `min:"20" type:"string" required:"true"`
  16828. // An array of key:value pairs to associate with the resource.
  16829. //
  16830. // Tags is a required field
  16831. Tags []*Tag `min:"1" type:"list" required:"true"`
  16832. }
  16833. // String returns the string representation.
  16834. //
  16835. // API parameter values that are decorated as "sensitive" in the API will not
  16836. // be included in the string output. The member name will be present, but the
  16837. // value will be replaced with "sensitive".
  16838. func (s TagResourceInput) String() string {
  16839. return awsutil.Prettify(s)
  16840. }
  16841. // GoString returns the string representation.
  16842. //
  16843. // API parameter values that are decorated as "sensitive" in the API will not
  16844. // be included in the string output. The member name will be present, but the
  16845. // value will be replaced with "sensitive".
  16846. func (s TagResourceInput) GoString() string {
  16847. return s.String()
  16848. }
  16849. // Validate inspects the fields of the type to determine if they are valid.
  16850. func (s *TagResourceInput) Validate() error {
  16851. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  16852. if s.ResourceARN == nil {
  16853. invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
  16854. }
  16855. if s.ResourceARN != nil && len(*s.ResourceARN) < 20 {
  16856. invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 20))
  16857. }
  16858. if s.Tags == nil {
  16859. invalidParams.Add(request.NewErrParamRequired("Tags"))
  16860. }
  16861. if s.Tags != nil && len(s.Tags) < 1 {
  16862. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  16863. }
  16864. if s.Tags != nil {
  16865. for i, v := range s.Tags {
  16866. if v == nil {
  16867. continue
  16868. }
  16869. if err := v.Validate(); err != nil {
  16870. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  16871. }
  16872. }
  16873. }
  16874. if invalidParams.Len() > 0 {
  16875. return invalidParams
  16876. }
  16877. return nil
  16878. }
  16879. // SetResourceARN sets the ResourceARN field's value.
  16880. func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput {
  16881. s.ResourceARN = &v
  16882. return s
  16883. }
  16884. // SetTags sets the Tags field's value.
  16885. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
  16886. s.Tags = v
  16887. return s
  16888. }
  16889. type TagResourceOutput struct {
  16890. _ struct{} `type:"structure"`
  16891. }
  16892. // String returns the string representation.
  16893. //
  16894. // API parameter values that are decorated as "sensitive" in the API will not
  16895. // be included in the string output. The member name will be present, but the
  16896. // value will be replaced with "sensitive".
  16897. func (s TagResourceOutput) String() string {
  16898. return awsutil.Prettify(s)
  16899. }
  16900. // GoString returns the string representation.
  16901. //
  16902. // API parameter values that are decorated as "sensitive" in the API will not
  16903. // be included in the string output. The member name will be present, but the
  16904. // value will be replaced with "sensitive".
  16905. func (s TagResourceOutput) GoString() string {
  16906. return s.String()
  16907. }
  16908. // Text transformations eliminate some of the unusual formatting that attackers
  16909. // use in web requests in an effort to bypass detection.
  16910. type TextTransformation struct {
  16911. _ struct{} `type:"structure"`
  16912. // Sets the relative processing order for multiple transformations that are
  16913. // defined for a rule statement. WAF processes all transformations, from lowest
  16914. // priority to highest, before inspecting the transformed content. The priorities
  16915. // don't need to be consecutive, but they must all be different.
  16916. //
  16917. // Priority is a required field
  16918. Priority *int64 `type:"integer" required:"true"`
  16919. // You can specify the following transformation types:
  16920. //
  16921. // BASE64_DECODE - Decode a Base64-encoded string.
  16922. //
  16923. // BASE64_DECODE_EXT - Decode a Base64-encoded string, but use a forgiving implementation
  16924. // that ignores characters that aren't valid.
  16925. //
  16926. // CMD_LINE - Command-line transformations. These are helpful in reducing effectiveness
  16927. // of attackers who inject an operating system command-line command and use
  16928. // unusual formatting to disguise some or all of the command.
  16929. //
  16930. // * Delete the following characters: \ " ' ^
  16931. //
  16932. // * Delete spaces before the following characters: / (
  16933. //
  16934. // * Replace the following characters with a space: , ;
  16935. //
  16936. // * Replace multiple spaces with one space
  16937. //
  16938. // * Convert uppercase letters (A-Z) to lowercase (a-z)
  16939. //
  16940. // COMPRESS_WHITE_SPACE - Replace these characters with a space character (decimal
  16941. // 32):
  16942. //
  16943. // * \f, formfeed, decimal 12
  16944. //
  16945. // * \t, tab, decimal 9
  16946. //
  16947. // * \n, newline, decimal 10
  16948. //
  16949. // * \r, carriage return, decimal 13
  16950. //
  16951. // * \v, vertical tab, decimal 11
  16952. //
  16953. // * Non-breaking space, decimal 160
  16954. //
  16955. // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
  16956. //
  16957. // CSS_DECODE - Decode characters that were encoded using CSS 2.x escape rules
  16958. // syndata.html#characters. This function uses up to two bytes in the decoding
  16959. // process, so it can help to uncover ASCII characters that were encoded using
  16960. // CSS encoding that wouldn’t typically be encoded. It's also useful in countering
  16961. // evasion, which is a combination of a backslash and non-hexadecimal characters.
  16962. // For example, ja\vascript for javascript.
  16963. //
  16964. // ESCAPE_SEQ_DECODE - Decode the following ANSI C escape sequences: \a, \b,
  16965. // \f, \n, \r, \t, \v, \\, \?, \', \", \xHH (hexadecimal), \0OOO (octal). Encodings
  16966. // that aren't valid remain in the output.
  16967. //
  16968. // HEX_DECODE - Decode a string of hexadecimal characters into a binary.
  16969. //
  16970. // HTML_ENTITY_DECODE - Replace HTML-encoded characters with unencoded characters.
  16971. // HTML_ENTITY_DECODE performs these operations:
  16972. //
  16973. // * Replaces (ampersand)quot; with "
  16974. //
  16975. // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
  16976. //
  16977. // * Replaces (ampersand)lt; with a "less than" symbol
  16978. //
  16979. // * Replaces (ampersand)gt; with >
  16980. //
  16981. // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
  16982. // with the corresponding characters
  16983. //
  16984. // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
  16985. // with the corresponding characters
  16986. //
  16987. // JS_DECODE - Decode JavaScript escape sequences. If a \ u HHHH code is in
  16988. // the full-width ASCII code range of FF01-FF5E, then the higher byte is used
  16989. // to detect and adjust the lower byte. If not, only the lower byte is used
  16990. // and the higher byte is zeroed, causing a possible loss of information.
  16991. //
  16992. // LOWERCASE - Convert uppercase letters (A-Z) to lowercase (a-z).
  16993. //
  16994. // MD5 - Calculate an MD5 hash from the data in the input. The computed hash
  16995. // is in a raw binary form.
  16996. //
  16997. // NONE - Specify NONE if you don't want any text transformations.
  16998. //
  16999. // NORMALIZE_PATH - Remove multiple slashes, directory self-references, and
  17000. // directory back-references that are not at the beginning of the input from
  17001. // an input string.
  17002. //
  17003. // NORMALIZE_PATH_WIN - This is the same as NORMALIZE_PATH, but first converts
  17004. // backslash characters to forward slashes.
  17005. //
  17006. // REMOVE_NULLS - Remove all NULL bytes from the input.
  17007. //
  17008. // REPLACE_COMMENTS - Replace each occurrence of a C-style comment (/* ... */)
  17009. // with a single space. Multiple consecutive occurrences are not compressed.
  17010. // Unterminated comments are also replaced with a space (ASCII 0x20). However,
  17011. // a standalone termination of a comment (*/) is not acted upon.
  17012. //
  17013. // REPLACE_NULLS - Replace NULL bytes in the input with space characters (ASCII
  17014. // 0x20).
  17015. //
  17016. // SQL_HEX_DECODE - Decode SQL hex data. Example (0x414243) will be decoded
  17017. // to (ABC).
  17018. //
  17019. // URL_DECODE - Decode a URL-encoded value.
  17020. //
  17021. // URL_DECODE_UNI - Like URL_DECODE, but with support for Microsoft-specific
  17022. // %u encoding. If the code is in the full-width ASCII code range of FF01-FF5E,
  17023. // the higher byte is used to detect and adjust the lower byte. Otherwise, only
  17024. // the lower byte is used and the higher byte is zeroed.
  17025. //
  17026. // UTF8_TO_UNICODE - Convert all UTF-8 character sequences to Unicode. This
  17027. // helps input normalization, and minimizing false-positives and false-negatives
  17028. // for non-English languages.
  17029. //
  17030. // Type is a required field
  17031. Type *string `type:"string" required:"true" enum:"TextTransformationType"`
  17032. }
  17033. // String returns the string representation.
  17034. //
  17035. // API parameter values that are decorated as "sensitive" in the API will not
  17036. // be included in the string output. The member name will be present, but the
  17037. // value will be replaced with "sensitive".
  17038. func (s TextTransformation) String() string {
  17039. return awsutil.Prettify(s)
  17040. }
  17041. // GoString returns the string representation.
  17042. //
  17043. // API parameter values that are decorated as "sensitive" in the API will not
  17044. // be included in the string output. The member name will be present, but the
  17045. // value will be replaced with "sensitive".
  17046. func (s TextTransformation) GoString() string {
  17047. return s.String()
  17048. }
  17049. // Validate inspects the fields of the type to determine if they are valid.
  17050. func (s *TextTransformation) Validate() error {
  17051. invalidParams := request.ErrInvalidParams{Context: "TextTransformation"}
  17052. if s.Priority == nil {
  17053. invalidParams.Add(request.NewErrParamRequired("Priority"))
  17054. }
  17055. if s.Type == nil {
  17056. invalidParams.Add(request.NewErrParamRequired("Type"))
  17057. }
  17058. if invalidParams.Len() > 0 {
  17059. return invalidParams
  17060. }
  17061. return nil
  17062. }
  17063. // SetPriority sets the Priority field's value.
  17064. func (s *TextTransformation) SetPriority(v int64) *TextTransformation {
  17065. s.Priority = &v
  17066. return s
  17067. }
  17068. // SetType sets the Type field's value.
  17069. func (s *TextTransformation) SetType(v string) *TextTransformation {
  17070. s.Type = &v
  17071. return s
  17072. }
  17073. // In a GetSampledRequests request, the StartTime and EndTime objects specify
  17074. // the time range for which you want WAF to return a sample of web requests.
  17075. //
  17076. // You must specify the times in Coordinated Universal Time (UTC) format. UTC
  17077. // format includes the special designator, Z. For example, "2016-09-27T14:50Z".
  17078. // You can specify any time range in the previous three hours.
  17079. //
  17080. // In a GetSampledRequests response, the StartTime and EndTime objects specify
  17081. // the time range for which WAF actually returned a sample of web requests.
  17082. // WAF gets the specified number of requests from among the first 5,000 requests
  17083. // that your Amazon Web Services resource receives during the specified time
  17084. // period. If your resource receives more than 5,000 requests during that period,
  17085. // WAF stops sampling after the 5,000th request. In that case, EndTime is the
  17086. // time that WAF received the 5,000th request.
  17087. type TimeWindow struct {
  17088. _ struct{} `type:"structure"`
  17089. // The end of the time range from which you want GetSampledRequests to return
  17090. // a sample of the requests that your Amazon Web Services resource received.
  17091. // You must specify the times in Coordinated Universal Time (UTC) format. UTC
  17092. // format includes the special designator, Z. For example, "2016-09-27T14:50Z".
  17093. // You can specify any time range in the previous three hours.
  17094. //
  17095. // EndTime is a required field
  17096. EndTime *time.Time `type:"timestamp" required:"true"`
  17097. // The beginning of the time range from which you want GetSampledRequests to
  17098. // return a sample of the requests that your Amazon Web Services resource received.
  17099. // You must specify the times in Coordinated Universal Time (UTC) format. UTC
  17100. // format includes the special designator, Z. For example, "2016-09-27T14:50Z".
  17101. // You can specify any time range in the previous three hours.
  17102. //
  17103. // StartTime is a required field
  17104. StartTime *time.Time `type:"timestamp" required:"true"`
  17105. }
  17106. // String returns the string representation.
  17107. //
  17108. // API parameter values that are decorated as "sensitive" in the API will not
  17109. // be included in the string output. The member name will be present, but the
  17110. // value will be replaced with "sensitive".
  17111. func (s TimeWindow) String() string {
  17112. return awsutil.Prettify(s)
  17113. }
  17114. // GoString returns the string representation.
  17115. //
  17116. // API parameter values that are decorated as "sensitive" in the API will not
  17117. // be included in the string output. The member name will be present, but the
  17118. // value will be replaced with "sensitive".
  17119. func (s TimeWindow) GoString() string {
  17120. return s.String()
  17121. }
  17122. // Validate inspects the fields of the type to determine if they are valid.
  17123. func (s *TimeWindow) Validate() error {
  17124. invalidParams := request.ErrInvalidParams{Context: "TimeWindow"}
  17125. if s.EndTime == nil {
  17126. invalidParams.Add(request.NewErrParamRequired("EndTime"))
  17127. }
  17128. if s.StartTime == nil {
  17129. invalidParams.Add(request.NewErrParamRequired("StartTime"))
  17130. }
  17131. if invalidParams.Len() > 0 {
  17132. return invalidParams
  17133. }
  17134. return nil
  17135. }
  17136. // SetEndTime sets the EndTime field's value.
  17137. func (s *TimeWindow) SetEndTime(v time.Time) *TimeWindow {
  17138. s.EndTime = &v
  17139. return s
  17140. }
  17141. // SetStartTime sets the StartTime field's value.
  17142. func (s *TimeWindow) SetStartTime(v time.Time) *TimeWindow {
  17143. s.StartTime = &v
  17144. return s
  17145. }
  17146. type UntagResourceInput struct {
  17147. _ struct{} `type:"structure"`
  17148. // The Amazon Resource Name (ARN) of the resource.
  17149. //
  17150. // ResourceARN is a required field
  17151. ResourceARN *string `min:"20" type:"string" required:"true"`
  17152. // An array of keys identifying the tags to disassociate from the resource.
  17153. //
  17154. // TagKeys is a required field
  17155. TagKeys []*string `min:"1" type:"list" required:"true"`
  17156. }
  17157. // String returns the string representation.
  17158. //
  17159. // API parameter values that are decorated as "sensitive" in the API will not
  17160. // be included in the string output. The member name will be present, but the
  17161. // value will be replaced with "sensitive".
  17162. func (s UntagResourceInput) String() string {
  17163. return awsutil.Prettify(s)
  17164. }
  17165. // GoString returns the string representation.
  17166. //
  17167. // API parameter values that are decorated as "sensitive" in the API will not
  17168. // be included in the string output. The member name will be present, but the
  17169. // value will be replaced with "sensitive".
  17170. func (s UntagResourceInput) GoString() string {
  17171. return s.String()
  17172. }
  17173. // Validate inspects the fields of the type to determine if they are valid.
  17174. func (s *UntagResourceInput) Validate() error {
  17175. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  17176. if s.ResourceARN == nil {
  17177. invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
  17178. }
  17179. if s.ResourceARN != nil && len(*s.ResourceARN) < 20 {
  17180. invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 20))
  17181. }
  17182. if s.TagKeys == nil {
  17183. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  17184. }
  17185. if s.TagKeys != nil && len(s.TagKeys) < 1 {
  17186. invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
  17187. }
  17188. if invalidParams.Len() > 0 {
  17189. return invalidParams
  17190. }
  17191. return nil
  17192. }
  17193. // SetResourceARN sets the ResourceARN field's value.
  17194. func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput {
  17195. s.ResourceARN = &v
  17196. return s
  17197. }
  17198. // SetTagKeys sets the TagKeys field's value.
  17199. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  17200. s.TagKeys = v
  17201. return s
  17202. }
  17203. type UntagResourceOutput struct {
  17204. _ struct{} `type:"structure"`
  17205. }
  17206. // String returns the string representation.
  17207. //
  17208. // API parameter values that are decorated as "sensitive" in the API will not
  17209. // be included in the string output. The member name will be present, but the
  17210. // value will be replaced with "sensitive".
  17211. func (s UntagResourceOutput) String() string {
  17212. return awsutil.Prettify(s)
  17213. }
  17214. // GoString returns the string representation.
  17215. //
  17216. // API parameter values that are decorated as "sensitive" in the API will not
  17217. // be included in the string output. The member name will be present, but the
  17218. // value will be replaced with "sensitive".
  17219. func (s UntagResourceOutput) GoString() string {
  17220. return s.String()
  17221. }
  17222. type UpdateIPSetInput struct {
  17223. _ struct{} `type:"structure"`
  17224. // Contains an array of strings that specifies zero or more IP addresses or
  17225. // blocks of IP addresses. All addresses must be specified using Classless Inter-Domain
  17226. // Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except
  17227. // for /0.
  17228. //
  17229. // Example address strings:
  17230. //
  17231. // * To configure WAF to allow, block, or count requests that originated
  17232. // from the IP address 192.0.2.44, specify 192.0.2.44/32.
  17233. //
  17234. // * To configure WAF to allow, block, or count requests that originated
  17235. // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.
  17236. //
  17237. // * To configure WAF to allow, block, or count requests that originated
  17238. // from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.
  17239. //
  17240. // * To configure WAF to allow, block, or count requests that originated
  17241. // from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff,
  17242. // specify 1111:0000:0000:0000:0000:0000:0000:0000/64.
  17243. //
  17244. // For more information about CIDR notation, see the Wikipedia entry Classless
  17245. // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  17246. //
  17247. // Example JSON Addresses specifications:
  17248. //
  17249. // * Empty array: "Addresses": []
  17250. //
  17251. // * Array with one address: "Addresses": ["192.0.2.44/32"]
  17252. //
  17253. // * Array with three addresses: "Addresses": ["192.0.2.44/32", "192.0.2.0/24",
  17254. // "192.0.0.0/16"]
  17255. //
  17256. // * INVALID specification: "Addresses": [""] INVALID
  17257. //
  17258. // Addresses is a required field
  17259. Addresses []*string `type:"list" required:"true"`
  17260. // A description of the IP set that helps with identification.
  17261. Description *string `min:"1" type:"string"`
  17262. // A unique identifier for the set. This ID is returned in the responses to
  17263. // create and list commands. You provide it to operations like update and delete.
  17264. //
  17265. // Id is a required field
  17266. Id *string `min:"1" type:"string" required:"true"`
  17267. // A token used for optimistic locking. WAF returns a token to your get and
  17268. // list requests, to mark the state of the entity at the time of the request.
  17269. // To make changes to the entity associated with the token, you provide the
  17270. // token to operations like update and delete. WAF uses the token to ensure
  17271. // that no changes have been made to the entity since you last retrieved it.
  17272. // If a change has been made, the update fails with a WAFOptimisticLockException.
  17273. // If this happens, perform another get, and use the new token returned by that
  17274. // operation.
  17275. //
  17276. // LockToken is a required field
  17277. LockToken *string `min:"1" type:"string" required:"true"`
  17278. // The name of the IP set. You cannot change the name of an IPSet after you
  17279. // create it.
  17280. //
  17281. // Name is a required field
  17282. Name *string `min:"1" type:"string" required:"true"`
  17283. // Specifies whether this is for an Amazon CloudFront distribution or for a
  17284. // regional application. A regional application can be an Application Load Balancer
  17285. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  17286. // Cognito user pool.
  17287. //
  17288. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  17289. // as follows:
  17290. //
  17291. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  17292. // --region=us-east-1.
  17293. //
  17294. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  17295. //
  17296. // Scope is a required field
  17297. Scope *string `type:"string" required:"true" enum:"Scope"`
  17298. }
  17299. // String returns the string representation.
  17300. //
  17301. // API parameter values that are decorated as "sensitive" in the API will not
  17302. // be included in the string output. The member name will be present, but the
  17303. // value will be replaced with "sensitive".
  17304. func (s UpdateIPSetInput) String() string {
  17305. return awsutil.Prettify(s)
  17306. }
  17307. // GoString returns the string representation.
  17308. //
  17309. // API parameter values that are decorated as "sensitive" in the API will not
  17310. // be included in the string output. The member name will be present, but the
  17311. // value will be replaced with "sensitive".
  17312. func (s UpdateIPSetInput) GoString() string {
  17313. return s.String()
  17314. }
  17315. // Validate inspects the fields of the type to determine if they are valid.
  17316. func (s *UpdateIPSetInput) Validate() error {
  17317. invalidParams := request.ErrInvalidParams{Context: "UpdateIPSetInput"}
  17318. if s.Addresses == nil {
  17319. invalidParams.Add(request.NewErrParamRequired("Addresses"))
  17320. }
  17321. if s.Description != nil && len(*s.Description) < 1 {
  17322. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  17323. }
  17324. if s.Id == nil {
  17325. invalidParams.Add(request.NewErrParamRequired("Id"))
  17326. }
  17327. if s.Id != nil && len(*s.Id) < 1 {
  17328. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  17329. }
  17330. if s.LockToken == nil {
  17331. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  17332. }
  17333. if s.LockToken != nil && len(*s.LockToken) < 1 {
  17334. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  17335. }
  17336. if s.Name == nil {
  17337. invalidParams.Add(request.NewErrParamRequired("Name"))
  17338. }
  17339. if s.Name != nil && len(*s.Name) < 1 {
  17340. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  17341. }
  17342. if s.Scope == nil {
  17343. invalidParams.Add(request.NewErrParamRequired("Scope"))
  17344. }
  17345. if invalidParams.Len() > 0 {
  17346. return invalidParams
  17347. }
  17348. return nil
  17349. }
  17350. // SetAddresses sets the Addresses field's value.
  17351. func (s *UpdateIPSetInput) SetAddresses(v []*string) *UpdateIPSetInput {
  17352. s.Addresses = v
  17353. return s
  17354. }
  17355. // SetDescription sets the Description field's value.
  17356. func (s *UpdateIPSetInput) SetDescription(v string) *UpdateIPSetInput {
  17357. s.Description = &v
  17358. return s
  17359. }
  17360. // SetId sets the Id field's value.
  17361. func (s *UpdateIPSetInput) SetId(v string) *UpdateIPSetInput {
  17362. s.Id = &v
  17363. return s
  17364. }
  17365. // SetLockToken sets the LockToken field's value.
  17366. func (s *UpdateIPSetInput) SetLockToken(v string) *UpdateIPSetInput {
  17367. s.LockToken = &v
  17368. return s
  17369. }
  17370. // SetName sets the Name field's value.
  17371. func (s *UpdateIPSetInput) SetName(v string) *UpdateIPSetInput {
  17372. s.Name = &v
  17373. return s
  17374. }
  17375. // SetScope sets the Scope field's value.
  17376. func (s *UpdateIPSetInput) SetScope(v string) *UpdateIPSetInput {
  17377. s.Scope = &v
  17378. return s
  17379. }
  17380. type UpdateIPSetOutput struct {
  17381. _ struct{} `type:"structure"`
  17382. // A token used for optimistic locking. WAF returns this token to your update
  17383. // requests. You use NextLockToken in the same manner as you use LockToken.
  17384. NextLockToken *string `min:"1" type:"string"`
  17385. }
  17386. // String returns the string representation.
  17387. //
  17388. // API parameter values that are decorated as "sensitive" in the API will not
  17389. // be included in the string output. The member name will be present, but the
  17390. // value will be replaced with "sensitive".
  17391. func (s UpdateIPSetOutput) String() string {
  17392. return awsutil.Prettify(s)
  17393. }
  17394. // GoString returns the string representation.
  17395. //
  17396. // API parameter values that are decorated as "sensitive" in the API will not
  17397. // be included in the string output. The member name will be present, but the
  17398. // value will be replaced with "sensitive".
  17399. func (s UpdateIPSetOutput) GoString() string {
  17400. return s.String()
  17401. }
  17402. // SetNextLockToken sets the NextLockToken field's value.
  17403. func (s *UpdateIPSetOutput) SetNextLockToken(v string) *UpdateIPSetOutput {
  17404. s.NextLockToken = &v
  17405. return s
  17406. }
  17407. type UpdateManagedRuleSetVersionExpiryDateInput struct {
  17408. _ struct{} `type:"structure"`
  17409. // The time that you want the version to expire.
  17410. //
  17411. // Times are in Coordinated Universal Time (UTC) format. UTC format includes
  17412. // the special designator, Z. For example, "2016-09-27T14:50Z".
  17413. //
  17414. // ExpiryTimestamp is a required field
  17415. ExpiryTimestamp *time.Time `type:"timestamp" required:"true"`
  17416. // A unique identifier for the managed rule set. The ID is returned in the responses
  17417. // to commands like list. You provide it to operations like get and update.
  17418. //
  17419. // Id is a required field
  17420. Id *string `min:"1" type:"string" required:"true"`
  17421. // A token used for optimistic locking. WAF returns a token to your get and
  17422. // list requests, to mark the state of the entity at the time of the request.
  17423. // To make changes to the entity associated with the token, you provide the
  17424. // token to operations like update and delete. WAF uses the token to ensure
  17425. // that no changes have been made to the entity since you last retrieved it.
  17426. // If a change has been made, the update fails with a WAFOptimisticLockException.
  17427. // If this happens, perform another get, and use the new token returned by that
  17428. // operation.
  17429. //
  17430. // LockToken is a required field
  17431. LockToken *string `min:"1" type:"string" required:"true"`
  17432. // The name of the managed rule set. You use this, along with the rule set ID,
  17433. // to identify the rule set.
  17434. //
  17435. // This name is assigned to the corresponding managed rule group, which your
  17436. // customers can access and use.
  17437. //
  17438. // Name is a required field
  17439. Name *string `min:"1" type:"string" required:"true"`
  17440. // Specifies whether this is for an Amazon CloudFront distribution or for a
  17441. // regional application. A regional application can be an Application Load Balancer
  17442. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  17443. // Cognito user pool.
  17444. //
  17445. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  17446. // as follows:
  17447. //
  17448. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  17449. // --region=us-east-1.
  17450. //
  17451. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  17452. //
  17453. // Scope is a required field
  17454. Scope *string `type:"string" required:"true" enum:"Scope"`
  17455. // The version that you want to remove from your list of offerings for the named
  17456. // managed rule group.
  17457. //
  17458. // VersionToExpire is a required field
  17459. VersionToExpire *string `min:"1" type:"string" required:"true"`
  17460. }
  17461. // String returns the string representation.
  17462. //
  17463. // API parameter values that are decorated as "sensitive" in the API will not
  17464. // be included in the string output. The member name will be present, but the
  17465. // value will be replaced with "sensitive".
  17466. func (s UpdateManagedRuleSetVersionExpiryDateInput) String() string {
  17467. return awsutil.Prettify(s)
  17468. }
  17469. // GoString returns the string representation.
  17470. //
  17471. // API parameter values that are decorated as "sensitive" in the API will not
  17472. // be included in the string output. The member name will be present, but the
  17473. // value will be replaced with "sensitive".
  17474. func (s UpdateManagedRuleSetVersionExpiryDateInput) GoString() string {
  17475. return s.String()
  17476. }
  17477. // Validate inspects the fields of the type to determine if they are valid.
  17478. func (s *UpdateManagedRuleSetVersionExpiryDateInput) Validate() error {
  17479. invalidParams := request.ErrInvalidParams{Context: "UpdateManagedRuleSetVersionExpiryDateInput"}
  17480. if s.ExpiryTimestamp == nil {
  17481. invalidParams.Add(request.NewErrParamRequired("ExpiryTimestamp"))
  17482. }
  17483. if s.Id == nil {
  17484. invalidParams.Add(request.NewErrParamRequired("Id"))
  17485. }
  17486. if s.Id != nil && len(*s.Id) < 1 {
  17487. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  17488. }
  17489. if s.LockToken == nil {
  17490. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  17491. }
  17492. if s.LockToken != nil && len(*s.LockToken) < 1 {
  17493. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  17494. }
  17495. if s.Name == nil {
  17496. invalidParams.Add(request.NewErrParamRequired("Name"))
  17497. }
  17498. if s.Name != nil && len(*s.Name) < 1 {
  17499. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  17500. }
  17501. if s.Scope == nil {
  17502. invalidParams.Add(request.NewErrParamRequired("Scope"))
  17503. }
  17504. if s.VersionToExpire == nil {
  17505. invalidParams.Add(request.NewErrParamRequired("VersionToExpire"))
  17506. }
  17507. if s.VersionToExpire != nil && len(*s.VersionToExpire) < 1 {
  17508. invalidParams.Add(request.NewErrParamMinLen("VersionToExpire", 1))
  17509. }
  17510. if invalidParams.Len() > 0 {
  17511. return invalidParams
  17512. }
  17513. return nil
  17514. }
  17515. // SetExpiryTimestamp sets the ExpiryTimestamp field's value.
  17516. func (s *UpdateManagedRuleSetVersionExpiryDateInput) SetExpiryTimestamp(v time.Time) *UpdateManagedRuleSetVersionExpiryDateInput {
  17517. s.ExpiryTimestamp = &v
  17518. return s
  17519. }
  17520. // SetId sets the Id field's value.
  17521. func (s *UpdateManagedRuleSetVersionExpiryDateInput) SetId(v string) *UpdateManagedRuleSetVersionExpiryDateInput {
  17522. s.Id = &v
  17523. return s
  17524. }
  17525. // SetLockToken sets the LockToken field's value.
  17526. func (s *UpdateManagedRuleSetVersionExpiryDateInput) SetLockToken(v string) *UpdateManagedRuleSetVersionExpiryDateInput {
  17527. s.LockToken = &v
  17528. return s
  17529. }
  17530. // SetName sets the Name field's value.
  17531. func (s *UpdateManagedRuleSetVersionExpiryDateInput) SetName(v string) *UpdateManagedRuleSetVersionExpiryDateInput {
  17532. s.Name = &v
  17533. return s
  17534. }
  17535. // SetScope sets the Scope field's value.
  17536. func (s *UpdateManagedRuleSetVersionExpiryDateInput) SetScope(v string) *UpdateManagedRuleSetVersionExpiryDateInput {
  17537. s.Scope = &v
  17538. return s
  17539. }
  17540. // SetVersionToExpire sets the VersionToExpire field's value.
  17541. func (s *UpdateManagedRuleSetVersionExpiryDateInput) SetVersionToExpire(v string) *UpdateManagedRuleSetVersionExpiryDateInput {
  17542. s.VersionToExpire = &v
  17543. return s
  17544. }
  17545. type UpdateManagedRuleSetVersionExpiryDateOutput struct {
  17546. _ struct{} `type:"structure"`
  17547. // The version that is set to expire.
  17548. ExpiringVersion *string `min:"1" type:"string"`
  17549. // The time that the version will expire.
  17550. //
  17551. // Times are in Coordinated Universal Time (UTC) format. UTC format includes
  17552. // the special designator, Z. For example, "2016-09-27T14:50Z".
  17553. ExpiryTimestamp *time.Time `type:"timestamp"`
  17554. // A token used for optimistic locking. WAF returns a token to your get and
  17555. // list requests, to mark the state of the entity at the time of the request.
  17556. // To make changes to the entity associated with the token, you provide the
  17557. // token to operations like update and delete. WAF uses the token to ensure
  17558. // that no changes have been made to the entity since you last retrieved it.
  17559. // If a change has been made, the update fails with a WAFOptimisticLockException.
  17560. // If this happens, perform another get, and use the new token returned by that
  17561. // operation.
  17562. NextLockToken *string `min:"1" type:"string"`
  17563. }
  17564. // String returns the string representation.
  17565. //
  17566. // API parameter values that are decorated as "sensitive" in the API will not
  17567. // be included in the string output. The member name will be present, but the
  17568. // value will be replaced with "sensitive".
  17569. func (s UpdateManagedRuleSetVersionExpiryDateOutput) String() string {
  17570. return awsutil.Prettify(s)
  17571. }
  17572. // GoString returns the string representation.
  17573. //
  17574. // API parameter values that are decorated as "sensitive" in the API will not
  17575. // be included in the string output. The member name will be present, but the
  17576. // value will be replaced with "sensitive".
  17577. func (s UpdateManagedRuleSetVersionExpiryDateOutput) GoString() string {
  17578. return s.String()
  17579. }
  17580. // SetExpiringVersion sets the ExpiringVersion field's value.
  17581. func (s *UpdateManagedRuleSetVersionExpiryDateOutput) SetExpiringVersion(v string) *UpdateManagedRuleSetVersionExpiryDateOutput {
  17582. s.ExpiringVersion = &v
  17583. return s
  17584. }
  17585. // SetExpiryTimestamp sets the ExpiryTimestamp field's value.
  17586. func (s *UpdateManagedRuleSetVersionExpiryDateOutput) SetExpiryTimestamp(v time.Time) *UpdateManagedRuleSetVersionExpiryDateOutput {
  17587. s.ExpiryTimestamp = &v
  17588. return s
  17589. }
  17590. // SetNextLockToken sets the NextLockToken field's value.
  17591. func (s *UpdateManagedRuleSetVersionExpiryDateOutput) SetNextLockToken(v string) *UpdateManagedRuleSetVersionExpiryDateOutput {
  17592. s.NextLockToken = &v
  17593. return s
  17594. }
  17595. type UpdateRegexPatternSetInput struct {
  17596. _ struct{} `type:"structure"`
  17597. // A description of the set that helps with identification.
  17598. Description *string `min:"1" type:"string"`
  17599. // A unique identifier for the set. This ID is returned in the responses to
  17600. // create and list commands. You provide it to operations like update and delete.
  17601. //
  17602. // Id is a required field
  17603. Id *string `min:"1" type:"string" required:"true"`
  17604. // A token used for optimistic locking. WAF returns a token to your get and
  17605. // list requests, to mark the state of the entity at the time of the request.
  17606. // To make changes to the entity associated with the token, you provide the
  17607. // token to operations like update and delete. WAF uses the token to ensure
  17608. // that no changes have been made to the entity since you last retrieved it.
  17609. // If a change has been made, the update fails with a WAFOptimisticLockException.
  17610. // If this happens, perform another get, and use the new token returned by that
  17611. // operation.
  17612. //
  17613. // LockToken is a required field
  17614. LockToken *string `min:"1" type:"string" required:"true"`
  17615. // The name of the set. You cannot change the name after you create the set.
  17616. //
  17617. // Name is a required field
  17618. Name *string `min:"1" type:"string" required:"true"`
  17619. // RegularExpressionList is a required field
  17620. RegularExpressionList []*Regex `type:"list" required:"true"`
  17621. // Specifies whether this is for an Amazon CloudFront distribution or for a
  17622. // regional application. A regional application can be an Application Load Balancer
  17623. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  17624. // Cognito user pool.
  17625. //
  17626. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  17627. // as follows:
  17628. //
  17629. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  17630. // --region=us-east-1.
  17631. //
  17632. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  17633. //
  17634. // Scope is a required field
  17635. Scope *string `type:"string" required:"true" enum:"Scope"`
  17636. }
  17637. // String returns the string representation.
  17638. //
  17639. // API parameter values that are decorated as "sensitive" in the API will not
  17640. // be included in the string output. The member name will be present, but the
  17641. // value will be replaced with "sensitive".
  17642. func (s UpdateRegexPatternSetInput) String() string {
  17643. return awsutil.Prettify(s)
  17644. }
  17645. // GoString returns the string representation.
  17646. //
  17647. // API parameter values that are decorated as "sensitive" in the API will not
  17648. // be included in the string output. The member name will be present, but the
  17649. // value will be replaced with "sensitive".
  17650. func (s UpdateRegexPatternSetInput) GoString() string {
  17651. return s.String()
  17652. }
  17653. // Validate inspects the fields of the type to determine if they are valid.
  17654. func (s *UpdateRegexPatternSetInput) Validate() error {
  17655. invalidParams := request.ErrInvalidParams{Context: "UpdateRegexPatternSetInput"}
  17656. if s.Description != nil && len(*s.Description) < 1 {
  17657. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  17658. }
  17659. if s.Id == nil {
  17660. invalidParams.Add(request.NewErrParamRequired("Id"))
  17661. }
  17662. if s.Id != nil && len(*s.Id) < 1 {
  17663. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  17664. }
  17665. if s.LockToken == nil {
  17666. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  17667. }
  17668. if s.LockToken != nil && len(*s.LockToken) < 1 {
  17669. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  17670. }
  17671. if s.Name == nil {
  17672. invalidParams.Add(request.NewErrParamRequired("Name"))
  17673. }
  17674. if s.Name != nil && len(*s.Name) < 1 {
  17675. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  17676. }
  17677. if s.RegularExpressionList == nil {
  17678. invalidParams.Add(request.NewErrParamRequired("RegularExpressionList"))
  17679. }
  17680. if s.Scope == nil {
  17681. invalidParams.Add(request.NewErrParamRequired("Scope"))
  17682. }
  17683. if s.RegularExpressionList != nil {
  17684. for i, v := range s.RegularExpressionList {
  17685. if v == nil {
  17686. continue
  17687. }
  17688. if err := v.Validate(); err != nil {
  17689. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RegularExpressionList", i), err.(request.ErrInvalidParams))
  17690. }
  17691. }
  17692. }
  17693. if invalidParams.Len() > 0 {
  17694. return invalidParams
  17695. }
  17696. return nil
  17697. }
  17698. // SetDescription sets the Description field's value.
  17699. func (s *UpdateRegexPatternSetInput) SetDescription(v string) *UpdateRegexPatternSetInput {
  17700. s.Description = &v
  17701. return s
  17702. }
  17703. // SetId sets the Id field's value.
  17704. func (s *UpdateRegexPatternSetInput) SetId(v string) *UpdateRegexPatternSetInput {
  17705. s.Id = &v
  17706. return s
  17707. }
  17708. // SetLockToken sets the LockToken field's value.
  17709. func (s *UpdateRegexPatternSetInput) SetLockToken(v string) *UpdateRegexPatternSetInput {
  17710. s.LockToken = &v
  17711. return s
  17712. }
  17713. // SetName sets the Name field's value.
  17714. func (s *UpdateRegexPatternSetInput) SetName(v string) *UpdateRegexPatternSetInput {
  17715. s.Name = &v
  17716. return s
  17717. }
  17718. // SetRegularExpressionList sets the RegularExpressionList field's value.
  17719. func (s *UpdateRegexPatternSetInput) SetRegularExpressionList(v []*Regex) *UpdateRegexPatternSetInput {
  17720. s.RegularExpressionList = v
  17721. return s
  17722. }
  17723. // SetScope sets the Scope field's value.
  17724. func (s *UpdateRegexPatternSetInput) SetScope(v string) *UpdateRegexPatternSetInput {
  17725. s.Scope = &v
  17726. return s
  17727. }
  17728. type UpdateRegexPatternSetOutput struct {
  17729. _ struct{} `type:"structure"`
  17730. // A token used for optimistic locking. WAF returns this token to your update
  17731. // requests. You use NextLockToken in the same manner as you use LockToken.
  17732. NextLockToken *string `min:"1" type:"string"`
  17733. }
  17734. // String returns the string representation.
  17735. //
  17736. // API parameter values that are decorated as "sensitive" in the API will not
  17737. // be included in the string output. The member name will be present, but the
  17738. // value will be replaced with "sensitive".
  17739. func (s UpdateRegexPatternSetOutput) String() string {
  17740. return awsutil.Prettify(s)
  17741. }
  17742. // GoString returns the string representation.
  17743. //
  17744. // API parameter values that are decorated as "sensitive" in the API will not
  17745. // be included in the string output. The member name will be present, but the
  17746. // value will be replaced with "sensitive".
  17747. func (s UpdateRegexPatternSetOutput) GoString() string {
  17748. return s.String()
  17749. }
  17750. // SetNextLockToken sets the NextLockToken field's value.
  17751. func (s *UpdateRegexPatternSetOutput) SetNextLockToken(v string) *UpdateRegexPatternSetOutput {
  17752. s.NextLockToken = &v
  17753. return s
  17754. }
  17755. type UpdateRuleGroupInput struct {
  17756. _ struct{} `type:"structure"`
  17757. // A map of custom response keys and content bodies. When you create a rule
  17758. // with a block action, you can send a custom response to the web request. You
  17759. // define these for the rule group, and then use them in the rules that you
  17760. // define in the rule group.
  17761. //
  17762. // For information about customizing web requests and responses, see Customizing
  17763. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  17764. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  17765. //
  17766. // For information about the limits on count and size for custom request and
  17767. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  17768. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  17769. CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"`
  17770. // A description of the rule group that helps with identification.
  17771. Description *string `min:"1" type:"string"`
  17772. // A unique identifier for the rule group. This ID is returned in the responses
  17773. // to create and list commands. You provide it to operations like update and
  17774. // delete.
  17775. //
  17776. // Id is a required field
  17777. Id *string `min:"1" type:"string" required:"true"`
  17778. // A token used for optimistic locking. WAF returns a token to your get and
  17779. // list requests, to mark the state of the entity at the time of the request.
  17780. // To make changes to the entity associated with the token, you provide the
  17781. // token to operations like update and delete. WAF uses the token to ensure
  17782. // that no changes have been made to the entity since you last retrieved it.
  17783. // If a change has been made, the update fails with a WAFOptimisticLockException.
  17784. // If this happens, perform another get, and use the new token returned by that
  17785. // operation.
  17786. //
  17787. // LockToken is a required field
  17788. LockToken *string `min:"1" type:"string" required:"true"`
  17789. // The name of the rule group. You cannot change the name of a rule group after
  17790. // you create it.
  17791. //
  17792. // Name is a required field
  17793. Name *string `min:"1" type:"string" required:"true"`
  17794. // The Rule statements used to identify the web requests that you want to allow,
  17795. // block, or count. Each rule includes one top-level statement that WAF uses
  17796. // to identify matching web requests, and parameters that govern how WAF handles
  17797. // them.
  17798. Rules []*Rule `type:"list"`
  17799. // Specifies whether this is for an Amazon CloudFront distribution or for a
  17800. // regional application. A regional application can be an Application Load Balancer
  17801. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  17802. // Cognito user pool.
  17803. //
  17804. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  17805. // as follows:
  17806. //
  17807. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  17808. // --region=us-east-1.
  17809. //
  17810. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  17811. //
  17812. // Scope is a required field
  17813. Scope *string `type:"string" required:"true" enum:"Scope"`
  17814. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  17815. //
  17816. // VisibilityConfig is a required field
  17817. VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
  17818. }
  17819. // String returns the string representation.
  17820. //
  17821. // API parameter values that are decorated as "sensitive" in the API will not
  17822. // be included in the string output. The member name will be present, but the
  17823. // value will be replaced with "sensitive".
  17824. func (s UpdateRuleGroupInput) String() string {
  17825. return awsutil.Prettify(s)
  17826. }
  17827. // GoString returns the string representation.
  17828. //
  17829. // API parameter values that are decorated as "sensitive" in the API will not
  17830. // be included in the string output. The member name will be present, but the
  17831. // value will be replaced with "sensitive".
  17832. func (s UpdateRuleGroupInput) GoString() string {
  17833. return s.String()
  17834. }
  17835. // Validate inspects the fields of the type to determine if they are valid.
  17836. func (s *UpdateRuleGroupInput) Validate() error {
  17837. invalidParams := request.ErrInvalidParams{Context: "UpdateRuleGroupInput"}
  17838. if s.CustomResponseBodies != nil && len(s.CustomResponseBodies) < 1 {
  17839. invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodies", 1))
  17840. }
  17841. if s.Description != nil && len(*s.Description) < 1 {
  17842. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  17843. }
  17844. if s.Id == nil {
  17845. invalidParams.Add(request.NewErrParamRequired("Id"))
  17846. }
  17847. if s.Id != nil && len(*s.Id) < 1 {
  17848. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  17849. }
  17850. if s.LockToken == nil {
  17851. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  17852. }
  17853. if s.LockToken != nil && len(*s.LockToken) < 1 {
  17854. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  17855. }
  17856. if s.Name == nil {
  17857. invalidParams.Add(request.NewErrParamRequired("Name"))
  17858. }
  17859. if s.Name != nil && len(*s.Name) < 1 {
  17860. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  17861. }
  17862. if s.Scope == nil {
  17863. invalidParams.Add(request.NewErrParamRequired("Scope"))
  17864. }
  17865. if s.VisibilityConfig == nil {
  17866. invalidParams.Add(request.NewErrParamRequired("VisibilityConfig"))
  17867. }
  17868. if s.CustomResponseBodies != nil {
  17869. for i, v := range s.CustomResponseBodies {
  17870. if v == nil {
  17871. continue
  17872. }
  17873. if err := v.Validate(); err != nil {
  17874. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomResponseBodies", i), err.(request.ErrInvalidParams))
  17875. }
  17876. }
  17877. }
  17878. if s.Rules != nil {
  17879. for i, v := range s.Rules {
  17880. if v == nil {
  17881. continue
  17882. }
  17883. if err := v.Validate(); err != nil {
  17884. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  17885. }
  17886. }
  17887. }
  17888. if s.VisibilityConfig != nil {
  17889. if err := s.VisibilityConfig.Validate(); err != nil {
  17890. invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams))
  17891. }
  17892. }
  17893. if invalidParams.Len() > 0 {
  17894. return invalidParams
  17895. }
  17896. return nil
  17897. }
  17898. // SetCustomResponseBodies sets the CustomResponseBodies field's value.
  17899. func (s *UpdateRuleGroupInput) SetCustomResponseBodies(v map[string]*CustomResponseBody) *UpdateRuleGroupInput {
  17900. s.CustomResponseBodies = v
  17901. return s
  17902. }
  17903. // SetDescription sets the Description field's value.
  17904. func (s *UpdateRuleGroupInput) SetDescription(v string) *UpdateRuleGroupInput {
  17905. s.Description = &v
  17906. return s
  17907. }
  17908. // SetId sets the Id field's value.
  17909. func (s *UpdateRuleGroupInput) SetId(v string) *UpdateRuleGroupInput {
  17910. s.Id = &v
  17911. return s
  17912. }
  17913. // SetLockToken sets the LockToken field's value.
  17914. func (s *UpdateRuleGroupInput) SetLockToken(v string) *UpdateRuleGroupInput {
  17915. s.LockToken = &v
  17916. return s
  17917. }
  17918. // SetName sets the Name field's value.
  17919. func (s *UpdateRuleGroupInput) SetName(v string) *UpdateRuleGroupInput {
  17920. s.Name = &v
  17921. return s
  17922. }
  17923. // SetRules sets the Rules field's value.
  17924. func (s *UpdateRuleGroupInput) SetRules(v []*Rule) *UpdateRuleGroupInput {
  17925. s.Rules = v
  17926. return s
  17927. }
  17928. // SetScope sets the Scope field's value.
  17929. func (s *UpdateRuleGroupInput) SetScope(v string) *UpdateRuleGroupInput {
  17930. s.Scope = &v
  17931. return s
  17932. }
  17933. // SetVisibilityConfig sets the VisibilityConfig field's value.
  17934. func (s *UpdateRuleGroupInput) SetVisibilityConfig(v *VisibilityConfig) *UpdateRuleGroupInput {
  17935. s.VisibilityConfig = v
  17936. return s
  17937. }
  17938. type UpdateRuleGroupOutput struct {
  17939. _ struct{} `type:"structure"`
  17940. // A token used for optimistic locking. WAF returns this token to your update
  17941. // requests. You use NextLockToken in the same manner as you use LockToken.
  17942. NextLockToken *string `min:"1" type:"string"`
  17943. }
  17944. // String returns the string representation.
  17945. //
  17946. // API parameter values that are decorated as "sensitive" in the API will not
  17947. // be included in the string output. The member name will be present, but the
  17948. // value will be replaced with "sensitive".
  17949. func (s UpdateRuleGroupOutput) String() string {
  17950. return awsutil.Prettify(s)
  17951. }
  17952. // GoString returns the string representation.
  17953. //
  17954. // API parameter values that are decorated as "sensitive" in the API will not
  17955. // be included in the string output. The member name will be present, but the
  17956. // value will be replaced with "sensitive".
  17957. func (s UpdateRuleGroupOutput) GoString() string {
  17958. return s.String()
  17959. }
  17960. // SetNextLockToken sets the NextLockToken field's value.
  17961. func (s *UpdateRuleGroupOutput) SetNextLockToken(v string) *UpdateRuleGroupOutput {
  17962. s.NextLockToken = &v
  17963. return s
  17964. }
  17965. type UpdateWebACLInput struct {
  17966. _ struct{} `type:"structure"`
  17967. // Specifies how WAF should handle CAPTCHA evaluations for rules that don't
  17968. // have their own CaptchaConfig settings. If you don't specify this, WAF uses
  17969. // its default settings for CaptchaConfig.
  17970. CaptchaConfig *CaptchaConfig `type:"structure"`
  17971. // Specifies how WAF should handle challenge evaluations for rules that don't
  17972. // have their own ChallengeConfig settings. If you don't specify this, WAF uses
  17973. // its default settings for ChallengeConfig.
  17974. ChallengeConfig *ChallengeConfig `type:"structure"`
  17975. // A map of custom response keys and content bodies. When you create a rule
  17976. // with a block action, you can send a custom response to the web request. You
  17977. // define these for the web ACL, and then use them in the rules and default
  17978. // actions that you define in the web ACL.
  17979. //
  17980. // For information about customizing web requests and responses, see Customizing
  17981. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  17982. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  17983. //
  17984. // For information about the limits on count and size for custom request and
  17985. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  17986. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  17987. CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"`
  17988. // The action to perform if none of the Rules contained in the WebACL match.
  17989. //
  17990. // DefaultAction is a required field
  17991. DefaultAction *DefaultAction `type:"structure" required:"true"`
  17992. // A description of the web ACL that helps with identification.
  17993. Description *string `min:"1" type:"string"`
  17994. // The unique identifier for the web ACL. This ID is returned in the responses
  17995. // to create and list commands. You provide it to operations like update and
  17996. // delete.
  17997. //
  17998. // Id is a required field
  17999. Id *string `min:"1" type:"string" required:"true"`
  18000. // A token used for optimistic locking. WAF returns a token to your get and
  18001. // list requests, to mark the state of the entity at the time of the request.
  18002. // To make changes to the entity associated with the token, you provide the
  18003. // token to operations like update and delete. WAF uses the token to ensure
  18004. // that no changes have been made to the entity since you last retrieved it.
  18005. // If a change has been made, the update fails with a WAFOptimisticLockException.
  18006. // If this happens, perform another get, and use the new token returned by that
  18007. // operation.
  18008. //
  18009. // LockToken is a required field
  18010. LockToken *string `min:"1" type:"string" required:"true"`
  18011. // The name of the web ACL. You cannot change the name of a web ACL after you
  18012. // create it.
  18013. //
  18014. // Name is a required field
  18015. Name *string `min:"1" type:"string" required:"true"`
  18016. // The Rule statements used to identify the web requests that you want to allow,
  18017. // block, or count. Each rule includes one top-level statement that WAF uses
  18018. // to identify matching web requests, and parameters that govern how WAF handles
  18019. // them.
  18020. Rules []*Rule `type:"list"`
  18021. // Specifies whether this is for an Amazon CloudFront distribution or for a
  18022. // regional application. A regional application can be an Application Load Balancer
  18023. // (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon
  18024. // Cognito user pool.
  18025. //
  18026. // To work with CloudFront, you must also specify the Region US East (N. Virginia)
  18027. // as follows:
  18028. //
  18029. // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
  18030. // --region=us-east-1.
  18031. //
  18032. // * API and SDKs - For all calls, use the Region endpoint us-east-1.
  18033. //
  18034. // Scope is a required field
  18035. Scope *string `type:"string" required:"true" enum:"Scope"`
  18036. // Specifies the domains that WAF should accept in a web request token. This
  18037. // enables the use of tokens across multiple protected websites. When WAF provides
  18038. // a token, it uses the domain of the Amazon Web Services resource that the
  18039. // web ACL is protecting. If you don't specify a list of token domains, WAF
  18040. // accepts tokens only for the domain of the protected resource. With a token
  18041. // domain list, WAF accepts the resource's host domain plus all domains in the
  18042. // token domain list, including their prefixed subdomains.
  18043. //
  18044. // Example JSON: "TokenDomains": { "mywebsite.com", "myotherwebsite.com" }
  18045. //
  18046. // Public suffixes aren't allowed. For example, you can't use usa.gov or co.uk
  18047. // as token domains.
  18048. TokenDomains []*string `min:"1" type:"list"`
  18049. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  18050. //
  18051. // VisibilityConfig is a required field
  18052. VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
  18053. }
  18054. // String returns the string representation.
  18055. //
  18056. // API parameter values that are decorated as "sensitive" in the API will not
  18057. // be included in the string output. The member name will be present, but the
  18058. // value will be replaced with "sensitive".
  18059. func (s UpdateWebACLInput) String() string {
  18060. return awsutil.Prettify(s)
  18061. }
  18062. // GoString returns the string representation.
  18063. //
  18064. // API parameter values that are decorated as "sensitive" in the API will not
  18065. // be included in the string output. The member name will be present, but the
  18066. // value will be replaced with "sensitive".
  18067. func (s UpdateWebACLInput) GoString() string {
  18068. return s.String()
  18069. }
  18070. // Validate inspects the fields of the type to determine if they are valid.
  18071. func (s *UpdateWebACLInput) Validate() error {
  18072. invalidParams := request.ErrInvalidParams{Context: "UpdateWebACLInput"}
  18073. if s.CustomResponseBodies != nil && len(s.CustomResponseBodies) < 1 {
  18074. invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodies", 1))
  18075. }
  18076. if s.DefaultAction == nil {
  18077. invalidParams.Add(request.NewErrParamRequired("DefaultAction"))
  18078. }
  18079. if s.Description != nil && len(*s.Description) < 1 {
  18080. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  18081. }
  18082. if s.Id == nil {
  18083. invalidParams.Add(request.NewErrParamRequired("Id"))
  18084. }
  18085. if s.Id != nil && len(*s.Id) < 1 {
  18086. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  18087. }
  18088. if s.LockToken == nil {
  18089. invalidParams.Add(request.NewErrParamRequired("LockToken"))
  18090. }
  18091. if s.LockToken != nil && len(*s.LockToken) < 1 {
  18092. invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
  18093. }
  18094. if s.Name == nil {
  18095. invalidParams.Add(request.NewErrParamRequired("Name"))
  18096. }
  18097. if s.Name != nil && len(*s.Name) < 1 {
  18098. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  18099. }
  18100. if s.Scope == nil {
  18101. invalidParams.Add(request.NewErrParamRequired("Scope"))
  18102. }
  18103. if s.TokenDomains != nil && len(s.TokenDomains) < 1 {
  18104. invalidParams.Add(request.NewErrParamMinLen("TokenDomains", 1))
  18105. }
  18106. if s.VisibilityConfig == nil {
  18107. invalidParams.Add(request.NewErrParamRequired("VisibilityConfig"))
  18108. }
  18109. if s.CaptchaConfig != nil {
  18110. if err := s.CaptchaConfig.Validate(); err != nil {
  18111. invalidParams.AddNested("CaptchaConfig", err.(request.ErrInvalidParams))
  18112. }
  18113. }
  18114. if s.ChallengeConfig != nil {
  18115. if err := s.ChallengeConfig.Validate(); err != nil {
  18116. invalidParams.AddNested("ChallengeConfig", err.(request.ErrInvalidParams))
  18117. }
  18118. }
  18119. if s.CustomResponseBodies != nil {
  18120. for i, v := range s.CustomResponseBodies {
  18121. if v == nil {
  18122. continue
  18123. }
  18124. if err := v.Validate(); err != nil {
  18125. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomResponseBodies", i), err.(request.ErrInvalidParams))
  18126. }
  18127. }
  18128. }
  18129. if s.DefaultAction != nil {
  18130. if err := s.DefaultAction.Validate(); err != nil {
  18131. invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
  18132. }
  18133. }
  18134. if s.Rules != nil {
  18135. for i, v := range s.Rules {
  18136. if v == nil {
  18137. continue
  18138. }
  18139. if err := v.Validate(); err != nil {
  18140. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  18141. }
  18142. }
  18143. }
  18144. if s.VisibilityConfig != nil {
  18145. if err := s.VisibilityConfig.Validate(); err != nil {
  18146. invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams))
  18147. }
  18148. }
  18149. if invalidParams.Len() > 0 {
  18150. return invalidParams
  18151. }
  18152. return nil
  18153. }
  18154. // SetCaptchaConfig sets the CaptchaConfig field's value.
  18155. func (s *UpdateWebACLInput) SetCaptchaConfig(v *CaptchaConfig) *UpdateWebACLInput {
  18156. s.CaptchaConfig = v
  18157. return s
  18158. }
  18159. // SetChallengeConfig sets the ChallengeConfig field's value.
  18160. func (s *UpdateWebACLInput) SetChallengeConfig(v *ChallengeConfig) *UpdateWebACLInput {
  18161. s.ChallengeConfig = v
  18162. return s
  18163. }
  18164. // SetCustomResponseBodies sets the CustomResponseBodies field's value.
  18165. func (s *UpdateWebACLInput) SetCustomResponseBodies(v map[string]*CustomResponseBody) *UpdateWebACLInput {
  18166. s.CustomResponseBodies = v
  18167. return s
  18168. }
  18169. // SetDefaultAction sets the DefaultAction field's value.
  18170. func (s *UpdateWebACLInput) SetDefaultAction(v *DefaultAction) *UpdateWebACLInput {
  18171. s.DefaultAction = v
  18172. return s
  18173. }
  18174. // SetDescription sets the Description field's value.
  18175. func (s *UpdateWebACLInput) SetDescription(v string) *UpdateWebACLInput {
  18176. s.Description = &v
  18177. return s
  18178. }
  18179. // SetId sets the Id field's value.
  18180. func (s *UpdateWebACLInput) SetId(v string) *UpdateWebACLInput {
  18181. s.Id = &v
  18182. return s
  18183. }
  18184. // SetLockToken sets the LockToken field's value.
  18185. func (s *UpdateWebACLInput) SetLockToken(v string) *UpdateWebACLInput {
  18186. s.LockToken = &v
  18187. return s
  18188. }
  18189. // SetName sets the Name field's value.
  18190. func (s *UpdateWebACLInput) SetName(v string) *UpdateWebACLInput {
  18191. s.Name = &v
  18192. return s
  18193. }
  18194. // SetRules sets the Rules field's value.
  18195. func (s *UpdateWebACLInput) SetRules(v []*Rule) *UpdateWebACLInput {
  18196. s.Rules = v
  18197. return s
  18198. }
  18199. // SetScope sets the Scope field's value.
  18200. func (s *UpdateWebACLInput) SetScope(v string) *UpdateWebACLInput {
  18201. s.Scope = &v
  18202. return s
  18203. }
  18204. // SetTokenDomains sets the TokenDomains field's value.
  18205. func (s *UpdateWebACLInput) SetTokenDomains(v []*string) *UpdateWebACLInput {
  18206. s.TokenDomains = v
  18207. return s
  18208. }
  18209. // SetVisibilityConfig sets the VisibilityConfig field's value.
  18210. func (s *UpdateWebACLInput) SetVisibilityConfig(v *VisibilityConfig) *UpdateWebACLInput {
  18211. s.VisibilityConfig = v
  18212. return s
  18213. }
  18214. type UpdateWebACLOutput struct {
  18215. _ struct{} `type:"structure"`
  18216. // A token used for optimistic locking. WAF returns this token to your update
  18217. // requests. You use NextLockToken in the same manner as you use LockToken.
  18218. NextLockToken *string `min:"1" type:"string"`
  18219. }
  18220. // String returns the string representation.
  18221. //
  18222. // API parameter values that are decorated as "sensitive" in the API will not
  18223. // be included in the string output. The member name will be present, but the
  18224. // value will be replaced with "sensitive".
  18225. func (s UpdateWebACLOutput) String() string {
  18226. return awsutil.Prettify(s)
  18227. }
  18228. // GoString returns the string representation.
  18229. //
  18230. // API parameter values that are decorated as "sensitive" in the API will not
  18231. // be included in the string output. The member name will be present, but the
  18232. // value will be replaced with "sensitive".
  18233. func (s UpdateWebACLOutput) GoString() string {
  18234. return s.String()
  18235. }
  18236. // SetNextLockToken sets the NextLockToken field's value.
  18237. func (s *UpdateWebACLOutput) SetNextLockToken(v string) *UpdateWebACLOutput {
  18238. s.NextLockToken = &v
  18239. return s
  18240. }
  18241. // Inspect the path component of the URI of the web request. This is the part
  18242. // of the web request that identifies a resource. For example, /images/daily-ad.jpg.
  18243. //
  18244. // This is used only in the FieldToMatch specification for some web request
  18245. // component types.
  18246. //
  18247. // JSON specification: "UriPath": {}
  18248. type UriPath struct {
  18249. _ struct{} `type:"structure"`
  18250. }
  18251. // String returns the string representation.
  18252. //
  18253. // API parameter values that are decorated as "sensitive" in the API will not
  18254. // be included in the string output. The member name will be present, but the
  18255. // value will be replaced with "sensitive".
  18256. func (s UriPath) String() string {
  18257. return awsutil.Prettify(s)
  18258. }
  18259. // GoString returns the string representation.
  18260. //
  18261. // API parameter values that are decorated as "sensitive" in the API will not
  18262. // be included in the string output. The member name will be present, but the
  18263. // value will be replaced with "sensitive".
  18264. func (s UriPath) GoString() string {
  18265. return s.String()
  18266. }
  18267. // Details about your login page username field, used in a ManagedRuleGroupConfig.
  18268. type UsernameField struct {
  18269. _ struct{} `type:"structure"`
  18270. // The name of the username field. For example /form/username.
  18271. //
  18272. // Identifier is a required field
  18273. Identifier *string `min:"1" type:"string" required:"true"`
  18274. }
  18275. // String returns the string representation.
  18276. //
  18277. // API parameter values that are decorated as "sensitive" in the API will not
  18278. // be included in the string output. The member name will be present, but the
  18279. // value will be replaced with "sensitive".
  18280. func (s UsernameField) String() string {
  18281. return awsutil.Prettify(s)
  18282. }
  18283. // GoString returns the string representation.
  18284. //
  18285. // API parameter values that are decorated as "sensitive" in the API will not
  18286. // be included in the string output. The member name will be present, but the
  18287. // value will be replaced with "sensitive".
  18288. func (s UsernameField) GoString() string {
  18289. return s.String()
  18290. }
  18291. // Validate inspects the fields of the type to determine if they are valid.
  18292. func (s *UsernameField) Validate() error {
  18293. invalidParams := request.ErrInvalidParams{Context: "UsernameField"}
  18294. if s.Identifier == nil {
  18295. invalidParams.Add(request.NewErrParamRequired("Identifier"))
  18296. }
  18297. if s.Identifier != nil && len(*s.Identifier) < 1 {
  18298. invalidParams.Add(request.NewErrParamMinLen("Identifier", 1))
  18299. }
  18300. if invalidParams.Len() > 0 {
  18301. return invalidParams
  18302. }
  18303. return nil
  18304. }
  18305. // SetIdentifier sets the Identifier field's value.
  18306. func (s *UsernameField) SetIdentifier(v string) *UsernameField {
  18307. s.Identifier = &v
  18308. return s
  18309. }
  18310. // A version of the named managed rule group, that the rule group's vendor publishes
  18311. // for use by customers.
  18312. //
  18313. // This is intended for use only by vendors of managed rule sets. Vendors are
  18314. // Amazon Web Services and Amazon Web Services Marketplace sellers.
  18315. //
  18316. // Vendors, you can use the managed rule set APIs to provide controlled rollout
  18317. // of your versioned managed rule group offerings for your customers. The APIs
  18318. // are ListManagedRuleSets, GetManagedRuleSet, PutManagedRuleSetVersions, and
  18319. // UpdateManagedRuleSetVersionExpiryDate.
  18320. type VersionToPublish struct {
  18321. _ struct{} `type:"structure"`
  18322. // The Amazon Resource Name (ARN) of the vendor's rule group that's used in
  18323. // the published managed rule group version.
  18324. AssociatedRuleGroupArn *string `min:"20" type:"string"`
  18325. // The amount of time the vendor expects this version of the managed rule group
  18326. // to last, in days.
  18327. ForecastedLifetime *int64 `min:"1" type:"integer"`
  18328. }
  18329. // String returns the string representation.
  18330. //
  18331. // API parameter values that are decorated as "sensitive" in the API will not
  18332. // be included in the string output. The member name will be present, but the
  18333. // value will be replaced with "sensitive".
  18334. func (s VersionToPublish) String() string {
  18335. return awsutil.Prettify(s)
  18336. }
  18337. // GoString returns the string representation.
  18338. //
  18339. // API parameter values that are decorated as "sensitive" in the API will not
  18340. // be included in the string output. The member name will be present, but the
  18341. // value will be replaced with "sensitive".
  18342. func (s VersionToPublish) GoString() string {
  18343. return s.String()
  18344. }
  18345. // Validate inspects the fields of the type to determine if they are valid.
  18346. func (s *VersionToPublish) Validate() error {
  18347. invalidParams := request.ErrInvalidParams{Context: "VersionToPublish"}
  18348. if s.AssociatedRuleGroupArn != nil && len(*s.AssociatedRuleGroupArn) < 20 {
  18349. invalidParams.Add(request.NewErrParamMinLen("AssociatedRuleGroupArn", 20))
  18350. }
  18351. if s.ForecastedLifetime != nil && *s.ForecastedLifetime < 1 {
  18352. invalidParams.Add(request.NewErrParamMinValue("ForecastedLifetime", 1))
  18353. }
  18354. if invalidParams.Len() > 0 {
  18355. return invalidParams
  18356. }
  18357. return nil
  18358. }
  18359. // SetAssociatedRuleGroupArn sets the AssociatedRuleGroupArn field's value.
  18360. func (s *VersionToPublish) SetAssociatedRuleGroupArn(v string) *VersionToPublish {
  18361. s.AssociatedRuleGroupArn = &v
  18362. return s
  18363. }
  18364. // SetForecastedLifetime sets the ForecastedLifetime field's value.
  18365. func (s *VersionToPublish) SetForecastedLifetime(v int64) *VersionToPublish {
  18366. s.ForecastedLifetime = &v
  18367. return s
  18368. }
  18369. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  18370. type VisibilityConfig struct {
  18371. _ struct{} `type:"structure"`
  18372. // A boolean indicating whether the associated resource sends metrics to Amazon
  18373. // CloudWatch. For the list of available metrics, see WAF Metrics (https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#waf-metrics).
  18374. //
  18375. // CloudWatchMetricsEnabled is a required field
  18376. CloudWatchMetricsEnabled *bool `type:"boolean" required:"true"`
  18377. // A name of the Amazon CloudWatch metric dimension. The name can contain only
  18378. // the characters: A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can
  18379. // be from one to 128 characters long. It can't contain whitespace or metric
  18380. // names that are reserved for WAF, for example All and Default_Action.
  18381. //
  18382. // MetricName is a required field
  18383. MetricName *string `min:"1" type:"string" required:"true"`
  18384. // A boolean indicating whether WAF should store a sampling of the web requests
  18385. // that match the rules. You can view the sampled requests through the WAF console.
  18386. //
  18387. // SampledRequestsEnabled is a required field
  18388. SampledRequestsEnabled *bool `type:"boolean" required:"true"`
  18389. }
  18390. // String returns the string representation.
  18391. //
  18392. // API parameter values that are decorated as "sensitive" in the API will not
  18393. // be included in the string output. The member name will be present, but the
  18394. // value will be replaced with "sensitive".
  18395. func (s VisibilityConfig) String() string {
  18396. return awsutil.Prettify(s)
  18397. }
  18398. // GoString returns the string representation.
  18399. //
  18400. // API parameter values that are decorated as "sensitive" in the API will not
  18401. // be included in the string output. The member name will be present, but the
  18402. // value will be replaced with "sensitive".
  18403. func (s VisibilityConfig) GoString() string {
  18404. return s.String()
  18405. }
  18406. // Validate inspects the fields of the type to determine if they are valid.
  18407. func (s *VisibilityConfig) Validate() error {
  18408. invalidParams := request.ErrInvalidParams{Context: "VisibilityConfig"}
  18409. if s.CloudWatchMetricsEnabled == nil {
  18410. invalidParams.Add(request.NewErrParamRequired("CloudWatchMetricsEnabled"))
  18411. }
  18412. if s.MetricName == nil {
  18413. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  18414. }
  18415. if s.MetricName != nil && len(*s.MetricName) < 1 {
  18416. invalidParams.Add(request.NewErrParamMinLen("MetricName", 1))
  18417. }
  18418. if s.SampledRequestsEnabled == nil {
  18419. invalidParams.Add(request.NewErrParamRequired("SampledRequestsEnabled"))
  18420. }
  18421. if invalidParams.Len() > 0 {
  18422. return invalidParams
  18423. }
  18424. return nil
  18425. }
  18426. // SetCloudWatchMetricsEnabled sets the CloudWatchMetricsEnabled field's value.
  18427. func (s *VisibilityConfig) SetCloudWatchMetricsEnabled(v bool) *VisibilityConfig {
  18428. s.CloudWatchMetricsEnabled = &v
  18429. return s
  18430. }
  18431. // SetMetricName sets the MetricName field's value.
  18432. func (s *VisibilityConfig) SetMetricName(v string) *VisibilityConfig {
  18433. s.MetricName = &v
  18434. return s
  18435. }
  18436. // SetSampledRequestsEnabled sets the SampledRequestsEnabled field's value.
  18437. func (s *VisibilityConfig) SetSampledRequestsEnabled(v bool) *VisibilityConfig {
  18438. s.SampledRequestsEnabled = &v
  18439. return s
  18440. }
  18441. // WAF couldn’t perform the operation because your resource is being used
  18442. // by another resource or it’s associated with another resource.
  18443. type WAFAssociatedItemException struct {
  18444. _ struct{} `type:"structure"`
  18445. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18446. Message_ *string `locationName:"Message" type:"string"`
  18447. }
  18448. // String returns the string representation.
  18449. //
  18450. // API parameter values that are decorated as "sensitive" in the API will not
  18451. // be included in the string output. The member name will be present, but the
  18452. // value will be replaced with "sensitive".
  18453. func (s WAFAssociatedItemException) String() string {
  18454. return awsutil.Prettify(s)
  18455. }
  18456. // GoString returns the string representation.
  18457. //
  18458. // API parameter values that are decorated as "sensitive" in the API will not
  18459. // be included in the string output. The member name will be present, but the
  18460. // value will be replaced with "sensitive".
  18461. func (s WAFAssociatedItemException) GoString() string {
  18462. return s.String()
  18463. }
  18464. func newErrorWAFAssociatedItemException(v protocol.ResponseMetadata) error {
  18465. return &WAFAssociatedItemException{
  18466. RespMetadata: v,
  18467. }
  18468. }
  18469. // Code returns the exception type name.
  18470. func (s *WAFAssociatedItemException) Code() string {
  18471. return "WAFAssociatedItemException"
  18472. }
  18473. // Message returns the exception's message.
  18474. func (s *WAFAssociatedItemException) Message() string {
  18475. if s.Message_ != nil {
  18476. return *s.Message_
  18477. }
  18478. return ""
  18479. }
  18480. // OrigErr always returns nil, satisfies awserr.Error interface.
  18481. func (s *WAFAssociatedItemException) OrigErr() error {
  18482. return nil
  18483. }
  18484. func (s *WAFAssociatedItemException) Error() string {
  18485. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  18486. }
  18487. // Status code returns the HTTP status code for the request's response error.
  18488. func (s *WAFAssociatedItemException) StatusCode() int {
  18489. return s.RespMetadata.StatusCode
  18490. }
  18491. // RequestID returns the service's response RequestID for request.
  18492. func (s *WAFAssociatedItemException) RequestID() string {
  18493. return s.RespMetadata.RequestID
  18494. }
  18495. // The operation failed because you are inspecting the web request body, headers,
  18496. // or cookies without specifying how to handle oversize components. Rules that
  18497. // inspect the body must either provide an OversizeHandling configuration or
  18498. // they must be preceded by a SizeConstraintStatement that blocks the body content
  18499. // from being too large. Rules that inspect the headers or cookies must provide
  18500. // an OversizeHandling configuration.
  18501. //
  18502. // Provide the handling configuration and retry your operation.
  18503. //
  18504. // Alternately, you can suppress this warning by adding the following tag to
  18505. // the resource that you provide to this operation: Tag (key:WAF:OversizeFieldsHandlingConstraintOptOut,
  18506. // value:true).
  18507. type WAFConfigurationWarningException struct {
  18508. _ struct{} `type:"structure"`
  18509. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18510. Message_ *string `locationName:"Message" type:"string"`
  18511. }
  18512. // String returns the string representation.
  18513. //
  18514. // API parameter values that are decorated as "sensitive" in the API will not
  18515. // be included in the string output. The member name will be present, but the
  18516. // value will be replaced with "sensitive".
  18517. func (s WAFConfigurationWarningException) String() string {
  18518. return awsutil.Prettify(s)
  18519. }
  18520. // GoString returns the string representation.
  18521. //
  18522. // API parameter values that are decorated as "sensitive" in the API will not
  18523. // be included in the string output. The member name will be present, but the
  18524. // value will be replaced with "sensitive".
  18525. func (s WAFConfigurationWarningException) GoString() string {
  18526. return s.String()
  18527. }
  18528. func newErrorWAFConfigurationWarningException(v protocol.ResponseMetadata) error {
  18529. return &WAFConfigurationWarningException{
  18530. RespMetadata: v,
  18531. }
  18532. }
  18533. // Code returns the exception type name.
  18534. func (s *WAFConfigurationWarningException) Code() string {
  18535. return "WAFConfigurationWarningException"
  18536. }
  18537. // Message returns the exception's message.
  18538. func (s *WAFConfigurationWarningException) Message() string {
  18539. if s.Message_ != nil {
  18540. return *s.Message_
  18541. }
  18542. return ""
  18543. }
  18544. // OrigErr always returns nil, satisfies awserr.Error interface.
  18545. func (s *WAFConfigurationWarningException) OrigErr() error {
  18546. return nil
  18547. }
  18548. func (s *WAFConfigurationWarningException) Error() string {
  18549. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  18550. }
  18551. // Status code returns the HTTP status code for the request's response error.
  18552. func (s *WAFConfigurationWarningException) StatusCode() int {
  18553. return s.RespMetadata.StatusCode
  18554. }
  18555. // RequestID returns the service's response RequestID for request.
  18556. func (s *WAFConfigurationWarningException) RequestID() string {
  18557. return s.RespMetadata.RequestID
  18558. }
  18559. // WAF couldn’t perform the operation because the resource that you tried
  18560. // to save is a duplicate of an existing one.
  18561. type WAFDuplicateItemException struct {
  18562. _ struct{} `type:"structure"`
  18563. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18564. Message_ *string `locationName:"Message" type:"string"`
  18565. }
  18566. // String returns the string representation.
  18567. //
  18568. // API parameter values that are decorated as "sensitive" in the API will not
  18569. // be included in the string output. The member name will be present, but the
  18570. // value will be replaced with "sensitive".
  18571. func (s WAFDuplicateItemException) String() string {
  18572. return awsutil.Prettify(s)
  18573. }
  18574. // GoString returns the string representation.
  18575. //
  18576. // API parameter values that are decorated as "sensitive" in the API will not
  18577. // be included in the string output. The member name will be present, but the
  18578. // value will be replaced with "sensitive".
  18579. func (s WAFDuplicateItemException) GoString() string {
  18580. return s.String()
  18581. }
  18582. func newErrorWAFDuplicateItemException(v protocol.ResponseMetadata) error {
  18583. return &WAFDuplicateItemException{
  18584. RespMetadata: v,
  18585. }
  18586. }
  18587. // Code returns the exception type name.
  18588. func (s *WAFDuplicateItemException) Code() string {
  18589. return "WAFDuplicateItemException"
  18590. }
  18591. // Message returns the exception's message.
  18592. func (s *WAFDuplicateItemException) Message() string {
  18593. if s.Message_ != nil {
  18594. return *s.Message_
  18595. }
  18596. return ""
  18597. }
  18598. // OrigErr always returns nil, satisfies awserr.Error interface.
  18599. func (s *WAFDuplicateItemException) OrigErr() error {
  18600. return nil
  18601. }
  18602. func (s *WAFDuplicateItemException) Error() string {
  18603. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  18604. }
  18605. // Status code returns the HTTP status code for the request's response error.
  18606. func (s *WAFDuplicateItemException) StatusCode() int {
  18607. return s.RespMetadata.StatusCode
  18608. }
  18609. // RequestID returns the service's response RequestID for request.
  18610. func (s *WAFDuplicateItemException) RequestID() string {
  18611. return s.RespMetadata.RequestID
  18612. }
  18613. // The operation failed because the specified version for the managed rule group
  18614. // has expired. You can retrieve the available versions for the managed rule
  18615. // group by calling ListAvailableManagedRuleGroupVersions.
  18616. type WAFExpiredManagedRuleGroupVersionException struct {
  18617. _ struct{} `type:"structure"`
  18618. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18619. Message_ *string `locationName:"Message" type:"string"`
  18620. }
  18621. // String returns the string representation.
  18622. //
  18623. // API parameter values that are decorated as "sensitive" in the API will not
  18624. // be included in the string output. The member name will be present, but the
  18625. // value will be replaced with "sensitive".
  18626. func (s WAFExpiredManagedRuleGroupVersionException) String() string {
  18627. return awsutil.Prettify(s)
  18628. }
  18629. // GoString returns the string representation.
  18630. //
  18631. // API parameter values that are decorated as "sensitive" in the API will not
  18632. // be included in the string output. The member name will be present, but the
  18633. // value will be replaced with "sensitive".
  18634. func (s WAFExpiredManagedRuleGroupVersionException) GoString() string {
  18635. return s.String()
  18636. }
  18637. func newErrorWAFExpiredManagedRuleGroupVersionException(v protocol.ResponseMetadata) error {
  18638. return &WAFExpiredManagedRuleGroupVersionException{
  18639. RespMetadata: v,
  18640. }
  18641. }
  18642. // Code returns the exception type name.
  18643. func (s *WAFExpiredManagedRuleGroupVersionException) Code() string {
  18644. return "WAFExpiredManagedRuleGroupVersionException"
  18645. }
  18646. // Message returns the exception's message.
  18647. func (s *WAFExpiredManagedRuleGroupVersionException) Message() string {
  18648. if s.Message_ != nil {
  18649. return *s.Message_
  18650. }
  18651. return ""
  18652. }
  18653. // OrigErr always returns nil, satisfies awserr.Error interface.
  18654. func (s *WAFExpiredManagedRuleGroupVersionException) OrigErr() error {
  18655. return nil
  18656. }
  18657. func (s *WAFExpiredManagedRuleGroupVersionException) Error() string {
  18658. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  18659. }
  18660. // Status code returns the HTTP status code for the request's response error.
  18661. func (s *WAFExpiredManagedRuleGroupVersionException) StatusCode() int {
  18662. return s.RespMetadata.StatusCode
  18663. }
  18664. // RequestID returns the service's response RequestID for request.
  18665. func (s *WAFExpiredManagedRuleGroupVersionException) RequestID() string {
  18666. return s.RespMetadata.RequestID
  18667. }
  18668. // Your request is valid, but WAF couldn’t perform the operation because of
  18669. // a system problem. Retry your request.
  18670. type WAFInternalErrorException struct {
  18671. _ struct{} `type:"structure"`
  18672. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18673. Message_ *string `locationName:"Message" type:"string"`
  18674. }
  18675. // String returns the string representation.
  18676. //
  18677. // API parameter values that are decorated as "sensitive" in the API will not
  18678. // be included in the string output. The member name will be present, but the
  18679. // value will be replaced with "sensitive".
  18680. func (s WAFInternalErrorException) String() string {
  18681. return awsutil.Prettify(s)
  18682. }
  18683. // GoString returns the string representation.
  18684. //
  18685. // API parameter values that are decorated as "sensitive" in the API will not
  18686. // be included in the string output. The member name will be present, but the
  18687. // value will be replaced with "sensitive".
  18688. func (s WAFInternalErrorException) GoString() string {
  18689. return s.String()
  18690. }
  18691. func newErrorWAFInternalErrorException(v protocol.ResponseMetadata) error {
  18692. return &WAFInternalErrorException{
  18693. RespMetadata: v,
  18694. }
  18695. }
  18696. // Code returns the exception type name.
  18697. func (s *WAFInternalErrorException) Code() string {
  18698. return "WAFInternalErrorException"
  18699. }
  18700. // Message returns the exception's message.
  18701. func (s *WAFInternalErrorException) Message() string {
  18702. if s.Message_ != nil {
  18703. return *s.Message_
  18704. }
  18705. return ""
  18706. }
  18707. // OrigErr always returns nil, satisfies awserr.Error interface.
  18708. func (s *WAFInternalErrorException) OrigErr() error {
  18709. return nil
  18710. }
  18711. func (s *WAFInternalErrorException) Error() string {
  18712. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  18713. }
  18714. // Status code returns the HTTP status code for the request's response error.
  18715. func (s *WAFInternalErrorException) StatusCode() int {
  18716. return s.RespMetadata.StatusCode
  18717. }
  18718. // RequestID returns the service's response RequestID for request.
  18719. func (s *WAFInternalErrorException) RequestID() string {
  18720. return s.RespMetadata.RequestID
  18721. }
  18722. // The operation isn't valid.
  18723. type WAFInvalidOperationException struct {
  18724. _ struct{} `type:"structure"`
  18725. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18726. Message_ *string `locationName:"Message" type:"string"`
  18727. }
  18728. // String returns the string representation.
  18729. //
  18730. // API parameter values that are decorated as "sensitive" in the API will not
  18731. // be included in the string output. The member name will be present, but the
  18732. // value will be replaced with "sensitive".
  18733. func (s WAFInvalidOperationException) String() string {
  18734. return awsutil.Prettify(s)
  18735. }
  18736. // GoString returns the string representation.
  18737. //
  18738. // API parameter values that are decorated as "sensitive" in the API will not
  18739. // be included in the string output. The member name will be present, but the
  18740. // value will be replaced with "sensitive".
  18741. func (s WAFInvalidOperationException) GoString() string {
  18742. return s.String()
  18743. }
  18744. func newErrorWAFInvalidOperationException(v protocol.ResponseMetadata) error {
  18745. return &WAFInvalidOperationException{
  18746. RespMetadata: v,
  18747. }
  18748. }
  18749. // Code returns the exception type name.
  18750. func (s *WAFInvalidOperationException) Code() string {
  18751. return "WAFInvalidOperationException"
  18752. }
  18753. // Message returns the exception's message.
  18754. func (s *WAFInvalidOperationException) Message() string {
  18755. if s.Message_ != nil {
  18756. return *s.Message_
  18757. }
  18758. return ""
  18759. }
  18760. // OrigErr always returns nil, satisfies awserr.Error interface.
  18761. func (s *WAFInvalidOperationException) OrigErr() error {
  18762. return nil
  18763. }
  18764. func (s *WAFInvalidOperationException) Error() string {
  18765. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  18766. }
  18767. // Status code returns the HTTP status code for the request's response error.
  18768. func (s *WAFInvalidOperationException) StatusCode() int {
  18769. return s.RespMetadata.StatusCode
  18770. }
  18771. // RequestID returns the service's response RequestID for request.
  18772. func (s *WAFInvalidOperationException) RequestID() string {
  18773. return s.RespMetadata.RequestID
  18774. }
  18775. // The operation failed because WAF didn't recognize a parameter in the request.
  18776. // For example:
  18777. //
  18778. // - You specified a parameter name or value that isn't valid.
  18779. //
  18780. // - Your nested statement isn't valid. You might have tried to nest a statement
  18781. // that can’t be nested.
  18782. //
  18783. // - You tried to update a WebACL with a DefaultAction that isn't among the
  18784. // types available at DefaultAction.
  18785. //
  18786. // - Your request references an ARN that is malformed, or corresponds to
  18787. // a resource with which a web ACL can't be associated.
  18788. type WAFInvalidParameterException struct {
  18789. _ struct{} `type:"structure"`
  18790. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18791. // The settings where the invalid parameter was found.
  18792. Field *string `type:"string" enum:"ParameterExceptionField"`
  18793. Message_ *string `locationName:"message" type:"string"`
  18794. // The invalid parameter that resulted in the exception.
  18795. Parameter *string `min:"1" type:"string"`
  18796. // Additional information about the exception.
  18797. Reason *string `type:"string"`
  18798. }
  18799. // String returns the string representation.
  18800. //
  18801. // API parameter values that are decorated as "sensitive" in the API will not
  18802. // be included in the string output. The member name will be present, but the
  18803. // value will be replaced with "sensitive".
  18804. func (s WAFInvalidParameterException) String() string {
  18805. return awsutil.Prettify(s)
  18806. }
  18807. // GoString returns the string representation.
  18808. //
  18809. // API parameter values that are decorated as "sensitive" in the API will not
  18810. // be included in the string output. The member name will be present, but the
  18811. // value will be replaced with "sensitive".
  18812. func (s WAFInvalidParameterException) GoString() string {
  18813. return s.String()
  18814. }
  18815. func newErrorWAFInvalidParameterException(v protocol.ResponseMetadata) error {
  18816. return &WAFInvalidParameterException{
  18817. RespMetadata: v,
  18818. }
  18819. }
  18820. // Code returns the exception type name.
  18821. func (s *WAFInvalidParameterException) Code() string {
  18822. return "WAFInvalidParameterException"
  18823. }
  18824. // Message returns the exception's message.
  18825. func (s *WAFInvalidParameterException) Message() string {
  18826. if s.Message_ != nil {
  18827. return *s.Message_
  18828. }
  18829. return ""
  18830. }
  18831. // OrigErr always returns nil, satisfies awserr.Error interface.
  18832. func (s *WAFInvalidParameterException) OrigErr() error {
  18833. return nil
  18834. }
  18835. func (s *WAFInvalidParameterException) Error() string {
  18836. return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  18837. }
  18838. // Status code returns the HTTP status code for the request's response error.
  18839. func (s *WAFInvalidParameterException) StatusCode() int {
  18840. return s.RespMetadata.StatusCode
  18841. }
  18842. // RequestID returns the service's response RequestID for request.
  18843. func (s *WAFInvalidParameterException) RequestID() string {
  18844. return s.RespMetadata.RequestID
  18845. }
  18846. // The operation failed because the specified policy isn't in the proper format.
  18847. //
  18848. // The policy specifications must conform to the following:
  18849. //
  18850. // - The policy must be composed using IAM Policy version 2012-10-17 or version
  18851. // 2015-01-01.
  18852. //
  18853. // - The policy must include specifications for Effect, Action, and Principal.
  18854. //
  18855. // - Effect must specify Allow.
  18856. //
  18857. // - Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups
  18858. // and may optionally specify wafv2:GetRuleGroup. WAF rejects any extra actions
  18859. // or wildcard actions in the policy.
  18860. //
  18861. // - The policy must not include a Resource parameter.
  18862. //
  18863. // For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html).
  18864. type WAFInvalidPermissionPolicyException struct {
  18865. _ struct{} `type:"structure"`
  18866. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18867. Message_ *string `locationName:"Message" type:"string"`
  18868. }
  18869. // String returns the string representation.
  18870. //
  18871. // API parameter values that are decorated as "sensitive" in the API will not
  18872. // be included in the string output. The member name will be present, but the
  18873. // value will be replaced with "sensitive".
  18874. func (s WAFInvalidPermissionPolicyException) String() string {
  18875. return awsutil.Prettify(s)
  18876. }
  18877. // GoString returns the string representation.
  18878. //
  18879. // API parameter values that are decorated as "sensitive" in the API will not
  18880. // be included in the string output. The member name will be present, but the
  18881. // value will be replaced with "sensitive".
  18882. func (s WAFInvalidPermissionPolicyException) GoString() string {
  18883. return s.String()
  18884. }
  18885. func newErrorWAFInvalidPermissionPolicyException(v protocol.ResponseMetadata) error {
  18886. return &WAFInvalidPermissionPolicyException{
  18887. RespMetadata: v,
  18888. }
  18889. }
  18890. // Code returns the exception type name.
  18891. func (s *WAFInvalidPermissionPolicyException) Code() string {
  18892. return "WAFInvalidPermissionPolicyException"
  18893. }
  18894. // Message returns the exception's message.
  18895. func (s *WAFInvalidPermissionPolicyException) Message() string {
  18896. if s.Message_ != nil {
  18897. return *s.Message_
  18898. }
  18899. return ""
  18900. }
  18901. // OrigErr always returns nil, satisfies awserr.Error interface.
  18902. func (s *WAFInvalidPermissionPolicyException) OrigErr() error {
  18903. return nil
  18904. }
  18905. func (s *WAFInvalidPermissionPolicyException) Error() string {
  18906. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  18907. }
  18908. // Status code returns the HTTP status code for the request's response error.
  18909. func (s *WAFInvalidPermissionPolicyException) StatusCode() int {
  18910. return s.RespMetadata.StatusCode
  18911. }
  18912. // RequestID returns the service's response RequestID for request.
  18913. func (s *WAFInvalidPermissionPolicyException) RequestID() string {
  18914. return s.RespMetadata.RequestID
  18915. }
  18916. // WAF couldn’t perform the operation because the resource that you requested
  18917. // isn’t valid. Check the resource, and try again.
  18918. type WAFInvalidResourceException struct {
  18919. _ struct{} `type:"structure"`
  18920. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18921. Message_ *string `locationName:"Message" type:"string"`
  18922. }
  18923. // String returns the string representation.
  18924. //
  18925. // API parameter values that are decorated as "sensitive" in the API will not
  18926. // be included in the string output. The member name will be present, but the
  18927. // value will be replaced with "sensitive".
  18928. func (s WAFInvalidResourceException) String() string {
  18929. return awsutil.Prettify(s)
  18930. }
  18931. // GoString returns the string representation.
  18932. //
  18933. // API parameter values that are decorated as "sensitive" in the API will not
  18934. // be included in the string output. The member name will be present, but the
  18935. // value will be replaced with "sensitive".
  18936. func (s WAFInvalidResourceException) GoString() string {
  18937. return s.String()
  18938. }
  18939. func newErrorWAFInvalidResourceException(v protocol.ResponseMetadata) error {
  18940. return &WAFInvalidResourceException{
  18941. RespMetadata: v,
  18942. }
  18943. }
  18944. // Code returns the exception type name.
  18945. func (s *WAFInvalidResourceException) Code() string {
  18946. return "WAFInvalidResourceException"
  18947. }
  18948. // Message returns the exception's message.
  18949. func (s *WAFInvalidResourceException) Message() string {
  18950. if s.Message_ != nil {
  18951. return *s.Message_
  18952. }
  18953. return ""
  18954. }
  18955. // OrigErr always returns nil, satisfies awserr.Error interface.
  18956. func (s *WAFInvalidResourceException) OrigErr() error {
  18957. return nil
  18958. }
  18959. func (s *WAFInvalidResourceException) Error() string {
  18960. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  18961. }
  18962. // Status code returns the HTTP status code for the request's response error.
  18963. func (s *WAFInvalidResourceException) StatusCode() int {
  18964. return s.RespMetadata.StatusCode
  18965. }
  18966. // RequestID returns the service's response RequestID for request.
  18967. func (s *WAFInvalidResourceException) RequestID() string {
  18968. return s.RespMetadata.RequestID
  18969. }
  18970. // WAF couldn’t perform the operation because you exceeded your resource limit.
  18971. // For example, the maximum number of WebACL objects that you can create for
  18972. // an Amazon Web Services account. For more information, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  18973. // in the WAF Developer Guide.
  18974. type WAFLimitsExceededException struct {
  18975. _ struct{} `type:"structure"`
  18976. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  18977. Message_ *string `locationName:"Message" type:"string"`
  18978. }
  18979. // String returns the string representation.
  18980. //
  18981. // API parameter values that are decorated as "sensitive" in the API will not
  18982. // be included in the string output. The member name will be present, but the
  18983. // value will be replaced with "sensitive".
  18984. func (s WAFLimitsExceededException) String() string {
  18985. return awsutil.Prettify(s)
  18986. }
  18987. // GoString returns the string representation.
  18988. //
  18989. // API parameter values that are decorated as "sensitive" in the API will not
  18990. // be included in the string output. The member name will be present, but the
  18991. // value will be replaced with "sensitive".
  18992. func (s WAFLimitsExceededException) GoString() string {
  18993. return s.String()
  18994. }
  18995. func newErrorWAFLimitsExceededException(v protocol.ResponseMetadata) error {
  18996. return &WAFLimitsExceededException{
  18997. RespMetadata: v,
  18998. }
  18999. }
  19000. // Code returns the exception type name.
  19001. func (s *WAFLimitsExceededException) Code() string {
  19002. return "WAFLimitsExceededException"
  19003. }
  19004. // Message returns the exception's message.
  19005. func (s *WAFLimitsExceededException) Message() string {
  19006. if s.Message_ != nil {
  19007. return *s.Message_
  19008. }
  19009. return ""
  19010. }
  19011. // OrigErr always returns nil, satisfies awserr.Error interface.
  19012. func (s *WAFLimitsExceededException) OrigErr() error {
  19013. return nil
  19014. }
  19015. func (s *WAFLimitsExceededException) Error() string {
  19016. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19017. }
  19018. // Status code returns the HTTP status code for the request's response error.
  19019. func (s *WAFLimitsExceededException) StatusCode() int {
  19020. return s.RespMetadata.StatusCode
  19021. }
  19022. // RequestID returns the service's response RequestID for request.
  19023. func (s *WAFLimitsExceededException) RequestID() string {
  19024. return s.RespMetadata.RequestID
  19025. }
  19026. // The operation failed because you don't have the permissions that your logging
  19027. // configuration requires. For information, see Logging web ACL traffic information
  19028. // (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html) in the
  19029. // WAF Developer Guide.
  19030. type WAFLogDestinationPermissionIssueException struct {
  19031. _ struct{} `type:"structure"`
  19032. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19033. Message_ *string `locationName:"Message" type:"string"`
  19034. }
  19035. // String returns the string representation.
  19036. //
  19037. // API parameter values that are decorated as "sensitive" in the API will not
  19038. // be included in the string output. The member name will be present, but the
  19039. // value will be replaced with "sensitive".
  19040. func (s WAFLogDestinationPermissionIssueException) String() string {
  19041. return awsutil.Prettify(s)
  19042. }
  19043. // GoString returns the string representation.
  19044. //
  19045. // API parameter values that are decorated as "sensitive" in the API will not
  19046. // be included in the string output. The member name will be present, but the
  19047. // value will be replaced with "sensitive".
  19048. func (s WAFLogDestinationPermissionIssueException) GoString() string {
  19049. return s.String()
  19050. }
  19051. func newErrorWAFLogDestinationPermissionIssueException(v protocol.ResponseMetadata) error {
  19052. return &WAFLogDestinationPermissionIssueException{
  19053. RespMetadata: v,
  19054. }
  19055. }
  19056. // Code returns the exception type name.
  19057. func (s *WAFLogDestinationPermissionIssueException) Code() string {
  19058. return "WAFLogDestinationPermissionIssueException"
  19059. }
  19060. // Message returns the exception's message.
  19061. func (s *WAFLogDestinationPermissionIssueException) Message() string {
  19062. if s.Message_ != nil {
  19063. return *s.Message_
  19064. }
  19065. return ""
  19066. }
  19067. // OrigErr always returns nil, satisfies awserr.Error interface.
  19068. func (s *WAFLogDestinationPermissionIssueException) OrigErr() error {
  19069. return nil
  19070. }
  19071. func (s *WAFLogDestinationPermissionIssueException) Error() string {
  19072. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19073. }
  19074. // Status code returns the HTTP status code for the request's response error.
  19075. func (s *WAFLogDestinationPermissionIssueException) StatusCode() int {
  19076. return s.RespMetadata.StatusCode
  19077. }
  19078. // RequestID returns the service's response RequestID for request.
  19079. func (s *WAFLogDestinationPermissionIssueException) RequestID() string {
  19080. return s.RespMetadata.RequestID
  19081. }
  19082. // WAF couldn’t perform the operation because your resource doesn't exist.
  19083. // If you've just created a resource that you're using in this operation, you
  19084. // might just need to wait a few minutes. It can take from a few seconds to
  19085. // a number of minutes for changes to propagate.
  19086. type WAFNonexistentItemException struct {
  19087. _ struct{} `type:"structure"`
  19088. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19089. Message_ *string `locationName:"Message" type:"string"`
  19090. }
  19091. // String returns the string representation.
  19092. //
  19093. // API parameter values that are decorated as "sensitive" in the API will not
  19094. // be included in the string output. The member name will be present, but the
  19095. // value will be replaced with "sensitive".
  19096. func (s WAFNonexistentItemException) String() string {
  19097. return awsutil.Prettify(s)
  19098. }
  19099. // GoString returns the string representation.
  19100. //
  19101. // API parameter values that are decorated as "sensitive" in the API will not
  19102. // be included in the string output. The member name will be present, but the
  19103. // value will be replaced with "sensitive".
  19104. func (s WAFNonexistentItemException) GoString() string {
  19105. return s.String()
  19106. }
  19107. func newErrorWAFNonexistentItemException(v protocol.ResponseMetadata) error {
  19108. return &WAFNonexistentItemException{
  19109. RespMetadata: v,
  19110. }
  19111. }
  19112. // Code returns the exception type name.
  19113. func (s *WAFNonexistentItemException) Code() string {
  19114. return "WAFNonexistentItemException"
  19115. }
  19116. // Message returns the exception's message.
  19117. func (s *WAFNonexistentItemException) Message() string {
  19118. if s.Message_ != nil {
  19119. return *s.Message_
  19120. }
  19121. return ""
  19122. }
  19123. // OrigErr always returns nil, satisfies awserr.Error interface.
  19124. func (s *WAFNonexistentItemException) OrigErr() error {
  19125. return nil
  19126. }
  19127. func (s *WAFNonexistentItemException) Error() string {
  19128. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19129. }
  19130. // Status code returns the HTTP status code for the request's response error.
  19131. func (s *WAFNonexistentItemException) StatusCode() int {
  19132. return s.RespMetadata.StatusCode
  19133. }
  19134. // RequestID returns the service's response RequestID for request.
  19135. func (s *WAFNonexistentItemException) RequestID() string {
  19136. return s.RespMetadata.RequestID
  19137. }
  19138. // WAF couldn’t save your changes because you tried to update or delete a
  19139. // resource that has changed since you last retrieved it. Get the resource again,
  19140. // make any changes you need to make to the new copy, and retry your operation.
  19141. type WAFOptimisticLockException struct {
  19142. _ struct{} `type:"structure"`
  19143. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19144. Message_ *string `locationName:"Message" type:"string"`
  19145. }
  19146. // String returns the string representation.
  19147. //
  19148. // API parameter values that are decorated as "sensitive" in the API will not
  19149. // be included in the string output. The member name will be present, but the
  19150. // value will be replaced with "sensitive".
  19151. func (s WAFOptimisticLockException) String() string {
  19152. return awsutil.Prettify(s)
  19153. }
  19154. // GoString returns the string representation.
  19155. //
  19156. // API parameter values that are decorated as "sensitive" in the API will not
  19157. // be included in the string output. The member name will be present, but the
  19158. // value will be replaced with "sensitive".
  19159. func (s WAFOptimisticLockException) GoString() string {
  19160. return s.String()
  19161. }
  19162. func newErrorWAFOptimisticLockException(v protocol.ResponseMetadata) error {
  19163. return &WAFOptimisticLockException{
  19164. RespMetadata: v,
  19165. }
  19166. }
  19167. // Code returns the exception type name.
  19168. func (s *WAFOptimisticLockException) Code() string {
  19169. return "WAFOptimisticLockException"
  19170. }
  19171. // Message returns the exception's message.
  19172. func (s *WAFOptimisticLockException) Message() string {
  19173. if s.Message_ != nil {
  19174. return *s.Message_
  19175. }
  19176. return ""
  19177. }
  19178. // OrigErr always returns nil, satisfies awserr.Error interface.
  19179. func (s *WAFOptimisticLockException) OrigErr() error {
  19180. return nil
  19181. }
  19182. func (s *WAFOptimisticLockException) Error() string {
  19183. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19184. }
  19185. // Status code returns the HTTP status code for the request's response error.
  19186. func (s *WAFOptimisticLockException) StatusCode() int {
  19187. return s.RespMetadata.StatusCode
  19188. }
  19189. // RequestID returns the service's response RequestID for request.
  19190. func (s *WAFOptimisticLockException) RequestID() string {
  19191. return s.RespMetadata.RequestID
  19192. }
  19193. // WAF is not able to access the service linked role. This can be caused by
  19194. // a previous PutLoggingConfiguration request, which can lock the service linked
  19195. // role for about 20 seconds. Please try your request again. The service linked
  19196. // role can also be locked by a previous DeleteServiceLinkedRole request, which
  19197. // can lock the role for 15 minutes or more. If you recently made a call to
  19198. // DeleteServiceLinkedRole, wait at least 15 minutes and try the request again.
  19199. // If you receive this same exception again, you will have to wait additional
  19200. // time until the role is unlocked.
  19201. type WAFServiceLinkedRoleErrorException struct {
  19202. _ struct{} `type:"structure"`
  19203. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19204. Message_ *string `locationName:"message" type:"string"`
  19205. }
  19206. // String returns the string representation.
  19207. //
  19208. // API parameter values that are decorated as "sensitive" in the API will not
  19209. // be included in the string output. The member name will be present, but the
  19210. // value will be replaced with "sensitive".
  19211. func (s WAFServiceLinkedRoleErrorException) String() string {
  19212. return awsutil.Prettify(s)
  19213. }
  19214. // GoString returns the string representation.
  19215. //
  19216. // API parameter values that are decorated as "sensitive" in the API will not
  19217. // be included in the string output. The member name will be present, but the
  19218. // value will be replaced with "sensitive".
  19219. func (s WAFServiceLinkedRoleErrorException) GoString() string {
  19220. return s.String()
  19221. }
  19222. func newErrorWAFServiceLinkedRoleErrorException(v protocol.ResponseMetadata) error {
  19223. return &WAFServiceLinkedRoleErrorException{
  19224. RespMetadata: v,
  19225. }
  19226. }
  19227. // Code returns the exception type name.
  19228. func (s *WAFServiceLinkedRoleErrorException) Code() string {
  19229. return "WAFServiceLinkedRoleErrorException"
  19230. }
  19231. // Message returns the exception's message.
  19232. func (s *WAFServiceLinkedRoleErrorException) Message() string {
  19233. if s.Message_ != nil {
  19234. return *s.Message_
  19235. }
  19236. return ""
  19237. }
  19238. // OrigErr always returns nil, satisfies awserr.Error interface.
  19239. func (s *WAFServiceLinkedRoleErrorException) OrigErr() error {
  19240. return nil
  19241. }
  19242. func (s *WAFServiceLinkedRoleErrorException) Error() string {
  19243. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19244. }
  19245. // Status code returns the HTTP status code for the request's response error.
  19246. func (s *WAFServiceLinkedRoleErrorException) StatusCode() int {
  19247. return s.RespMetadata.StatusCode
  19248. }
  19249. // RequestID returns the service's response RequestID for request.
  19250. func (s *WAFServiceLinkedRoleErrorException) RequestID() string {
  19251. return s.RespMetadata.RequestID
  19252. }
  19253. // You tried to use a managed rule group that's available by subscription, but
  19254. // you aren't subscribed to it yet.
  19255. type WAFSubscriptionNotFoundException struct {
  19256. _ struct{} `type:"structure"`
  19257. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19258. Message_ *string `locationName:"Message" type:"string"`
  19259. }
  19260. // String returns the string representation.
  19261. //
  19262. // API parameter values that are decorated as "sensitive" in the API will not
  19263. // be included in the string output. The member name will be present, but the
  19264. // value will be replaced with "sensitive".
  19265. func (s WAFSubscriptionNotFoundException) String() string {
  19266. return awsutil.Prettify(s)
  19267. }
  19268. // GoString returns the string representation.
  19269. //
  19270. // API parameter values that are decorated as "sensitive" in the API will not
  19271. // be included in the string output. The member name will be present, but the
  19272. // value will be replaced with "sensitive".
  19273. func (s WAFSubscriptionNotFoundException) GoString() string {
  19274. return s.String()
  19275. }
  19276. func newErrorWAFSubscriptionNotFoundException(v protocol.ResponseMetadata) error {
  19277. return &WAFSubscriptionNotFoundException{
  19278. RespMetadata: v,
  19279. }
  19280. }
  19281. // Code returns the exception type name.
  19282. func (s *WAFSubscriptionNotFoundException) Code() string {
  19283. return "WAFSubscriptionNotFoundException"
  19284. }
  19285. // Message returns the exception's message.
  19286. func (s *WAFSubscriptionNotFoundException) Message() string {
  19287. if s.Message_ != nil {
  19288. return *s.Message_
  19289. }
  19290. return ""
  19291. }
  19292. // OrigErr always returns nil, satisfies awserr.Error interface.
  19293. func (s *WAFSubscriptionNotFoundException) OrigErr() error {
  19294. return nil
  19295. }
  19296. func (s *WAFSubscriptionNotFoundException) Error() string {
  19297. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19298. }
  19299. // Status code returns the HTTP status code for the request's response error.
  19300. func (s *WAFSubscriptionNotFoundException) StatusCode() int {
  19301. return s.RespMetadata.StatusCode
  19302. }
  19303. // RequestID returns the service's response RequestID for request.
  19304. func (s *WAFSubscriptionNotFoundException) RequestID() string {
  19305. return s.RespMetadata.RequestID
  19306. }
  19307. // An error occurred during the tagging operation. Retry your request.
  19308. type WAFTagOperationException struct {
  19309. _ struct{} `type:"structure"`
  19310. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19311. Message_ *string `locationName:"Message" type:"string"`
  19312. }
  19313. // String returns the string representation.
  19314. //
  19315. // API parameter values that are decorated as "sensitive" in the API will not
  19316. // be included in the string output. The member name will be present, but the
  19317. // value will be replaced with "sensitive".
  19318. func (s WAFTagOperationException) String() string {
  19319. return awsutil.Prettify(s)
  19320. }
  19321. // GoString returns the string representation.
  19322. //
  19323. // API parameter values that are decorated as "sensitive" in the API will not
  19324. // be included in the string output. The member name will be present, but the
  19325. // value will be replaced with "sensitive".
  19326. func (s WAFTagOperationException) GoString() string {
  19327. return s.String()
  19328. }
  19329. func newErrorWAFTagOperationException(v protocol.ResponseMetadata) error {
  19330. return &WAFTagOperationException{
  19331. RespMetadata: v,
  19332. }
  19333. }
  19334. // Code returns the exception type name.
  19335. func (s *WAFTagOperationException) Code() string {
  19336. return "WAFTagOperationException"
  19337. }
  19338. // Message returns the exception's message.
  19339. func (s *WAFTagOperationException) Message() string {
  19340. if s.Message_ != nil {
  19341. return *s.Message_
  19342. }
  19343. return ""
  19344. }
  19345. // OrigErr always returns nil, satisfies awserr.Error interface.
  19346. func (s *WAFTagOperationException) OrigErr() error {
  19347. return nil
  19348. }
  19349. func (s *WAFTagOperationException) Error() string {
  19350. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19351. }
  19352. // Status code returns the HTTP status code for the request's response error.
  19353. func (s *WAFTagOperationException) StatusCode() int {
  19354. return s.RespMetadata.StatusCode
  19355. }
  19356. // RequestID returns the service's response RequestID for request.
  19357. func (s *WAFTagOperationException) RequestID() string {
  19358. return s.RespMetadata.RequestID
  19359. }
  19360. // WAF couldn’t perform your tagging operation because of an internal error.
  19361. // Retry your request.
  19362. type WAFTagOperationInternalErrorException struct {
  19363. _ struct{} `type:"structure"`
  19364. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19365. Message_ *string `locationName:"Message" type:"string"`
  19366. }
  19367. // String returns the string representation.
  19368. //
  19369. // API parameter values that are decorated as "sensitive" in the API will not
  19370. // be included in the string output. The member name will be present, but the
  19371. // value will be replaced with "sensitive".
  19372. func (s WAFTagOperationInternalErrorException) String() string {
  19373. return awsutil.Prettify(s)
  19374. }
  19375. // GoString returns the string representation.
  19376. //
  19377. // API parameter values that are decorated as "sensitive" in the API will not
  19378. // be included in the string output. The member name will be present, but the
  19379. // value will be replaced with "sensitive".
  19380. func (s WAFTagOperationInternalErrorException) GoString() string {
  19381. return s.String()
  19382. }
  19383. func newErrorWAFTagOperationInternalErrorException(v protocol.ResponseMetadata) error {
  19384. return &WAFTagOperationInternalErrorException{
  19385. RespMetadata: v,
  19386. }
  19387. }
  19388. // Code returns the exception type name.
  19389. func (s *WAFTagOperationInternalErrorException) Code() string {
  19390. return "WAFTagOperationInternalErrorException"
  19391. }
  19392. // Message returns the exception's message.
  19393. func (s *WAFTagOperationInternalErrorException) Message() string {
  19394. if s.Message_ != nil {
  19395. return *s.Message_
  19396. }
  19397. return ""
  19398. }
  19399. // OrigErr always returns nil, satisfies awserr.Error interface.
  19400. func (s *WAFTagOperationInternalErrorException) OrigErr() error {
  19401. return nil
  19402. }
  19403. func (s *WAFTagOperationInternalErrorException) Error() string {
  19404. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19405. }
  19406. // Status code returns the HTTP status code for the request's response error.
  19407. func (s *WAFTagOperationInternalErrorException) StatusCode() int {
  19408. return s.RespMetadata.StatusCode
  19409. }
  19410. // RequestID returns the service's response RequestID for request.
  19411. func (s *WAFTagOperationInternalErrorException) RequestID() string {
  19412. return s.RespMetadata.RequestID
  19413. }
  19414. // WAF couldn’t retrieve a resource that you specified for this operation.
  19415. // If you've just created a resource that you're using in this operation, you
  19416. // might just need to wait a few minutes. It can take from a few seconds to
  19417. // a number of minutes for changes to propagate. Verify the resources that you
  19418. // are specifying in your request parameters and then retry the operation.
  19419. type WAFUnavailableEntityException struct {
  19420. _ struct{} `type:"structure"`
  19421. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19422. Message_ *string `locationName:"Message" type:"string"`
  19423. }
  19424. // String returns the string representation.
  19425. //
  19426. // API parameter values that are decorated as "sensitive" in the API will not
  19427. // be included in the string output. The member name will be present, but the
  19428. // value will be replaced with "sensitive".
  19429. func (s WAFUnavailableEntityException) String() string {
  19430. return awsutil.Prettify(s)
  19431. }
  19432. // GoString returns the string representation.
  19433. //
  19434. // API parameter values that are decorated as "sensitive" in the API will not
  19435. // be included in the string output. The member name will be present, but the
  19436. // value will be replaced with "sensitive".
  19437. func (s WAFUnavailableEntityException) GoString() string {
  19438. return s.String()
  19439. }
  19440. func newErrorWAFUnavailableEntityException(v protocol.ResponseMetadata) error {
  19441. return &WAFUnavailableEntityException{
  19442. RespMetadata: v,
  19443. }
  19444. }
  19445. // Code returns the exception type name.
  19446. func (s *WAFUnavailableEntityException) Code() string {
  19447. return "WAFUnavailableEntityException"
  19448. }
  19449. // Message returns the exception's message.
  19450. func (s *WAFUnavailableEntityException) Message() string {
  19451. if s.Message_ != nil {
  19452. return *s.Message_
  19453. }
  19454. return ""
  19455. }
  19456. // OrigErr always returns nil, satisfies awserr.Error interface.
  19457. func (s *WAFUnavailableEntityException) OrigErr() error {
  19458. return nil
  19459. }
  19460. func (s *WAFUnavailableEntityException) Error() string {
  19461. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19462. }
  19463. // Status code returns the HTTP status code for the request's response error.
  19464. func (s *WAFUnavailableEntityException) StatusCode() int {
  19465. return s.RespMetadata.StatusCode
  19466. }
  19467. // RequestID returns the service's response RequestID for request.
  19468. func (s *WAFUnavailableEntityException) RequestID() string {
  19469. return s.RespMetadata.RequestID
  19470. }
  19471. // A web ACL defines a collection of rules to use to inspect and control web
  19472. // requests. Each rule has an action defined (allow, block, or count) for requests
  19473. // that match the statement of the rule. In the web ACL, you assign a default
  19474. // action to take (allow, block) for any request that does not match any of
  19475. // the rules. The rules in a web ACL can be a combination of the types Rule,
  19476. // RuleGroup, and managed rule group. You can associate a web ACL with one or
  19477. // more Amazon Web Services resources to protect. The resources can be an Amazon
  19478. // CloudFront distribution, an Amazon API Gateway REST API, an Application Load
  19479. // Balancer, an AppSync GraphQL API, or an Amazon Cognito user pool.
  19480. type WebACL struct {
  19481. _ struct{} `type:"structure"`
  19482. // The Amazon Resource Name (ARN) of the web ACL that you want to associate
  19483. // with the resource.
  19484. //
  19485. // ARN is a required field
  19486. ARN *string `min:"20" type:"string" required:"true"`
  19487. // The web ACL capacity units (WCUs) currently being used by this web ACL.
  19488. //
  19489. // WAF uses WCUs to calculate and control the operating resources that are used
  19490. // to run your rules, rule groups, and web ACLs. WAF calculates capacity differently
  19491. // for each rule type, to reflect the relative cost of each rule. Simple rules
  19492. // that cost little to run use fewer WCUs than more complex rules that use more
  19493. // processing power. Rule group capacity is fixed at creation, which helps users
  19494. // plan their web ACL WCU usage when they use a rule group. The WCU limit for
  19495. // web ACLs is 1,500.
  19496. Capacity *int64 `type:"long"`
  19497. // Specifies how WAF should handle CAPTCHA evaluations for rules that don't
  19498. // have their own CaptchaConfig settings. If you don't specify this, WAF uses
  19499. // its default settings for CaptchaConfig.
  19500. CaptchaConfig *CaptchaConfig `type:"structure"`
  19501. // Specifies how WAF should handle challenge evaluations for rules that don't
  19502. // have their own ChallengeConfig settings. If you don't specify this, WAF uses
  19503. // its default settings for ChallengeConfig.
  19504. ChallengeConfig *ChallengeConfig `type:"structure"`
  19505. // A map of custom response keys and content bodies. When you create a rule
  19506. // with a block action, you can send a custom response to the web request. You
  19507. // define these for the web ACL, and then use them in the rules and default
  19508. // actions that you define in the web ACL.
  19509. //
  19510. // For information about customizing web requests and responses, see Customizing
  19511. // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
  19512. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  19513. //
  19514. // For information about the limits on count and size for custom request and
  19515. // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  19516. // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
  19517. CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"`
  19518. // The action to perform if none of the Rules contained in the WebACL match.
  19519. //
  19520. // DefaultAction is a required field
  19521. DefaultAction *DefaultAction `type:"structure" required:"true"`
  19522. // A description of the web ACL that helps with identification.
  19523. Description *string `min:"1" type:"string"`
  19524. // A unique identifier for the WebACL. This ID is returned in the responses
  19525. // to create and list commands. You use this ID to do things like get, update,
  19526. // and delete a WebACL.
  19527. //
  19528. // Id is a required field
  19529. Id *string `min:"1" type:"string" required:"true"`
  19530. // The label namespace prefix for this web ACL. All labels added by rules in
  19531. // this web ACL have this prefix.
  19532. //
  19533. // * The syntax for the label namespace prefix for a web ACL is the following:
  19534. // awswaf:<account ID>:webacl:<web ACL name>:
  19535. //
  19536. // * When a rule with a label matches a web request, WAF adds the fully qualified
  19537. // label to the request. A fully qualified label is made up of the label
  19538. // namespace from the rule group or web ACL where the rule is defined and
  19539. // the label from the rule, separated by a colon: <label namespace>:<label
  19540. // from rule>
  19541. LabelNamespace *string `min:"1" type:"string"`
  19542. // Indicates whether this web ACL is managed by Firewall Manager. If true, then
  19543. // only Firewall Manager can delete the web ACL or any Firewall Manager rule
  19544. // groups in the web ACL.
  19545. ManagedByFirewallManager *bool `type:"boolean"`
  19546. // The name of the web ACL. You cannot change the name of a web ACL after you
  19547. // create it.
  19548. //
  19549. // Name is a required field
  19550. Name *string `min:"1" type:"string" required:"true"`
  19551. // The last set of rules for WAF to process in the web ACL. This is defined
  19552. // in an Firewall Manager WAF policy and contains only rule group references.
  19553. // You can't alter these. Any rules and rule groups that you define for the
  19554. // web ACL are prioritized before these.
  19555. //
  19556. // In the Firewall Manager WAF policy, the Firewall Manager administrator can
  19557. // define a set of rule groups to run first in the web ACL and a set of rule
  19558. // groups to run last. Within each set, the administrator prioritizes the rule
  19559. // groups, to determine their relative processing order.
  19560. PostProcessFirewallManagerRuleGroups []*FirewallManagerRuleGroup `type:"list"`
  19561. // The first set of rules for WAF to process in the web ACL. This is defined
  19562. // in an Firewall Manager WAF policy and contains only rule group references.
  19563. // You can't alter these. Any rules and rule groups that you define for the
  19564. // web ACL are prioritized after these.
  19565. //
  19566. // In the Firewall Manager WAF policy, the Firewall Manager administrator can
  19567. // define a set of rule groups to run first in the web ACL and a set of rule
  19568. // groups to run last. Within each set, the administrator prioritizes the rule
  19569. // groups, to determine their relative processing order.
  19570. PreProcessFirewallManagerRuleGroups []*FirewallManagerRuleGroup `type:"list"`
  19571. // The Rule statements used to identify the web requests that you want to allow,
  19572. // block, or count. Each rule includes one top-level statement that WAF uses
  19573. // to identify matching web requests, and parameters that govern how WAF handles
  19574. // them.
  19575. Rules []*Rule `type:"list"`
  19576. // Specifies the domains that WAF should accept in a web request token. This
  19577. // enables the use of tokens across multiple protected websites. When WAF provides
  19578. // a token, it uses the domain of the Amazon Web Services resource that the
  19579. // web ACL is protecting. If you don't specify a list of token domains, WAF
  19580. // accepts tokens only for the domain of the protected resource. With a token
  19581. // domain list, WAF accepts the resource's host domain plus all domains in the
  19582. // token domain list, including their prefixed subdomains.
  19583. TokenDomains []*string `min:"1" type:"list"`
  19584. // Defines and enables Amazon CloudWatch metrics and web request sample collection.
  19585. //
  19586. // VisibilityConfig is a required field
  19587. VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
  19588. }
  19589. // String returns the string representation.
  19590. //
  19591. // API parameter values that are decorated as "sensitive" in the API will not
  19592. // be included in the string output. The member name will be present, but the
  19593. // value will be replaced with "sensitive".
  19594. func (s WebACL) String() string {
  19595. return awsutil.Prettify(s)
  19596. }
  19597. // GoString returns the string representation.
  19598. //
  19599. // API parameter values that are decorated as "sensitive" in the API will not
  19600. // be included in the string output. The member name will be present, but the
  19601. // value will be replaced with "sensitive".
  19602. func (s WebACL) GoString() string {
  19603. return s.String()
  19604. }
  19605. // SetARN sets the ARN field's value.
  19606. func (s *WebACL) SetARN(v string) *WebACL {
  19607. s.ARN = &v
  19608. return s
  19609. }
  19610. // SetCapacity sets the Capacity field's value.
  19611. func (s *WebACL) SetCapacity(v int64) *WebACL {
  19612. s.Capacity = &v
  19613. return s
  19614. }
  19615. // SetCaptchaConfig sets the CaptchaConfig field's value.
  19616. func (s *WebACL) SetCaptchaConfig(v *CaptchaConfig) *WebACL {
  19617. s.CaptchaConfig = v
  19618. return s
  19619. }
  19620. // SetChallengeConfig sets the ChallengeConfig field's value.
  19621. func (s *WebACL) SetChallengeConfig(v *ChallengeConfig) *WebACL {
  19622. s.ChallengeConfig = v
  19623. return s
  19624. }
  19625. // SetCustomResponseBodies sets the CustomResponseBodies field's value.
  19626. func (s *WebACL) SetCustomResponseBodies(v map[string]*CustomResponseBody) *WebACL {
  19627. s.CustomResponseBodies = v
  19628. return s
  19629. }
  19630. // SetDefaultAction sets the DefaultAction field's value.
  19631. func (s *WebACL) SetDefaultAction(v *DefaultAction) *WebACL {
  19632. s.DefaultAction = v
  19633. return s
  19634. }
  19635. // SetDescription sets the Description field's value.
  19636. func (s *WebACL) SetDescription(v string) *WebACL {
  19637. s.Description = &v
  19638. return s
  19639. }
  19640. // SetId sets the Id field's value.
  19641. func (s *WebACL) SetId(v string) *WebACL {
  19642. s.Id = &v
  19643. return s
  19644. }
  19645. // SetLabelNamespace sets the LabelNamespace field's value.
  19646. func (s *WebACL) SetLabelNamespace(v string) *WebACL {
  19647. s.LabelNamespace = &v
  19648. return s
  19649. }
  19650. // SetManagedByFirewallManager sets the ManagedByFirewallManager field's value.
  19651. func (s *WebACL) SetManagedByFirewallManager(v bool) *WebACL {
  19652. s.ManagedByFirewallManager = &v
  19653. return s
  19654. }
  19655. // SetName sets the Name field's value.
  19656. func (s *WebACL) SetName(v string) *WebACL {
  19657. s.Name = &v
  19658. return s
  19659. }
  19660. // SetPostProcessFirewallManagerRuleGroups sets the PostProcessFirewallManagerRuleGroups field's value.
  19661. func (s *WebACL) SetPostProcessFirewallManagerRuleGroups(v []*FirewallManagerRuleGroup) *WebACL {
  19662. s.PostProcessFirewallManagerRuleGroups = v
  19663. return s
  19664. }
  19665. // SetPreProcessFirewallManagerRuleGroups sets the PreProcessFirewallManagerRuleGroups field's value.
  19666. func (s *WebACL) SetPreProcessFirewallManagerRuleGroups(v []*FirewallManagerRuleGroup) *WebACL {
  19667. s.PreProcessFirewallManagerRuleGroups = v
  19668. return s
  19669. }
  19670. // SetRules sets the Rules field's value.
  19671. func (s *WebACL) SetRules(v []*Rule) *WebACL {
  19672. s.Rules = v
  19673. return s
  19674. }
  19675. // SetTokenDomains sets the TokenDomains field's value.
  19676. func (s *WebACL) SetTokenDomains(v []*string) *WebACL {
  19677. s.TokenDomains = v
  19678. return s
  19679. }
  19680. // SetVisibilityConfig sets the VisibilityConfig field's value.
  19681. func (s *WebACL) SetVisibilityConfig(v *VisibilityConfig) *WebACL {
  19682. s.VisibilityConfig = v
  19683. return s
  19684. }
  19685. // High-level information about a WebACL, returned by operations like create
  19686. // and list. This provides information like the ID, that you can use to retrieve
  19687. // and manage a WebACL, and the ARN, that you provide to operations like AssociateWebACL.
  19688. type WebACLSummary struct {
  19689. _ struct{} `type:"structure"`
  19690. // The Amazon Resource Name (ARN) of the entity.
  19691. ARN *string `min:"20" type:"string"`
  19692. // A description of the web ACL that helps with identification.
  19693. Description *string `min:"1" type:"string"`
  19694. // The unique identifier for the web ACL. This ID is returned in the responses
  19695. // to create and list commands. You provide it to operations like update and
  19696. // delete.
  19697. Id *string `min:"1" type:"string"`
  19698. // A token used for optimistic locking. WAF returns a token to your get and
  19699. // list requests, to mark the state of the entity at the time of the request.
  19700. // To make changes to the entity associated with the token, you provide the
  19701. // token to operations like update and delete. WAF uses the token to ensure
  19702. // that no changes have been made to the entity since you last retrieved it.
  19703. // If a change has been made, the update fails with a WAFOptimisticLockException.
  19704. // If this happens, perform another get, and use the new token returned by that
  19705. // operation.
  19706. LockToken *string `min:"1" type:"string"`
  19707. // The name of the web ACL. You cannot change the name of a web ACL after you
  19708. // create it.
  19709. Name *string `min:"1" type:"string"`
  19710. }
  19711. // String returns the string representation.
  19712. //
  19713. // API parameter values that are decorated as "sensitive" in the API will not
  19714. // be included in the string output. The member name will be present, but the
  19715. // value will be replaced with "sensitive".
  19716. func (s WebACLSummary) String() string {
  19717. return awsutil.Prettify(s)
  19718. }
  19719. // GoString returns the string representation.
  19720. //
  19721. // API parameter values that are decorated as "sensitive" in the API will not
  19722. // be included in the string output. The member name will be present, but the
  19723. // value will be replaced with "sensitive".
  19724. func (s WebACLSummary) GoString() string {
  19725. return s.String()
  19726. }
  19727. // SetARN sets the ARN field's value.
  19728. func (s *WebACLSummary) SetARN(v string) *WebACLSummary {
  19729. s.ARN = &v
  19730. return s
  19731. }
  19732. // SetDescription sets the Description field's value.
  19733. func (s *WebACLSummary) SetDescription(v string) *WebACLSummary {
  19734. s.Description = &v
  19735. return s
  19736. }
  19737. // SetId sets the Id field's value.
  19738. func (s *WebACLSummary) SetId(v string) *WebACLSummary {
  19739. s.Id = &v
  19740. return s
  19741. }
  19742. // SetLockToken sets the LockToken field's value.
  19743. func (s *WebACLSummary) SetLockToken(v string) *WebACLSummary {
  19744. s.LockToken = &v
  19745. return s
  19746. }
  19747. // SetName sets the Name field's value.
  19748. func (s *WebACLSummary) SetName(v string) *WebACLSummary {
  19749. s.Name = &v
  19750. return s
  19751. }
  19752. // A rule statement that inspects for cross-site scripting (XSS) attacks. In
  19753. // XSS attacks, the attacker uses vulnerabilities in a benign website as a vehicle
  19754. // to inject malicious client-site scripts into other legitimate web browsers.
  19755. type XssMatchStatement struct {
  19756. _ struct{} `type:"structure"`
  19757. // The part of the web request that you want WAF to inspect.
  19758. //
  19759. // FieldToMatch is a required field
  19760. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  19761. // Text transformations eliminate some of the unusual formatting that attackers
  19762. // use in web requests in an effort to bypass detection. If you specify one
  19763. // or more transformations in a rule statement, WAF performs all transformations
  19764. // on the content of the request component identified by FieldToMatch, starting
  19765. // from the lowest priority setting, before inspecting the content for a match.
  19766. //
  19767. // TextTransformations is a required field
  19768. TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"`
  19769. }
  19770. // String returns the string representation.
  19771. //
  19772. // API parameter values that are decorated as "sensitive" in the API will not
  19773. // be included in the string output. The member name will be present, but the
  19774. // value will be replaced with "sensitive".
  19775. func (s XssMatchStatement) String() string {
  19776. return awsutil.Prettify(s)
  19777. }
  19778. // GoString returns the string representation.
  19779. //
  19780. // API parameter values that are decorated as "sensitive" in the API will not
  19781. // be included in the string output. The member name will be present, but the
  19782. // value will be replaced with "sensitive".
  19783. func (s XssMatchStatement) GoString() string {
  19784. return s.String()
  19785. }
  19786. // Validate inspects the fields of the type to determine if they are valid.
  19787. func (s *XssMatchStatement) Validate() error {
  19788. invalidParams := request.ErrInvalidParams{Context: "XssMatchStatement"}
  19789. if s.FieldToMatch == nil {
  19790. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  19791. }
  19792. if s.TextTransformations == nil {
  19793. invalidParams.Add(request.NewErrParamRequired("TextTransformations"))
  19794. }
  19795. if s.TextTransformations != nil && len(s.TextTransformations) < 1 {
  19796. invalidParams.Add(request.NewErrParamMinLen("TextTransformations", 1))
  19797. }
  19798. if s.FieldToMatch != nil {
  19799. if err := s.FieldToMatch.Validate(); err != nil {
  19800. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  19801. }
  19802. }
  19803. if s.TextTransformations != nil {
  19804. for i, v := range s.TextTransformations {
  19805. if v == nil {
  19806. continue
  19807. }
  19808. if err := v.Validate(); err != nil {
  19809. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TextTransformations", i), err.(request.ErrInvalidParams))
  19810. }
  19811. }
  19812. }
  19813. if invalidParams.Len() > 0 {
  19814. return invalidParams
  19815. }
  19816. return nil
  19817. }
  19818. // SetFieldToMatch sets the FieldToMatch field's value.
  19819. func (s *XssMatchStatement) SetFieldToMatch(v *FieldToMatch) *XssMatchStatement {
  19820. s.FieldToMatch = v
  19821. return s
  19822. }
  19823. // SetTextTransformations sets the TextTransformations field's value.
  19824. func (s *XssMatchStatement) SetTextTransformations(v []*TextTransformation) *XssMatchStatement {
  19825. s.TextTransformations = v
  19826. return s
  19827. }
  19828. const (
  19829. // ActionValueAllow is a ActionValue enum value
  19830. ActionValueAllow = "ALLOW"
  19831. // ActionValueBlock is a ActionValue enum value
  19832. ActionValueBlock = "BLOCK"
  19833. // ActionValueCount is a ActionValue enum value
  19834. ActionValueCount = "COUNT"
  19835. // ActionValueCaptcha is a ActionValue enum value
  19836. ActionValueCaptcha = "CAPTCHA"
  19837. // ActionValueChallenge is a ActionValue enum value
  19838. ActionValueChallenge = "CHALLENGE"
  19839. // ActionValueExcludedAsCount is a ActionValue enum value
  19840. ActionValueExcludedAsCount = "EXCLUDED_AS_COUNT"
  19841. )
  19842. // ActionValue_Values returns all elements of the ActionValue enum
  19843. func ActionValue_Values() []string {
  19844. return []string{
  19845. ActionValueAllow,
  19846. ActionValueBlock,
  19847. ActionValueCount,
  19848. ActionValueCaptcha,
  19849. ActionValueChallenge,
  19850. ActionValueExcludedAsCount,
  19851. }
  19852. }
  19853. const (
  19854. // BodyParsingFallbackBehaviorMatch is a BodyParsingFallbackBehavior enum value
  19855. BodyParsingFallbackBehaviorMatch = "MATCH"
  19856. // BodyParsingFallbackBehaviorNoMatch is a BodyParsingFallbackBehavior enum value
  19857. BodyParsingFallbackBehaviorNoMatch = "NO_MATCH"
  19858. // BodyParsingFallbackBehaviorEvaluateAsString is a BodyParsingFallbackBehavior enum value
  19859. BodyParsingFallbackBehaviorEvaluateAsString = "EVALUATE_AS_STRING"
  19860. )
  19861. // BodyParsingFallbackBehavior_Values returns all elements of the BodyParsingFallbackBehavior enum
  19862. func BodyParsingFallbackBehavior_Values() []string {
  19863. return []string{
  19864. BodyParsingFallbackBehaviorMatch,
  19865. BodyParsingFallbackBehaviorNoMatch,
  19866. BodyParsingFallbackBehaviorEvaluateAsString,
  19867. }
  19868. }
  19869. const (
  19870. // ComparisonOperatorEq is a ComparisonOperator enum value
  19871. ComparisonOperatorEq = "EQ"
  19872. // ComparisonOperatorNe is a ComparisonOperator enum value
  19873. ComparisonOperatorNe = "NE"
  19874. // ComparisonOperatorLe is a ComparisonOperator enum value
  19875. ComparisonOperatorLe = "LE"
  19876. // ComparisonOperatorLt is a ComparisonOperator enum value
  19877. ComparisonOperatorLt = "LT"
  19878. // ComparisonOperatorGe is a ComparisonOperator enum value
  19879. ComparisonOperatorGe = "GE"
  19880. // ComparisonOperatorGt is a ComparisonOperator enum value
  19881. ComparisonOperatorGt = "GT"
  19882. )
  19883. // ComparisonOperator_Values returns all elements of the ComparisonOperator enum
  19884. func ComparisonOperator_Values() []string {
  19885. return []string{
  19886. ComparisonOperatorEq,
  19887. ComparisonOperatorNe,
  19888. ComparisonOperatorLe,
  19889. ComparisonOperatorLt,
  19890. ComparisonOperatorGe,
  19891. ComparisonOperatorGt,
  19892. }
  19893. }
  19894. const (
  19895. // CountryCodeAf is a CountryCode enum value
  19896. CountryCodeAf = "AF"
  19897. // CountryCodeAx is a CountryCode enum value
  19898. CountryCodeAx = "AX"
  19899. // CountryCodeAl is a CountryCode enum value
  19900. CountryCodeAl = "AL"
  19901. // CountryCodeDz is a CountryCode enum value
  19902. CountryCodeDz = "DZ"
  19903. // CountryCodeAs is a CountryCode enum value
  19904. CountryCodeAs = "AS"
  19905. // CountryCodeAd is a CountryCode enum value
  19906. CountryCodeAd = "AD"
  19907. // CountryCodeAo is a CountryCode enum value
  19908. CountryCodeAo = "AO"
  19909. // CountryCodeAi is a CountryCode enum value
  19910. CountryCodeAi = "AI"
  19911. // CountryCodeAq is a CountryCode enum value
  19912. CountryCodeAq = "AQ"
  19913. // CountryCodeAg is a CountryCode enum value
  19914. CountryCodeAg = "AG"
  19915. // CountryCodeAr is a CountryCode enum value
  19916. CountryCodeAr = "AR"
  19917. // CountryCodeAm is a CountryCode enum value
  19918. CountryCodeAm = "AM"
  19919. // CountryCodeAw is a CountryCode enum value
  19920. CountryCodeAw = "AW"
  19921. // CountryCodeAu is a CountryCode enum value
  19922. CountryCodeAu = "AU"
  19923. // CountryCodeAt is a CountryCode enum value
  19924. CountryCodeAt = "AT"
  19925. // CountryCodeAz is a CountryCode enum value
  19926. CountryCodeAz = "AZ"
  19927. // CountryCodeBs is a CountryCode enum value
  19928. CountryCodeBs = "BS"
  19929. // CountryCodeBh is a CountryCode enum value
  19930. CountryCodeBh = "BH"
  19931. // CountryCodeBd is a CountryCode enum value
  19932. CountryCodeBd = "BD"
  19933. // CountryCodeBb is a CountryCode enum value
  19934. CountryCodeBb = "BB"
  19935. // CountryCodeBy is a CountryCode enum value
  19936. CountryCodeBy = "BY"
  19937. // CountryCodeBe is a CountryCode enum value
  19938. CountryCodeBe = "BE"
  19939. // CountryCodeBz is a CountryCode enum value
  19940. CountryCodeBz = "BZ"
  19941. // CountryCodeBj is a CountryCode enum value
  19942. CountryCodeBj = "BJ"
  19943. // CountryCodeBm is a CountryCode enum value
  19944. CountryCodeBm = "BM"
  19945. // CountryCodeBt is a CountryCode enum value
  19946. CountryCodeBt = "BT"
  19947. // CountryCodeBo is a CountryCode enum value
  19948. CountryCodeBo = "BO"
  19949. // CountryCodeBq is a CountryCode enum value
  19950. CountryCodeBq = "BQ"
  19951. // CountryCodeBa is a CountryCode enum value
  19952. CountryCodeBa = "BA"
  19953. // CountryCodeBw is a CountryCode enum value
  19954. CountryCodeBw = "BW"
  19955. // CountryCodeBv is a CountryCode enum value
  19956. CountryCodeBv = "BV"
  19957. // CountryCodeBr is a CountryCode enum value
  19958. CountryCodeBr = "BR"
  19959. // CountryCodeIo is a CountryCode enum value
  19960. CountryCodeIo = "IO"
  19961. // CountryCodeBn is a CountryCode enum value
  19962. CountryCodeBn = "BN"
  19963. // CountryCodeBg is a CountryCode enum value
  19964. CountryCodeBg = "BG"
  19965. // CountryCodeBf is a CountryCode enum value
  19966. CountryCodeBf = "BF"
  19967. // CountryCodeBi is a CountryCode enum value
  19968. CountryCodeBi = "BI"
  19969. // CountryCodeKh is a CountryCode enum value
  19970. CountryCodeKh = "KH"
  19971. // CountryCodeCm is a CountryCode enum value
  19972. CountryCodeCm = "CM"
  19973. // CountryCodeCa is a CountryCode enum value
  19974. CountryCodeCa = "CA"
  19975. // CountryCodeCv is a CountryCode enum value
  19976. CountryCodeCv = "CV"
  19977. // CountryCodeKy is a CountryCode enum value
  19978. CountryCodeKy = "KY"
  19979. // CountryCodeCf is a CountryCode enum value
  19980. CountryCodeCf = "CF"
  19981. // CountryCodeTd is a CountryCode enum value
  19982. CountryCodeTd = "TD"
  19983. // CountryCodeCl is a CountryCode enum value
  19984. CountryCodeCl = "CL"
  19985. // CountryCodeCn is a CountryCode enum value
  19986. CountryCodeCn = "CN"
  19987. // CountryCodeCx is a CountryCode enum value
  19988. CountryCodeCx = "CX"
  19989. // CountryCodeCc is a CountryCode enum value
  19990. CountryCodeCc = "CC"
  19991. // CountryCodeCo is a CountryCode enum value
  19992. CountryCodeCo = "CO"
  19993. // CountryCodeKm is a CountryCode enum value
  19994. CountryCodeKm = "KM"
  19995. // CountryCodeCg is a CountryCode enum value
  19996. CountryCodeCg = "CG"
  19997. // CountryCodeCd is a CountryCode enum value
  19998. CountryCodeCd = "CD"
  19999. // CountryCodeCk is a CountryCode enum value
  20000. CountryCodeCk = "CK"
  20001. // CountryCodeCr is a CountryCode enum value
  20002. CountryCodeCr = "CR"
  20003. // CountryCodeCi is a CountryCode enum value
  20004. CountryCodeCi = "CI"
  20005. // CountryCodeHr is a CountryCode enum value
  20006. CountryCodeHr = "HR"
  20007. // CountryCodeCu is a CountryCode enum value
  20008. CountryCodeCu = "CU"
  20009. // CountryCodeCw is a CountryCode enum value
  20010. CountryCodeCw = "CW"
  20011. // CountryCodeCy is a CountryCode enum value
  20012. CountryCodeCy = "CY"
  20013. // CountryCodeCz is a CountryCode enum value
  20014. CountryCodeCz = "CZ"
  20015. // CountryCodeDk is a CountryCode enum value
  20016. CountryCodeDk = "DK"
  20017. // CountryCodeDj is a CountryCode enum value
  20018. CountryCodeDj = "DJ"
  20019. // CountryCodeDm is a CountryCode enum value
  20020. CountryCodeDm = "DM"
  20021. // CountryCodeDo is a CountryCode enum value
  20022. CountryCodeDo = "DO"
  20023. // CountryCodeEc is a CountryCode enum value
  20024. CountryCodeEc = "EC"
  20025. // CountryCodeEg is a CountryCode enum value
  20026. CountryCodeEg = "EG"
  20027. // CountryCodeSv is a CountryCode enum value
  20028. CountryCodeSv = "SV"
  20029. // CountryCodeGq is a CountryCode enum value
  20030. CountryCodeGq = "GQ"
  20031. // CountryCodeEr is a CountryCode enum value
  20032. CountryCodeEr = "ER"
  20033. // CountryCodeEe is a CountryCode enum value
  20034. CountryCodeEe = "EE"
  20035. // CountryCodeEt is a CountryCode enum value
  20036. CountryCodeEt = "ET"
  20037. // CountryCodeFk is a CountryCode enum value
  20038. CountryCodeFk = "FK"
  20039. // CountryCodeFo is a CountryCode enum value
  20040. CountryCodeFo = "FO"
  20041. // CountryCodeFj is a CountryCode enum value
  20042. CountryCodeFj = "FJ"
  20043. // CountryCodeFi is a CountryCode enum value
  20044. CountryCodeFi = "FI"
  20045. // CountryCodeFr is a CountryCode enum value
  20046. CountryCodeFr = "FR"
  20047. // CountryCodeGf is a CountryCode enum value
  20048. CountryCodeGf = "GF"
  20049. // CountryCodePf is a CountryCode enum value
  20050. CountryCodePf = "PF"
  20051. // CountryCodeTf is a CountryCode enum value
  20052. CountryCodeTf = "TF"
  20053. // CountryCodeGa is a CountryCode enum value
  20054. CountryCodeGa = "GA"
  20055. // CountryCodeGm is a CountryCode enum value
  20056. CountryCodeGm = "GM"
  20057. // CountryCodeGe is a CountryCode enum value
  20058. CountryCodeGe = "GE"
  20059. // CountryCodeDe is a CountryCode enum value
  20060. CountryCodeDe = "DE"
  20061. // CountryCodeGh is a CountryCode enum value
  20062. CountryCodeGh = "GH"
  20063. // CountryCodeGi is a CountryCode enum value
  20064. CountryCodeGi = "GI"
  20065. // CountryCodeGr is a CountryCode enum value
  20066. CountryCodeGr = "GR"
  20067. // CountryCodeGl is a CountryCode enum value
  20068. CountryCodeGl = "GL"
  20069. // CountryCodeGd is a CountryCode enum value
  20070. CountryCodeGd = "GD"
  20071. // CountryCodeGp is a CountryCode enum value
  20072. CountryCodeGp = "GP"
  20073. // CountryCodeGu is a CountryCode enum value
  20074. CountryCodeGu = "GU"
  20075. // CountryCodeGt is a CountryCode enum value
  20076. CountryCodeGt = "GT"
  20077. // CountryCodeGg is a CountryCode enum value
  20078. CountryCodeGg = "GG"
  20079. // CountryCodeGn is a CountryCode enum value
  20080. CountryCodeGn = "GN"
  20081. // CountryCodeGw is a CountryCode enum value
  20082. CountryCodeGw = "GW"
  20083. // CountryCodeGy is a CountryCode enum value
  20084. CountryCodeGy = "GY"
  20085. // CountryCodeHt is a CountryCode enum value
  20086. CountryCodeHt = "HT"
  20087. // CountryCodeHm is a CountryCode enum value
  20088. CountryCodeHm = "HM"
  20089. // CountryCodeVa is a CountryCode enum value
  20090. CountryCodeVa = "VA"
  20091. // CountryCodeHn is a CountryCode enum value
  20092. CountryCodeHn = "HN"
  20093. // CountryCodeHk is a CountryCode enum value
  20094. CountryCodeHk = "HK"
  20095. // CountryCodeHu is a CountryCode enum value
  20096. CountryCodeHu = "HU"
  20097. // CountryCodeIs is a CountryCode enum value
  20098. CountryCodeIs = "IS"
  20099. // CountryCodeIn is a CountryCode enum value
  20100. CountryCodeIn = "IN"
  20101. // CountryCodeId is a CountryCode enum value
  20102. CountryCodeId = "ID"
  20103. // CountryCodeIr is a CountryCode enum value
  20104. CountryCodeIr = "IR"
  20105. // CountryCodeIq is a CountryCode enum value
  20106. CountryCodeIq = "IQ"
  20107. // CountryCodeIe is a CountryCode enum value
  20108. CountryCodeIe = "IE"
  20109. // CountryCodeIm is a CountryCode enum value
  20110. CountryCodeIm = "IM"
  20111. // CountryCodeIl is a CountryCode enum value
  20112. CountryCodeIl = "IL"
  20113. // CountryCodeIt is a CountryCode enum value
  20114. CountryCodeIt = "IT"
  20115. // CountryCodeJm is a CountryCode enum value
  20116. CountryCodeJm = "JM"
  20117. // CountryCodeJp is a CountryCode enum value
  20118. CountryCodeJp = "JP"
  20119. // CountryCodeJe is a CountryCode enum value
  20120. CountryCodeJe = "JE"
  20121. // CountryCodeJo is a CountryCode enum value
  20122. CountryCodeJo = "JO"
  20123. // CountryCodeKz is a CountryCode enum value
  20124. CountryCodeKz = "KZ"
  20125. // CountryCodeKe is a CountryCode enum value
  20126. CountryCodeKe = "KE"
  20127. // CountryCodeKi is a CountryCode enum value
  20128. CountryCodeKi = "KI"
  20129. // CountryCodeKp is a CountryCode enum value
  20130. CountryCodeKp = "KP"
  20131. // CountryCodeKr is a CountryCode enum value
  20132. CountryCodeKr = "KR"
  20133. // CountryCodeKw is a CountryCode enum value
  20134. CountryCodeKw = "KW"
  20135. // CountryCodeKg is a CountryCode enum value
  20136. CountryCodeKg = "KG"
  20137. // CountryCodeLa is a CountryCode enum value
  20138. CountryCodeLa = "LA"
  20139. // CountryCodeLv is a CountryCode enum value
  20140. CountryCodeLv = "LV"
  20141. // CountryCodeLb is a CountryCode enum value
  20142. CountryCodeLb = "LB"
  20143. // CountryCodeLs is a CountryCode enum value
  20144. CountryCodeLs = "LS"
  20145. // CountryCodeLr is a CountryCode enum value
  20146. CountryCodeLr = "LR"
  20147. // CountryCodeLy is a CountryCode enum value
  20148. CountryCodeLy = "LY"
  20149. // CountryCodeLi is a CountryCode enum value
  20150. CountryCodeLi = "LI"
  20151. // CountryCodeLt is a CountryCode enum value
  20152. CountryCodeLt = "LT"
  20153. // CountryCodeLu is a CountryCode enum value
  20154. CountryCodeLu = "LU"
  20155. // CountryCodeMo is a CountryCode enum value
  20156. CountryCodeMo = "MO"
  20157. // CountryCodeMk is a CountryCode enum value
  20158. CountryCodeMk = "MK"
  20159. // CountryCodeMg is a CountryCode enum value
  20160. CountryCodeMg = "MG"
  20161. // CountryCodeMw is a CountryCode enum value
  20162. CountryCodeMw = "MW"
  20163. // CountryCodeMy is a CountryCode enum value
  20164. CountryCodeMy = "MY"
  20165. // CountryCodeMv is a CountryCode enum value
  20166. CountryCodeMv = "MV"
  20167. // CountryCodeMl is a CountryCode enum value
  20168. CountryCodeMl = "ML"
  20169. // CountryCodeMt is a CountryCode enum value
  20170. CountryCodeMt = "MT"
  20171. // CountryCodeMh is a CountryCode enum value
  20172. CountryCodeMh = "MH"
  20173. // CountryCodeMq is a CountryCode enum value
  20174. CountryCodeMq = "MQ"
  20175. // CountryCodeMr is a CountryCode enum value
  20176. CountryCodeMr = "MR"
  20177. // CountryCodeMu is a CountryCode enum value
  20178. CountryCodeMu = "MU"
  20179. // CountryCodeYt is a CountryCode enum value
  20180. CountryCodeYt = "YT"
  20181. // CountryCodeMx is a CountryCode enum value
  20182. CountryCodeMx = "MX"
  20183. // CountryCodeFm is a CountryCode enum value
  20184. CountryCodeFm = "FM"
  20185. // CountryCodeMd is a CountryCode enum value
  20186. CountryCodeMd = "MD"
  20187. // CountryCodeMc is a CountryCode enum value
  20188. CountryCodeMc = "MC"
  20189. // CountryCodeMn is a CountryCode enum value
  20190. CountryCodeMn = "MN"
  20191. // CountryCodeMe is a CountryCode enum value
  20192. CountryCodeMe = "ME"
  20193. // CountryCodeMs is a CountryCode enum value
  20194. CountryCodeMs = "MS"
  20195. // CountryCodeMa is a CountryCode enum value
  20196. CountryCodeMa = "MA"
  20197. // CountryCodeMz is a CountryCode enum value
  20198. CountryCodeMz = "MZ"
  20199. // CountryCodeMm is a CountryCode enum value
  20200. CountryCodeMm = "MM"
  20201. // CountryCodeNa is a CountryCode enum value
  20202. CountryCodeNa = "NA"
  20203. // CountryCodeNr is a CountryCode enum value
  20204. CountryCodeNr = "NR"
  20205. // CountryCodeNp is a CountryCode enum value
  20206. CountryCodeNp = "NP"
  20207. // CountryCodeNl is a CountryCode enum value
  20208. CountryCodeNl = "NL"
  20209. // CountryCodeNc is a CountryCode enum value
  20210. CountryCodeNc = "NC"
  20211. // CountryCodeNz is a CountryCode enum value
  20212. CountryCodeNz = "NZ"
  20213. // CountryCodeNi is a CountryCode enum value
  20214. CountryCodeNi = "NI"
  20215. // CountryCodeNe is a CountryCode enum value
  20216. CountryCodeNe = "NE"
  20217. // CountryCodeNg is a CountryCode enum value
  20218. CountryCodeNg = "NG"
  20219. // CountryCodeNu is a CountryCode enum value
  20220. CountryCodeNu = "NU"
  20221. // CountryCodeNf is a CountryCode enum value
  20222. CountryCodeNf = "NF"
  20223. // CountryCodeMp is a CountryCode enum value
  20224. CountryCodeMp = "MP"
  20225. // CountryCodeNo is a CountryCode enum value
  20226. CountryCodeNo = "NO"
  20227. // CountryCodeOm is a CountryCode enum value
  20228. CountryCodeOm = "OM"
  20229. // CountryCodePk is a CountryCode enum value
  20230. CountryCodePk = "PK"
  20231. // CountryCodePw is a CountryCode enum value
  20232. CountryCodePw = "PW"
  20233. // CountryCodePs is a CountryCode enum value
  20234. CountryCodePs = "PS"
  20235. // CountryCodePa is a CountryCode enum value
  20236. CountryCodePa = "PA"
  20237. // CountryCodePg is a CountryCode enum value
  20238. CountryCodePg = "PG"
  20239. // CountryCodePy is a CountryCode enum value
  20240. CountryCodePy = "PY"
  20241. // CountryCodePe is a CountryCode enum value
  20242. CountryCodePe = "PE"
  20243. // CountryCodePh is a CountryCode enum value
  20244. CountryCodePh = "PH"
  20245. // CountryCodePn is a CountryCode enum value
  20246. CountryCodePn = "PN"
  20247. // CountryCodePl is a CountryCode enum value
  20248. CountryCodePl = "PL"
  20249. // CountryCodePt is a CountryCode enum value
  20250. CountryCodePt = "PT"
  20251. // CountryCodePr is a CountryCode enum value
  20252. CountryCodePr = "PR"
  20253. // CountryCodeQa is a CountryCode enum value
  20254. CountryCodeQa = "QA"
  20255. // CountryCodeRe is a CountryCode enum value
  20256. CountryCodeRe = "RE"
  20257. // CountryCodeRo is a CountryCode enum value
  20258. CountryCodeRo = "RO"
  20259. // CountryCodeRu is a CountryCode enum value
  20260. CountryCodeRu = "RU"
  20261. // CountryCodeRw is a CountryCode enum value
  20262. CountryCodeRw = "RW"
  20263. // CountryCodeBl is a CountryCode enum value
  20264. CountryCodeBl = "BL"
  20265. // CountryCodeSh is a CountryCode enum value
  20266. CountryCodeSh = "SH"
  20267. // CountryCodeKn is a CountryCode enum value
  20268. CountryCodeKn = "KN"
  20269. // CountryCodeLc is a CountryCode enum value
  20270. CountryCodeLc = "LC"
  20271. // CountryCodeMf is a CountryCode enum value
  20272. CountryCodeMf = "MF"
  20273. // CountryCodePm is a CountryCode enum value
  20274. CountryCodePm = "PM"
  20275. // CountryCodeVc is a CountryCode enum value
  20276. CountryCodeVc = "VC"
  20277. // CountryCodeWs is a CountryCode enum value
  20278. CountryCodeWs = "WS"
  20279. // CountryCodeSm is a CountryCode enum value
  20280. CountryCodeSm = "SM"
  20281. // CountryCodeSt is a CountryCode enum value
  20282. CountryCodeSt = "ST"
  20283. // CountryCodeSa is a CountryCode enum value
  20284. CountryCodeSa = "SA"
  20285. // CountryCodeSn is a CountryCode enum value
  20286. CountryCodeSn = "SN"
  20287. // CountryCodeRs is a CountryCode enum value
  20288. CountryCodeRs = "RS"
  20289. // CountryCodeSc is a CountryCode enum value
  20290. CountryCodeSc = "SC"
  20291. // CountryCodeSl is a CountryCode enum value
  20292. CountryCodeSl = "SL"
  20293. // CountryCodeSg is a CountryCode enum value
  20294. CountryCodeSg = "SG"
  20295. // CountryCodeSx is a CountryCode enum value
  20296. CountryCodeSx = "SX"
  20297. // CountryCodeSk is a CountryCode enum value
  20298. CountryCodeSk = "SK"
  20299. // CountryCodeSi is a CountryCode enum value
  20300. CountryCodeSi = "SI"
  20301. // CountryCodeSb is a CountryCode enum value
  20302. CountryCodeSb = "SB"
  20303. // CountryCodeSo is a CountryCode enum value
  20304. CountryCodeSo = "SO"
  20305. // CountryCodeZa is a CountryCode enum value
  20306. CountryCodeZa = "ZA"
  20307. // CountryCodeGs is a CountryCode enum value
  20308. CountryCodeGs = "GS"
  20309. // CountryCodeSs is a CountryCode enum value
  20310. CountryCodeSs = "SS"
  20311. // CountryCodeEs is a CountryCode enum value
  20312. CountryCodeEs = "ES"
  20313. // CountryCodeLk is a CountryCode enum value
  20314. CountryCodeLk = "LK"
  20315. // CountryCodeSd is a CountryCode enum value
  20316. CountryCodeSd = "SD"
  20317. // CountryCodeSr is a CountryCode enum value
  20318. CountryCodeSr = "SR"
  20319. // CountryCodeSj is a CountryCode enum value
  20320. CountryCodeSj = "SJ"
  20321. // CountryCodeSz is a CountryCode enum value
  20322. CountryCodeSz = "SZ"
  20323. // CountryCodeSe is a CountryCode enum value
  20324. CountryCodeSe = "SE"
  20325. // CountryCodeCh is a CountryCode enum value
  20326. CountryCodeCh = "CH"
  20327. // CountryCodeSy is a CountryCode enum value
  20328. CountryCodeSy = "SY"
  20329. // CountryCodeTw is a CountryCode enum value
  20330. CountryCodeTw = "TW"
  20331. // CountryCodeTj is a CountryCode enum value
  20332. CountryCodeTj = "TJ"
  20333. // CountryCodeTz is a CountryCode enum value
  20334. CountryCodeTz = "TZ"
  20335. // CountryCodeTh is a CountryCode enum value
  20336. CountryCodeTh = "TH"
  20337. // CountryCodeTl is a CountryCode enum value
  20338. CountryCodeTl = "TL"
  20339. // CountryCodeTg is a CountryCode enum value
  20340. CountryCodeTg = "TG"
  20341. // CountryCodeTk is a CountryCode enum value
  20342. CountryCodeTk = "TK"
  20343. // CountryCodeTo is a CountryCode enum value
  20344. CountryCodeTo = "TO"
  20345. // CountryCodeTt is a CountryCode enum value
  20346. CountryCodeTt = "TT"
  20347. // CountryCodeTn is a CountryCode enum value
  20348. CountryCodeTn = "TN"
  20349. // CountryCodeTr is a CountryCode enum value
  20350. CountryCodeTr = "TR"
  20351. // CountryCodeTm is a CountryCode enum value
  20352. CountryCodeTm = "TM"
  20353. // CountryCodeTc is a CountryCode enum value
  20354. CountryCodeTc = "TC"
  20355. // CountryCodeTv is a CountryCode enum value
  20356. CountryCodeTv = "TV"
  20357. // CountryCodeUg is a CountryCode enum value
  20358. CountryCodeUg = "UG"
  20359. // CountryCodeUa is a CountryCode enum value
  20360. CountryCodeUa = "UA"
  20361. // CountryCodeAe is a CountryCode enum value
  20362. CountryCodeAe = "AE"
  20363. // CountryCodeGb is a CountryCode enum value
  20364. CountryCodeGb = "GB"
  20365. // CountryCodeUs is a CountryCode enum value
  20366. CountryCodeUs = "US"
  20367. // CountryCodeUm is a CountryCode enum value
  20368. CountryCodeUm = "UM"
  20369. // CountryCodeUy is a CountryCode enum value
  20370. CountryCodeUy = "UY"
  20371. // CountryCodeUz is a CountryCode enum value
  20372. CountryCodeUz = "UZ"
  20373. // CountryCodeVu is a CountryCode enum value
  20374. CountryCodeVu = "VU"
  20375. // CountryCodeVe is a CountryCode enum value
  20376. CountryCodeVe = "VE"
  20377. // CountryCodeVn is a CountryCode enum value
  20378. CountryCodeVn = "VN"
  20379. // CountryCodeVg is a CountryCode enum value
  20380. CountryCodeVg = "VG"
  20381. // CountryCodeVi is a CountryCode enum value
  20382. CountryCodeVi = "VI"
  20383. // CountryCodeWf is a CountryCode enum value
  20384. CountryCodeWf = "WF"
  20385. // CountryCodeEh is a CountryCode enum value
  20386. CountryCodeEh = "EH"
  20387. // CountryCodeYe is a CountryCode enum value
  20388. CountryCodeYe = "YE"
  20389. // CountryCodeZm is a CountryCode enum value
  20390. CountryCodeZm = "ZM"
  20391. // CountryCodeZw is a CountryCode enum value
  20392. CountryCodeZw = "ZW"
  20393. // CountryCodeXk is a CountryCode enum value
  20394. CountryCodeXk = "XK"
  20395. )
  20396. // CountryCode_Values returns all elements of the CountryCode enum
  20397. func CountryCode_Values() []string {
  20398. return []string{
  20399. CountryCodeAf,
  20400. CountryCodeAx,
  20401. CountryCodeAl,
  20402. CountryCodeDz,
  20403. CountryCodeAs,
  20404. CountryCodeAd,
  20405. CountryCodeAo,
  20406. CountryCodeAi,
  20407. CountryCodeAq,
  20408. CountryCodeAg,
  20409. CountryCodeAr,
  20410. CountryCodeAm,
  20411. CountryCodeAw,
  20412. CountryCodeAu,
  20413. CountryCodeAt,
  20414. CountryCodeAz,
  20415. CountryCodeBs,
  20416. CountryCodeBh,
  20417. CountryCodeBd,
  20418. CountryCodeBb,
  20419. CountryCodeBy,
  20420. CountryCodeBe,
  20421. CountryCodeBz,
  20422. CountryCodeBj,
  20423. CountryCodeBm,
  20424. CountryCodeBt,
  20425. CountryCodeBo,
  20426. CountryCodeBq,
  20427. CountryCodeBa,
  20428. CountryCodeBw,
  20429. CountryCodeBv,
  20430. CountryCodeBr,
  20431. CountryCodeIo,
  20432. CountryCodeBn,
  20433. CountryCodeBg,
  20434. CountryCodeBf,
  20435. CountryCodeBi,
  20436. CountryCodeKh,
  20437. CountryCodeCm,
  20438. CountryCodeCa,
  20439. CountryCodeCv,
  20440. CountryCodeKy,
  20441. CountryCodeCf,
  20442. CountryCodeTd,
  20443. CountryCodeCl,
  20444. CountryCodeCn,
  20445. CountryCodeCx,
  20446. CountryCodeCc,
  20447. CountryCodeCo,
  20448. CountryCodeKm,
  20449. CountryCodeCg,
  20450. CountryCodeCd,
  20451. CountryCodeCk,
  20452. CountryCodeCr,
  20453. CountryCodeCi,
  20454. CountryCodeHr,
  20455. CountryCodeCu,
  20456. CountryCodeCw,
  20457. CountryCodeCy,
  20458. CountryCodeCz,
  20459. CountryCodeDk,
  20460. CountryCodeDj,
  20461. CountryCodeDm,
  20462. CountryCodeDo,
  20463. CountryCodeEc,
  20464. CountryCodeEg,
  20465. CountryCodeSv,
  20466. CountryCodeGq,
  20467. CountryCodeEr,
  20468. CountryCodeEe,
  20469. CountryCodeEt,
  20470. CountryCodeFk,
  20471. CountryCodeFo,
  20472. CountryCodeFj,
  20473. CountryCodeFi,
  20474. CountryCodeFr,
  20475. CountryCodeGf,
  20476. CountryCodePf,
  20477. CountryCodeTf,
  20478. CountryCodeGa,
  20479. CountryCodeGm,
  20480. CountryCodeGe,
  20481. CountryCodeDe,
  20482. CountryCodeGh,
  20483. CountryCodeGi,
  20484. CountryCodeGr,
  20485. CountryCodeGl,
  20486. CountryCodeGd,
  20487. CountryCodeGp,
  20488. CountryCodeGu,
  20489. CountryCodeGt,
  20490. CountryCodeGg,
  20491. CountryCodeGn,
  20492. CountryCodeGw,
  20493. CountryCodeGy,
  20494. CountryCodeHt,
  20495. CountryCodeHm,
  20496. CountryCodeVa,
  20497. CountryCodeHn,
  20498. CountryCodeHk,
  20499. CountryCodeHu,
  20500. CountryCodeIs,
  20501. CountryCodeIn,
  20502. CountryCodeId,
  20503. CountryCodeIr,
  20504. CountryCodeIq,
  20505. CountryCodeIe,
  20506. CountryCodeIm,
  20507. CountryCodeIl,
  20508. CountryCodeIt,
  20509. CountryCodeJm,
  20510. CountryCodeJp,
  20511. CountryCodeJe,
  20512. CountryCodeJo,
  20513. CountryCodeKz,
  20514. CountryCodeKe,
  20515. CountryCodeKi,
  20516. CountryCodeKp,
  20517. CountryCodeKr,
  20518. CountryCodeKw,
  20519. CountryCodeKg,
  20520. CountryCodeLa,
  20521. CountryCodeLv,
  20522. CountryCodeLb,
  20523. CountryCodeLs,
  20524. CountryCodeLr,
  20525. CountryCodeLy,
  20526. CountryCodeLi,
  20527. CountryCodeLt,
  20528. CountryCodeLu,
  20529. CountryCodeMo,
  20530. CountryCodeMk,
  20531. CountryCodeMg,
  20532. CountryCodeMw,
  20533. CountryCodeMy,
  20534. CountryCodeMv,
  20535. CountryCodeMl,
  20536. CountryCodeMt,
  20537. CountryCodeMh,
  20538. CountryCodeMq,
  20539. CountryCodeMr,
  20540. CountryCodeMu,
  20541. CountryCodeYt,
  20542. CountryCodeMx,
  20543. CountryCodeFm,
  20544. CountryCodeMd,
  20545. CountryCodeMc,
  20546. CountryCodeMn,
  20547. CountryCodeMe,
  20548. CountryCodeMs,
  20549. CountryCodeMa,
  20550. CountryCodeMz,
  20551. CountryCodeMm,
  20552. CountryCodeNa,
  20553. CountryCodeNr,
  20554. CountryCodeNp,
  20555. CountryCodeNl,
  20556. CountryCodeNc,
  20557. CountryCodeNz,
  20558. CountryCodeNi,
  20559. CountryCodeNe,
  20560. CountryCodeNg,
  20561. CountryCodeNu,
  20562. CountryCodeNf,
  20563. CountryCodeMp,
  20564. CountryCodeNo,
  20565. CountryCodeOm,
  20566. CountryCodePk,
  20567. CountryCodePw,
  20568. CountryCodePs,
  20569. CountryCodePa,
  20570. CountryCodePg,
  20571. CountryCodePy,
  20572. CountryCodePe,
  20573. CountryCodePh,
  20574. CountryCodePn,
  20575. CountryCodePl,
  20576. CountryCodePt,
  20577. CountryCodePr,
  20578. CountryCodeQa,
  20579. CountryCodeRe,
  20580. CountryCodeRo,
  20581. CountryCodeRu,
  20582. CountryCodeRw,
  20583. CountryCodeBl,
  20584. CountryCodeSh,
  20585. CountryCodeKn,
  20586. CountryCodeLc,
  20587. CountryCodeMf,
  20588. CountryCodePm,
  20589. CountryCodeVc,
  20590. CountryCodeWs,
  20591. CountryCodeSm,
  20592. CountryCodeSt,
  20593. CountryCodeSa,
  20594. CountryCodeSn,
  20595. CountryCodeRs,
  20596. CountryCodeSc,
  20597. CountryCodeSl,
  20598. CountryCodeSg,
  20599. CountryCodeSx,
  20600. CountryCodeSk,
  20601. CountryCodeSi,
  20602. CountryCodeSb,
  20603. CountryCodeSo,
  20604. CountryCodeZa,
  20605. CountryCodeGs,
  20606. CountryCodeSs,
  20607. CountryCodeEs,
  20608. CountryCodeLk,
  20609. CountryCodeSd,
  20610. CountryCodeSr,
  20611. CountryCodeSj,
  20612. CountryCodeSz,
  20613. CountryCodeSe,
  20614. CountryCodeCh,
  20615. CountryCodeSy,
  20616. CountryCodeTw,
  20617. CountryCodeTj,
  20618. CountryCodeTz,
  20619. CountryCodeTh,
  20620. CountryCodeTl,
  20621. CountryCodeTg,
  20622. CountryCodeTk,
  20623. CountryCodeTo,
  20624. CountryCodeTt,
  20625. CountryCodeTn,
  20626. CountryCodeTr,
  20627. CountryCodeTm,
  20628. CountryCodeTc,
  20629. CountryCodeTv,
  20630. CountryCodeUg,
  20631. CountryCodeUa,
  20632. CountryCodeAe,
  20633. CountryCodeGb,
  20634. CountryCodeUs,
  20635. CountryCodeUm,
  20636. CountryCodeUy,
  20637. CountryCodeUz,
  20638. CountryCodeVu,
  20639. CountryCodeVe,
  20640. CountryCodeVn,
  20641. CountryCodeVg,
  20642. CountryCodeVi,
  20643. CountryCodeWf,
  20644. CountryCodeEh,
  20645. CountryCodeYe,
  20646. CountryCodeZm,
  20647. CountryCodeZw,
  20648. CountryCodeXk,
  20649. }
  20650. }
  20651. const (
  20652. // FailureReasonTokenMissing is a FailureReason enum value
  20653. FailureReasonTokenMissing = "TOKEN_MISSING"
  20654. // FailureReasonTokenExpired is a FailureReason enum value
  20655. FailureReasonTokenExpired = "TOKEN_EXPIRED"
  20656. // FailureReasonTokenInvalid is a FailureReason enum value
  20657. FailureReasonTokenInvalid = "TOKEN_INVALID"
  20658. // FailureReasonTokenDomainMismatch is a FailureReason enum value
  20659. FailureReasonTokenDomainMismatch = "TOKEN_DOMAIN_MISMATCH"
  20660. )
  20661. // FailureReason_Values returns all elements of the FailureReason enum
  20662. func FailureReason_Values() []string {
  20663. return []string{
  20664. FailureReasonTokenMissing,
  20665. FailureReasonTokenExpired,
  20666. FailureReasonTokenInvalid,
  20667. FailureReasonTokenDomainMismatch,
  20668. }
  20669. }
  20670. const (
  20671. // FallbackBehaviorMatch is a FallbackBehavior enum value
  20672. FallbackBehaviorMatch = "MATCH"
  20673. // FallbackBehaviorNoMatch is a FallbackBehavior enum value
  20674. FallbackBehaviorNoMatch = "NO_MATCH"
  20675. )
  20676. // FallbackBehavior_Values returns all elements of the FallbackBehavior enum
  20677. func FallbackBehavior_Values() []string {
  20678. return []string{
  20679. FallbackBehaviorMatch,
  20680. FallbackBehaviorNoMatch,
  20681. }
  20682. }
  20683. const (
  20684. // FilterBehaviorKeep is a FilterBehavior enum value
  20685. FilterBehaviorKeep = "KEEP"
  20686. // FilterBehaviorDrop is a FilterBehavior enum value
  20687. FilterBehaviorDrop = "DROP"
  20688. )
  20689. // FilterBehavior_Values returns all elements of the FilterBehavior enum
  20690. func FilterBehavior_Values() []string {
  20691. return []string{
  20692. FilterBehaviorKeep,
  20693. FilterBehaviorDrop,
  20694. }
  20695. }
  20696. const (
  20697. // FilterRequirementMeetsAll is a FilterRequirement enum value
  20698. FilterRequirementMeetsAll = "MEETS_ALL"
  20699. // FilterRequirementMeetsAny is a FilterRequirement enum value
  20700. FilterRequirementMeetsAny = "MEETS_ANY"
  20701. )
  20702. // FilterRequirement_Values returns all elements of the FilterRequirement enum
  20703. func FilterRequirement_Values() []string {
  20704. return []string{
  20705. FilterRequirementMeetsAll,
  20706. FilterRequirementMeetsAny,
  20707. }
  20708. }
  20709. const (
  20710. // ForwardedIPPositionFirst is a ForwardedIPPosition enum value
  20711. ForwardedIPPositionFirst = "FIRST"
  20712. // ForwardedIPPositionLast is a ForwardedIPPosition enum value
  20713. ForwardedIPPositionLast = "LAST"
  20714. // ForwardedIPPositionAny is a ForwardedIPPosition enum value
  20715. ForwardedIPPositionAny = "ANY"
  20716. )
  20717. // ForwardedIPPosition_Values returns all elements of the ForwardedIPPosition enum
  20718. func ForwardedIPPosition_Values() []string {
  20719. return []string{
  20720. ForwardedIPPositionFirst,
  20721. ForwardedIPPositionLast,
  20722. ForwardedIPPositionAny,
  20723. }
  20724. }
  20725. const (
  20726. // IPAddressVersionIpv4 is a IPAddressVersion enum value
  20727. IPAddressVersionIpv4 = "IPV4"
  20728. // IPAddressVersionIpv6 is a IPAddressVersion enum value
  20729. IPAddressVersionIpv6 = "IPV6"
  20730. )
  20731. // IPAddressVersion_Values returns all elements of the IPAddressVersion enum
  20732. func IPAddressVersion_Values() []string {
  20733. return []string{
  20734. IPAddressVersionIpv4,
  20735. IPAddressVersionIpv6,
  20736. }
  20737. }
  20738. const (
  20739. // InspectionLevelCommon is a InspectionLevel enum value
  20740. InspectionLevelCommon = "COMMON"
  20741. // InspectionLevelTargeted is a InspectionLevel enum value
  20742. InspectionLevelTargeted = "TARGETED"
  20743. )
  20744. // InspectionLevel_Values returns all elements of the InspectionLevel enum
  20745. func InspectionLevel_Values() []string {
  20746. return []string{
  20747. InspectionLevelCommon,
  20748. InspectionLevelTargeted,
  20749. }
  20750. }
  20751. const (
  20752. // JsonMatchScopeAll is a JsonMatchScope enum value
  20753. JsonMatchScopeAll = "ALL"
  20754. // JsonMatchScopeKey is a JsonMatchScope enum value
  20755. JsonMatchScopeKey = "KEY"
  20756. // JsonMatchScopeValue is a JsonMatchScope enum value
  20757. JsonMatchScopeValue = "VALUE"
  20758. )
  20759. // JsonMatchScope_Values returns all elements of the JsonMatchScope enum
  20760. func JsonMatchScope_Values() []string {
  20761. return []string{
  20762. JsonMatchScopeAll,
  20763. JsonMatchScopeKey,
  20764. JsonMatchScopeValue,
  20765. }
  20766. }
  20767. const (
  20768. // LabelMatchScopeLabel is a LabelMatchScope enum value
  20769. LabelMatchScopeLabel = "LABEL"
  20770. // LabelMatchScopeNamespace is a LabelMatchScope enum value
  20771. LabelMatchScopeNamespace = "NAMESPACE"
  20772. )
  20773. // LabelMatchScope_Values returns all elements of the LabelMatchScope enum
  20774. func LabelMatchScope_Values() []string {
  20775. return []string{
  20776. LabelMatchScopeLabel,
  20777. LabelMatchScopeNamespace,
  20778. }
  20779. }
  20780. const (
  20781. // MapMatchScopeAll is a MapMatchScope enum value
  20782. MapMatchScopeAll = "ALL"
  20783. // MapMatchScopeKey is a MapMatchScope enum value
  20784. MapMatchScopeKey = "KEY"
  20785. // MapMatchScopeValue is a MapMatchScope enum value
  20786. MapMatchScopeValue = "VALUE"
  20787. )
  20788. // MapMatchScope_Values returns all elements of the MapMatchScope enum
  20789. func MapMatchScope_Values() []string {
  20790. return []string{
  20791. MapMatchScopeAll,
  20792. MapMatchScopeKey,
  20793. MapMatchScopeValue,
  20794. }
  20795. }
  20796. const (
  20797. // OversizeHandlingContinue is a OversizeHandling enum value
  20798. OversizeHandlingContinue = "CONTINUE"
  20799. // OversizeHandlingMatch is a OversizeHandling enum value
  20800. OversizeHandlingMatch = "MATCH"
  20801. // OversizeHandlingNoMatch is a OversizeHandling enum value
  20802. OversizeHandlingNoMatch = "NO_MATCH"
  20803. )
  20804. // OversizeHandling_Values returns all elements of the OversizeHandling enum
  20805. func OversizeHandling_Values() []string {
  20806. return []string{
  20807. OversizeHandlingContinue,
  20808. OversizeHandlingMatch,
  20809. OversizeHandlingNoMatch,
  20810. }
  20811. }
  20812. const (
  20813. // ParameterExceptionFieldWebAcl is a ParameterExceptionField enum value
  20814. ParameterExceptionFieldWebAcl = "WEB_ACL"
  20815. // ParameterExceptionFieldRuleGroup is a ParameterExceptionField enum value
  20816. ParameterExceptionFieldRuleGroup = "RULE_GROUP"
  20817. // ParameterExceptionFieldRegexPatternSet is a ParameterExceptionField enum value
  20818. ParameterExceptionFieldRegexPatternSet = "REGEX_PATTERN_SET"
  20819. // ParameterExceptionFieldIpSet is a ParameterExceptionField enum value
  20820. ParameterExceptionFieldIpSet = "IP_SET"
  20821. // ParameterExceptionFieldManagedRuleSet is a ParameterExceptionField enum value
  20822. ParameterExceptionFieldManagedRuleSet = "MANAGED_RULE_SET"
  20823. // ParameterExceptionFieldRule is a ParameterExceptionField enum value
  20824. ParameterExceptionFieldRule = "RULE"
  20825. // ParameterExceptionFieldExcludedRule is a ParameterExceptionField enum value
  20826. ParameterExceptionFieldExcludedRule = "EXCLUDED_RULE"
  20827. // ParameterExceptionFieldStatement is a ParameterExceptionField enum value
  20828. ParameterExceptionFieldStatement = "STATEMENT"
  20829. // ParameterExceptionFieldByteMatchStatement is a ParameterExceptionField enum value
  20830. ParameterExceptionFieldByteMatchStatement = "BYTE_MATCH_STATEMENT"
  20831. // ParameterExceptionFieldSqliMatchStatement is a ParameterExceptionField enum value
  20832. ParameterExceptionFieldSqliMatchStatement = "SQLI_MATCH_STATEMENT"
  20833. // ParameterExceptionFieldXssMatchStatement is a ParameterExceptionField enum value
  20834. ParameterExceptionFieldXssMatchStatement = "XSS_MATCH_STATEMENT"
  20835. // ParameterExceptionFieldSizeConstraintStatement is a ParameterExceptionField enum value
  20836. ParameterExceptionFieldSizeConstraintStatement = "SIZE_CONSTRAINT_STATEMENT"
  20837. // ParameterExceptionFieldGeoMatchStatement is a ParameterExceptionField enum value
  20838. ParameterExceptionFieldGeoMatchStatement = "GEO_MATCH_STATEMENT"
  20839. // ParameterExceptionFieldRateBasedStatement is a ParameterExceptionField enum value
  20840. ParameterExceptionFieldRateBasedStatement = "RATE_BASED_STATEMENT"
  20841. // ParameterExceptionFieldRuleGroupReferenceStatement is a ParameterExceptionField enum value
  20842. ParameterExceptionFieldRuleGroupReferenceStatement = "RULE_GROUP_REFERENCE_STATEMENT"
  20843. // ParameterExceptionFieldRegexPatternReferenceStatement is a ParameterExceptionField enum value
  20844. ParameterExceptionFieldRegexPatternReferenceStatement = "REGEX_PATTERN_REFERENCE_STATEMENT"
  20845. // ParameterExceptionFieldIpSetReferenceStatement is a ParameterExceptionField enum value
  20846. ParameterExceptionFieldIpSetReferenceStatement = "IP_SET_REFERENCE_STATEMENT"
  20847. // ParameterExceptionFieldManagedRuleSetStatement is a ParameterExceptionField enum value
  20848. ParameterExceptionFieldManagedRuleSetStatement = "MANAGED_RULE_SET_STATEMENT"
  20849. // ParameterExceptionFieldLabelMatchStatement is a ParameterExceptionField enum value
  20850. ParameterExceptionFieldLabelMatchStatement = "LABEL_MATCH_STATEMENT"
  20851. // ParameterExceptionFieldAndStatement is a ParameterExceptionField enum value
  20852. ParameterExceptionFieldAndStatement = "AND_STATEMENT"
  20853. // ParameterExceptionFieldOrStatement is a ParameterExceptionField enum value
  20854. ParameterExceptionFieldOrStatement = "OR_STATEMENT"
  20855. // ParameterExceptionFieldNotStatement is a ParameterExceptionField enum value
  20856. ParameterExceptionFieldNotStatement = "NOT_STATEMENT"
  20857. // ParameterExceptionFieldIpAddress is a ParameterExceptionField enum value
  20858. ParameterExceptionFieldIpAddress = "IP_ADDRESS"
  20859. // ParameterExceptionFieldIpAddressVersion is a ParameterExceptionField enum value
  20860. ParameterExceptionFieldIpAddressVersion = "IP_ADDRESS_VERSION"
  20861. // ParameterExceptionFieldFieldToMatch is a ParameterExceptionField enum value
  20862. ParameterExceptionFieldFieldToMatch = "FIELD_TO_MATCH"
  20863. // ParameterExceptionFieldTextTransformation is a ParameterExceptionField enum value
  20864. ParameterExceptionFieldTextTransformation = "TEXT_TRANSFORMATION"
  20865. // ParameterExceptionFieldSingleQueryArgument is a ParameterExceptionField enum value
  20866. ParameterExceptionFieldSingleQueryArgument = "SINGLE_QUERY_ARGUMENT"
  20867. // ParameterExceptionFieldSingleHeader is a ParameterExceptionField enum value
  20868. ParameterExceptionFieldSingleHeader = "SINGLE_HEADER"
  20869. // ParameterExceptionFieldDefaultAction is a ParameterExceptionField enum value
  20870. ParameterExceptionFieldDefaultAction = "DEFAULT_ACTION"
  20871. // ParameterExceptionFieldRuleAction is a ParameterExceptionField enum value
  20872. ParameterExceptionFieldRuleAction = "RULE_ACTION"
  20873. // ParameterExceptionFieldEntityLimit is a ParameterExceptionField enum value
  20874. ParameterExceptionFieldEntityLimit = "ENTITY_LIMIT"
  20875. // ParameterExceptionFieldOverrideAction is a ParameterExceptionField enum value
  20876. ParameterExceptionFieldOverrideAction = "OVERRIDE_ACTION"
  20877. // ParameterExceptionFieldScopeValue is a ParameterExceptionField enum value
  20878. ParameterExceptionFieldScopeValue = "SCOPE_VALUE"
  20879. // ParameterExceptionFieldResourceArn is a ParameterExceptionField enum value
  20880. ParameterExceptionFieldResourceArn = "RESOURCE_ARN"
  20881. // ParameterExceptionFieldResourceType is a ParameterExceptionField enum value
  20882. ParameterExceptionFieldResourceType = "RESOURCE_TYPE"
  20883. // ParameterExceptionFieldTags is a ParameterExceptionField enum value
  20884. ParameterExceptionFieldTags = "TAGS"
  20885. // ParameterExceptionFieldTagKeys is a ParameterExceptionField enum value
  20886. ParameterExceptionFieldTagKeys = "TAG_KEYS"
  20887. // ParameterExceptionFieldMetricName is a ParameterExceptionField enum value
  20888. ParameterExceptionFieldMetricName = "METRIC_NAME"
  20889. // ParameterExceptionFieldFirewallManagerStatement is a ParameterExceptionField enum value
  20890. ParameterExceptionFieldFirewallManagerStatement = "FIREWALL_MANAGER_STATEMENT"
  20891. // ParameterExceptionFieldFallbackBehavior is a ParameterExceptionField enum value
  20892. ParameterExceptionFieldFallbackBehavior = "FALLBACK_BEHAVIOR"
  20893. // ParameterExceptionFieldPosition is a ParameterExceptionField enum value
  20894. ParameterExceptionFieldPosition = "POSITION"
  20895. // ParameterExceptionFieldForwardedIpConfig is a ParameterExceptionField enum value
  20896. ParameterExceptionFieldForwardedIpConfig = "FORWARDED_IP_CONFIG"
  20897. // ParameterExceptionFieldIpSetForwardedIpConfig is a ParameterExceptionField enum value
  20898. ParameterExceptionFieldIpSetForwardedIpConfig = "IP_SET_FORWARDED_IP_CONFIG"
  20899. // ParameterExceptionFieldHeaderName is a ParameterExceptionField enum value
  20900. ParameterExceptionFieldHeaderName = "HEADER_NAME"
  20901. // ParameterExceptionFieldCustomRequestHandling is a ParameterExceptionField enum value
  20902. ParameterExceptionFieldCustomRequestHandling = "CUSTOM_REQUEST_HANDLING"
  20903. // ParameterExceptionFieldResponseContentType is a ParameterExceptionField enum value
  20904. ParameterExceptionFieldResponseContentType = "RESPONSE_CONTENT_TYPE"
  20905. // ParameterExceptionFieldCustomResponse is a ParameterExceptionField enum value
  20906. ParameterExceptionFieldCustomResponse = "CUSTOM_RESPONSE"
  20907. // ParameterExceptionFieldCustomResponseBody is a ParameterExceptionField enum value
  20908. ParameterExceptionFieldCustomResponseBody = "CUSTOM_RESPONSE_BODY"
  20909. // ParameterExceptionFieldJsonMatchPattern is a ParameterExceptionField enum value
  20910. ParameterExceptionFieldJsonMatchPattern = "JSON_MATCH_PATTERN"
  20911. // ParameterExceptionFieldJsonMatchScope is a ParameterExceptionField enum value
  20912. ParameterExceptionFieldJsonMatchScope = "JSON_MATCH_SCOPE"
  20913. // ParameterExceptionFieldBodyParsingFallbackBehavior is a ParameterExceptionField enum value
  20914. ParameterExceptionFieldBodyParsingFallbackBehavior = "BODY_PARSING_FALLBACK_BEHAVIOR"
  20915. // ParameterExceptionFieldLoggingFilter is a ParameterExceptionField enum value
  20916. ParameterExceptionFieldLoggingFilter = "LOGGING_FILTER"
  20917. // ParameterExceptionFieldFilterCondition is a ParameterExceptionField enum value
  20918. ParameterExceptionFieldFilterCondition = "FILTER_CONDITION"
  20919. // ParameterExceptionFieldExpireTimestamp is a ParameterExceptionField enum value
  20920. ParameterExceptionFieldExpireTimestamp = "EXPIRE_TIMESTAMP"
  20921. // ParameterExceptionFieldChangePropagationStatus is a ParameterExceptionField enum value
  20922. ParameterExceptionFieldChangePropagationStatus = "CHANGE_PROPAGATION_STATUS"
  20923. // ParameterExceptionFieldAssociableResource is a ParameterExceptionField enum value
  20924. ParameterExceptionFieldAssociableResource = "ASSOCIABLE_RESOURCE"
  20925. // ParameterExceptionFieldLogDestination is a ParameterExceptionField enum value
  20926. ParameterExceptionFieldLogDestination = "LOG_DESTINATION"
  20927. // ParameterExceptionFieldManagedRuleGroupConfig is a ParameterExceptionField enum value
  20928. ParameterExceptionFieldManagedRuleGroupConfig = "MANAGED_RULE_GROUP_CONFIG"
  20929. // ParameterExceptionFieldPayloadType is a ParameterExceptionField enum value
  20930. ParameterExceptionFieldPayloadType = "PAYLOAD_TYPE"
  20931. // ParameterExceptionFieldHeaderMatchPattern is a ParameterExceptionField enum value
  20932. ParameterExceptionFieldHeaderMatchPattern = "HEADER_MATCH_PATTERN"
  20933. // ParameterExceptionFieldCookieMatchPattern is a ParameterExceptionField enum value
  20934. ParameterExceptionFieldCookieMatchPattern = "COOKIE_MATCH_PATTERN"
  20935. // ParameterExceptionFieldMapMatchScope is a ParameterExceptionField enum value
  20936. ParameterExceptionFieldMapMatchScope = "MAP_MATCH_SCOPE"
  20937. // ParameterExceptionFieldOversizeHandling is a ParameterExceptionField enum value
  20938. ParameterExceptionFieldOversizeHandling = "OVERSIZE_HANDLING"
  20939. // ParameterExceptionFieldChallengeConfig is a ParameterExceptionField enum value
  20940. ParameterExceptionFieldChallengeConfig = "CHALLENGE_CONFIG"
  20941. // ParameterExceptionFieldTokenDomain is a ParameterExceptionField enum value
  20942. ParameterExceptionFieldTokenDomain = "TOKEN_DOMAIN"
  20943. )
  20944. // ParameterExceptionField_Values returns all elements of the ParameterExceptionField enum
  20945. func ParameterExceptionField_Values() []string {
  20946. return []string{
  20947. ParameterExceptionFieldWebAcl,
  20948. ParameterExceptionFieldRuleGroup,
  20949. ParameterExceptionFieldRegexPatternSet,
  20950. ParameterExceptionFieldIpSet,
  20951. ParameterExceptionFieldManagedRuleSet,
  20952. ParameterExceptionFieldRule,
  20953. ParameterExceptionFieldExcludedRule,
  20954. ParameterExceptionFieldStatement,
  20955. ParameterExceptionFieldByteMatchStatement,
  20956. ParameterExceptionFieldSqliMatchStatement,
  20957. ParameterExceptionFieldXssMatchStatement,
  20958. ParameterExceptionFieldSizeConstraintStatement,
  20959. ParameterExceptionFieldGeoMatchStatement,
  20960. ParameterExceptionFieldRateBasedStatement,
  20961. ParameterExceptionFieldRuleGroupReferenceStatement,
  20962. ParameterExceptionFieldRegexPatternReferenceStatement,
  20963. ParameterExceptionFieldIpSetReferenceStatement,
  20964. ParameterExceptionFieldManagedRuleSetStatement,
  20965. ParameterExceptionFieldLabelMatchStatement,
  20966. ParameterExceptionFieldAndStatement,
  20967. ParameterExceptionFieldOrStatement,
  20968. ParameterExceptionFieldNotStatement,
  20969. ParameterExceptionFieldIpAddress,
  20970. ParameterExceptionFieldIpAddressVersion,
  20971. ParameterExceptionFieldFieldToMatch,
  20972. ParameterExceptionFieldTextTransformation,
  20973. ParameterExceptionFieldSingleQueryArgument,
  20974. ParameterExceptionFieldSingleHeader,
  20975. ParameterExceptionFieldDefaultAction,
  20976. ParameterExceptionFieldRuleAction,
  20977. ParameterExceptionFieldEntityLimit,
  20978. ParameterExceptionFieldOverrideAction,
  20979. ParameterExceptionFieldScopeValue,
  20980. ParameterExceptionFieldResourceArn,
  20981. ParameterExceptionFieldResourceType,
  20982. ParameterExceptionFieldTags,
  20983. ParameterExceptionFieldTagKeys,
  20984. ParameterExceptionFieldMetricName,
  20985. ParameterExceptionFieldFirewallManagerStatement,
  20986. ParameterExceptionFieldFallbackBehavior,
  20987. ParameterExceptionFieldPosition,
  20988. ParameterExceptionFieldForwardedIpConfig,
  20989. ParameterExceptionFieldIpSetForwardedIpConfig,
  20990. ParameterExceptionFieldHeaderName,
  20991. ParameterExceptionFieldCustomRequestHandling,
  20992. ParameterExceptionFieldResponseContentType,
  20993. ParameterExceptionFieldCustomResponse,
  20994. ParameterExceptionFieldCustomResponseBody,
  20995. ParameterExceptionFieldJsonMatchPattern,
  20996. ParameterExceptionFieldJsonMatchScope,
  20997. ParameterExceptionFieldBodyParsingFallbackBehavior,
  20998. ParameterExceptionFieldLoggingFilter,
  20999. ParameterExceptionFieldFilterCondition,
  21000. ParameterExceptionFieldExpireTimestamp,
  21001. ParameterExceptionFieldChangePropagationStatus,
  21002. ParameterExceptionFieldAssociableResource,
  21003. ParameterExceptionFieldLogDestination,
  21004. ParameterExceptionFieldManagedRuleGroupConfig,
  21005. ParameterExceptionFieldPayloadType,
  21006. ParameterExceptionFieldHeaderMatchPattern,
  21007. ParameterExceptionFieldCookieMatchPattern,
  21008. ParameterExceptionFieldMapMatchScope,
  21009. ParameterExceptionFieldOversizeHandling,
  21010. ParameterExceptionFieldChallengeConfig,
  21011. ParameterExceptionFieldTokenDomain,
  21012. }
  21013. }
  21014. const (
  21015. // PayloadTypeJson is a PayloadType enum value
  21016. PayloadTypeJson = "JSON"
  21017. // PayloadTypeFormEncoded is a PayloadType enum value
  21018. PayloadTypeFormEncoded = "FORM_ENCODED"
  21019. )
  21020. // PayloadType_Values returns all elements of the PayloadType enum
  21021. func PayloadType_Values() []string {
  21022. return []string{
  21023. PayloadTypeJson,
  21024. PayloadTypeFormEncoded,
  21025. }
  21026. }
  21027. const (
  21028. // PlatformIos is a Platform enum value
  21029. PlatformIos = "IOS"
  21030. // PlatformAndroid is a Platform enum value
  21031. PlatformAndroid = "ANDROID"
  21032. )
  21033. // Platform_Values returns all elements of the Platform enum
  21034. func Platform_Values() []string {
  21035. return []string{
  21036. PlatformIos,
  21037. PlatformAndroid,
  21038. }
  21039. }
  21040. const (
  21041. // PositionalConstraintExactly is a PositionalConstraint enum value
  21042. PositionalConstraintExactly = "EXACTLY"
  21043. // PositionalConstraintStartsWith is a PositionalConstraint enum value
  21044. PositionalConstraintStartsWith = "STARTS_WITH"
  21045. // PositionalConstraintEndsWith is a PositionalConstraint enum value
  21046. PositionalConstraintEndsWith = "ENDS_WITH"
  21047. // PositionalConstraintContains is a PositionalConstraint enum value
  21048. PositionalConstraintContains = "CONTAINS"
  21049. // PositionalConstraintContainsWord is a PositionalConstraint enum value
  21050. PositionalConstraintContainsWord = "CONTAINS_WORD"
  21051. )
  21052. // PositionalConstraint_Values returns all elements of the PositionalConstraint enum
  21053. func PositionalConstraint_Values() []string {
  21054. return []string{
  21055. PositionalConstraintExactly,
  21056. PositionalConstraintStartsWith,
  21057. PositionalConstraintEndsWith,
  21058. PositionalConstraintContains,
  21059. PositionalConstraintContainsWord,
  21060. }
  21061. }
  21062. const (
  21063. // RateBasedStatementAggregateKeyTypeIp is a RateBasedStatementAggregateKeyType enum value
  21064. RateBasedStatementAggregateKeyTypeIp = "IP"
  21065. // RateBasedStatementAggregateKeyTypeForwardedIp is a RateBasedStatementAggregateKeyType enum value
  21066. RateBasedStatementAggregateKeyTypeForwardedIp = "FORWARDED_IP"
  21067. )
  21068. // RateBasedStatementAggregateKeyType_Values returns all elements of the RateBasedStatementAggregateKeyType enum
  21069. func RateBasedStatementAggregateKeyType_Values() []string {
  21070. return []string{
  21071. RateBasedStatementAggregateKeyTypeIp,
  21072. RateBasedStatementAggregateKeyTypeForwardedIp,
  21073. }
  21074. }
  21075. const (
  21076. // ResourceTypeApplicationLoadBalancer is a ResourceType enum value
  21077. ResourceTypeApplicationLoadBalancer = "APPLICATION_LOAD_BALANCER"
  21078. // ResourceTypeApiGateway is a ResourceType enum value
  21079. ResourceTypeApiGateway = "API_GATEWAY"
  21080. // ResourceTypeAppsync is a ResourceType enum value
  21081. ResourceTypeAppsync = "APPSYNC"
  21082. // ResourceTypeCognitoUserPool is a ResourceType enum value
  21083. ResourceTypeCognitoUserPool = "COGNITO_USER_POOL"
  21084. )
  21085. // ResourceType_Values returns all elements of the ResourceType enum
  21086. func ResourceType_Values() []string {
  21087. return []string{
  21088. ResourceTypeApplicationLoadBalancer,
  21089. ResourceTypeApiGateway,
  21090. ResourceTypeAppsync,
  21091. ResourceTypeCognitoUserPool,
  21092. }
  21093. }
  21094. const (
  21095. // ResponseContentTypeTextPlain is a ResponseContentType enum value
  21096. ResponseContentTypeTextPlain = "TEXT_PLAIN"
  21097. // ResponseContentTypeTextHtml is a ResponseContentType enum value
  21098. ResponseContentTypeTextHtml = "TEXT_HTML"
  21099. // ResponseContentTypeApplicationJson is a ResponseContentType enum value
  21100. ResponseContentTypeApplicationJson = "APPLICATION_JSON"
  21101. )
  21102. // ResponseContentType_Values returns all elements of the ResponseContentType enum
  21103. func ResponseContentType_Values() []string {
  21104. return []string{
  21105. ResponseContentTypeTextPlain,
  21106. ResponseContentTypeTextHtml,
  21107. ResponseContentTypeApplicationJson,
  21108. }
  21109. }
  21110. const (
  21111. // ScopeCloudfront is a Scope enum value
  21112. ScopeCloudfront = "CLOUDFRONT"
  21113. // ScopeRegional is a Scope enum value
  21114. ScopeRegional = "REGIONAL"
  21115. )
  21116. // Scope_Values returns all elements of the Scope enum
  21117. func Scope_Values() []string {
  21118. return []string{
  21119. ScopeCloudfront,
  21120. ScopeRegional,
  21121. }
  21122. }
  21123. const (
  21124. // SensitivityLevelLow is a SensitivityLevel enum value
  21125. SensitivityLevelLow = "LOW"
  21126. // SensitivityLevelHigh is a SensitivityLevel enum value
  21127. SensitivityLevelHigh = "HIGH"
  21128. )
  21129. // SensitivityLevel_Values returns all elements of the SensitivityLevel enum
  21130. func SensitivityLevel_Values() []string {
  21131. return []string{
  21132. SensitivityLevelLow,
  21133. SensitivityLevelHigh,
  21134. }
  21135. }
  21136. const (
  21137. // TextTransformationTypeNone is a TextTransformationType enum value
  21138. TextTransformationTypeNone = "NONE"
  21139. // TextTransformationTypeCompressWhiteSpace is a TextTransformationType enum value
  21140. TextTransformationTypeCompressWhiteSpace = "COMPRESS_WHITE_SPACE"
  21141. // TextTransformationTypeHtmlEntityDecode is a TextTransformationType enum value
  21142. TextTransformationTypeHtmlEntityDecode = "HTML_ENTITY_DECODE"
  21143. // TextTransformationTypeLowercase is a TextTransformationType enum value
  21144. TextTransformationTypeLowercase = "LOWERCASE"
  21145. // TextTransformationTypeCmdLine is a TextTransformationType enum value
  21146. TextTransformationTypeCmdLine = "CMD_LINE"
  21147. // TextTransformationTypeUrlDecode is a TextTransformationType enum value
  21148. TextTransformationTypeUrlDecode = "URL_DECODE"
  21149. // TextTransformationTypeBase64Decode is a TextTransformationType enum value
  21150. TextTransformationTypeBase64Decode = "BASE64_DECODE"
  21151. // TextTransformationTypeHexDecode is a TextTransformationType enum value
  21152. TextTransformationTypeHexDecode = "HEX_DECODE"
  21153. // TextTransformationTypeMd5 is a TextTransformationType enum value
  21154. TextTransformationTypeMd5 = "MD5"
  21155. // TextTransformationTypeReplaceComments is a TextTransformationType enum value
  21156. TextTransformationTypeReplaceComments = "REPLACE_COMMENTS"
  21157. // TextTransformationTypeEscapeSeqDecode is a TextTransformationType enum value
  21158. TextTransformationTypeEscapeSeqDecode = "ESCAPE_SEQ_DECODE"
  21159. // TextTransformationTypeSqlHexDecode is a TextTransformationType enum value
  21160. TextTransformationTypeSqlHexDecode = "SQL_HEX_DECODE"
  21161. // TextTransformationTypeCssDecode is a TextTransformationType enum value
  21162. TextTransformationTypeCssDecode = "CSS_DECODE"
  21163. // TextTransformationTypeJsDecode is a TextTransformationType enum value
  21164. TextTransformationTypeJsDecode = "JS_DECODE"
  21165. // TextTransformationTypeNormalizePath is a TextTransformationType enum value
  21166. TextTransformationTypeNormalizePath = "NORMALIZE_PATH"
  21167. // TextTransformationTypeNormalizePathWin is a TextTransformationType enum value
  21168. TextTransformationTypeNormalizePathWin = "NORMALIZE_PATH_WIN"
  21169. // TextTransformationTypeRemoveNulls is a TextTransformationType enum value
  21170. TextTransformationTypeRemoveNulls = "REMOVE_NULLS"
  21171. // TextTransformationTypeReplaceNulls is a TextTransformationType enum value
  21172. TextTransformationTypeReplaceNulls = "REPLACE_NULLS"
  21173. // TextTransformationTypeBase64DecodeExt is a TextTransformationType enum value
  21174. TextTransformationTypeBase64DecodeExt = "BASE64_DECODE_EXT"
  21175. // TextTransformationTypeUrlDecodeUni is a TextTransformationType enum value
  21176. TextTransformationTypeUrlDecodeUni = "URL_DECODE_UNI"
  21177. // TextTransformationTypeUtf8ToUnicode is a TextTransformationType enum value
  21178. TextTransformationTypeUtf8ToUnicode = "UTF8_TO_UNICODE"
  21179. )
  21180. // TextTransformationType_Values returns all elements of the TextTransformationType enum
  21181. func TextTransformationType_Values() []string {
  21182. return []string{
  21183. TextTransformationTypeNone,
  21184. TextTransformationTypeCompressWhiteSpace,
  21185. TextTransformationTypeHtmlEntityDecode,
  21186. TextTransformationTypeLowercase,
  21187. TextTransformationTypeCmdLine,
  21188. TextTransformationTypeUrlDecode,
  21189. TextTransformationTypeBase64Decode,
  21190. TextTransformationTypeHexDecode,
  21191. TextTransformationTypeMd5,
  21192. TextTransformationTypeReplaceComments,
  21193. TextTransformationTypeEscapeSeqDecode,
  21194. TextTransformationTypeSqlHexDecode,
  21195. TextTransformationTypeCssDecode,
  21196. TextTransformationTypeJsDecode,
  21197. TextTransformationTypeNormalizePath,
  21198. TextTransformationTypeNormalizePathWin,
  21199. TextTransformationTypeRemoveNulls,
  21200. TextTransformationTypeReplaceNulls,
  21201. TextTransformationTypeBase64DecodeExt,
  21202. TextTransformationTypeUrlDecodeUni,
  21203. TextTransformationTypeUtf8ToUnicode,
  21204. }
  21205. }