api.go 688 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package cloudtrail
  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 opAddTags = "AddTags"
  13. // AddTagsRequest generates a "aws/request.Request" representing the
  14. // client's request for the AddTags 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 AddTags for more information on using the AddTags
  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 AddTagsRequest method.
  28. // req, resp := client.AddTagsRequest(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/cloudtrail-2013-11-01/AddTags
  36. func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
  37. op := &request.Operation{
  38. Name: opAddTags,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &AddTagsInput{}
  44. }
  45. output = &AddTagsOutput{}
  46. req = c.newRequest(op, input, output)
  47. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  48. return
  49. }
  50. // AddTags API operation for AWS CloudTrail.
  51. //
  52. // Adds one or more tags to a trail, event data store, or channel, up to a limit
  53. // of 50. Overwrites an existing tag's value when a new value is specified for
  54. // an existing tag key. Tag key names must be unique; you cannot have two keys
  55. // with the same name but different values. If you specify a key without a value,
  56. // the tag will be created with the specified key and a value of null. You can
  57. // tag a trail or event data store that applies to all Amazon Web Services Regions
  58. // only from the Region in which the trail or event data store was created (also
  59. // known as its home region).
  60. //
  61. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  62. // with awserr.Error's Code and Message methods to get detailed information about
  63. // the error.
  64. //
  65. // See the AWS API reference guide for AWS CloudTrail's
  66. // API operation AddTags for usage and error information.
  67. //
  68. // Returned Error Types:
  69. //
  70. // - ResourceNotFoundException
  71. // This exception is thrown when the specified resource is not found.
  72. //
  73. // - ARNInvalidException
  74. // This exception is thrown when an operation is called with a trail ARN that
  75. // is not valid. The following is the format of a trail ARN.
  76. //
  77. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  78. //
  79. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  80. // event data store, or channel with a resource ARN that is not valid.
  81. //
  82. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  83. //
  84. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  85. //
  86. // - ResourceTypeNotSupportedException
  87. // This exception is thrown when the specified resource type is not supported
  88. // by CloudTrail.
  89. //
  90. // - TagsLimitExceededException
  91. // The number of tags per trail, event data store, or channel has exceeded the
  92. // permitted amount. Currently, the limit is 50.
  93. //
  94. // - InvalidTrailNameException
  95. // This exception is thrown when the provided trail name is not valid. Trail
  96. // names must meet the following requirements:
  97. //
  98. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  99. // (_), or dashes (-)
  100. //
  101. // - Start with a letter or number, and end with a letter or number
  102. //
  103. // - Be between 3 and 128 characters
  104. //
  105. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  106. // and my--namespace are not valid.
  107. //
  108. // - Not be in IP address format (for example, 192.168.5.4)
  109. //
  110. // - InvalidTagParameterException
  111. // This exception is thrown when the specified tag key or values are not valid.
  112. // It can also occur if there are duplicate tags or too many tags on the resource.
  113. //
  114. // - InactiveEventDataStoreException
  115. // The event data store is inactive.
  116. //
  117. // - EventDataStoreNotFoundException
  118. // The specified event data store was not found.
  119. //
  120. // - ChannelNotFoundException
  121. // This exception is thrown when CloudTrail cannot find the specified channel.
  122. //
  123. // - UnsupportedOperationException
  124. // This exception is thrown when the requested operation is not supported.
  125. //
  126. // - OperationNotPermittedException
  127. // This exception is thrown when the requested operation is not permitted.
  128. //
  129. // - NotOrganizationMasterAccountException
  130. // This exception is thrown when the Amazon Web Services account making the
  131. // request to create or update an organization trail or event data store is
  132. // not the management account for an organization in Organizations. For more
  133. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  134. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  135. //
  136. // - NoManagementAccountSLRExistsException
  137. // This exception is thrown when the management account does not have a service-linked
  138. // role.
  139. //
  140. // - ConflictException
  141. // This exception is thrown when the specified resource is not ready for an
  142. // operation. This can occur when you try to run an operation on a resource
  143. // before CloudTrail has time to fully load the resource, or because another
  144. // operation is modifying the resource. If this exception occurs, wait a few
  145. // minutes, and then try the operation again.
  146. //
  147. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
  148. func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
  149. req, out := c.AddTagsRequest(input)
  150. return out, req.Send()
  151. }
  152. // AddTagsWithContext is the same as AddTags with the addition of
  153. // the ability to pass a context and additional request options.
  154. //
  155. // See AddTags for details on how to use this API operation.
  156. //
  157. // The context must be non-nil and will be used for request cancellation. If
  158. // the context is nil a panic will occur. In the future the SDK may create
  159. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  160. // for more information on using Contexts.
  161. func (c *CloudTrail) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) {
  162. req, out := c.AddTagsRequest(input)
  163. req.SetContext(ctx)
  164. req.ApplyOptions(opts...)
  165. return out, req.Send()
  166. }
  167. const opCancelQuery = "CancelQuery"
  168. // CancelQueryRequest generates a "aws/request.Request" representing the
  169. // client's request for the CancelQuery operation. The "output" return
  170. // value will be populated with the request's response once the request completes
  171. // successfully.
  172. //
  173. // Use "Send" method on the returned Request to send the API call to the service.
  174. // the "output" return value is not valid until after Send returns without error.
  175. //
  176. // See CancelQuery for more information on using the CancelQuery
  177. // API call, and error handling.
  178. //
  179. // This method is useful when you want to inject custom logic or configuration
  180. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  181. //
  182. // // Example sending a request using the CancelQueryRequest method.
  183. // req, resp := client.CancelQueryRequest(params)
  184. //
  185. // err := req.Send()
  186. // if err == nil { // resp is now filled
  187. // fmt.Println(resp)
  188. // }
  189. //
  190. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery
  191. func (c *CloudTrail) CancelQueryRequest(input *CancelQueryInput) (req *request.Request, output *CancelQueryOutput) {
  192. op := &request.Operation{
  193. Name: opCancelQuery,
  194. HTTPMethod: "POST",
  195. HTTPPath: "/",
  196. }
  197. if input == nil {
  198. input = &CancelQueryInput{}
  199. }
  200. output = &CancelQueryOutput{}
  201. req = c.newRequest(op, input, output)
  202. return
  203. }
  204. // CancelQuery API operation for AWS CloudTrail.
  205. //
  206. // Cancels a query if the query is not in a terminated state, such as CANCELLED,
  207. // FAILED, TIMED_OUT, or FINISHED. You must specify an ARN value for EventDataStore.
  208. // The ID of the query that you want to cancel is also required. When you run
  209. // CancelQuery, the query status might show as CANCELLED even if the operation
  210. // is not yet finished.
  211. //
  212. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  213. // with awserr.Error's Code and Message methods to get detailed information about
  214. // the error.
  215. //
  216. // See the AWS API reference guide for AWS CloudTrail's
  217. // API operation CancelQuery for usage and error information.
  218. //
  219. // Returned Error Types:
  220. //
  221. // - EventDataStoreARNInvalidException
  222. // The specified event data store ARN is not valid or does not map to an event
  223. // data store in your account.
  224. //
  225. // - EventDataStoreNotFoundException
  226. // The specified event data store was not found.
  227. //
  228. // - InactiveEventDataStoreException
  229. // The event data store is inactive.
  230. //
  231. // - InactiveQueryException
  232. // The specified query cannot be canceled because it is in the FINISHED, FAILED,
  233. // TIMED_OUT, or CANCELLED state.
  234. //
  235. // - InvalidParameterException
  236. // The request includes a parameter that is not valid.
  237. //
  238. // - QueryIdNotFoundException
  239. // The query ID does not exist or does not map to a query.
  240. //
  241. // - OperationNotPermittedException
  242. // This exception is thrown when the requested operation is not permitted.
  243. //
  244. // - UnsupportedOperationException
  245. // This exception is thrown when the requested operation is not supported.
  246. //
  247. // - NoManagementAccountSLRExistsException
  248. // This exception is thrown when the management account does not have a service-linked
  249. // role.
  250. //
  251. // - ConflictException
  252. // This exception is thrown when the specified resource is not ready for an
  253. // operation. This can occur when you try to run an operation on a resource
  254. // before CloudTrail has time to fully load the resource, or because another
  255. // operation is modifying the resource. If this exception occurs, wait a few
  256. // minutes, and then try the operation again.
  257. //
  258. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery
  259. func (c *CloudTrail) CancelQuery(input *CancelQueryInput) (*CancelQueryOutput, error) {
  260. req, out := c.CancelQueryRequest(input)
  261. return out, req.Send()
  262. }
  263. // CancelQueryWithContext is the same as CancelQuery with the addition of
  264. // the ability to pass a context and additional request options.
  265. //
  266. // See CancelQuery for details on how to use this API operation.
  267. //
  268. // The context must be non-nil and will be used for request cancellation. If
  269. // the context is nil a panic will occur. In the future the SDK may create
  270. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  271. // for more information on using Contexts.
  272. func (c *CloudTrail) CancelQueryWithContext(ctx aws.Context, input *CancelQueryInput, opts ...request.Option) (*CancelQueryOutput, error) {
  273. req, out := c.CancelQueryRequest(input)
  274. req.SetContext(ctx)
  275. req.ApplyOptions(opts...)
  276. return out, req.Send()
  277. }
  278. const opCreateChannel = "CreateChannel"
  279. // CreateChannelRequest generates a "aws/request.Request" representing the
  280. // client's request for the CreateChannel operation. The "output" return
  281. // value will be populated with the request's response once the request completes
  282. // successfully.
  283. //
  284. // Use "Send" method on the returned Request to send the API call to the service.
  285. // the "output" return value is not valid until after Send returns without error.
  286. //
  287. // See CreateChannel for more information on using the CreateChannel
  288. // API call, and error handling.
  289. //
  290. // This method is useful when you want to inject custom logic or configuration
  291. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  292. //
  293. // // Example sending a request using the CreateChannelRequest method.
  294. // req, resp := client.CreateChannelRequest(params)
  295. //
  296. // err := req.Send()
  297. // if err == nil { // resp is now filled
  298. // fmt.Println(resp)
  299. // }
  300. //
  301. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel
  302. func (c *CloudTrail) CreateChannelRequest(input *CreateChannelInput) (req *request.Request, output *CreateChannelOutput) {
  303. op := &request.Operation{
  304. Name: opCreateChannel,
  305. HTTPMethod: "POST",
  306. HTTPPath: "/",
  307. }
  308. if input == nil {
  309. input = &CreateChannelInput{}
  310. }
  311. output = &CreateChannelOutput{}
  312. req = c.newRequest(op, input, output)
  313. return
  314. }
  315. // CreateChannel API operation for AWS CloudTrail.
  316. //
  317. // Creates a channel for CloudTrail to ingest events from a partner or external
  318. // source. After you create a channel, a CloudTrail Lake event data store can
  319. // log events from the partner or source that you specify.
  320. //
  321. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  322. // with awserr.Error's Code and Message methods to get detailed information about
  323. // the error.
  324. //
  325. // See the AWS API reference guide for AWS CloudTrail's
  326. // API operation CreateChannel for usage and error information.
  327. //
  328. // Returned Error Types:
  329. //
  330. // - ChannelMaxLimitExceededException
  331. // This exception is thrown when the maximum number of channels limit is exceeded.
  332. //
  333. // - InvalidSourceException
  334. // This exception is thrown when the specified value of Source is not valid.
  335. //
  336. // - ChannelAlreadyExistsException
  337. // This exception is thrown when the provided channel already exists.
  338. //
  339. // - EventDataStoreARNInvalidException
  340. // The specified event data store ARN is not valid or does not map to an event
  341. // data store in your account.
  342. //
  343. // - EventDataStoreNotFoundException
  344. // The specified event data store was not found.
  345. //
  346. // - InvalidEventDataStoreCategoryException
  347. // This exception is thrown when event categories of specified event data stores
  348. // are not valid.
  349. //
  350. // - InactiveEventDataStoreException
  351. // The event data store is inactive.
  352. //
  353. // - InvalidParameterException
  354. // The request includes a parameter that is not valid.
  355. //
  356. // - InvalidTagParameterException
  357. // This exception is thrown when the specified tag key or values are not valid.
  358. // It can also occur if there are duplicate tags or too many tags on the resource.
  359. //
  360. // - TagsLimitExceededException
  361. // The number of tags per trail, event data store, or channel has exceeded the
  362. // permitted amount. Currently, the limit is 50.
  363. //
  364. // - OperationNotPermittedException
  365. // This exception is thrown when the requested operation is not permitted.
  366. //
  367. // - UnsupportedOperationException
  368. // This exception is thrown when the requested operation is not supported.
  369. //
  370. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel
  371. func (c *CloudTrail) CreateChannel(input *CreateChannelInput) (*CreateChannelOutput, error) {
  372. req, out := c.CreateChannelRequest(input)
  373. return out, req.Send()
  374. }
  375. // CreateChannelWithContext is the same as CreateChannel with the addition of
  376. // the ability to pass a context and additional request options.
  377. //
  378. // See CreateChannel 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 *CloudTrail) CreateChannelWithContext(ctx aws.Context, input *CreateChannelInput, opts ...request.Option) (*CreateChannelOutput, error) {
  385. req, out := c.CreateChannelRequest(input)
  386. req.SetContext(ctx)
  387. req.ApplyOptions(opts...)
  388. return out, req.Send()
  389. }
  390. const opCreateEventDataStore = "CreateEventDataStore"
  391. // CreateEventDataStoreRequest generates a "aws/request.Request" representing the
  392. // client's request for the CreateEventDataStore 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 CreateEventDataStore for more information on using the CreateEventDataStore
  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 CreateEventDataStoreRequest method.
  406. // req, resp := client.CreateEventDataStoreRequest(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/cloudtrail-2013-11-01/CreateEventDataStore
  414. func (c *CloudTrail) CreateEventDataStoreRequest(input *CreateEventDataStoreInput) (req *request.Request, output *CreateEventDataStoreOutput) {
  415. op := &request.Operation{
  416. Name: opCreateEventDataStore,
  417. HTTPMethod: "POST",
  418. HTTPPath: "/",
  419. }
  420. if input == nil {
  421. input = &CreateEventDataStoreInput{}
  422. }
  423. output = &CreateEventDataStoreOutput{}
  424. req = c.newRequest(op, input, output)
  425. return
  426. }
  427. // CreateEventDataStore API operation for AWS CloudTrail.
  428. //
  429. // Creates a new event data store.
  430. //
  431. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  432. // with awserr.Error's Code and Message methods to get detailed information about
  433. // the error.
  434. //
  435. // See the AWS API reference guide for AWS CloudTrail's
  436. // API operation CreateEventDataStore for usage and error information.
  437. //
  438. // Returned Error Types:
  439. //
  440. // - EventDataStoreAlreadyExistsException
  441. // An event data store with that name already exists.
  442. //
  443. // - EventDataStoreMaxLimitExceededException
  444. // Your account has used the maximum number of event data stores.
  445. //
  446. // - InvalidEventSelectorsException
  447. // This exception is thrown when the PutEventSelectors operation is called with
  448. // a number of event selectors, advanced event selectors, or data resources
  449. // that is not valid. The combination of event selectors or advanced event selectors
  450. // and data resources is not valid. A trail can have up to 5 event selectors.
  451. // If a trail uses advanced event selectors, a maximum of 500 total values for
  452. // all conditions in all advanced event selectors is allowed. A trail is limited
  453. // to 250 data resources. These data resources can be distributed across event
  454. // selectors, but the overall total cannot exceed 250.
  455. //
  456. // You can:
  457. //
  458. // - Specify a valid number of event selectors (1 to 5) for a trail.
  459. //
  460. // - Specify a valid number of data resources (1 to 250) for an event selector.
  461. // The limit of number of resources on an individual event selector is configurable
  462. // up to 250. However, this upper limit is allowed only if the total number
  463. // of data resources does not exceed 250 across all event selectors for a
  464. // trail.
  465. //
  466. // - Specify up to 500 values for all conditions in all advanced event selectors
  467. // for a trail.
  468. //
  469. // - Specify a valid value for a parameter. For example, specifying the ReadWriteType
  470. // parameter with a value of read-only is not valid.
  471. //
  472. // - InvalidParameterException
  473. // The request includes a parameter that is not valid.
  474. //
  475. // - InvalidTagParameterException
  476. // This exception is thrown when the specified tag key or values are not valid.
  477. // It can also occur if there are duplicate tags or too many tags on the resource.
  478. //
  479. // - OperationNotPermittedException
  480. // This exception is thrown when the requested operation is not permitted.
  481. //
  482. // - UnsupportedOperationException
  483. // This exception is thrown when the requested operation is not supported.
  484. //
  485. // - ConflictException
  486. // This exception is thrown when the specified resource is not ready for an
  487. // operation. This can occur when you try to run an operation on a resource
  488. // before CloudTrail has time to fully load the resource, or because another
  489. // operation is modifying the resource. If this exception occurs, wait a few
  490. // minutes, and then try the operation again.
  491. //
  492. // - InsufficientEncryptionPolicyException
  493. // This exception is thrown when the policy on the S3 bucket or KMS key does
  494. // not have sufficient permissions for the operation.
  495. //
  496. // - InvalidKmsKeyIdException
  497. // This exception is thrown when the KMS key ARN is not valid.
  498. //
  499. // - KmsKeyNotFoundException
  500. // This exception is thrown when the KMS key does not exist, when the S3 bucket
  501. // and the KMS key are not in the same region, or when the KMS key associated
  502. // with the Amazon SNS topic either does not exist or is not in the same region.
  503. //
  504. // - KmsException
  505. // This exception is thrown when there is an issue with the specified KMS key
  506. // and the trail or event data store can't be updated.
  507. //
  508. // - AccessNotEnabledException
  509. // This exception is thrown when trusted access has not been enabled between
  510. // CloudTrail and Organizations. For more information, see Enabling Trusted
  511. // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  512. // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  513. //
  514. // - InsufficientDependencyServiceAccessPermissionException
  515. // This exception is thrown when the IAM user or role that is used to create
  516. // the organization resource lacks one or more required permissions for creating
  517. // an organization resource in a required service.
  518. //
  519. // - NotOrganizationMasterAccountException
  520. // This exception is thrown when the Amazon Web Services account making the
  521. // request to create or update an organization trail or event data store is
  522. // not the management account for an organization in Organizations. For more
  523. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  524. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  525. //
  526. // - OrganizationsNotInUseException
  527. // This exception is thrown when the request is made from an Amazon Web Services
  528. // account that is not a member of an organization. To make this request, sign
  529. // in using the credentials of an account that belongs to an organization.
  530. //
  531. // - OrganizationNotInAllFeaturesModeException
  532. // This exception is thrown when Organizations is not configured to support
  533. // all features. All features must be enabled in Organizations to support creating
  534. // an organization trail or event data store.
  535. //
  536. // - NoManagementAccountSLRExistsException
  537. // This exception is thrown when the management account does not have a service-linked
  538. // role.
  539. //
  540. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore
  541. func (c *CloudTrail) CreateEventDataStore(input *CreateEventDataStoreInput) (*CreateEventDataStoreOutput, error) {
  542. req, out := c.CreateEventDataStoreRequest(input)
  543. return out, req.Send()
  544. }
  545. // CreateEventDataStoreWithContext is the same as CreateEventDataStore with the addition of
  546. // the ability to pass a context and additional request options.
  547. //
  548. // See CreateEventDataStore for details on how to use this API operation.
  549. //
  550. // The context must be non-nil and will be used for request cancellation. If
  551. // the context is nil a panic will occur. In the future the SDK may create
  552. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  553. // for more information on using Contexts.
  554. func (c *CloudTrail) CreateEventDataStoreWithContext(ctx aws.Context, input *CreateEventDataStoreInput, opts ...request.Option) (*CreateEventDataStoreOutput, error) {
  555. req, out := c.CreateEventDataStoreRequest(input)
  556. req.SetContext(ctx)
  557. req.ApplyOptions(opts...)
  558. return out, req.Send()
  559. }
  560. const opCreateTrail = "CreateTrail"
  561. // CreateTrailRequest generates a "aws/request.Request" representing the
  562. // client's request for the CreateTrail operation. The "output" return
  563. // value will be populated with the request's response once the request completes
  564. // successfully.
  565. //
  566. // Use "Send" method on the returned Request to send the API call to the service.
  567. // the "output" return value is not valid until after Send returns without error.
  568. //
  569. // See CreateTrail for more information on using the CreateTrail
  570. // API call, and error handling.
  571. //
  572. // This method is useful when you want to inject custom logic or configuration
  573. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  574. //
  575. // // Example sending a request using the CreateTrailRequest method.
  576. // req, resp := client.CreateTrailRequest(params)
  577. //
  578. // err := req.Send()
  579. // if err == nil { // resp is now filled
  580. // fmt.Println(resp)
  581. // }
  582. //
  583. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
  584. func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput) {
  585. op := &request.Operation{
  586. Name: opCreateTrail,
  587. HTTPMethod: "POST",
  588. HTTPPath: "/",
  589. }
  590. if input == nil {
  591. input = &CreateTrailInput{}
  592. }
  593. output = &CreateTrailOutput{}
  594. req = c.newRequest(op, input, output)
  595. return
  596. }
  597. // CreateTrail API operation for AWS CloudTrail.
  598. //
  599. // Creates a trail that specifies the settings for delivery of log data to an
  600. // Amazon S3 bucket.
  601. //
  602. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  603. // with awserr.Error's Code and Message methods to get detailed information about
  604. // the error.
  605. //
  606. // See the AWS API reference guide for AWS CloudTrail's
  607. // API operation CreateTrail for usage and error information.
  608. //
  609. // Returned Error Types:
  610. //
  611. // - MaximumNumberOfTrailsExceededException
  612. // This exception is thrown when the maximum number of trails is reached.
  613. //
  614. // - TrailAlreadyExistsException
  615. // This exception is thrown when the specified trail already exists.
  616. //
  617. // - S3BucketDoesNotExistException
  618. // This exception is thrown when the specified S3 bucket does not exist.
  619. //
  620. // - InsufficientS3BucketPolicyException
  621. // This exception is thrown when the policy on the S3 bucket is not sufficient.
  622. //
  623. // - InsufficientSnsTopicPolicyException
  624. // This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
  625. //
  626. // - InsufficientEncryptionPolicyException
  627. // This exception is thrown when the policy on the S3 bucket or KMS key does
  628. // not have sufficient permissions for the operation.
  629. //
  630. // - InvalidS3BucketNameException
  631. // This exception is thrown when the provided S3 bucket name is not valid.
  632. //
  633. // - InvalidS3PrefixException
  634. // This exception is thrown when the provided S3 prefix is not valid.
  635. //
  636. // - InvalidSnsTopicNameException
  637. // This exception is thrown when the provided SNS topic name is not valid.
  638. //
  639. // - InvalidKmsKeyIdException
  640. // This exception is thrown when the KMS key ARN is not valid.
  641. //
  642. // - InvalidTrailNameException
  643. // This exception is thrown when the provided trail name is not valid. Trail
  644. // names must meet the following requirements:
  645. //
  646. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  647. // (_), or dashes (-)
  648. //
  649. // - Start with a letter or number, and end with a letter or number
  650. //
  651. // - Be between 3 and 128 characters
  652. //
  653. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  654. // and my--namespace are not valid.
  655. //
  656. // - Not be in IP address format (for example, 192.168.5.4)
  657. //
  658. // - TrailNotProvidedException
  659. // This exception is no longer in use.
  660. //
  661. // - TagsLimitExceededException
  662. // The number of tags per trail, event data store, or channel has exceeded the
  663. // permitted amount. Currently, the limit is 50.
  664. //
  665. // - InvalidParameterCombinationException
  666. // This exception is thrown when the combination of parameters provided is not
  667. // valid.
  668. //
  669. // - KmsKeyNotFoundException
  670. // This exception is thrown when the KMS key does not exist, when the S3 bucket
  671. // and the KMS key are not in the same region, or when the KMS key associated
  672. // with the Amazon SNS topic either does not exist or is not in the same region.
  673. //
  674. // - KmsKeyDisabledException
  675. // This exception is no longer in use.
  676. //
  677. // - KmsException
  678. // This exception is thrown when there is an issue with the specified KMS key
  679. // and the trail or event data store can't be updated.
  680. //
  681. // - InvalidCloudWatchLogsLogGroupArnException
  682. // This exception is thrown when the provided CloudWatch Logs log group is not
  683. // valid.
  684. //
  685. // - InvalidCloudWatchLogsRoleArnException
  686. // This exception is thrown when the provided role is not valid.
  687. //
  688. // - CloudWatchLogsDeliveryUnavailableException
  689. // Cannot set a CloudWatch Logs delivery for this region.
  690. //
  691. // - InvalidTagParameterException
  692. // This exception is thrown when the specified tag key or values are not valid.
  693. // It can also occur if there are duplicate tags or too many tags on the resource.
  694. //
  695. // - UnsupportedOperationException
  696. // This exception is thrown when the requested operation is not supported.
  697. //
  698. // - OperationNotPermittedException
  699. // This exception is thrown when the requested operation is not permitted.
  700. //
  701. // - AccessNotEnabledException
  702. // This exception is thrown when trusted access has not been enabled between
  703. // CloudTrail and Organizations. For more information, see Enabling Trusted
  704. // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  705. // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  706. //
  707. // - InsufficientDependencyServiceAccessPermissionException
  708. // This exception is thrown when the IAM user or role that is used to create
  709. // the organization resource lacks one or more required permissions for creating
  710. // an organization resource in a required service.
  711. //
  712. // - NotOrganizationMasterAccountException
  713. // This exception is thrown when the Amazon Web Services account making the
  714. // request to create or update an organization trail or event data store is
  715. // not the management account for an organization in Organizations. For more
  716. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  717. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  718. //
  719. // - OrganizationsNotInUseException
  720. // This exception is thrown when the request is made from an Amazon Web Services
  721. // account that is not a member of an organization. To make this request, sign
  722. // in using the credentials of an account that belongs to an organization.
  723. //
  724. // - OrganizationNotInAllFeaturesModeException
  725. // This exception is thrown when Organizations is not configured to support
  726. // all features. All features must be enabled in Organizations to support creating
  727. // an organization trail or event data store.
  728. //
  729. // - NoManagementAccountSLRExistsException
  730. // This exception is thrown when the management account does not have a service-linked
  731. // role.
  732. //
  733. // - CloudTrailInvalidClientTokenIdException
  734. // This exception is thrown when a call results in the InvalidClientTokenId
  735. // error code. This can occur when you are creating or updating a trail to send
  736. // notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
  737. // account.
  738. //
  739. // - ConflictException
  740. // This exception is thrown when the specified resource is not ready for an
  741. // operation. This can occur when you try to run an operation on a resource
  742. // before CloudTrail has time to fully load the resource, or because another
  743. // operation is modifying the resource. If this exception occurs, wait a few
  744. // minutes, and then try the operation again.
  745. //
  746. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
  747. func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error) {
  748. req, out := c.CreateTrailRequest(input)
  749. return out, req.Send()
  750. }
  751. // CreateTrailWithContext is the same as CreateTrail with the addition of
  752. // the ability to pass a context and additional request options.
  753. //
  754. // See CreateTrail for details on how to use this API operation.
  755. //
  756. // The context must be non-nil and will be used for request cancellation. If
  757. // the context is nil a panic will occur. In the future the SDK may create
  758. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  759. // for more information on using Contexts.
  760. func (c *CloudTrail) CreateTrailWithContext(ctx aws.Context, input *CreateTrailInput, opts ...request.Option) (*CreateTrailOutput, error) {
  761. req, out := c.CreateTrailRequest(input)
  762. req.SetContext(ctx)
  763. req.ApplyOptions(opts...)
  764. return out, req.Send()
  765. }
  766. const opDeleteChannel = "DeleteChannel"
  767. // DeleteChannelRequest generates a "aws/request.Request" representing the
  768. // client's request for the DeleteChannel operation. The "output" return
  769. // value will be populated with the request's response once the request completes
  770. // successfully.
  771. //
  772. // Use "Send" method on the returned Request to send the API call to the service.
  773. // the "output" return value is not valid until after Send returns without error.
  774. //
  775. // See DeleteChannel for more information on using the DeleteChannel
  776. // API call, and error handling.
  777. //
  778. // This method is useful when you want to inject custom logic or configuration
  779. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  780. //
  781. // // Example sending a request using the DeleteChannelRequest method.
  782. // req, resp := client.DeleteChannelRequest(params)
  783. //
  784. // err := req.Send()
  785. // if err == nil { // resp is now filled
  786. // fmt.Println(resp)
  787. // }
  788. //
  789. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel
  790. func (c *CloudTrail) DeleteChannelRequest(input *DeleteChannelInput) (req *request.Request, output *DeleteChannelOutput) {
  791. op := &request.Operation{
  792. Name: opDeleteChannel,
  793. HTTPMethod: "POST",
  794. HTTPPath: "/",
  795. }
  796. if input == nil {
  797. input = &DeleteChannelInput{}
  798. }
  799. output = &DeleteChannelOutput{}
  800. req = c.newRequest(op, input, output)
  801. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  802. return
  803. }
  804. // DeleteChannel API operation for AWS CloudTrail.
  805. //
  806. // Deletes a channel.
  807. //
  808. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  809. // with awserr.Error's Code and Message methods to get detailed information about
  810. // the error.
  811. //
  812. // See the AWS API reference guide for AWS CloudTrail's
  813. // API operation DeleteChannel for usage and error information.
  814. //
  815. // Returned Error Types:
  816. //
  817. // - ChannelARNInvalidException
  818. // This exception is thrown when the specified value of ChannelARN is not valid.
  819. //
  820. // - ChannelNotFoundException
  821. // This exception is thrown when CloudTrail cannot find the specified channel.
  822. //
  823. // - OperationNotPermittedException
  824. // This exception is thrown when the requested operation is not permitted.
  825. //
  826. // - UnsupportedOperationException
  827. // This exception is thrown when the requested operation is not supported.
  828. //
  829. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel
  830. func (c *CloudTrail) DeleteChannel(input *DeleteChannelInput) (*DeleteChannelOutput, error) {
  831. req, out := c.DeleteChannelRequest(input)
  832. return out, req.Send()
  833. }
  834. // DeleteChannelWithContext is the same as DeleteChannel with the addition of
  835. // the ability to pass a context and additional request options.
  836. //
  837. // See DeleteChannel for details on how to use this API operation.
  838. //
  839. // The context must be non-nil and will be used for request cancellation. If
  840. // the context is nil a panic will occur. In the future the SDK may create
  841. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  842. // for more information on using Contexts.
  843. func (c *CloudTrail) DeleteChannelWithContext(ctx aws.Context, input *DeleteChannelInput, opts ...request.Option) (*DeleteChannelOutput, error) {
  844. req, out := c.DeleteChannelRequest(input)
  845. req.SetContext(ctx)
  846. req.ApplyOptions(opts...)
  847. return out, req.Send()
  848. }
  849. const opDeleteEventDataStore = "DeleteEventDataStore"
  850. // DeleteEventDataStoreRequest generates a "aws/request.Request" representing the
  851. // client's request for the DeleteEventDataStore operation. The "output" return
  852. // value will be populated with the request's response once the request completes
  853. // successfully.
  854. //
  855. // Use "Send" method on the returned Request to send the API call to the service.
  856. // the "output" return value is not valid until after Send returns without error.
  857. //
  858. // See DeleteEventDataStore for more information on using the DeleteEventDataStore
  859. // API call, and error handling.
  860. //
  861. // This method is useful when you want to inject custom logic or configuration
  862. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  863. //
  864. // // Example sending a request using the DeleteEventDataStoreRequest method.
  865. // req, resp := client.DeleteEventDataStoreRequest(params)
  866. //
  867. // err := req.Send()
  868. // if err == nil { // resp is now filled
  869. // fmt.Println(resp)
  870. // }
  871. //
  872. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore
  873. func (c *CloudTrail) DeleteEventDataStoreRequest(input *DeleteEventDataStoreInput) (req *request.Request, output *DeleteEventDataStoreOutput) {
  874. op := &request.Operation{
  875. Name: opDeleteEventDataStore,
  876. HTTPMethod: "POST",
  877. HTTPPath: "/",
  878. }
  879. if input == nil {
  880. input = &DeleteEventDataStoreInput{}
  881. }
  882. output = &DeleteEventDataStoreOutput{}
  883. req = c.newRequest(op, input, output)
  884. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  885. return
  886. }
  887. // DeleteEventDataStore API operation for AWS CloudTrail.
  888. //
  889. // Disables the event data store specified by EventDataStore, which accepts
  890. // an event data store ARN. After you run DeleteEventDataStore, the event data
  891. // store enters a PENDING_DELETION state, and is automatically deleted after
  892. // a wait period of seven days. TerminationProtectionEnabled must be set to
  893. // False on the event data store; this operation cannot work if TerminationProtectionEnabled
  894. // is True.
  895. //
  896. // After you run DeleteEventDataStore on an event data store, you cannot run
  897. // ListQueries, DescribeQuery, or GetQueryResults on queries that are using
  898. // an event data store in a PENDING_DELETION state. An event data store in the
  899. // PENDING_DELETION state does not incur costs.
  900. //
  901. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  902. // with awserr.Error's Code and Message methods to get detailed information about
  903. // the error.
  904. //
  905. // See the AWS API reference guide for AWS CloudTrail's
  906. // API operation DeleteEventDataStore for usage and error information.
  907. //
  908. // Returned Error Types:
  909. //
  910. // - EventDataStoreARNInvalidException
  911. // The specified event data store ARN is not valid or does not map to an event
  912. // data store in your account.
  913. //
  914. // - EventDataStoreNotFoundException
  915. // The specified event data store was not found.
  916. //
  917. // - EventDataStoreTerminationProtectedException
  918. // The event data store cannot be deleted because termination protection is
  919. // enabled for it.
  920. //
  921. // - EventDataStoreHasOngoingImportException
  922. // This exception is thrown when you try to update or delete an event data store
  923. // that currently has an import in progress.
  924. //
  925. // - InactiveEventDataStoreException
  926. // The event data store is inactive.
  927. //
  928. // - InvalidParameterException
  929. // The request includes a parameter that is not valid.
  930. //
  931. // - OperationNotPermittedException
  932. // This exception is thrown when the requested operation is not permitted.
  933. //
  934. // - UnsupportedOperationException
  935. // This exception is thrown when the requested operation is not supported.
  936. //
  937. // - NotOrganizationMasterAccountException
  938. // This exception is thrown when the Amazon Web Services account making the
  939. // request to create or update an organization trail or event data store is
  940. // not the management account for an organization in Organizations. For more
  941. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  942. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  943. //
  944. // - NoManagementAccountSLRExistsException
  945. // This exception is thrown when the management account does not have a service-linked
  946. // role.
  947. //
  948. // - ChannelExistsForEDSException
  949. // This exception is thrown when the specified event data store cannot yet be
  950. // deleted because it is in use by a channel.
  951. //
  952. // - InsufficientDependencyServiceAccessPermissionException
  953. // This exception is thrown when the IAM user or role that is used to create
  954. // the organization resource lacks one or more required permissions for creating
  955. // an organization resource in a required service.
  956. //
  957. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore
  958. func (c *CloudTrail) DeleteEventDataStore(input *DeleteEventDataStoreInput) (*DeleteEventDataStoreOutput, error) {
  959. req, out := c.DeleteEventDataStoreRequest(input)
  960. return out, req.Send()
  961. }
  962. // DeleteEventDataStoreWithContext is the same as DeleteEventDataStore with the addition of
  963. // the ability to pass a context and additional request options.
  964. //
  965. // See DeleteEventDataStore for details on how to use this API operation.
  966. //
  967. // The context must be non-nil and will be used for request cancellation. If
  968. // the context is nil a panic will occur. In the future the SDK may create
  969. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  970. // for more information on using Contexts.
  971. func (c *CloudTrail) DeleteEventDataStoreWithContext(ctx aws.Context, input *DeleteEventDataStoreInput, opts ...request.Option) (*DeleteEventDataStoreOutput, error) {
  972. req, out := c.DeleteEventDataStoreRequest(input)
  973. req.SetContext(ctx)
  974. req.ApplyOptions(opts...)
  975. return out, req.Send()
  976. }
  977. const opDeleteResourcePolicy = "DeleteResourcePolicy"
  978. // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the
  979. // client's request for the DeleteResourcePolicy operation. The "output" return
  980. // value will be populated with the request's response once the request completes
  981. // successfully.
  982. //
  983. // Use "Send" method on the returned Request to send the API call to the service.
  984. // the "output" return value is not valid until after Send returns without error.
  985. //
  986. // See DeleteResourcePolicy for more information on using the DeleteResourcePolicy
  987. // API call, and error handling.
  988. //
  989. // This method is useful when you want to inject custom logic or configuration
  990. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  991. //
  992. // // Example sending a request using the DeleteResourcePolicyRequest method.
  993. // req, resp := client.DeleteResourcePolicyRequest(params)
  994. //
  995. // err := req.Send()
  996. // if err == nil { // resp is now filled
  997. // fmt.Println(resp)
  998. // }
  999. //
  1000. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy
  1001. func (c *CloudTrail) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) {
  1002. op := &request.Operation{
  1003. Name: opDeleteResourcePolicy,
  1004. HTTPMethod: "POST",
  1005. HTTPPath: "/",
  1006. }
  1007. if input == nil {
  1008. input = &DeleteResourcePolicyInput{}
  1009. }
  1010. output = &DeleteResourcePolicyOutput{}
  1011. req = c.newRequest(op, input, output)
  1012. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1013. return
  1014. }
  1015. // DeleteResourcePolicy API operation for AWS CloudTrail.
  1016. //
  1017. // Deletes the resource-based policy attached to the CloudTrail channel.
  1018. //
  1019. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1020. // with awserr.Error's Code and Message methods to get detailed information about
  1021. // the error.
  1022. //
  1023. // See the AWS API reference guide for AWS CloudTrail's
  1024. // API operation DeleteResourcePolicy for usage and error information.
  1025. //
  1026. // Returned Error Types:
  1027. //
  1028. // - ResourceARNNotValidException
  1029. // This exception is thrown when the provided resource does not exist, or the
  1030. // ARN format of the resource is not valid. The following is the valid format
  1031. // for a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
  1032. //
  1033. // - ResourceNotFoundException
  1034. // This exception is thrown when the specified resource is not found.
  1035. //
  1036. // - ResourcePolicyNotFoundException
  1037. // This exception is thrown when the specified resource policy is not found.
  1038. //
  1039. // - ResourceTypeNotSupportedException
  1040. // This exception is thrown when the specified resource type is not supported
  1041. // by CloudTrail.
  1042. //
  1043. // - OperationNotPermittedException
  1044. // This exception is thrown when the requested operation is not permitted.
  1045. //
  1046. // - UnsupportedOperationException
  1047. // This exception is thrown when the requested operation is not supported.
  1048. //
  1049. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy
  1050. func (c *CloudTrail) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) {
  1051. req, out := c.DeleteResourcePolicyRequest(input)
  1052. return out, req.Send()
  1053. }
  1054. // DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of
  1055. // the ability to pass a context and additional request options.
  1056. //
  1057. // See DeleteResourcePolicy for details on how to use this API operation.
  1058. //
  1059. // The context must be non-nil and will be used for request cancellation. If
  1060. // the context is nil a panic will occur. In the future the SDK may create
  1061. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1062. // for more information on using Contexts.
  1063. func (c *CloudTrail) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) {
  1064. req, out := c.DeleteResourcePolicyRequest(input)
  1065. req.SetContext(ctx)
  1066. req.ApplyOptions(opts...)
  1067. return out, req.Send()
  1068. }
  1069. const opDeleteTrail = "DeleteTrail"
  1070. // DeleteTrailRequest generates a "aws/request.Request" representing the
  1071. // client's request for the DeleteTrail operation. The "output" return
  1072. // value will be populated with the request's response once the request completes
  1073. // successfully.
  1074. //
  1075. // Use "Send" method on the returned Request to send the API call to the service.
  1076. // the "output" return value is not valid until after Send returns without error.
  1077. //
  1078. // See DeleteTrail for more information on using the DeleteTrail
  1079. // API call, and error handling.
  1080. //
  1081. // This method is useful when you want to inject custom logic or configuration
  1082. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1083. //
  1084. // // Example sending a request using the DeleteTrailRequest method.
  1085. // req, resp := client.DeleteTrailRequest(params)
  1086. //
  1087. // err := req.Send()
  1088. // if err == nil { // resp is now filled
  1089. // fmt.Println(resp)
  1090. // }
  1091. //
  1092. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
  1093. func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput) {
  1094. op := &request.Operation{
  1095. Name: opDeleteTrail,
  1096. HTTPMethod: "POST",
  1097. HTTPPath: "/",
  1098. }
  1099. if input == nil {
  1100. input = &DeleteTrailInput{}
  1101. }
  1102. output = &DeleteTrailOutput{}
  1103. req = c.newRequest(op, input, output)
  1104. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1105. return
  1106. }
  1107. // DeleteTrail API operation for AWS CloudTrail.
  1108. //
  1109. // Deletes a trail. This operation must be called from the region in which the
  1110. // trail was created. DeleteTrail cannot be called on the shadow trails (replicated
  1111. // trails in other regions) of a trail that is enabled in all regions.
  1112. //
  1113. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1114. // with awserr.Error's Code and Message methods to get detailed information about
  1115. // the error.
  1116. //
  1117. // See the AWS API reference guide for AWS CloudTrail's
  1118. // API operation DeleteTrail for usage and error information.
  1119. //
  1120. // Returned Error Types:
  1121. //
  1122. // - TrailNotFoundException
  1123. // This exception is thrown when the trail with the given name is not found.
  1124. //
  1125. // - InvalidTrailNameException
  1126. // This exception is thrown when the provided trail name is not valid. Trail
  1127. // names must meet the following requirements:
  1128. //
  1129. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  1130. // (_), or dashes (-)
  1131. //
  1132. // - Start with a letter or number, and end with a letter or number
  1133. //
  1134. // - Be between 3 and 128 characters
  1135. //
  1136. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  1137. // and my--namespace are not valid.
  1138. //
  1139. // - Not be in IP address format (for example, 192.168.5.4)
  1140. //
  1141. // - ARNInvalidException
  1142. // This exception is thrown when an operation is called with a trail ARN that
  1143. // is not valid. The following is the format of a trail ARN.
  1144. //
  1145. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  1146. //
  1147. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  1148. // event data store, or channel with a resource ARN that is not valid.
  1149. //
  1150. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  1151. //
  1152. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  1153. //
  1154. // - ConflictException
  1155. // This exception is thrown when the specified resource is not ready for an
  1156. // operation. This can occur when you try to run an operation on a resource
  1157. // before CloudTrail has time to fully load the resource, or because another
  1158. // operation is modifying the resource. If this exception occurs, wait a few
  1159. // minutes, and then try the operation again.
  1160. //
  1161. // - InvalidHomeRegionException
  1162. // This exception is thrown when an operation is called on a trail from a region
  1163. // other than the region in which the trail was created.
  1164. //
  1165. // - UnsupportedOperationException
  1166. // This exception is thrown when the requested operation is not supported.
  1167. //
  1168. // - OperationNotPermittedException
  1169. // This exception is thrown when the requested operation is not permitted.
  1170. //
  1171. // - NotOrganizationMasterAccountException
  1172. // This exception is thrown when the Amazon Web Services account making the
  1173. // request to create or update an organization trail or event data store is
  1174. // not the management account for an organization in Organizations. For more
  1175. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  1176. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  1177. //
  1178. // - NoManagementAccountSLRExistsException
  1179. // This exception is thrown when the management account does not have a service-linked
  1180. // role.
  1181. //
  1182. // - InsufficientDependencyServiceAccessPermissionException
  1183. // This exception is thrown when the IAM user or role that is used to create
  1184. // the organization resource lacks one or more required permissions for creating
  1185. // an organization resource in a required service.
  1186. //
  1187. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
  1188. func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error) {
  1189. req, out := c.DeleteTrailRequest(input)
  1190. return out, req.Send()
  1191. }
  1192. // DeleteTrailWithContext is the same as DeleteTrail with the addition of
  1193. // the ability to pass a context and additional request options.
  1194. //
  1195. // See DeleteTrail for details on how to use this API operation.
  1196. //
  1197. // The context must be non-nil and will be used for request cancellation. If
  1198. // the context is nil a panic will occur. In the future the SDK may create
  1199. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1200. // for more information on using Contexts.
  1201. func (c *CloudTrail) DeleteTrailWithContext(ctx aws.Context, input *DeleteTrailInput, opts ...request.Option) (*DeleteTrailOutput, error) {
  1202. req, out := c.DeleteTrailRequest(input)
  1203. req.SetContext(ctx)
  1204. req.ApplyOptions(opts...)
  1205. return out, req.Send()
  1206. }
  1207. const opDeregisterOrganizationDelegatedAdmin = "DeregisterOrganizationDelegatedAdmin"
  1208. // DeregisterOrganizationDelegatedAdminRequest generates a "aws/request.Request" representing the
  1209. // client's request for the DeregisterOrganizationDelegatedAdmin operation. The "output" return
  1210. // value will be populated with the request's response once the request completes
  1211. // successfully.
  1212. //
  1213. // Use "Send" method on the returned Request to send the API call to the service.
  1214. // the "output" return value is not valid until after Send returns without error.
  1215. //
  1216. // See DeregisterOrganizationDelegatedAdmin for more information on using the DeregisterOrganizationDelegatedAdmin
  1217. // API call, and error handling.
  1218. //
  1219. // This method is useful when you want to inject custom logic or configuration
  1220. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1221. //
  1222. // // Example sending a request using the DeregisterOrganizationDelegatedAdminRequest method.
  1223. // req, resp := client.DeregisterOrganizationDelegatedAdminRequest(params)
  1224. //
  1225. // err := req.Send()
  1226. // if err == nil { // resp is now filled
  1227. // fmt.Println(resp)
  1228. // }
  1229. //
  1230. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin
  1231. func (c *CloudTrail) DeregisterOrganizationDelegatedAdminRequest(input *DeregisterOrganizationDelegatedAdminInput) (req *request.Request, output *DeregisterOrganizationDelegatedAdminOutput) {
  1232. op := &request.Operation{
  1233. Name: opDeregisterOrganizationDelegatedAdmin,
  1234. HTTPMethod: "POST",
  1235. HTTPPath: "/",
  1236. }
  1237. if input == nil {
  1238. input = &DeregisterOrganizationDelegatedAdminInput{}
  1239. }
  1240. output = &DeregisterOrganizationDelegatedAdminOutput{}
  1241. req = c.newRequest(op, input, output)
  1242. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1243. return
  1244. }
  1245. // DeregisterOrganizationDelegatedAdmin API operation for AWS CloudTrail.
  1246. //
  1247. // Removes CloudTrail delegated administrator permissions from a member account
  1248. // in an organization.
  1249. //
  1250. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1251. // with awserr.Error's Code and Message methods to get detailed information about
  1252. // the error.
  1253. //
  1254. // See the AWS API reference guide for AWS CloudTrail's
  1255. // API operation DeregisterOrganizationDelegatedAdmin for usage and error information.
  1256. //
  1257. // Returned Error Types:
  1258. //
  1259. // - AccountNotFoundException
  1260. // This exception is thrown when the specified account is not found or not part
  1261. // of an organization.
  1262. //
  1263. // - AccountNotRegisteredException
  1264. // This exception is thrown when the specified account is not registered as
  1265. // the CloudTrail delegated administrator.
  1266. //
  1267. // - AccessNotEnabledException
  1268. // This exception is thrown when trusted access has not been enabled between
  1269. // CloudTrail and Organizations. For more information, see Enabling Trusted
  1270. // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  1271. // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  1272. //
  1273. // - ConflictException
  1274. // This exception is thrown when the specified resource is not ready for an
  1275. // operation. This can occur when you try to run an operation on a resource
  1276. // before CloudTrail has time to fully load the resource, or because another
  1277. // operation is modifying the resource. If this exception occurs, wait a few
  1278. // minutes, and then try the operation again.
  1279. //
  1280. // - InsufficientDependencyServiceAccessPermissionException
  1281. // This exception is thrown when the IAM user or role that is used to create
  1282. // the organization resource lacks one or more required permissions for creating
  1283. // an organization resource in a required service.
  1284. //
  1285. // - InvalidParameterException
  1286. // The request includes a parameter that is not valid.
  1287. //
  1288. // - NotOrganizationManagementAccountException
  1289. // This exception is thrown when the account making the request is not the organization's
  1290. // management account.
  1291. //
  1292. // - OrganizationNotInAllFeaturesModeException
  1293. // This exception is thrown when Organizations is not configured to support
  1294. // all features. All features must be enabled in Organizations to support creating
  1295. // an organization trail or event data store.
  1296. //
  1297. // - OrganizationsNotInUseException
  1298. // This exception is thrown when the request is made from an Amazon Web Services
  1299. // account that is not a member of an organization. To make this request, sign
  1300. // in using the credentials of an account that belongs to an organization.
  1301. //
  1302. // - UnsupportedOperationException
  1303. // This exception is thrown when the requested operation is not supported.
  1304. //
  1305. // - OperationNotPermittedException
  1306. // This exception is thrown when the requested operation is not permitted.
  1307. //
  1308. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin
  1309. func (c *CloudTrail) DeregisterOrganizationDelegatedAdmin(input *DeregisterOrganizationDelegatedAdminInput) (*DeregisterOrganizationDelegatedAdminOutput, error) {
  1310. req, out := c.DeregisterOrganizationDelegatedAdminRequest(input)
  1311. return out, req.Send()
  1312. }
  1313. // DeregisterOrganizationDelegatedAdminWithContext is the same as DeregisterOrganizationDelegatedAdmin with the addition of
  1314. // the ability to pass a context and additional request options.
  1315. //
  1316. // See DeregisterOrganizationDelegatedAdmin for details on how to use this API operation.
  1317. //
  1318. // The context must be non-nil and will be used for request cancellation. If
  1319. // the context is nil a panic will occur. In the future the SDK may create
  1320. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1321. // for more information on using Contexts.
  1322. func (c *CloudTrail) DeregisterOrganizationDelegatedAdminWithContext(ctx aws.Context, input *DeregisterOrganizationDelegatedAdminInput, opts ...request.Option) (*DeregisterOrganizationDelegatedAdminOutput, error) {
  1323. req, out := c.DeregisterOrganizationDelegatedAdminRequest(input)
  1324. req.SetContext(ctx)
  1325. req.ApplyOptions(opts...)
  1326. return out, req.Send()
  1327. }
  1328. const opDescribeQuery = "DescribeQuery"
  1329. // DescribeQueryRequest generates a "aws/request.Request" representing the
  1330. // client's request for the DescribeQuery operation. The "output" return
  1331. // value will be populated with the request's response once the request completes
  1332. // successfully.
  1333. //
  1334. // Use "Send" method on the returned Request to send the API call to the service.
  1335. // the "output" return value is not valid until after Send returns without error.
  1336. //
  1337. // See DescribeQuery for more information on using the DescribeQuery
  1338. // API call, and error handling.
  1339. //
  1340. // This method is useful when you want to inject custom logic or configuration
  1341. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1342. //
  1343. // // Example sending a request using the DescribeQueryRequest method.
  1344. // req, resp := client.DescribeQueryRequest(params)
  1345. //
  1346. // err := req.Send()
  1347. // if err == nil { // resp is now filled
  1348. // fmt.Println(resp)
  1349. // }
  1350. //
  1351. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery
  1352. func (c *CloudTrail) DescribeQueryRequest(input *DescribeQueryInput) (req *request.Request, output *DescribeQueryOutput) {
  1353. op := &request.Operation{
  1354. Name: opDescribeQuery,
  1355. HTTPMethod: "POST",
  1356. HTTPPath: "/",
  1357. }
  1358. if input == nil {
  1359. input = &DescribeQueryInput{}
  1360. }
  1361. output = &DescribeQueryOutput{}
  1362. req = c.newRequest(op, input, output)
  1363. return
  1364. }
  1365. // DescribeQuery API operation for AWS CloudTrail.
  1366. //
  1367. // Returns metadata about a query, including query run time in milliseconds,
  1368. // number of events scanned and matched, and query status. You must specify
  1369. // an ARN for EventDataStore, and a value for QueryID.
  1370. //
  1371. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1372. // with awserr.Error's Code and Message methods to get detailed information about
  1373. // the error.
  1374. //
  1375. // See the AWS API reference guide for AWS CloudTrail's
  1376. // API operation DescribeQuery for usage and error information.
  1377. //
  1378. // Returned Error Types:
  1379. //
  1380. // - EventDataStoreARNInvalidException
  1381. // The specified event data store ARN is not valid or does not map to an event
  1382. // data store in your account.
  1383. //
  1384. // - EventDataStoreNotFoundException
  1385. // The specified event data store was not found.
  1386. //
  1387. // - InactiveEventDataStoreException
  1388. // The event data store is inactive.
  1389. //
  1390. // - InvalidParameterException
  1391. // The request includes a parameter that is not valid.
  1392. //
  1393. // - QueryIdNotFoundException
  1394. // The query ID does not exist or does not map to a query.
  1395. //
  1396. // - OperationNotPermittedException
  1397. // This exception is thrown when the requested operation is not permitted.
  1398. //
  1399. // - UnsupportedOperationException
  1400. // This exception is thrown when the requested operation is not supported.
  1401. //
  1402. // - NoManagementAccountSLRExistsException
  1403. // This exception is thrown when the management account does not have a service-linked
  1404. // role.
  1405. //
  1406. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery
  1407. func (c *CloudTrail) DescribeQuery(input *DescribeQueryInput) (*DescribeQueryOutput, error) {
  1408. req, out := c.DescribeQueryRequest(input)
  1409. return out, req.Send()
  1410. }
  1411. // DescribeQueryWithContext is the same as DescribeQuery with the addition of
  1412. // the ability to pass a context and additional request options.
  1413. //
  1414. // See DescribeQuery for details on how to use this API operation.
  1415. //
  1416. // The context must be non-nil and will be used for request cancellation. If
  1417. // the context is nil a panic will occur. In the future the SDK may create
  1418. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1419. // for more information on using Contexts.
  1420. func (c *CloudTrail) DescribeQueryWithContext(ctx aws.Context, input *DescribeQueryInput, opts ...request.Option) (*DescribeQueryOutput, error) {
  1421. req, out := c.DescribeQueryRequest(input)
  1422. req.SetContext(ctx)
  1423. req.ApplyOptions(opts...)
  1424. return out, req.Send()
  1425. }
  1426. const opDescribeTrails = "DescribeTrails"
  1427. // DescribeTrailsRequest generates a "aws/request.Request" representing the
  1428. // client's request for the DescribeTrails operation. The "output" return
  1429. // value will be populated with the request's response once the request completes
  1430. // successfully.
  1431. //
  1432. // Use "Send" method on the returned Request to send the API call to the service.
  1433. // the "output" return value is not valid until after Send returns without error.
  1434. //
  1435. // See DescribeTrails for more information on using the DescribeTrails
  1436. // API call, and error handling.
  1437. //
  1438. // This method is useful when you want to inject custom logic or configuration
  1439. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1440. //
  1441. // // Example sending a request using the DescribeTrailsRequest method.
  1442. // req, resp := client.DescribeTrailsRequest(params)
  1443. //
  1444. // err := req.Send()
  1445. // if err == nil { // resp is now filled
  1446. // fmt.Println(resp)
  1447. // }
  1448. //
  1449. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
  1450. func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput) {
  1451. op := &request.Operation{
  1452. Name: opDescribeTrails,
  1453. HTTPMethod: "POST",
  1454. HTTPPath: "/",
  1455. }
  1456. if input == nil {
  1457. input = &DescribeTrailsInput{}
  1458. }
  1459. output = &DescribeTrailsOutput{}
  1460. req = c.newRequest(op, input, output)
  1461. return
  1462. }
  1463. // DescribeTrails API operation for AWS CloudTrail.
  1464. //
  1465. // Retrieves settings for one or more trails associated with the current region
  1466. // for your account.
  1467. //
  1468. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1469. // with awserr.Error's Code and Message methods to get detailed information about
  1470. // the error.
  1471. //
  1472. // See the AWS API reference guide for AWS CloudTrail's
  1473. // API operation DescribeTrails for usage and error information.
  1474. //
  1475. // Returned Error Types:
  1476. //
  1477. // - UnsupportedOperationException
  1478. // This exception is thrown when the requested operation is not supported.
  1479. //
  1480. // - OperationNotPermittedException
  1481. // This exception is thrown when the requested operation is not permitted.
  1482. //
  1483. // - InvalidTrailNameException
  1484. // This exception is thrown when the provided trail name is not valid. Trail
  1485. // names must meet the following requirements:
  1486. //
  1487. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  1488. // (_), or dashes (-)
  1489. //
  1490. // - Start with a letter or number, and end with a letter or number
  1491. //
  1492. // - Be between 3 and 128 characters
  1493. //
  1494. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  1495. // and my--namespace are not valid.
  1496. //
  1497. // - Not be in IP address format (for example, 192.168.5.4)
  1498. //
  1499. // - NoManagementAccountSLRExistsException
  1500. // This exception is thrown when the management account does not have a service-linked
  1501. // role.
  1502. //
  1503. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
  1504. func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error) {
  1505. req, out := c.DescribeTrailsRequest(input)
  1506. return out, req.Send()
  1507. }
  1508. // DescribeTrailsWithContext is the same as DescribeTrails with the addition of
  1509. // the ability to pass a context and additional request options.
  1510. //
  1511. // See DescribeTrails for details on how to use this API operation.
  1512. //
  1513. // The context must be non-nil and will be used for request cancellation. If
  1514. // the context is nil a panic will occur. In the future the SDK may create
  1515. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1516. // for more information on using Contexts.
  1517. func (c *CloudTrail) DescribeTrailsWithContext(ctx aws.Context, input *DescribeTrailsInput, opts ...request.Option) (*DescribeTrailsOutput, error) {
  1518. req, out := c.DescribeTrailsRequest(input)
  1519. req.SetContext(ctx)
  1520. req.ApplyOptions(opts...)
  1521. return out, req.Send()
  1522. }
  1523. const opGetChannel = "GetChannel"
  1524. // GetChannelRequest generates a "aws/request.Request" representing the
  1525. // client's request for the GetChannel operation. The "output" return
  1526. // value will be populated with the request's response once the request completes
  1527. // successfully.
  1528. //
  1529. // Use "Send" method on the returned Request to send the API call to the service.
  1530. // the "output" return value is not valid until after Send returns without error.
  1531. //
  1532. // See GetChannel for more information on using the GetChannel
  1533. // API call, and error handling.
  1534. //
  1535. // This method is useful when you want to inject custom logic or configuration
  1536. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1537. //
  1538. // // Example sending a request using the GetChannelRequest method.
  1539. // req, resp := client.GetChannelRequest(params)
  1540. //
  1541. // err := req.Send()
  1542. // if err == nil { // resp is now filled
  1543. // fmt.Println(resp)
  1544. // }
  1545. //
  1546. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel
  1547. func (c *CloudTrail) GetChannelRequest(input *GetChannelInput) (req *request.Request, output *GetChannelOutput) {
  1548. op := &request.Operation{
  1549. Name: opGetChannel,
  1550. HTTPMethod: "POST",
  1551. HTTPPath: "/",
  1552. }
  1553. if input == nil {
  1554. input = &GetChannelInput{}
  1555. }
  1556. output = &GetChannelOutput{}
  1557. req = c.newRequest(op, input, output)
  1558. return
  1559. }
  1560. // GetChannel API operation for AWS CloudTrail.
  1561. //
  1562. // Returns information about a specific channel.
  1563. //
  1564. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1565. // with awserr.Error's Code and Message methods to get detailed information about
  1566. // the error.
  1567. //
  1568. // See the AWS API reference guide for AWS CloudTrail's
  1569. // API operation GetChannel for usage and error information.
  1570. //
  1571. // Returned Error Types:
  1572. //
  1573. // - ChannelARNInvalidException
  1574. // This exception is thrown when the specified value of ChannelARN is not valid.
  1575. //
  1576. // - ChannelNotFoundException
  1577. // This exception is thrown when CloudTrail cannot find the specified channel.
  1578. //
  1579. // - OperationNotPermittedException
  1580. // This exception is thrown when the requested operation is not permitted.
  1581. //
  1582. // - UnsupportedOperationException
  1583. // This exception is thrown when the requested operation is not supported.
  1584. //
  1585. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel
  1586. func (c *CloudTrail) GetChannel(input *GetChannelInput) (*GetChannelOutput, error) {
  1587. req, out := c.GetChannelRequest(input)
  1588. return out, req.Send()
  1589. }
  1590. // GetChannelWithContext is the same as GetChannel with the addition of
  1591. // the ability to pass a context and additional request options.
  1592. //
  1593. // See GetChannel for details on how to use this API operation.
  1594. //
  1595. // The context must be non-nil and will be used for request cancellation. If
  1596. // the context is nil a panic will occur. In the future the SDK may create
  1597. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1598. // for more information on using Contexts.
  1599. func (c *CloudTrail) GetChannelWithContext(ctx aws.Context, input *GetChannelInput, opts ...request.Option) (*GetChannelOutput, error) {
  1600. req, out := c.GetChannelRequest(input)
  1601. req.SetContext(ctx)
  1602. req.ApplyOptions(opts...)
  1603. return out, req.Send()
  1604. }
  1605. const opGetEventDataStore = "GetEventDataStore"
  1606. // GetEventDataStoreRequest generates a "aws/request.Request" representing the
  1607. // client's request for the GetEventDataStore operation. The "output" return
  1608. // value will be populated with the request's response once the request completes
  1609. // successfully.
  1610. //
  1611. // Use "Send" method on the returned Request to send the API call to the service.
  1612. // the "output" return value is not valid until after Send returns without error.
  1613. //
  1614. // See GetEventDataStore for more information on using the GetEventDataStore
  1615. // API call, and error handling.
  1616. //
  1617. // This method is useful when you want to inject custom logic or configuration
  1618. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1619. //
  1620. // // Example sending a request using the GetEventDataStoreRequest method.
  1621. // req, resp := client.GetEventDataStoreRequest(params)
  1622. //
  1623. // err := req.Send()
  1624. // if err == nil { // resp is now filled
  1625. // fmt.Println(resp)
  1626. // }
  1627. //
  1628. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore
  1629. func (c *CloudTrail) GetEventDataStoreRequest(input *GetEventDataStoreInput) (req *request.Request, output *GetEventDataStoreOutput) {
  1630. op := &request.Operation{
  1631. Name: opGetEventDataStore,
  1632. HTTPMethod: "POST",
  1633. HTTPPath: "/",
  1634. }
  1635. if input == nil {
  1636. input = &GetEventDataStoreInput{}
  1637. }
  1638. output = &GetEventDataStoreOutput{}
  1639. req = c.newRequest(op, input, output)
  1640. return
  1641. }
  1642. // GetEventDataStore API operation for AWS CloudTrail.
  1643. //
  1644. // Returns information about an event data store specified as either an ARN
  1645. // or the ID portion of the ARN.
  1646. //
  1647. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1648. // with awserr.Error's Code and Message methods to get detailed information about
  1649. // the error.
  1650. //
  1651. // See the AWS API reference guide for AWS CloudTrail's
  1652. // API operation GetEventDataStore for usage and error information.
  1653. //
  1654. // Returned Error Types:
  1655. //
  1656. // - EventDataStoreARNInvalidException
  1657. // The specified event data store ARN is not valid or does not map to an event
  1658. // data store in your account.
  1659. //
  1660. // - EventDataStoreNotFoundException
  1661. // The specified event data store was not found.
  1662. //
  1663. // - InvalidParameterException
  1664. // The request includes a parameter that is not valid.
  1665. //
  1666. // - OperationNotPermittedException
  1667. // This exception is thrown when the requested operation is not permitted.
  1668. //
  1669. // - UnsupportedOperationException
  1670. // This exception is thrown when the requested operation is not supported.
  1671. //
  1672. // - NoManagementAccountSLRExistsException
  1673. // This exception is thrown when the management account does not have a service-linked
  1674. // role.
  1675. //
  1676. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore
  1677. func (c *CloudTrail) GetEventDataStore(input *GetEventDataStoreInput) (*GetEventDataStoreOutput, error) {
  1678. req, out := c.GetEventDataStoreRequest(input)
  1679. return out, req.Send()
  1680. }
  1681. // GetEventDataStoreWithContext is the same as GetEventDataStore with the addition of
  1682. // the ability to pass a context and additional request options.
  1683. //
  1684. // See GetEventDataStore for details on how to use this API operation.
  1685. //
  1686. // The context must be non-nil and will be used for request cancellation. If
  1687. // the context is nil a panic will occur. In the future the SDK may create
  1688. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1689. // for more information on using Contexts.
  1690. func (c *CloudTrail) GetEventDataStoreWithContext(ctx aws.Context, input *GetEventDataStoreInput, opts ...request.Option) (*GetEventDataStoreOutput, error) {
  1691. req, out := c.GetEventDataStoreRequest(input)
  1692. req.SetContext(ctx)
  1693. req.ApplyOptions(opts...)
  1694. return out, req.Send()
  1695. }
  1696. const opGetEventSelectors = "GetEventSelectors"
  1697. // GetEventSelectorsRequest generates a "aws/request.Request" representing the
  1698. // client's request for the GetEventSelectors operation. The "output" return
  1699. // value will be populated with the request's response once the request completes
  1700. // successfully.
  1701. //
  1702. // Use "Send" method on the returned Request to send the API call to the service.
  1703. // the "output" return value is not valid until after Send returns without error.
  1704. //
  1705. // See GetEventSelectors for more information on using the GetEventSelectors
  1706. // API call, and error handling.
  1707. //
  1708. // This method is useful when you want to inject custom logic or configuration
  1709. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1710. //
  1711. // // Example sending a request using the GetEventSelectorsRequest method.
  1712. // req, resp := client.GetEventSelectorsRequest(params)
  1713. //
  1714. // err := req.Send()
  1715. // if err == nil { // resp is now filled
  1716. // fmt.Println(resp)
  1717. // }
  1718. //
  1719. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
  1720. func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (req *request.Request, output *GetEventSelectorsOutput) {
  1721. op := &request.Operation{
  1722. Name: opGetEventSelectors,
  1723. HTTPMethod: "POST",
  1724. HTTPPath: "/",
  1725. }
  1726. if input == nil {
  1727. input = &GetEventSelectorsInput{}
  1728. }
  1729. output = &GetEventSelectorsOutput{}
  1730. req = c.newRequest(op, input, output)
  1731. return
  1732. }
  1733. // GetEventSelectors API operation for AWS CloudTrail.
  1734. //
  1735. // Describes the settings for the event selectors that you configured for your
  1736. // trail. The information returned for your event selectors includes the following:
  1737. //
  1738. // - If your event selector includes read-only events, write-only events,
  1739. // or all events. This applies to both management events and data events.
  1740. //
  1741. // - If your event selector includes management events.
  1742. //
  1743. // - If your event selector includes data events, the resources on which
  1744. // you are logging data events.
  1745. //
  1746. // For more information about logging management and data events, see the following
  1747. // topics in the CloudTrail User Guide:
  1748. //
  1749. // - Logging management events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html)
  1750. //
  1751. // - Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
  1752. //
  1753. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1754. // with awserr.Error's Code and Message methods to get detailed information about
  1755. // the error.
  1756. //
  1757. // See the AWS API reference guide for AWS CloudTrail's
  1758. // API operation GetEventSelectors for usage and error information.
  1759. //
  1760. // Returned Error Types:
  1761. //
  1762. // - TrailNotFoundException
  1763. // This exception is thrown when the trail with the given name is not found.
  1764. //
  1765. // - InvalidTrailNameException
  1766. // This exception is thrown when the provided trail name is not valid. Trail
  1767. // names must meet the following requirements:
  1768. //
  1769. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  1770. // (_), or dashes (-)
  1771. //
  1772. // - Start with a letter or number, and end with a letter or number
  1773. //
  1774. // - Be between 3 and 128 characters
  1775. //
  1776. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  1777. // and my--namespace are not valid.
  1778. //
  1779. // - Not be in IP address format (for example, 192.168.5.4)
  1780. //
  1781. // - ARNInvalidException
  1782. // This exception is thrown when an operation is called with a trail ARN that
  1783. // is not valid. The following is the format of a trail ARN.
  1784. //
  1785. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  1786. //
  1787. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  1788. // event data store, or channel with a resource ARN that is not valid.
  1789. //
  1790. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  1791. //
  1792. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  1793. //
  1794. // - UnsupportedOperationException
  1795. // This exception is thrown when the requested operation is not supported.
  1796. //
  1797. // - OperationNotPermittedException
  1798. // This exception is thrown when the requested operation is not permitted.
  1799. //
  1800. // - NoManagementAccountSLRExistsException
  1801. // This exception is thrown when the management account does not have a service-linked
  1802. // role.
  1803. //
  1804. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
  1805. func (c *CloudTrail) GetEventSelectors(input *GetEventSelectorsInput) (*GetEventSelectorsOutput, error) {
  1806. req, out := c.GetEventSelectorsRequest(input)
  1807. return out, req.Send()
  1808. }
  1809. // GetEventSelectorsWithContext is the same as GetEventSelectors with the addition of
  1810. // the ability to pass a context and additional request options.
  1811. //
  1812. // See GetEventSelectors for details on how to use this API operation.
  1813. //
  1814. // The context must be non-nil and will be used for request cancellation. If
  1815. // the context is nil a panic will occur. In the future the SDK may create
  1816. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1817. // for more information on using Contexts.
  1818. func (c *CloudTrail) GetEventSelectorsWithContext(ctx aws.Context, input *GetEventSelectorsInput, opts ...request.Option) (*GetEventSelectorsOutput, error) {
  1819. req, out := c.GetEventSelectorsRequest(input)
  1820. req.SetContext(ctx)
  1821. req.ApplyOptions(opts...)
  1822. return out, req.Send()
  1823. }
  1824. const opGetImport = "GetImport"
  1825. // GetImportRequest generates a "aws/request.Request" representing the
  1826. // client's request for the GetImport operation. The "output" return
  1827. // value will be populated with the request's response once the request completes
  1828. // successfully.
  1829. //
  1830. // Use "Send" method on the returned Request to send the API call to the service.
  1831. // the "output" return value is not valid until after Send returns without error.
  1832. //
  1833. // See GetImport for more information on using the GetImport
  1834. // API call, and error handling.
  1835. //
  1836. // This method is useful when you want to inject custom logic or configuration
  1837. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1838. //
  1839. // // Example sending a request using the GetImportRequest method.
  1840. // req, resp := client.GetImportRequest(params)
  1841. //
  1842. // err := req.Send()
  1843. // if err == nil { // resp is now filled
  1844. // fmt.Println(resp)
  1845. // }
  1846. //
  1847. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport
  1848. func (c *CloudTrail) GetImportRequest(input *GetImportInput) (req *request.Request, output *GetImportOutput) {
  1849. op := &request.Operation{
  1850. Name: opGetImport,
  1851. HTTPMethod: "POST",
  1852. HTTPPath: "/",
  1853. }
  1854. if input == nil {
  1855. input = &GetImportInput{}
  1856. }
  1857. output = &GetImportOutput{}
  1858. req = c.newRequest(op, input, output)
  1859. return
  1860. }
  1861. // GetImport API operation for AWS CloudTrail.
  1862. //
  1863. // Returns information about a specific import.
  1864. //
  1865. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1866. // with awserr.Error's Code and Message methods to get detailed information about
  1867. // the error.
  1868. //
  1869. // See the AWS API reference guide for AWS CloudTrail's
  1870. // API operation GetImport for usage and error information.
  1871. //
  1872. // Returned Error Types:
  1873. //
  1874. // - ImportNotFoundException
  1875. // The specified import was not found.
  1876. //
  1877. // - InvalidParameterException
  1878. // The request includes a parameter that is not valid.
  1879. //
  1880. // - OperationNotPermittedException
  1881. // This exception is thrown when the requested operation is not permitted.
  1882. //
  1883. // - UnsupportedOperationException
  1884. // This exception is thrown when the requested operation is not supported.
  1885. //
  1886. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport
  1887. func (c *CloudTrail) GetImport(input *GetImportInput) (*GetImportOutput, error) {
  1888. req, out := c.GetImportRequest(input)
  1889. return out, req.Send()
  1890. }
  1891. // GetImportWithContext is the same as GetImport with the addition of
  1892. // the ability to pass a context and additional request options.
  1893. //
  1894. // See GetImport for details on how to use this API operation.
  1895. //
  1896. // The context must be non-nil and will be used for request cancellation. If
  1897. // the context is nil a panic will occur. In the future the SDK may create
  1898. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1899. // for more information on using Contexts.
  1900. func (c *CloudTrail) GetImportWithContext(ctx aws.Context, input *GetImportInput, opts ...request.Option) (*GetImportOutput, error) {
  1901. req, out := c.GetImportRequest(input)
  1902. req.SetContext(ctx)
  1903. req.ApplyOptions(opts...)
  1904. return out, req.Send()
  1905. }
  1906. const opGetInsightSelectors = "GetInsightSelectors"
  1907. // GetInsightSelectorsRequest generates a "aws/request.Request" representing the
  1908. // client's request for the GetInsightSelectors operation. The "output" return
  1909. // value will be populated with the request's response once the request completes
  1910. // successfully.
  1911. //
  1912. // Use "Send" method on the returned Request to send the API call to the service.
  1913. // the "output" return value is not valid until after Send returns without error.
  1914. //
  1915. // See GetInsightSelectors for more information on using the GetInsightSelectors
  1916. // API call, and error handling.
  1917. //
  1918. // This method is useful when you want to inject custom logic or configuration
  1919. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1920. //
  1921. // // Example sending a request using the GetInsightSelectorsRequest method.
  1922. // req, resp := client.GetInsightSelectorsRequest(params)
  1923. //
  1924. // err := req.Send()
  1925. // if err == nil { // resp is now filled
  1926. // fmt.Println(resp)
  1927. // }
  1928. //
  1929. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors
  1930. func (c *CloudTrail) GetInsightSelectorsRequest(input *GetInsightSelectorsInput) (req *request.Request, output *GetInsightSelectorsOutput) {
  1931. op := &request.Operation{
  1932. Name: opGetInsightSelectors,
  1933. HTTPMethod: "POST",
  1934. HTTPPath: "/",
  1935. }
  1936. if input == nil {
  1937. input = &GetInsightSelectorsInput{}
  1938. }
  1939. output = &GetInsightSelectorsOutput{}
  1940. req = c.newRequest(op, input, output)
  1941. return
  1942. }
  1943. // GetInsightSelectors API operation for AWS CloudTrail.
  1944. //
  1945. // Describes the settings for the Insights event selectors that you configured
  1946. // for your trail. GetInsightSelectors shows if CloudTrail Insights event logging
  1947. // is enabled on the trail, and if it is, which insight types are enabled. If
  1948. // you run GetInsightSelectors on a trail that does not have Insights events
  1949. // enabled, the operation throws the exception InsightNotEnabledException
  1950. //
  1951. // For more information, see Logging CloudTrail Insights Events for Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html)
  1952. // in the CloudTrail User Guide.
  1953. //
  1954. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1955. // with awserr.Error's Code and Message methods to get detailed information about
  1956. // the error.
  1957. //
  1958. // See the AWS API reference guide for AWS CloudTrail's
  1959. // API operation GetInsightSelectors for usage and error information.
  1960. //
  1961. // Returned Error Types:
  1962. //
  1963. // - TrailNotFoundException
  1964. // This exception is thrown when the trail with the given name is not found.
  1965. //
  1966. // - InvalidTrailNameException
  1967. // This exception is thrown when the provided trail name is not valid. Trail
  1968. // names must meet the following requirements:
  1969. //
  1970. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  1971. // (_), or dashes (-)
  1972. //
  1973. // - Start with a letter or number, and end with a letter or number
  1974. //
  1975. // - Be between 3 and 128 characters
  1976. //
  1977. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  1978. // and my--namespace are not valid.
  1979. //
  1980. // - Not be in IP address format (for example, 192.168.5.4)
  1981. //
  1982. // - ARNInvalidException
  1983. // This exception is thrown when an operation is called with a trail ARN that
  1984. // is not valid. The following is the format of a trail ARN.
  1985. //
  1986. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  1987. //
  1988. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  1989. // event data store, or channel with a resource ARN that is not valid.
  1990. //
  1991. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  1992. //
  1993. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  1994. //
  1995. // - UnsupportedOperationException
  1996. // This exception is thrown when the requested operation is not supported.
  1997. //
  1998. // - OperationNotPermittedException
  1999. // This exception is thrown when the requested operation is not permitted.
  2000. //
  2001. // - InsightNotEnabledException
  2002. // If you run GetInsightSelectors on a trail that does not have Insights events
  2003. // enabled, the operation throws the exception InsightNotEnabledException.
  2004. //
  2005. // - NoManagementAccountSLRExistsException
  2006. // This exception is thrown when the management account does not have a service-linked
  2007. // role.
  2008. //
  2009. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors
  2010. func (c *CloudTrail) GetInsightSelectors(input *GetInsightSelectorsInput) (*GetInsightSelectorsOutput, error) {
  2011. req, out := c.GetInsightSelectorsRequest(input)
  2012. return out, req.Send()
  2013. }
  2014. // GetInsightSelectorsWithContext is the same as GetInsightSelectors with the addition of
  2015. // the ability to pass a context and additional request options.
  2016. //
  2017. // See GetInsightSelectors for details on how to use this API operation.
  2018. //
  2019. // The context must be non-nil and will be used for request cancellation. If
  2020. // the context is nil a panic will occur. In the future the SDK may create
  2021. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2022. // for more information on using Contexts.
  2023. func (c *CloudTrail) GetInsightSelectorsWithContext(ctx aws.Context, input *GetInsightSelectorsInput, opts ...request.Option) (*GetInsightSelectorsOutput, error) {
  2024. req, out := c.GetInsightSelectorsRequest(input)
  2025. req.SetContext(ctx)
  2026. req.ApplyOptions(opts...)
  2027. return out, req.Send()
  2028. }
  2029. const opGetQueryResults = "GetQueryResults"
  2030. // GetQueryResultsRequest generates a "aws/request.Request" representing the
  2031. // client's request for the GetQueryResults operation. The "output" return
  2032. // value will be populated with the request's response once the request completes
  2033. // successfully.
  2034. //
  2035. // Use "Send" method on the returned Request to send the API call to the service.
  2036. // the "output" return value is not valid until after Send returns without error.
  2037. //
  2038. // See GetQueryResults for more information on using the GetQueryResults
  2039. // API call, and error handling.
  2040. //
  2041. // This method is useful when you want to inject custom logic or configuration
  2042. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2043. //
  2044. // // Example sending a request using the GetQueryResultsRequest method.
  2045. // req, resp := client.GetQueryResultsRequest(params)
  2046. //
  2047. // err := req.Send()
  2048. // if err == nil { // resp is now filled
  2049. // fmt.Println(resp)
  2050. // }
  2051. //
  2052. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults
  2053. func (c *CloudTrail) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) {
  2054. op := &request.Operation{
  2055. Name: opGetQueryResults,
  2056. HTTPMethod: "POST",
  2057. HTTPPath: "/",
  2058. Paginator: &request.Paginator{
  2059. InputTokens: []string{"NextToken"},
  2060. OutputTokens: []string{"NextToken"},
  2061. LimitToken: "",
  2062. TruncationToken: "",
  2063. },
  2064. }
  2065. if input == nil {
  2066. input = &GetQueryResultsInput{}
  2067. }
  2068. output = &GetQueryResultsOutput{}
  2069. req = c.newRequest(op, input, output)
  2070. return
  2071. }
  2072. // GetQueryResults API operation for AWS CloudTrail.
  2073. //
  2074. // Gets event data results of a query. You must specify the QueryID value returned
  2075. // by the StartQuery operation, and an ARN for EventDataStore.
  2076. //
  2077. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2078. // with awserr.Error's Code and Message methods to get detailed information about
  2079. // the error.
  2080. //
  2081. // See the AWS API reference guide for AWS CloudTrail's
  2082. // API operation GetQueryResults for usage and error information.
  2083. //
  2084. // Returned Error Types:
  2085. //
  2086. // - EventDataStoreARNInvalidException
  2087. // The specified event data store ARN is not valid or does not map to an event
  2088. // data store in your account.
  2089. //
  2090. // - EventDataStoreNotFoundException
  2091. // The specified event data store was not found.
  2092. //
  2093. // - InactiveEventDataStoreException
  2094. // The event data store is inactive.
  2095. //
  2096. // - InvalidMaxResultsException
  2097. // This exception is thrown if the limit specified is not valid.
  2098. //
  2099. // - InvalidNextTokenException
  2100. // A token that is not valid, or a token that was previously used in a request
  2101. // with different parameters. This exception is thrown if the token is not valid.
  2102. //
  2103. // - InvalidParameterException
  2104. // The request includes a parameter that is not valid.
  2105. //
  2106. // - QueryIdNotFoundException
  2107. // The query ID does not exist or does not map to a query.
  2108. //
  2109. // - InsufficientEncryptionPolicyException
  2110. // This exception is thrown when the policy on the S3 bucket or KMS key does
  2111. // not have sufficient permissions for the operation.
  2112. //
  2113. // - OperationNotPermittedException
  2114. // This exception is thrown when the requested operation is not permitted.
  2115. //
  2116. // - UnsupportedOperationException
  2117. // This exception is thrown when the requested operation is not supported.
  2118. //
  2119. // - NoManagementAccountSLRExistsException
  2120. // This exception is thrown when the management account does not have a service-linked
  2121. // role.
  2122. //
  2123. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults
  2124. func (c *CloudTrail) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) {
  2125. req, out := c.GetQueryResultsRequest(input)
  2126. return out, req.Send()
  2127. }
  2128. // GetQueryResultsWithContext is the same as GetQueryResults with the addition of
  2129. // the ability to pass a context and additional request options.
  2130. //
  2131. // See GetQueryResults for details on how to use this API operation.
  2132. //
  2133. // The context must be non-nil and will be used for request cancellation. If
  2134. // the context is nil a panic will occur. In the future the SDK may create
  2135. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2136. // for more information on using Contexts.
  2137. func (c *CloudTrail) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) {
  2138. req, out := c.GetQueryResultsRequest(input)
  2139. req.SetContext(ctx)
  2140. req.ApplyOptions(opts...)
  2141. return out, req.Send()
  2142. }
  2143. // GetQueryResultsPages iterates over the pages of a GetQueryResults operation,
  2144. // calling the "fn" function with the response data for each page. To stop
  2145. // iterating, return false from the fn function.
  2146. //
  2147. // See GetQueryResults method for more information on how to use this operation.
  2148. //
  2149. // Note: This operation can generate multiple requests to a service.
  2150. //
  2151. // // Example iterating over at most 3 pages of a GetQueryResults operation.
  2152. // pageNum := 0
  2153. // err := client.GetQueryResultsPages(params,
  2154. // func(page *cloudtrail.GetQueryResultsOutput, lastPage bool) bool {
  2155. // pageNum++
  2156. // fmt.Println(page)
  2157. // return pageNum <= 3
  2158. // })
  2159. func (c *CloudTrail) GetQueryResultsPages(input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool) error {
  2160. return c.GetQueryResultsPagesWithContext(aws.BackgroundContext(), input, fn)
  2161. }
  2162. // GetQueryResultsPagesWithContext same as GetQueryResultsPages except
  2163. // it takes a Context and allows setting request options on the pages.
  2164. //
  2165. // The context must be non-nil and will be used for request cancellation. If
  2166. // the context is nil a panic will occur. In the future the SDK may create
  2167. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2168. // for more information on using Contexts.
  2169. func (c *CloudTrail) GetQueryResultsPagesWithContext(ctx aws.Context, input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool, opts ...request.Option) error {
  2170. p := request.Pagination{
  2171. NewRequest: func() (*request.Request, error) {
  2172. var inCpy *GetQueryResultsInput
  2173. if input != nil {
  2174. tmp := *input
  2175. inCpy = &tmp
  2176. }
  2177. req, _ := c.GetQueryResultsRequest(inCpy)
  2178. req.SetContext(ctx)
  2179. req.ApplyOptions(opts...)
  2180. return req, nil
  2181. },
  2182. }
  2183. for p.Next() {
  2184. if !fn(p.Page().(*GetQueryResultsOutput), !p.HasNextPage()) {
  2185. break
  2186. }
  2187. }
  2188. return p.Err()
  2189. }
  2190. const opGetResourcePolicy = "GetResourcePolicy"
  2191. // GetResourcePolicyRequest generates a "aws/request.Request" representing the
  2192. // client's request for the GetResourcePolicy operation. The "output" return
  2193. // value will be populated with the request's response once the request completes
  2194. // successfully.
  2195. //
  2196. // Use "Send" method on the returned Request to send the API call to the service.
  2197. // the "output" return value is not valid until after Send returns without error.
  2198. //
  2199. // See GetResourcePolicy for more information on using the GetResourcePolicy
  2200. // API call, and error handling.
  2201. //
  2202. // This method is useful when you want to inject custom logic or configuration
  2203. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2204. //
  2205. // // Example sending a request using the GetResourcePolicyRequest method.
  2206. // req, resp := client.GetResourcePolicyRequest(params)
  2207. //
  2208. // err := req.Send()
  2209. // if err == nil { // resp is now filled
  2210. // fmt.Println(resp)
  2211. // }
  2212. //
  2213. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy
  2214. func (c *CloudTrail) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) {
  2215. op := &request.Operation{
  2216. Name: opGetResourcePolicy,
  2217. HTTPMethod: "POST",
  2218. HTTPPath: "/",
  2219. }
  2220. if input == nil {
  2221. input = &GetResourcePolicyInput{}
  2222. }
  2223. output = &GetResourcePolicyOutput{}
  2224. req = c.newRequest(op, input, output)
  2225. return
  2226. }
  2227. // GetResourcePolicy API operation for AWS CloudTrail.
  2228. //
  2229. // Retrieves the JSON text of the resource-based policy document attached to
  2230. // the CloudTrail channel.
  2231. //
  2232. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2233. // with awserr.Error's Code and Message methods to get detailed information about
  2234. // the error.
  2235. //
  2236. // See the AWS API reference guide for AWS CloudTrail's
  2237. // API operation GetResourcePolicy for usage and error information.
  2238. //
  2239. // Returned Error Types:
  2240. //
  2241. // - ResourceARNNotValidException
  2242. // This exception is thrown when the provided resource does not exist, or the
  2243. // ARN format of the resource is not valid. The following is the valid format
  2244. // for a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
  2245. //
  2246. // - ResourceNotFoundException
  2247. // This exception is thrown when the specified resource is not found.
  2248. //
  2249. // - ResourcePolicyNotFoundException
  2250. // This exception is thrown when the specified resource policy is not found.
  2251. //
  2252. // - ResourceTypeNotSupportedException
  2253. // This exception is thrown when the specified resource type is not supported
  2254. // by CloudTrail.
  2255. //
  2256. // - OperationNotPermittedException
  2257. // This exception is thrown when the requested operation is not permitted.
  2258. //
  2259. // - UnsupportedOperationException
  2260. // This exception is thrown when the requested operation is not supported.
  2261. //
  2262. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy
  2263. func (c *CloudTrail) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) {
  2264. req, out := c.GetResourcePolicyRequest(input)
  2265. return out, req.Send()
  2266. }
  2267. // GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of
  2268. // the ability to pass a context and additional request options.
  2269. //
  2270. // See GetResourcePolicy for details on how to use this API operation.
  2271. //
  2272. // The context must be non-nil and will be used for request cancellation. If
  2273. // the context is nil a panic will occur. In the future the SDK may create
  2274. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2275. // for more information on using Contexts.
  2276. func (c *CloudTrail) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) {
  2277. req, out := c.GetResourcePolicyRequest(input)
  2278. req.SetContext(ctx)
  2279. req.ApplyOptions(opts...)
  2280. return out, req.Send()
  2281. }
  2282. const opGetTrail = "GetTrail"
  2283. // GetTrailRequest generates a "aws/request.Request" representing the
  2284. // client's request for the GetTrail operation. The "output" return
  2285. // value will be populated with the request's response once the request completes
  2286. // successfully.
  2287. //
  2288. // Use "Send" method on the returned Request to send the API call to the service.
  2289. // the "output" return value is not valid until after Send returns without error.
  2290. //
  2291. // See GetTrail for more information on using the GetTrail
  2292. // API call, and error handling.
  2293. //
  2294. // This method is useful when you want to inject custom logic or configuration
  2295. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2296. //
  2297. // // Example sending a request using the GetTrailRequest method.
  2298. // req, resp := client.GetTrailRequest(params)
  2299. //
  2300. // err := req.Send()
  2301. // if err == nil { // resp is now filled
  2302. // fmt.Println(resp)
  2303. // }
  2304. //
  2305. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail
  2306. func (c *CloudTrail) GetTrailRequest(input *GetTrailInput) (req *request.Request, output *GetTrailOutput) {
  2307. op := &request.Operation{
  2308. Name: opGetTrail,
  2309. HTTPMethod: "POST",
  2310. HTTPPath: "/",
  2311. }
  2312. if input == nil {
  2313. input = &GetTrailInput{}
  2314. }
  2315. output = &GetTrailOutput{}
  2316. req = c.newRequest(op, input, output)
  2317. return
  2318. }
  2319. // GetTrail API operation for AWS CloudTrail.
  2320. //
  2321. // Returns settings information for a specified trail.
  2322. //
  2323. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2324. // with awserr.Error's Code and Message methods to get detailed information about
  2325. // the error.
  2326. //
  2327. // See the AWS API reference guide for AWS CloudTrail's
  2328. // API operation GetTrail for usage and error information.
  2329. //
  2330. // Returned Error Types:
  2331. //
  2332. // - ARNInvalidException
  2333. // This exception is thrown when an operation is called with a trail ARN that
  2334. // is not valid. The following is the format of a trail ARN.
  2335. //
  2336. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  2337. //
  2338. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  2339. // event data store, or channel with a resource ARN that is not valid.
  2340. //
  2341. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  2342. //
  2343. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  2344. //
  2345. // - TrailNotFoundException
  2346. // This exception is thrown when the trail with the given name is not found.
  2347. //
  2348. // - InvalidTrailNameException
  2349. // This exception is thrown when the provided trail name is not valid. Trail
  2350. // names must meet the following requirements:
  2351. //
  2352. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  2353. // (_), or dashes (-)
  2354. //
  2355. // - Start with a letter or number, and end with a letter or number
  2356. //
  2357. // - Be between 3 and 128 characters
  2358. //
  2359. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  2360. // and my--namespace are not valid.
  2361. //
  2362. // - Not be in IP address format (for example, 192.168.5.4)
  2363. //
  2364. // - UnsupportedOperationException
  2365. // This exception is thrown when the requested operation is not supported.
  2366. //
  2367. // - OperationNotPermittedException
  2368. // This exception is thrown when the requested operation is not permitted.
  2369. //
  2370. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail
  2371. func (c *CloudTrail) GetTrail(input *GetTrailInput) (*GetTrailOutput, error) {
  2372. req, out := c.GetTrailRequest(input)
  2373. return out, req.Send()
  2374. }
  2375. // GetTrailWithContext is the same as GetTrail with the addition of
  2376. // the ability to pass a context and additional request options.
  2377. //
  2378. // See GetTrail for details on how to use this API operation.
  2379. //
  2380. // The context must be non-nil and will be used for request cancellation. If
  2381. // the context is nil a panic will occur. In the future the SDK may create
  2382. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2383. // for more information on using Contexts.
  2384. func (c *CloudTrail) GetTrailWithContext(ctx aws.Context, input *GetTrailInput, opts ...request.Option) (*GetTrailOutput, error) {
  2385. req, out := c.GetTrailRequest(input)
  2386. req.SetContext(ctx)
  2387. req.ApplyOptions(opts...)
  2388. return out, req.Send()
  2389. }
  2390. const opGetTrailStatus = "GetTrailStatus"
  2391. // GetTrailStatusRequest generates a "aws/request.Request" representing the
  2392. // client's request for the GetTrailStatus operation. The "output" return
  2393. // value will be populated with the request's response once the request completes
  2394. // successfully.
  2395. //
  2396. // Use "Send" method on the returned Request to send the API call to the service.
  2397. // the "output" return value is not valid until after Send returns without error.
  2398. //
  2399. // See GetTrailStatus for more information on using the GetTrailStatus
  2400. // API call, and error handling.
  2401. //
  2402. // This method is useful when you want to inject custom logic or configuration
  2403. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2404. //
  2405. // // Example sending a request using the GetTrailStatusRequest method.
  2406. // req, resp := client.GetTrailStatusRequest(params)
  2407. //
  2408. // err := req.Send()
  2409. // if err == nil { // resp is now filled
  2410. // fmt.Println(resp)
  2411. // }
  2412. //
  2413. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
  2414. func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput) {
  2415. op := &request.Operation{
  2416. Name: opGetTrailStatus,
  2417. HTTPMethod: "POST",
  2418. HTTPPath: "/",
  2419. }
  2420. if input == nil {
  2421. input = &GetTrailStatusInput{}
  2422. }
  2423. output = &GetTrailStatusOutput{}
  2424. req = c.newRequest(op, input, output)
  2425. return
  2426. }
  2427. // GetTrailStatus API operation for AWS CloudTrail.
  2428. //
  2429. // Returns a JSON-formatted list of information about the specified trail. Fields
  2430. // include information on delivery errors, Amazon SNS and Amazon S3 errors,
  2431. // and start and stop logging times for each trail. This operation returns trail
  2432. // status from a single region. To return trail status from all regions, you
  2433. // must call the operation on each region.
  2434. //
  2435. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2436. // with awserr.Error's Code and Message methods to get detailed information about
  2437. // the error.
  2438. //
  2439. // See the AWS API reference guide for AWS CloudTrail's
  2440. // API operation GetTrailStatus for usage and error information.
  2441. //
  2442. // Returned Error Types:
  2443. //
  2444. // - ARNInvalidException
  2445. // This exception is thrown when an operation is called with a trail ARN that
  2446. // is not valid. The following is the format of a trail ARN.
  2447. //
  2448. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  2449. //
  2450. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  2451. // event data store, or channel with a resource ARN that is not valid.
  2452. //
  2453. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  2454. //
  2455. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  2456. //
  2457. // - TrailNotFoundException
  2458. // This exception is thrown when the trail with the given name is not found.
  2459. //
  2460. // - InvalidTrailNameException
  2461. // This exception is thrown when the provided trail name is not valid. Trail
  2462. // names must meet the following requirements:
  2463. //
  2464. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  2465. // (_), or dashes (-)
  2466. //
  2467. // - Start with a letter or number, and end with a letter or number
  2468. //
  2469. // - Be between 3 and 128 characters
  2470. //
  2471. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  2472. // and my--namespace are not valid.
  2473. //
  2474. // - Not be in IP address format (for example, 192.168.5.4)
  2475. //
  2476. // - UnsupportedOperationException
  2477. // This exception is thrown when the requested operation is not supported.
  2478. //
  2479. // - OperationNotPermittedException
  2480. // This exception is thrown when the requested operation is not permitted.
  2481. //
  2482. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
  2483. func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error) {
  2484. req, out := c.GetTrailStatusRequest(input)
  2485. return out, req.Send()
  2486. }
  2487. // GetTrailStatusWithContext is the same as GetTrailStatus with the addition of
  2488. // the ability to pass a context and additional request options.
  2489. //
  2490. // See GetTrailStatus for details on how to use this API operation.
  2491. //
  2492. // The context must be non-nil and will be used for request cancellation. If
  2493. // the context is nil a panic will occur. In the future the SDK may create
  2494. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2495. // for more information on using Contexts.
  2496. func (c *CloudTrail) GetTrailStatusWithContext(ctx aws.Context, input *GetTrailStatusInput, opts ...request.Option) (*GetTrailStatusOutput, error) {
  2497. req, out := c.GetTrailStatusRequest(input)
  2498. req.SetContext(ctx)
  2499. req.ApplyOptions(opts...)
  2500. return out, req.Send()
  2501. }
  2502. const opListChannels = "ListChannels"
  2503. // ListChannelsRequest generates a "aws/request.Request" representing the
  2504. // client's request for the ListChannels operation. The "output" return
  2505. // value will be populated with the request's response once the request completes
  2506. // successfully.
  2507. //
  2508. // Use "Send" method on the returned Request to send the API call to the service.
  2509. // the "output" return value is not valid until after Send returns without error.
  2510. //
  2511. // See ListChannels for more information on using the ListChannels
  2512. // API call, and error handling.
  2513. //
  2514. // This method is useful when you want to inject custom logic or configuration
  2515. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2516. //
  2517. // // Example sending a request using the ListChannelsRequest method.
  2518. // req, resp := client.ListChannelsRequest(params)
  2519. //
  2520. // err := req.Send()
  2521. // if err == nil { // resp is now filled
  2522. // fmt.Println(resp)
  2523. // }
  2524. //
  2525. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels
  2526. func (c *CloudTrail) ListChannelsRequest(input *ListChannelsInput) (req *request.Request, output *ListChannelsOutput) {
  2527. op := &request.Operation{
  2528. Name: opListChannels,
  2529. HTTPMethod: "POST",
  2530. HTTPPath: "/",
  2531. Paginator: &request.Paginator{
  2532. InputTokens: []string{"NextToken"},
  2533. OutputTokens: []string{"NextToken"},
  2534. LimitToken: "MaxResults",
  2535. TruncationToken: "",
  2536. },
  2537. }
  2538. if input == nil {
  2539. input = &ListChannelsInput{}
  2540. }
  2541. output = &ListChannelsOutput{}
  2542. req = c.newRequest(op, input, output)
  2543. return
  2544. }
  2545. // ListChannels API operation for AWS CloudTrail.
  2546. //
  2547. // Lists the channels in the current account, and their source names.
  2548. //
  2549. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2550. // with awserr.Error's Code and Message methods to get detailed information about
  2551. // the error.
  2552. //
  2553. // See the AWS API reference guide for AWS CloudTrail's
  2554. // API operation ListChannels for usage and error information.
  2555. //
  2556. // Returned Error Types:
  2557. //
  2558. // - InvalidNextTokenException
  2559. // A token that is not valid, or a token that was previously used in a request
  2560. // with different parameters. This exception is thrown if the token is not valid.
  2561. //
  2562. // - OperationNotPermittedException
  2563. // This exception is thrown when the requested operation is not permitted.
  2564. //
  2565. // - UnsupportedOperationException
  2566. // This exception is thrown when the requested operation is not supported.
  2567. //
  2568. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels
  2569. func (c *CloudTrail) ListChannels(input *ListChannelsInput) (*ListChannelsOutput, error) {
  2570. req, out := c.ListChannelsRequest(input)
  2571. return out, req.Send()
  2572. }
  2573. // ListChannelsWithContext is the same as ListChannels with the addition of
  2574. // the ability to pass a context and additional request options.
  2575. //
  2576. // See ListChannels for details on how to use this API operation.
  2577. //
  2578. // The context must be non-nil and will be used for request cancellation. If
  2579. // the context is nil a panic will occur. In the future the SDK may create
  2580. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2581. // for more information on using Contexts.
  2582. func (c *CloudTrail) ListChannelsWithContext(ctx aws.Context, input *ListChannelsInput, opts ...request.Option) (*ListChannelsOutput, error) {
  2583. req, out := c.ListChannelsRequest(input)
  2584. req.SetContext(ctx)
  2585. req.ApplyOptions(opts...)
  2586. return out, req.Send()
  2587. }
  2588. // ListChannelsPages iterates over the pages of a ListChannels operation,
  2589. // calling the "fn" function with the response data for each page. To stop
  2590. // iterating, return false from the fn function.
  2591. //
  2592. // See ListChannels method for more information on how to use this operation.
  2593. //
  2594. // Note: This operation can generate multiple requests to a service.
  2595. //
  2596. // // Example iterating over at most 3 pages of a ListChannels operation.
  2597. // pageNum := 0
  2598. // err := client.ListChannelsPages(params,
  2599. // func(page *cloudtrail.ListChannelsOutput, lastPage bool) bool {
  2600. // pageNum++
  2601. // fmt.Println(page)
  2602. // return pageNum <= 3
  2603. // })
  2604. func (c *CloudTrail) ListChannelsPages(input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool) error {
  2605. return c.ListChannelsPagesWithContext(aws.BackgroundContext(), input, fn)
  2606. }
  2607. // ListChannelsPagesWithContext same as ListChannelsPages except
  2608. // it takes a Context and allows setting request options on the pages.
  2609. //
  2610. // The context must be non-nil and will be used for request cancellation. If
  2611. // the context is nil a panic will occur. In the future the SDK may create
  2612. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2613. // for more information on using Contexts.
  2614. func (c *CloudTrail) ListChannelsPagesWithContext(ctx aws.Context, input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool, opts ...request.Option) error {
  2615. p := request.Pagination{
  2616. NewRequest: func() (*request.Request, error) {
  2617. var inCpy *ListChannelsInput
  2618. if input != nil {
  2619. tmp := *input
  2620. inCpy = &tmp
  2621. }
  2622. req, _ := c.ListChannelsRequest(inCpy)
  2623. req.SetContext(ctx)
  2624. req.ApplyOptions(opts...)
  2625. return req, nil
  2626. },
  2627. }
  2628. for p.Next() {
  2629. if !fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) {
  2630. break
  2631. }
  2632. }
  2633. return p.Err()
  2634. }
  2635. const opListEventDataStores = "ListEventDataStores"
  2636. // ListEventDataStoresRequest generates a "aws/request.Request" representing the
  2637. // client's request for the ListEventDataStores operation. The "output" return
  2638. // value will be populated with the request's response once the request completes
  2639. // successfully.
  2640. //
  2641. // Use "Send" method on the returned Request to send the API call to the service.
  2642. // the "output" return value is not valid until after Send returns without error.
  2643. //
  2644. // See ListEventDataStores for more information on using the ListEventDataStores
  2645. // API call, and error handling.
  2646. //
  2647. // This method is useful when you want to inject custom logic or configuration
  2648. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2649. //
  2650. // // Example sending a request using the ListEventDataStoresRequest method.
  2651. // req, resp := client.ListEventDataStoresRequest(params)
  2652. //
  2653. // err := req.Send()
  2654. // if err == nil { // resp is now filled
  2655. // fmt.Println(resp)
  2656. // }
  2657. //
  2658. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores
  2659. func (c *CloudTrail) ListEventDataStoresRequest(input *ListEventDataStoresInput) (req *request.Request, output *ListEventDataStoresOutput) {
  2660. op := &request.Operation{
  2661. Name: opListEventDataStores,
  2662. HTTPMethod: "POST",
  2663. HTTPPath: "/",
  2664. Paginator: &request.Paginator{
  2665. InputTokens: []string{"NextToken"},
  2666. OutputTokens: []string{"NextToken"},
  2667. LimitToken: "MaxResults",
  2668. TruncationToken: "",
  2669. },
  2670. }
  2671. if input == nil {
  2672. input = &ListEventDataStoresInput{}
  2673. }
  2674. output = &ListEventDataStoresOutput{}
  2675. req = c.newRequest(op, input, output)
  2676. return
  2677. }
  2678. // ListEventDataStores API operation for AWS CloudTrail.
  2679. //
  2680. // Returns information about all event data stores in the account, in the current
  2681. // region.
  2682. //
  2683. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2684. // with awserr.Error's Code and Message methods to get detailed information about
  2685. // the error.
  2686. //
  2687. // See the AWS API reference guide for AWS CloudTrail's
  2688. // API operation ListEventDataStores for usage and error information.
  2689. //
  2690. // Returned Error Types:
  2691. //
  2692. // - InvalidMaxResultsException
  2693. // This exception is thrown if the limit specified is not valid.
  2694. //
  2695. // - InvalidNextTokenException
  2696. // A token that is not valid, or a token that was previously used in a request
  2697. // with different parameters. This exception is thrown if the token is not valid.
  2698. //
  2699. // - OperationNotPermittedException
  2700. // This exception is thrown when the requested operation is not permitted.
  2701. //
  2702. // - UnsupportedOperationException
  2703. // This exception is thrown when the requested operation is not supported.
  2704. //
  2705. // - NoManagementAccountSLRExistsException
  2706. // This exception is thrown when the management account does not have a service-linked
  2707. // role.
  2708. //
  2709. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores
  2710. func (c *CloudTrail) ListEventDataStores(input *ListEventDataStoresInput) (*ListEventDataStoresOutput, error) {
  2711. req, out := c.ListEventDataStoresRequest(input)
  2712. return out, req.Send()
  2713. }
  2714. // ListEventDataStoresWithContext is the same as ListEventDataStores with the addition of
  2715. // the ability to pass a context and additional request options.
  2716. //
  2717. // See ListEventDataStores for details on how to use this API operation.
  2718. //
  2719. // The context must be non-nil and will be used for request cancellation. If
  2720. // the context is nil a panic will occur. In the future the SDK may create
  2721. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2722. // for more information on using Contexts.
  2723. func (c *CloudTrail) ListEventDataStoresWithContext(ctx aws.Context, input *ListEventDataStoresInput, opts ...request.Option) (*ListEventDataStoresOutput, error) {
  2724. req, out := c.ListEventDataStoresRequest(input)
  2725. req.SetContext(ctx)
  2726. req.ApplyOptions(opts...)
  2727. return out, req.Send()
  2728. }
  2729. // ListEventDataStoresPages iterates over the pages of a ListEventDataStores operation,
  2730. // calling the "fn" function with the response data for each page. To stop
  2731. // iterating, return false from the fn function.
  2732. //
  2733. // See ListEventDataStores method for more information on how to use this operation.
  2734. //
  2735. // Note: This operation can generate multiple requests to a service.
  2736. //
  2737. // // Example iterating over at most 3 pages of a ListEventDataStores operation.
  2738. // pageNum := 0
  2739. // err := client.ListEventDataStoresPages(params,
  2740. // func(page *cloudtrail.ListEventDataStoresOutput, lastPage bool) bool {
  2741. // pageNum++
  2742. // fmt.Println(page)
  2743. // return pageNum <= 3
  2744. // })
  2745. func (c *CloudTrail) ListEventDataStoresPages(input *ListEventDataStoresInput, fn func(*ListEventDataStoresOutput, bool) bool) error {
  2746. return c.ListEventDataStoresPagesWithContext(aws.BackgroundContext(), input, fn)
  2747. }
  2748. // ListEventDataStoresPagesWithContext same as ListEventDataStoresPages except
  2749. // it takes a Context and allows setting request options on the pages.
  2750. //
  2751. // The context must be non-nil and will be used for request cancellation. If
  2752. // the context is nil a panic will occur. In the future the SDK may create
  2753. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2754. // for more information on using Contexts.
  2755. func (c *CloudTrail) ListEventDataStoresPagesWithContext(ctx aws.Context, input *ListEventDataStoresInput, fn func(*ListEventDataStoresOutput, bool) bool, opts ...request.Option) error {
  2756. p := request.Pagination{
  2757. NewRequest: func() (*request.Request, error) {
  2758. var inCpy *ListEventDataStoresInput
  2759. if input != nil {
  2760. tmp := *input
  2761. inCpy = &tmp
  2762. }
  2763. req, _ := c.ListEventDataStoresRequest(inCpy)
  2764. req.SetContext(ctx)
  2765. req.ApplyOptions(opts...)
  2766. return req, nil
  2767. },
  2768. }
  2769. for p.Next() {
  2770. if !fn(p.Page().(*ListEventDataStoresOutput), !p.HasNextPage()) {
  2771. break
  2772. }
  2773. }
  2774. return p.Err()
  2775. }
  2776. const opListImportFailures = "ListImportFailures"
  2777. // ListImportFailuresRequest generates a "aws/request.Request" representing the
  2778. // client's request for the ListImportFailures operation. The "output" return
  2779. // value will be populated with the request's response once the request completes
  2780. // successfully.
  2781. //
  2782. // Use "Send" method on the returned Request to send the API call to the service.
  2783. // the "output" return value is not valid until after Send returns without error.
  2784. //
  2785. // See ListImportFailures for more information on using the ListImportFailures
  2786. // API call, and error handling.
  2787. //
  2788. // This method is useful when you want to inject custom logic or configuration
  2789. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2790. //
  2791. // // Example sending a request using the ListImportFailuresRequest method.
  2792. // req, resp := client.ListImportFailuresRequest(params)
  2793. //
  2794. // err := req.Send()
  2795. // if err == nil { // resp is now filled
  2796. // fmt.Println(resp)
  2797. // }
  2798. //
  2799. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures
  2800. func (c *CloudTrail) ListImportFailuresRequest(input *ListImportFailuresInput) (req *request.Request, output *ListImportFailuresOutput) {
  2801. op := &request.Operation{
  2802. Name: opListImportFailures,
  2803. HTTPMethod: "POST",
  2804. HTTPPath: "/",
  2805. Paginator: &request.Paginator{
  2806. InputTokens: []string{"NextToken"},
  2807. OutputTokens: []string{"NextToken"},
  2808. LimitToken: "MaxResults",
  2809. TruncationToken: "",
  2810. },
  2811. }
  2812. if input == nil {
  2813. input = &ListImportFailuresInput{}
  2814. }
  2815. output = &ListImportFailuresOutput{}
  2816. req = c.newRequest(op, input, output)
  2817. return
  2818. }
  2819. // ListImportFailures API operation for AWS CloudTrail.
  2820. //
  2821. // Returns a list of failures for the specified import.
  2822. //
  2823. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2824. // with awserr.Error's Code and Message methods to get detailed information about
  2825. // the error.
  2826. //
  2827. // See the AWS API reference guide for AWS CloudTrail's
  2828. // API operation ListImportFailures for usage and error information.
  2829. //
  2830. // Returned Error Types:
  2831. //
  2832. // - InvalidNextTokenException
  2833. // A token that is not valid, or a token that was previously used in a request
  2834. // with different parameters. This exception is thrown if the token is not valid.
  2835. //
  2836. // - OperationNotPermittedException
  2837. // This exception is thrown when the requested operation is not permitted.
  2838. //
  2839. // - UnsupportedOperationException
  2840. // This exception is thrown when the requested operation is not supported.
  2841. //
  2842. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures
  2843. func (c *CloudTrail) ListImportFailures(input *ListImportFailuresInput) (*ListImportFailuresOutput, error) {
  2844. req, out := c.ListImportFailuresRequest(input)
  2845. return out, req.Send()
  2846. }
  2847. // ListImportFailuresWithContext is the same as ListImportFailures with the addition of
  2848. // the ability to pass a context and additional request options.
  2849. //
  2850. // See ListImportFailures for details on how to use this API operation.
  2851. //
  2852. // The context must be non-nil and will be used for request cancellation. If
  2853. // the context is nil a panic will occur. In the future the SDK may create
  2854. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2855. // for more information on using Contexts.
  2856. func (c *CloudTrail) ListImportFailuresWithContext(ctx aws.Context, input *ListImportFailuresInput, opts ...request.Option) (*ListImportFailuresOutput, error) {
  2857. req, out := c.ListImportFailuresRequest(input)
  2858. req.SetContext(ctx)
  2859. req.ApplyOptions(opts...)
  2860. return out, req.Send()
  2861. }
  2862. // ListImportFailuresPages iterates over the pages of a ListImportFailures operation,
  2863. // calling the "fn" function with the response data for each page. To stop
  2864. // iterating, return false from the fn function.
  2865. //
  2866. // See ListImportFailures method for more information on how to use this operation.
  2867. //
  2868. // Note: This operation can generate multiple requests to a service.
  2869. //
  2870. // // Example iterating over at most 3 pages of a ListImportFailures operation.
  2871. // pageNum := 0
  2872. // err := client.ListImportFailuresPages(params,
  2873. // func(page *cloudtrail.ListImportFailuresOutput, lastPage bool) bool {
  2874. // pageNum++
  2875. // fmt.Println(page)
  2876. // return pageNum <= 3
  2877. // })
  2878. func (c *CloudTrail) ListImportFailuresPages(input *ListImportFailuresInput, fn func(*ListImportFailuresOutput, bool) bool) error {
  2879. return c.ListImportFailuresPagesWithContext(aws.BackgroundContext(), input, fn)
  2880. }
  2881. // ListImportFailuresPagesWithContext same as ListImportFailuresPages except
  2882. // it takes a Context and allows setting request options on the pages.
  2883. //
  2884. // The context must be non-nil and will be used for request cancellation. If
  2885. // the context is nil a panic will occur. In the future the SDK may create
  2886. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2887. // for more information on using Contexts.
  2888. func (c *CloudTrail) ListImportFailuresPagesWithContext(ctx aws.Context, input *ListImportFailuresInput, fn func(*ListImportFailuresOutput, bool) bool, opts ...request.Option) error {
  2889. p := request.Pagination{
  2890. NewRequest: func() (*request.Request, error) {
  2891. var inCpy *ListImportFailuresInput
  2892. if input != nil {
  2893. tmp := *input
  2894. inCpy = &tmp
  2895. }
  2896. req, _ := c.ListImportFailuresRequest(inCpy)
  2897. req.SetContext(ctx)
  2898. req.ApplyOptions(opts...)
  2899. return req, nil
  2900. },
  2901. }
  2902. for p.Next() {
  2903. if !fn(p.Page().(*ListImportFailuresOutput), !p.HasNextPage()) {
  2904. break
  2905. }
  2906. }
  2907. return p.Err()
  2908. }
  2909. const opListImports = "ListImports"
  2910. // ListImportsRequest generates a "aws/request.Request" representing the
  2911. // client's request for the ListImports operation. The "output" return
  2912. // value will be populated with the request's response once the request completes
  2913. // successfully.
  2914. //
  2915. // Use "Send" method on the returned Request to send the API call to the service.
  2916. // the "output" return value is not valid until after Send returns without error.
  2917. //
  2918. // See ListImports for more information on using the ListImports
  2919. // API call, and error handling.
  2920. //
  2921. // This method is useful when you want to inject custom logic or configuration
  2922. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2923. //
  2924. // // Example sending a request using the ListImportsRequest method.
  2925. // req, resp := client.ListImportsRequest(params)
  2926. //
  2927. // err := req.Send()
  2928. // if err == nil { // resp is now filled
  2929. // fmt.Println(resp)
  2930. // }
  2931. //
  2932. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports
  2933. func (c *CloudTrail) ListImportsRequest(input *ListImportsInput) (req *request.Request, output *ListImportsOutput) {
  2934. op := &request.Operation{
  2935. Name: opListImports,
  2936. HTTPMethod: "POST",
  2937. HTTPPath: "/",
  2938. Paginator: &request.Paginator{
  2939. InputTokens: []string{"NextToken"},
  2940. OutputTokens: []string{"NextToken"},
  2941. LimitToken: "MaxResults",
  2942. TruncationToken: "",
  2943. },
  2944. }
  2945. if input == nil {
  2946. input = &ListImportsInput{}
  2947. }
  2948. output = &ListImportsOutput{}
  2949. req = c.newRequest(op, input, output)
  2950. return
  2951. }
  2952. // ListImports API operation for AWS CloudTrail.
  2953. //
  2954. // Returns information on all imports, or a select set of imports by ImportStatus
  2955. // or Destination.
  2956. //
  2957. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2958. // with awserr.Error's Code and Message methods to get detailed information about
  2959. // the error.
  2960. //
  2961. // See the AWS API reference guide for AWS CloudTrail's
  2962. // API operation ListImports for usage and error information.
  2963. //
  2964. // Returned Error Types:
  2965. //
  2966. // - EventDataStoreARNInvalidException
  2967. // The specified event data store ARN is not valid or does not map to an event
  2968. // data store in your account.
  2969. //
  2970. // - InvalidNextTokenException
  2971. // A token that is not valid, or a token that was previously used in a request
  2972. // with different parameters. This exception is thrown if the token is not valid.
  2973. //
  2974. // - InvalidParameterException
  2975. // The request includes a parameter that is not valid.
  2976. //
  2977. // - OperationNotPermittedException
  2978. // This exception is thrown when the requested operation is not permitted.
  2979. //
  2980. // - UnsupportedOperationException
  2981. // This exception is thrown when the requested operation is not supported.
  2982. //
  2983. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports
  2984. func (c *CloudTrail) ListImports(input *ListImportsInput) (*ListImportsOutput, error) {
  2985. req, out := c.ListImportsRequest(input)
  2986. return out, req.Send()
  2987. }
  2988. // ListImportsWithContext is the same as ListImports with the addition of
  2989. // the ability to pass a context and additional request options.
  2990. //
  2991. // See ListImports for details on how to use this API operation.
  2992. //
  2993. // The context must be non-nil and will be used for request cancellation. If
  2994. // the context is nil a panic will occur. In the future the SDK may create
  2995. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2996. // for more information on using Contexts.
  2997. func (c *CloudTrail) ListImportsWithContext(ctx aws.Context, input *ListImportsInput, opts ...request.Option) (*ListImportsOutput, error) {
  2998. req, out := c.ListImportsRequest(input)
  2999. req.SetContext(ctx)
  3000. req.ApplyOptions(opts...)
  3001. return out, req.Send()
  3002. }
  3003. // ListImportsPages iterates over the pages of a ListImports operation,
  3004. // calling the "fn" function with the response data for each page. To stop
  3005. // iterating, return false from the fn function.
  3006. //
  3007. // See ListImports method for more information on how to use this operation.
  3008. //
  3009. // Note: This operation can generate multiple requests to a service.
  3010. //
  3011. // // Example iterating over at most 3 pages of a ListImports operation.
  3012. // pageNum := 0
  3013. // err := client.ListImportsPages(params,
  3014. // func(page *cloudtrail.ListImportsOutput, lastPage bool) bool {
  3015. // pageNum++
  3016. // fmt.Println(page)
  3017. // return pageNum <= 3
  3018. // })
  3019. func (c *CloudTrail) ListImportsPages(input *ListImportsInput, fn func(*ListImportsOutput, bool) bool) error {
  3020. return c.ListImportsPagesWithContext(aws.BackgroundContext(), input, fn)
  3021. }
  3022. // ListImportsPagesWithContext same as ListImportsPages except
  3023. // it takes a Context and allows setting request options on the pages.
  3024. //
  3025. // The context must be non-nil and will be used for request cancellation. If
  3026. // the context is nil a panic will occur. In the future the SDK may create
  3027. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3028. // for more information on using Contexts.
  3029. func (c *CloudTrail) ListImportsPagesWithContext(ctx aws.Context, input *ListImportsInput, fn func(*ListImportsOutput, bool) bool, opts ...request.Option) error {
  3030. p := request.Pagination{
  3031. NewRequest: func() (*request.Request, error) {
  3032. var inCpy *ListImportsInput
  3033. if input != nil {
  3034. tmp := *input
  3035. inCpy = &tmp
  3036. }
  3037. req, _ := c.ListImportsRequest(inCpy)
  3038. req.SetContext(ctx)
  3039. req.ApplyOptions(opts...)
  3040. return req, nil
  3041. },
  3042. }
  3043. for p.Next() {
  3044. if !fn(p.Page().(*ListImportsOutput), !p.HasNextPage()) {
  3045. break
  3046. }
  3047. }
  3048. return p.Err()
  3049. }
  3050. const opListPublicKeys = "ListPublicKeys"
  3051. // ListPublicKeysRequest generates a "aws/request.Request" representing the
  3052. // client's request for the ListPublicKeys operation. The "output" return
  3053. // value will be populated with the request's response once the request completes
  3054. // successfully.
  3055. //
  3056. // Use "Send" method on the returned Request to send the API call to the service.
  3057. // the "output" return value is not valid until after Send returns without error.
  3058. //
  3059. // See ListPublicKeys for more information on using the ListPublicKeys
  3060. // API call, and error handling.
  3061. //
  3062. // This method is useful when you want to inject custom logic or configuration
  3063. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3064. //
  3065. // // Example sending a request using the ListPublicKeysRequest method.
  3066. // req, resp := client.ListPublicKeysRequest(params)
  3067. //
  3068. // err := req.Send()
  3069. // if err == nil { // resp is now filled
  3070. // fmt.Println(resp)
  3071. // }
  3072. //
  3073. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
  3074. func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) {
  3075. op := &request.Operation{
  3076. Name: opListPublicKeys,
  3077. HTTPMethod: "POST",
  3078. HTTPPath: "/",
  3079. Paginator: &request.Paginator{
  3080. InputTokens: []string{"NextToken"},
  3081. OutputTokens: []string{"NextToken"},
  3082. LimitToken: "",
  3083. TruncationToken: "",
  3084. },
  3085. }
  3086. if input == nil {
  3087. input = &ListPublicKeysInput{}
  3088. }
  3089. output = &ListPublicKeysOutput{}
  3090. req = c.newRequest(op, input, output)
  3091. return
  3092. }
  3093. // ListPublicKeys API operation for AWS CloudTrail.
  3094. //
  3095. // Returns all public keys whose private keys were used to sign the digest files
  3096. // within the specified time range. The public key is needed to validate digest
  3097. // files that were signed with its corresponding private key.
  3098. //
  3099. // CloudTrail uses different private and public key pairs per region. Each digest
  3100. // file is signed with a private key unique to its region. When you validate
  3101. // a digest file from a specific region, you must look in the same region for
  3102. // its corresponding public key.
  3103. //
  3104. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3105. // with awserr.Error's Code and Message methods to get detailed information about
  3106. // the error.
  3107. //
  3108. // See the AWS API reference guide for AWS CloudTrail's
  3109. // API operation ListPublicKeys for usage and error information.
  3110. //
  3111. // Returned Error Types:
  3112. //
  3113. // - InvalidTimeRangeException
  3114. // Occurs if the timestamp values are not valid. Either the start time occurs
  3115. // after the end time, or the time range is outside the range of possible values.
  3116. //
  3117. // - UnsupportedOperationException
  3118. // This exception is thrown when the requested operation is not supported.
  3119. //
  3120. // - OperationNotPermittedException
  3121. // This exception is thrown when the requested operation is not permitted.
  3122. //
  3123. // - InvalidTokenException
  3124. // Reserved for future use.
  3125. //
  3126. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
  3127. func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) {
  3128. req, out := c.ListPublicKeysRequest(input)
  3129. return out, req.Send()
  3130. }
  3131. // ListPublicKeysWithContext is the same as ListPublicKeys with the addition of
  3132. // the ability to pass a context and additional request options.
  3133. //
  3134. // See ListPublicKeys for details on how to use this API operation.
  3135. //
  3136. // The context must be non-nil and will be used for request cancellation. If
  3137. // the context is nil a panic will occur. In the future the SDK may create
  3138. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3139. // for more information on using Contexts.
  3140. func (c *CloudTrail) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) {
  3141. req, out := c.ListPublicKeysRequest(input)
  3142. req.SetContext(ctx)
  3143. req.ApplyOptions(opts...)
  3144. return out, req.Send()
  3145. }
  3146. // ListPublicKeysPages iterates over the pages of a ListPublicKeys operation,
  3147. // calling the "fn" function with the response data for each page. To stop
  3148. // iterating, return false from the fn function.
  3149. //
  3150. // See ListPublicKeys method for more information on how to use this operation.
  3151. //
  3152. // Note: This operation can generate multiple requests to a service.
  3153. //
  3154. // // Example iterating over at most 3 pages of a ListPublicKeys operation.
  3155. // pageNum := 0
  3156. // err := client.ListPublicKeysPages(params,
  3157. // func(page *cloudtrail.ListPublicKeysOutput, lastPage bool) bool {
  3158. // pageNum++
  3159. // fmt.Println(page)
  3160. // return pageNum <= 3
  3161. // })
  3162. func (c *CloudTrail) ListPublicKeysPages(input *ListPublicKeysInput, fn func(*ListPublicKeysOutput, bool) bool) error {
  3163. return c.ListPublicKeysPagesWithContext(aws.BackgroundContext(), input, fn)
  3164. }
  3165. // ListPublicKeysPagesWithContext same as ListPublicKeysPages except
  3166. // it takes a Context and allows setting request options on the pages.
  3167. //
  3168. // The context must be non-nil and will be used for request cancellation. If
  3169. // the context is nil a panic will occur. In the future the SDK may create
  3170. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3171. // for more information on using Contexts.
  3172. func (c *CloudTrail) ListPublicKeysPagesWithContext(ctx aws.Context, input *ListPublicKeysInput, fn func(*ListPublicKeysOutput, bool) bool, opts ...request.Option) error {
  3173. p := request.Pagination{
  3174. NewRequest: func() (*request.Request, error) {
  3175. var inCpy *ListPublicKeysInput
  3176. if input != nil {
  3177. tmp := *input
  3178. inCpy = &tmp
  3179. }
  3180. req, _ := c.ListPublicKeysRequest(inCpy)
  3181. req.SetContext(ctx)
  3182. req.ApplyOptions(opts...)
  3183. return req, nil
  3184. },
  3185. }
  3186. for p.Next() {
  3187. if !fn(p.Page().(*ListPublicKeysOutput), !p.HasNextPage()) {
  3188. break
  3189. }
  3190. }
  3191. return p.Err()
  3192. }
  3193. const opListQueries = "ListQueries"
  3194. // ListQueriesRequest generates a "aws/request.Request" representing the
  3195. // client's request for the ListQueries operation. The "output" return
  3196. // value will be populated with the request's response once the request completes
  3197. // successfully.
  3198. //
  3199. // Use "Send" method on the returned Request to send the API call to the service.
  3200. // the "output" return value is not valid until after Send returns without error.
  3201. //
  3202. // See ListQueries for more information on using the ListQueries
  3203. // API call, and error handling.
  3204. //
  3205. // This method is useful when you want to inject custom logic or configuration
  3206. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3207. //
  3208. // // Example sending a request using the ListQueriesRequest method.
  3209. // req, resp := client.ListQueriesRequest(params)
  3210. //
  3211. // err := req.Send()
  3212. // if err == nil { // resp is now filled
  3213. // fmt.Println(resp)
  3214. // }
  3215. //
  3216. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries
  3217. func (c *CloudTrail) ListQueriesRequest(input *ListQueriesInput) (req *request.Request, output *ListQueriesOutput) {
  3218. op := &request.Operation{
  3219. Name: opListQueries,
  3220. HTTPMethod: "POST",
  3221. HTTPPath: "/",
  3222. Paginator: &request.Paginator{
  3223. InputTokens: []string{"NextToken"},
  3224. OutputTokens: []string{"NextToken"},
  3225. LimitToken: "MaxResults",
  3226. TruncationToken: "",
  3227. },
  3228. }
  3229. if input == nil {
  3230. input = &ListQueriesInput{}
  3231. }
  3232. output = &ListQueriesOutput{}
  3233. req = c.newRequest(op, input, output)
  3234. return
  3235. }
  3236. // ListQueries API operation for AWS CloudTrail.
  3237. //
  3238. // Returns a list of queries and query statuses for the past seven days. You
  3239. // must specify an ARN value for EventDataStore. Optionally, to shorten the
  3240. // list of results, you can specify a time range, formatted as timestamps, by
  3241. // adding StartTime and EndTime parameters, and a QueryStatus value. Valid values
  3242. // for QueryStatus include QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or
  3243. // CANCELLED.
  3244. //
  3245. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3246. // with awserr.Error's Code and Message methods to get detailed information about
  3247. // the error.
  3248. //
  3249. // See the AWS API reference guide for AWS CloudTrail's
  3250. // API operation ListQueries for usage and error information.
  3251. //
  3252. // Returned Error Types:
  3253. //
  3254. // - EventDataStoreARNInvalidException
  3255. // The specified event data store ARN is not valid or does not map to an event
  3256. // data store in your account.
  3257. //
  3258. // - EventDataStoreNotFoundException
  3259. // The specified event data store was not found.
  3260. //
  3261. // - InactiveEventDataStoreException
  3262. // The event data store is inactive.
  3263. //
  3264. // - InvalidDateRangeException
  3265. // A date range for the query was specified that is not valid. Be sure that
  3266. // the start time is chronologically before the end time. For more information
  3267. // about writing a query, see Create or edit a query (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html)
  3268. // in the CloudTrail User Guide.
  3269. //
  3270. // - InvalidMaxResultsException
  3271. // This exception is thrown if the limit specified is not valid.
  3272. //
  3273. // - InvalidNextTokenException
  3274. // A token that is not valid, or a token that was previously used in a request
  3275. // with different parameters. This exception is thrown if the token is not valid.
  3276. //
  3277. // - InvalidParameterException
  3278. // The request includes a parameter that is not valid.
  3279. //
  3280. // - InvalidQueryStatusException
  3281. // The query status is not valid for the operation.
  3282. //
  3283. // - OperationNotPermittedException
  3284. // This exception is thrown when the requested operation is not permitted.
  3285. //
  3286. // - UnsupportedOperationException
  3287. // This exception is thrown when the requested operation is not supported.
  3288. //
  3289. // - NoManagementAccountSLRExistsException
  3290. // This exception is thrown when the management account does not have a service-linked
  3291. // role.
  3292. //
  3293. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries
  3294. func (c *CloudTrail) ListQueries(input *ListQueriesInput) (*ListQueriesOutput, error) {
  3295. req, out := c.ListQueriesRequest(input)
  3296. return out, req.Send()
  3297. }
  3298. // ListQueriesWithContext is the same as ListQueries with the addition of
  3299. // the ability to pass a context and additional request options.
  3300. //
  3301. // See ListQueries for details on how to use this API operation.
  3302. //
  3303. // The context must be non-nil and will be used for request cancellation. If
  3304. // the context is nil a panic will occur. In the future the SDK may create
  3305. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3306. // for more information on using Contexts.
  3307. func (c *CloudTrail) ListQueriesWithContext(ctx aws.Context, input *ListQueriesInput, opts ...request.Option) (*ListQueriesOutput, error) {
  3308. req, out := c.ListQueriesRequest(input)
  3309. req.SetContext(ctx)
  3310. req.ApplyOptions(opts...)
  3311. return out, req.Send()
  3312. }
  3313. // ListQueriesPages iterates over the pages of a ListQueries operation,
  3314. // calling the "fn" function with the response data for each page. To stop
  3315. // iterating, return false from the fn function.
  3316. //
  3317. // See ListQueries method for more information on how to use this operation.
  3318. //
  3319. // Note: This operation can generate multiple requests to a service.
  3320. //
  3321. // // Example iterating over at most 3 pages of a ListQueries operation.
  3322. // pageNum := 0
  3323. // err := client.ListQueriesPages(params,
  3324. // func(page *cloudtrail.ListQueriesOutput, lastPage bool) bool {
  3325. // pageNum++
  3326. // fmt.Println(page)
  3327. // return pageNum <= 3
  3328. // })
  3329. func (c *CloudTrail) ListQueriesPages(input *ListQueriesInput, fn func(*ListQueriesOutput, bool) bool) error {
  3330. return c.ListQueriesPagesWithContext(aws.BackgroundContext(), input, fn)
  3331. }
  3332. // ListQueriesPagesWithContext same as ListQueriesPages except
  3333. // it takes a Context and allows setting request options on the pages.
  3334. //
  3335. // The context must be non-nil and will be used for request cancellation. If
  3336. // the context is nil a panic will occur. In the future the SDK may create
  3337. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3338. // for more information on using Contexts.
  3339. func (c *CloudTrail) ListQueriesPagesWithContext(ctx aws.Context, input *ListQueriesInput, fn func(*ListQueriesOutput, bool) bool, opts ...request.Option) error {
  3340. p := request.Pagination{
  3341. NewRequest: func() (*request.Request, error) {
  3342. var inCpy *ListQueriesInput
  3343. if input != nil {
  3344. tmp := *input
  3345. inCpy = &tmp
  3346. }
  3347. req, _ := c.ListQueriesRequest(inCpy)
  3348. req.SetContext(ctx)
  3349. req.ApplyOptions(opts...)
  3350. return req, nil
  3351. },
  3352. }
  3353. for p.Next() {
  3354. if !fn(p.Page().(*ListQueriesOutput), !p.HasNextPage()) {
  3355. break
  3356. }
  3357. }
  3358. return p.Err()
  3359. }
  3360. const opListTags = "ListTags"
  3361. // ListTagsRequest generates a "aws/request.Request" representing the
  3362. // client's request for the ListTags operation. The "output" return
  3363. // value will be populated with the request's response once the request completes
  3364. // successfully.
  3365. //
  3366. // Use "Send" method on the returned Request to send the API call to the service.
  3367. // the "output" return value is not valid until after Send returns without error.
  3368. //
  3369. // See ListTags for more information on using the ListTags
  3370. // API call, and error handling.
  3371. //
  3372. // This method is useful when you want to inject custom logic or configuration
  3373. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3374. //
  3375. // // Example sending a request using the ListTagsRequest method.
  3376. // req, resp := client.ListTagsRequest(params)
  3377. //
  3378. // err := req.Send()
  3379. // if err == nil { // resp is now filled
  3380. // fmt.Println(resp)
  3381. // }
  3382. //
  3383. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
  3384. func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
  3385. op := &request.Operation{
  3386. Name: opListTags,
  3387. HTTPMethod: "POST",
  3388. HTTPPath: "/",
  3389. Paginator: &request.Paginator{
  3390. InputTokens: []string{"NextToken"},
  3391. OutputTokens: []string{"NextToken"},
  3392. LimitToken: "",
  3393. TruncationToken: "",
  3394. },
  3395. }
  3396. if input == nil {
  3397. input = &ListTagsInput{}
  3398. }
  3399. output = &ListTagsOutput{}
  3400. req = c.newRequest(op, input, output)
  3401. return
  3402. }
  3403. // ListTags API operation for AWS CloudTrail.
  3404. //
  3405. // Lists the tags for the trail, event data store, or channel in the current
  3406. // region.
  3407. //
  3408. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3409. // with awserr.Error's Code and Message methods to get detailed information about
  3410. // the error.
  3411. //
  3412. // See the AWS API reference guide for AWS CloudTrail's
  3413. // API operation ListTags for usage and error information.
  3414. //
  3415. // Returned Error Types:
  3416. //
  3417. // - ResourceNotFoundException
  3418. // This exception is thrown when the specified resource is not found.
  3419. //
  3420. // - ARNInvalidException
  3421. // This exception is thrown when an operation is called with a trail ARN that
  3422. // is not valid. The following is the format of a trail ARN.
  3423. //
  3424. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  3425. //
  3426. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  3427. // event data store, or channel with a resource ARN that is not valid.
  3428. //
  3429. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  3430. //
  3431. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  3432. //
  3433. // - ResourceTypeNotSupportedException
  3434. // This exception is thrown when the specified resource type is not supported
  3435. // by CloudTrail.
  3436. //
  3437. // - InvalidTrailNameException
  3438. // This exception is thrown when the provided trail name is not valid. Trail
  3439. // names must meet the following requirements:
  3440. //
  3441. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  3442. // (_), or dashes (-)
  3443. //
  3444. // - Start with a letter or number, and end with a letter or number
  3445. //
  3446. // - Be between 3 and 128 characters
  3447. //
  3448. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  3449. // and my--namespace are not valid.
  3450. //
  3451. // - Not be in IP address format (for example, 192.168.5.4)
  3452. //
  3453. // - InactiveEventDataStoreException
  3454. // The event data store is inactive.
  3455. //
  3456. // - EventDataStoreNotFoundException
  3457. // The specified event data store was not found.
  3458. //
  3459. // - UnsupportedOperationException
  3460. // This exception is thrown when the requested operation is not supported.
  3461. //
  3462. // - OperationNotPermittedException
  3463. // This exception is thrown when the requested operation is not permitted.
  3464. //
  3465. // - InvalidTokenException
  3466. // Reserved for future use.
  3467. //
  3468. // - NoManagementAccountSLRExistsException
  3469. // This exception is thrown when the management account does not have a service-linked
  3470. // role.
  3471. //
  3472. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
  3473. func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
  3474. req, out := c.ListTagsRequest(input)
  3475. return out, req.Send()
  3476. }
  3477. // ListTagsWithContext is the same as ListTags with the addition of
  3478. // the ability to pass a context and additional request options.
  3479. //
  3480. // See ListTags for details on how to use this API operation.
  3481. //
  3482. // The context must be non-nil and will be used for request cancellation. If
  3483. // the context is nil a panic will occur. In the future the SDK may create
  3484. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3485. // for more information on using Contexts.
  3486. func (c *CloudTrail) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
  3487. req, out := c.ListTagsRequest(input)
  3488. req.SetContext(ctx)
  3489. req.ApplyOptions(opts...)
  3490. return out, req.Send()
  3491. }
  3492. // ListTagsPages iterates over the pages of a ListTags operation,
  3493. // calling the "fn" function with the response data for each page. To stop
  3494. // iterating, return false from the fn function.
  3495. //
  3496. // See ListTags method for more information on how to use this operation.
  3497. //
  3498. // Note: This operation can generate multiple requests to a service.
  3499. //
  3500. // // Example iterating over at most 3 pages of a ListTags operation.
  3501. // pageNum := 0
  3502. // err := client.ListTagsPages(params,
  3503. // func(page *cloudtrail.ListTagsOutput, lastPage bool) bool {
  3504. // pageNum++
  3505. // fmt.Println(page)
  3506. // return pageNum <= 3
  3507. // })
  3508. func (c *CloudTrail) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error {
  3509. return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn)
  3510. }
  3511. // ListTagsPagesWithContext same as ListTagsPages except
  3512. // it takes a Context and allows setting request options on the pages.
  3513. //
  3514. // The context must be non-nil and will be used for request cancellation. If
  3515. // the context is nil a panic will occur. In the future the SDK may create
  3516. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3517. // for more information on using Contexts.
  3518. func (c *CloudTrail) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error {
  3519. p := request.Pagination{
  3520. NewRequest: func() (*request.Request, error) {
  3521. var inCpy *ListTagsInput
  3522. if input != nil {
  3523. tmp := *input
  3524. inCpy = &tmp
  3525. }
  3526. req, _ := c.ListTagsRequest(inCpy)
  3527. req.SetContext(ctx)
  3528. req.ApplyOptions(opts...)
  3529. return req, nil
  3530. },
  3531. }
  3532. for p.Next() {
  3533. if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) {
  3534. break
  3535. }
  3536. }
  3537. return p.Err()
  3538. }
  3539. const opListTrails = "ListTrails"
  3540. // ListTrailsRequest generates a "aws/request.Request" representing the
  3541. // client's request for the ListTrails operation. The "output" return
  3542. // value will be populated with the request's response once the request completes
  3543. // successfully.
  3544. //
  3545. // Use "Send" method on the returned Request to send the API call to the service.
  3546. // the "output" return value is not valid until after Send returns without error.
  3547. //
  3548. // See ListTrails for more information on using the ListTrails
  3549. // API call, and error handling.
  3550. //
  3551. // This method is useful when you want to inject custom logic or configuration
  3552. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3553. //
  3554. // // Example sending a request using the ListTrailsRequest method.
  3555. // req, resp := client.ListTrailsRequest(params)
  3556. //
  3557. // err := req.Send()
  3558. // if err == nil { // resp is now filled
  3559. // fmt.Println(resp)
  3560. // }
  3561. //
  3562. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails
  3563. func (c *CloudTrail) ListTrailsRequest(input *ListTrailsInput) (req *request.Request, output *ListTrailsOutput) {
  3564. op := &request.Operation{
  3565. Name: opListTrails,
  3566. HTTPMethod: "POST",
  3567. HTTPPath: "/",
  3568. Paginator: &request.Paginator{
  3569. InputTokens: []string{"NextToken"},
  3570. OutputTokens: []string{"NextToken"},
  3571. LimitToken: "",
  3572. TruncationToken: "",
  3573. },
  3574. }
  3575. if input == nil {
  3576. input = &ListTrailsInput{}
  3577. }
  3578. output = &ListTrailsOutput{}
  3579. req = c.newRequest(op, input, output)
  3580. return
  3581. }
  3582. // ListTrails API operation for AWS CloudTrail.
  3583. //
  3584. // Lists trails that are in the current account.
  3585. //
  3586. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3587. // with awserr.Error's Code and Message methods to get detailed information about
  3588. // the error.
  3589. //
  3590. // See the AWS API reference guide for AWS CloudTrail's
  3591. // API operation ListTrails for usage and error information.
  3592. //
  3593. // Returned Error Types:
  3594. //
  3595. // - UnsupportedOperationException
  3596. // This exception is thrown when the requested operation is not supported.
  3597. //
  3598. // - OperationNotPermittedException
  3599. // This exception is thrown when the requested operation is not permitted.
  3600. //
  3601. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails
  3602. func (c *CloudTrail) ListTrails(input *ListTrailsInput) (*ListTrailsOutput, error) {
  3603. req, out := c.ListTrailsRequest(input)
  3604. return out, req.Send()
  3605. }
  3606. // ListTrailsWithContext is the same as ListTrails with the addition of
  3607. // the ability to pass a context and additional request options.
  3608. //
  3609. // See ListTrails for details on how to use this API operation.
  3610. //
  3611. // The context must be non-nil and will be used for request cancellation. If
  3612. // the context is nil a panic will occur. In the future the SDK may create
  3613. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3614. // for more information on using Contexts.
  3615. func (c *CloudTrail) ListTrailsWithContext(ctx aws.Context, input *ListTrailsInput, opts ...request.Option) (*ListTrailsOutput, error) {
  3616. req, out := c.ListTrailsRequest(input)
  3617. req.SetContext(ctx)
  3618. req.ApplyOptions(opts...)
  3619. return out, req.Send()
  3620. }
  3621. // ListTrailsPages iterates over the pages of a ListTrails operation,
  3622. // calling the "fn" function with the response data for each page. To stop
  3623. // iterating, return false from the fn function.
  3624. //
  3625. // See ListTrails method for more information on how to use this operation.
  3626. //
  3627. // Note: This operation can generate multiple requests to a service.
  3628. //
  3629. // // Example iterating over at most 3 pages of a ListTrails operation.
  3630. // pageNum := 0
  3631. // err := client.ListTrailsPages(params,
  3632. // func(page *cloudtrail.ListTrailsOutput, lastPage bool) bool {
  3633. // pageNum++
  3634. // fmt.Println(page)
  3635. // return pageNum <= 3
  3636. // })
  3637. func (c *CloudTrail) ListTrailsPages(input *ListTrailsInput, fn func(*ListTrailsOutput, bool) bool) error {
  3638. return c.ListTrailsPagesWithContext(aws.BackgroundContext(), input, fn)
  3639. }
  3640. // ListTrailsPagesWithContext same as ListTrailsPages except
  3641. // it takes a Context and allows setting request options on the pages.
  3642. //
  3643. // The context must be non-nil and will be used for request cancellation. If
  3644. // the context is nil a panic will occur. In the future the SDK may create
  3645. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3646. // for more information on using Contexts.
  3647. func (c *CloudTrail) ListTrailsPagesWithContext(ctx aws.Context, input *ListTrailsInput, fn func(*ListTrailsOutput, bool) bool, opts ...request.Option) error {
  3648. p := request.Pagination{
  3649. NewRequest: func() (*request.Request, error) {
  3650. var inCpy *ListTrailsInput
  3651. if input != nil {
  3652. tmp := *input
  3653. inCpy = &tmp
  3654. }
  3655. req, _ := c.ListTrailsRequest(inCpy)
  3656. req.SetContext(ctx)
  3657. req.ApplyOptions(opts...)
  3658. return req, nil
  3659. },
  3660. }
  3661. for p.Next() {
  3662. if !fn(p.Page().(*ListTrailsOutput), !p.HasNextPage()) {
  3663. break
  3664. }
  3665. }
  3666. return p.Err()
  3667. }
  3668. const opLookupEvents = "LookupEvents"
  3669. // LookupEventsRequest generates a "aws/request.Request" representing the
  3670. // client's request for the LookupEvents operation. The "output" return
  3671. // value will be populated with the request's response once the request completes
  3672. // successfully.
  3673. //
  3674. // Use "Send" method on the returned Request to send the API call to the service.
  3675. // the "output" return value is not valid until after Send returns without error.
  3676. //
  3677. // See LookupEvents for more information on using the LookupEvents
  3678. // API call, and error handling.
  3679. //
  3680. // This method is useful when you want to inject custom logic or configuration
  3681. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3682. //
  3683. // // Example sending a request using the LookupEventsRequest method.
  3684. // req, resp := client.LookupEventsRequest(params)
  3685. //
  3686. // err := req.Send()
  3687. // if err == nil { // resp is now filled
  3688. // fmt.Println(resp)
  3689. // }
  3690. //
  3691. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
  3692. func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput) {
  3693. op := &request.Operation{
  3694. Name: opLookupEvents,
  3695. HTTPMethod: "POST",
  3696. HTTPPath: "/",
  3697. Paginator: &request.Paginator{
  3698. InputTokens: []string{"NextToken"},
  3699. OutputTokens: []string{"NextToken"},
  3700. LimitToken: "MaxResults",
  3701. TruncationToken: "",
  3702. },
  3703. }
  3704. if input == nil {
  3705. input = &LookupEventsInput{}
  3706. }
  3707. output = &LookupEventsOutput{}
  3708. req = c.newRequest(op, input, output)
  3709. return
  3710. }
  3711. // LookupEvents API operation for AWS CloudTrail.
  3712. //
  3713. // Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events)
  3714. // or CloudTrail Insights events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events)
  3715. // that are captured by CloudTrail. You can look up events that occurred in
  3716. // a region within the last 90 days. Lookup supports the following attributes
  3717. // for management events:
  3718. //
  3719. // - Amazon Web Services access key
  3720. //
  3721. // - Event ID
  3722. //
  3723. // - Event name
  3724. //
  3725. // - Event source
  3726. //
  3727. // - Read only
  3728. //
  3729. // - Resource name
  3730. //
  3731. // - Resource type
  3732. //
  3733. // - User name
  3734. //
  3735. // Lookup supports the following attributes for Insights events:
  3736. //
  3737. // - Event ID
  3738. //
  3739. // - Event name
  3740. //
  3741. // - Event source
  3742. //
  3743. // All attributes are optional. The default number of results returned is 50,
  3744. // with a maximum of 50 possible. The response includes a token that you can
  3745. // use to get the next page of results.
  3746. //
  3747. // The rate of lookup requests is limited to two per second, per account, per
  3748. // region. If this limit is exceeded, a throttling error occurs.
  3749. //
  3750. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3751. // with awserr.Error's Code and Message methods to get detailed information about
  3752. // the error.
  3753. //
  3754. // See the AWS API reference guide for AWS CloudTrail's
  3755. // API operation LookupEvents for usage and error information.
  3756. //
  3757. // Returned Error Types:
  3758. //
  3759. // - InvalidLookupAttributesException
  3760. // Occurs when a lookup attribute is specified that is not valid.
  3761. //
  3762. // - InvalidTimeRangeException
  3763. // Occurs if the timestamp values are not valid. Either the start time occurs
  3764. // after the end time, or the time range is outside the range of possible values.
  3765. //
  3766. // - InvalidMaxResultsException
  3767. // This exception is thrown if the limit specified is not valid.
  3768. //
  3769. // - InvalidNextTokenException
  3770. // A token that is not valid, or a token that was previously used in a request
  3771. // with different parameters. This exception is thrown if the token is not valid.
  3772. //
  3773. // - InvalidEventCategoryException
  3774. // Occurs if an event category that is not valid is specified as a value of
  3775. // EventCategory.
  3776. //
  3777. // - UnsupportedOperationException
  3778. // This exception is thrown when the requested operation is not supported.
  3779. //
  3780. // - OperationNotPermittedException
  3781. // This exception is thrown when the requested operation is not permitted.
  3782. //
  3783. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
  3784. func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error) {
  3785. req, out := c.LookupEventsRequest(input)
  3786. return out, req.Send()
  3787. }
  3788. // LookupEventsWithContext is the same as LookupEvents with the addition of
  3789. // the ability to pass a context and additional request options.
  3790. //
  3791. // See LookupEvents for details on how to use this API operation.
  3792. //
  3793. // The context must be non-nil and will be used for request cancellation. If
  3794. // the context is nil a panic will occur. In the future the SDK may create
  3795. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3796. // for more information on using Contexts.
  3797. func (c *CloudTrail) LookupEventsWithContext(ctx aws.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error) {
  3798. req, out := c.LookupEventsRequest(input)
  3799. req.SetContext(ctx)
  3800. req.ApplyOptions(opts...)
  3801. return out, req.Send()
  3802. }
  3803. // LookupEventsPages iterates over the pages of a LookupEvents operation,
  3804. // calling the "fn" function with the response data for each page. To stop
  3805. // iterating, return false from the fn function.
  3806. //
  3807. // See LookupEvents method for more information on how to use this operation.
  3808. //
  3809. // Note: This operation can generate multiple requests to a service.
  3810. //
  3811. // // Example iterating over at most 3 pages of a LookupEvents operation.
  3812. // pageNum := 0
  3813. // err := client.LookupEventsPages(params,
  3814. // func(page *cloudtrail.LookupEventsOutput, lastPage bool) bool {
  3815. // pageNum++
  3816. // fmt.Println(page)
  3817. // return pageNum <= 3
  3818. // })
  3819. func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool) error {
  3820. return c.LookupEventsPagesWithContext(aws.BackgroundContext(), input, fn)
  3821. }
  3822. // LookupEventsPagesWithContext same as LookupEventsPages except
  3823. // it takes a Context and allows setting request options on the pages.
  3824. //
  3825. // The context must be non-nil and will be used for request cancellation. If
  3826. // the context is nil a panic will occur. In the future the SDK may create
  3827. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3828. // for more information on using Contexts.
  3829. func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error {
  3830. p := request.Pagination{
  3831. NewRequest: func() (*request.Request, error) {
  3832. var inCpy *LookupEventsInput
  3833. if input != nil {
  3834. tmp := *input
  3835. inCpy = &tmp
  3836. }
  3837. req, _ := c.LookupEventsRequest(inCpy)
  3838. req.SetContext(ctx)
  3839. req.ApplyOptions(opts...)
  3840. return req, nil
  3841. },
  3842. }
  3843. for p.Next() {
  3844. if !fn(p.Page().(*LookupEventsOutput), !p.HasNextPage()) {
  3845. break
  3846. }
  3847. }
  3848. return p.Err()
  3849. }
  3850. const opPutEventSelectors = "PutEventSelectors"
  3851. // PutEventSelectorsRequest generates a "aws/request.Request" representing the
  3852. // client's request for the PutEventSelectors operation. The "output" return
  3853. // value will be populated with the request's response once the request completes
  3854. // successfully.
  3855. //
  3856. // Use "Send" method on the returned Request to send the API call to the service.
  3857. // the "output" return value is not valid until after Send returns without error.
  3858. //
  3859. // See PutEventSelectors for more information on using the PutEventSelectors
  3860. // API call, and error handling.
  3861. //
  3862. // This method is useful when you want to inject custom logic or configuration
  3863. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3864. //
  3865. // // Example sending a request using the PutEventSelectorsRequest method.
  3866. // req, resp := client.PutEventSelectorsRequest(params)
  3867. //
  3868. // err := req.Send()
  3869. // if err == nil { // resp is now filled
  3870. // fmt.Println(resp)
  3871. // }
  3872. //
  3873. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
  3874. func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (req *request.Request, output *PutEventSelectorsOutput) {
  3875. op := &request.Operation{
  3876. Name: opPutEventSelectors,
  3877. HTTPMethod: "POST",
  3878. HTTPPath: "/",
  3879. }
  3880. if input == nil {
  3881. input = &PutEventSelectorsInput{}
  3882. }
  3883. output = &PutEventSelectorsOutput{}
  3884. req = c.newRequest(op, input, output)
  3885. return
  3886. }
  3887. // PutEventSelectors API operation for AWS CloudTrail.
  3888. //
  3889. // Configures an event selector or advanced event selectors for your trail.
  3890. // Use event selectors or advanced event selectors to specify management and
  3891. // data event settings for your trail. By default, trails created without specific
  3892. // event selectors are configured to log all read and write management events,
  3893. // and no data events.
  3894. //
  3895. // When an event occurs in your account, CloudTrail evaluates the event selectors
  3896. // or advanced event selectors in all trails. For each trail, if the event matches
  3897. // any event selector, the trail processes and logs the event. If the event
  3898. // doesn't match any event selector, the trail doesn't log the event.
  3899. //
  3900. // # Example
  3901. //
  3902. // You create an event selector for a trail and specify that you want write-only
  3903. // events.
  3904. //
  3905. // The EC2 GetConsoleOutput and RunInstances API operations occur in your account.
  3906. //
  3907. // CloudTrail evaluates whether the events match your event selectors.
  3908. //
  3909. // The RunInstances is a write-only event and it matches your event selector.
  3910. // The trail logs the event.
  3911. //
  3912. // The GetConsoleOutput is a read-only event that doesn't match your event selector.
  3913. // The trail doesn't log the event.
  3914. //
  3915. // The PutEventSelectors operation must be called from the region in which the
  3916. // trail was created; otherwise, an InvalidHomeRegionException exception is
  3917. // thrown.
  3918. //
  3919. // You can configure up to five event selectors for each trail. For more information,
  3920. // see Logging management events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html),
  3921. // Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html),
  3922. // and Quotas in CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
  3923. // in the CloudTrail User Guide.
  3924. //
  3925. // You can add advanced event selectors, and conditions for your advanced event
  3926. // selectors, up to a maximum of 500 values for all conditions and selectors
  3927. // on a trail. You can use either AdvancedEventSelectors or EventSelectors,
  3928. // but not both. If you apply AdvancedEventSelectors to a trail, any existing
  3929. // EventSelectors are overwritten. For more information about advanced event
  3930. // selectors, see Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
  3931. // in the CloudTrail User Guide.
  3932. //
  3933. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3934. // with awserr.Error's Code and Message methods to get detailed information about
  3935. // the error.
  3936. //
  3937. // See the AWS API reference guide for AWS CloudTrail's
  3938. // API operation PutEventSelectors for usage and error information.
  3939. //
  3940. // Returned Error Types:
  3941. //
  3942. // - TrailNotFoundException
  3943. // This exception is thrown when the trail with the given name is not found.
  3944. //
  3945. // - InvalidTrailNameException
  3946. // This exception is thrown when the provided trail name is not valid. Trail
  3947. // names must meet the following requirements:
  3948. //
  3949. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  3950. // (_), or dashes (-)
  3951. //
  3952. // - Start with a letter or number, and end with a letter or number
  3953. //
  3954. // - Be between 3 and 128 characters
  3955. //
  3956. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  3957. // and my--namespace are not valid.
  3958. //
  3959. // - Not be in IP address format (for example, 192.168.5.4)
  3960. //
  3961. // - ARNInvalidException
  3962. // This exception is thrown when an operation is called with a trail ARN that
  3963. // is not valid. The following is the format of a trail ARN.
  3964. //
  3965. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  3966. //
  3967. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  3968. // event data store, or channel with a resource ARN that is not valid.
  3969. //
  3970. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  3971. //
  3972. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  3973. //
  3974. // - InvalidHomeRegionException
  3975. // This exception is thrown when an operation is called on a trail from a region
  3976. // other than the region in which the trail was created.
  3977. //
  3978. // - InvalidEventSelectorsException
  3979. // This exception is thrown when the PutEventSelectors operation is called with
  3980. // a number of event selectors, advanced event selectors, or data resources
  3981. // that is not valid. The combination of event selectors or advanced event selectors
  3982. // and data resources is not valid. A trail can have up to 5 event selectors.
  3983. // If a trail uses advanced event selectors, a maximum of 500 total values for
  3984. // all conditions in all advanced event selectors is allowed. A trail is limited
  3985. // to 250 data resources. These data resources can be distributed across event
  3986. // selectors, but the overall total cannot exceed 250.
  3987. //
  3988. // You can:
  3989. //
  3990. // - Specify a valid number of event selectors (1 to 5) for a trail.
  3991. //
  3992. // - Specify a valid number of data resources (1 to 250) for an event selector.
  3993. // The limit of number of resources on an individual event selector is configurable
  3994. // up to 250. However, this upper limit is allowed only if the total number
  3995. // of data resources does not exceed 250 across all event selectors for a
  3996. // trail.
  3997. //
  3998. // - Specify up to 500 values for all conditions in all advanced event selectors
  3999. // for a trail.
  4000. //
  4001. // - Specify a valid value for a parameter. For example, specifying the ReadWriteType
  4002. // parameter with a value of read-only is not valid.
  4003. //
  4004. // - UnsupportedOperationException
  4005. // This exception is thrown when the requested operation is not supported.
  4006. //
  4007. // - OperationNotPermittedException
  4008. // This exception is thrown when the requested operation is not permitted.
  4009. //
  4010. // - NotOrganizationMasterAccountException
  4011. // This exception is thrown when the Amazon Web Services account making the
  4012. // request to create or update an organization trail or event data store is
  4013. // not the management account for an organization in Organizations. For more
  4014. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  4015. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  4016. //
  4017. // - NoManagementAccountSLRExistsException
  4018. // This exception is thrown when the management account does not have a service-linked
  4019. // role.
  4020. //
  4021. // - InsufficientDependencyServiceAccessPermissionException
  4022. // This exception is thrown when the IAM user or role that is used to create
  4023. // the organization resource lacks one or more required permissions for creating
  4024. // an organization resource in a required service.
  4025. //
  4026. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
  4027. func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error) {
  4028. req, out := c.PutEventSelectorsRequest(input)
  4029. return out, req.Send()
  4030. }
  4031. // PutEventSelectorsWithContext is the same as PutEventSelectors with the addition of
  4032. // the ability to pass a context and additional request options.
  4033. //
  4034. // See PutEventSelectors for details on how to use this API operation.
  4035. //
  4036. // The context must be non-nil and will be used for request cancellation. If
  4037. // the context is nil a panic will occur. In the future the SDK may create
  4038. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4039. // for more information on using Contexts.
  4040. func (c *CloudTrail) PutEventSelectorsWithContext(ctx aws.Context, input *PutEventSelectorsInput, opts ...request.Option) (*PutEventSelectorsOutput, error) {
  4041. req, out := c.PutEventSelectorsRequest(input)
  4042. req.SetContext(ctx)
  4043. req.ApplyOptions(opts...)
  4044. return out, req.Send()
  4045. }
  4046. const opPutInsightSelectors = "PutInsightSelectors"
  4047. // PutInsightSelectorsRequest generates a "aws/request.Request" representing the
  4048. // client's request for the PutInsightSelectors operation. The "output" return
  4049. // value will be populated with the request's response once the request completes
  4050. // successfully.
  4051. //
  4052. // Use "Send" method on the returned Request to send the API call to the service.
  4053. // the "output" return value is not valid until after Send returns without error.
  4054. //
  4055. // See PutInsightSelectors for more information on using the PutInsightSelectors
  4056. // API call, and error handling.
  4057. //
  4058. // This method is useful when you want to inject custom logic or configuration
  4059. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4060. //
  4061. // // Example sending a request using the PutInsightSelectorsRequest method.
  4062. // req, resp := client.PutInsightSelectorsRequest(params)
  4063. //
  4064. // err := req.Send()
  4065. // if err == nil { // resp is now filled
  4066. // fmt.Println(resp)
  4067. // }
  4068. //
  4069. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors
  4070. func (c *CloudTrail) PutInsightSelectorsRequest(input *PutInsightSelectorsInput) (req *request.Request, output *PutInsightSelectorsOutput) {
  4071. op := &request.Operation{
  4072. Name: opPutInsightSelectors,
  4073. HTTPMethod: "POST",
  4074. HTTPPath: "/",
  4075. }
  4076. if input == nil {
  4077. input = &PutInsightSelectorsInput{}
  4078. }
  4079. output = &PutInsightSelectorsOutput{}
  4080. req = c.newRequest(op, input, output)
  4081. return
  4082. }
  4083. // PutInsightSelectors API operation for AWS CloudTrail.
  4084. //
  4085. // Lets you enable Insights event logging by specifying the Insights selectors
  4086. // that you want to enable on an existing trail. You also use PutInsightSelectors
  4087. // to turn off Insights event logging, by passing an empty list of insight types.
  4088. // The valid Insights event types in this release are ApiErrorRateInsight and
  4089. // ApiCallRateInsight.
  4090. //
  4091. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4092. // with awserr.Error's Code and Message methods to get detailed information about
  4093. // the error.
  4094. //
  4095. // See the AWS API reference guide for AWS CloudTrail's
  4096. // API operation PutInsightSelectors for usage and error information.
  4097. //
  4098. // Returned Error Types:
  4099. //
  4100. // - TrailNotFoundException
  4101. // This exception is thrown when the trail with the given name is not found.
  4102. //
  4103. // - InvalidTrailNameException
  4104. // This exception is thrown when the provided trail name is not valid. Trail
  4105. // names must meet the following requirements:
  4106. //
  4107. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  4108. // (_), or dashes (-)
  4109. //
  4110. // - Start with a letter or number, and end with a letter or number
  4111. //
  4112. // - Be between 3 and 128 characters
  4113. //
  4114. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  4115. // and my--namespace are not valid.
  4116. //
  4117. // - Not be in IP address format (for example, 192.168.5.4)
  4118. //
  4119. // - ARNInvalidException
  4120. // This exception is thrown when an operation is called with a trail ARN that
  4121. // is not valid. The following is the format of a trail ARN.
  4122. //
  4123. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  4124. //
  4125. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  4126. // event data store, or channel with a resource ARN that is not valid.
  4127. //
  4128. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  4129. //
  4130. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  4131. //
  4132. // - InvalidHomeRegionException
  4133. // This exception is thrown when an operation is called on a trail from a region
  4134. // other than the region in which the trail was created.
  4135. //
  4136. // - InvalidInsightSelectorsException
  4137. // The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
  4138. // or GetInsightSelectors request is not valid, or the specified insight type
  4139. // in the InsightSelectors statement is not a valid insight type.
  4140. //
  4141. // - InsufficientS3BucketPolicyException
  4142. // This exception is thrown when the policy on the S3 bucket is not sufficient.
  4143. //
  4144. // - InsufficientEncryptionPolicyException
  4145. // This exception is thrown when the policy on the S3 bucket or KMS key does
  4146. // not have sufficient permissions for the operation.
  4147. //
  4148. // - S3BucketDoesNotExistException
  4149. // This exception is thrown when the specified S3 bucket does not exist.
  4150. //
  4151. // - KmsException
  4152. // This exception is thrown when there is an issue with the specified KMS key
  4153. // and the trail or event data store can't be updated.
  4154. //
  4155. // - UnsupportedOperationException
  4156. // This exception is thrown when the requested operation is not supported.
  4157. //
  4158. // - OperationNotPermittedException
  4159. // This exception is thrown when the requested operation is not permitted.
  4160. //
  4161. // - NotOrganizationMasterAccountException
  4162. // This exception is thrown when the Amazon Web Services account making the
  4163. // request to create or update an organization trail or event data store is
  4164. // not the management account for an organization in Organizations. For more
  4165. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  4166. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  4167. //
  4168. // - NoManagementAccountSLRExistsException
  4169. // This exception is thrown when the management account does not have a service-linked
  4170. // role.
  4171. //
  4172. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors
  4173. func (c *CloudTrail) PutInsightSelectors(input *PutInsightSelectorsInput) (*PutInsightSelectorsOutput, error) {
  4174. req, out := c.PutInsightSelectorsRequest(input)
  4175. return out, req.Send()
  4176. }
  4177. // PutInsightSelectorsWithContext is the same as PutInsightSelectors with the addition of
  4178. // the ability to pass a context and additional request options.
  4179. //
  4180. // See PutInsightSelectors for details on how to use this API operation.
  4181. //
  4182. // The context must be non-nil and will be used for request cancellation. If
  4183. // the context is nil a panic will occur. In the future the SDK may create
  4184. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4185. // for more information on using Contexts.
  4186. func (c *CloudTrail) PutInsightSelectorsWithContext(ctx aws.Context, input *PutInsightSelectorsInput, opts ...request.Option) (*PutInsightSelectorsOutput, error) {
  4187. req, out := c.PutInsightSelectorsRequest(input)
  4188. req.SetContext(ctx)
  4189. req.ApplyOptions(opts...)
  4190. return out, req.Send()
  4191. }
  4192. const opPutResourcePolicy = "PutResourcePolicy"
  4193. // PutResourcePolicyRequest generates a "aws/request.Request" representing the
  4194. // client's request for the PutResourcePolicy operation. The "output" return
  4195. // value will be populated with the request's response once the request completes
  4196. // successfully.
  4197. //
  4198. // Use "Send" method on the returned Request to send the API call to the service.
  4199. // the "output" return value is not valid until after Send returns without error.
  4200. //
  4201. // See PutResourcePolicy for more information on using the PutResourcePolicy
  4202. // API call, and error handling.
  4203. //
  4204. // This method is useful when you want to inject custom logic or configuration
  4205. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4206. //
  4207. // // Example sending a request using the PutResourcePolicyRequest method.
  4208. // req, resp := client.PutResourcePolicyRequest(params)
  4209. //
  4210. // err := req.Send()
  4211. // if err == nil { // resp is now filled
  4212. // fmt.Println(resp)
  4213. // }
  4214. //
  4215. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy
  4216. func (c *CloudTrail) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) {
  4217. op := &request.Operation{
  4218. Name: opPutResourcePolicy,
  4219. HTTPMethod: "POST",
  4220. HTTPPath: "/",
  4221. }
  4222. if input == nil {
  4223. input = &PutResourcePolicyInput{}
  4224. }
  4225. output = &PutResourcePolicyOutput{}
  4226. req = c.newRequest(op, input, output)
  4227. return
  4228. }
  4229. // PutResourcePolicy API operation for AWS CloudTrail.
  4230. //
  4231. // Attaches a resource-based permission policy to a CloudTrail channel that
  4232. // is used for an integration with an event source outside of Amazon Web Services.
  4233. // For more information about resource-based policies, see CloudTrail resource-based
  4234. // policy examples (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html)
  4235. // in the CloudTrail User Guide.
  4236. //
  4237. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4238. // with awserr.Error's Code and Message methods to get detailed information about
  4239. // the error.
  4240. //
  4241. // See the AWS API reference guide for AWS CloudTrail's
  4242. // API operation PutResourcePolicy for usage and error information.
  4243. //
  4244. // Returned Error Types:
  4245. //
  4246. // - ResourceARNNotValidException
  4247. // This exception is thrown when the provided resource does not exist, or the
  4248. // ARN format of the resource is not valid. The following is the valid format
  4249. // for a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
  4250. //
  4251. // - ResourcePolicyNotValidException
  4252. // This exception is thrown when the resouce-based policy has syntax errors,
  4253. // or contains a principal that is not valid.
  4254. //
  4255. // The following are requirements for the resource policy:
  4256. //
  4257. // - Contains only one action: cloudtrail-data:PutAuditEvents
  4258. //
  4259. // - Contains at least one statement. The policy can have a maximum of 20
  4260. // statements.
  4261. //
  4262. // - Each statement contains at least one principal. A statement can have
  4263. // a maximum of 50 principals.
  4264. //
  4265. // - ResourceNotFoundException
  4266. // This exception is thrown when the specified resource is not found.
  4267. //
  4268. // - ResourceTypeNotSupportedException
  4269. // This exception is thrown when the specified resource type is not supported
  4270. // by CloudTrail.
  4271. //
  4272. // - OperationNotPermittedException
  4273. // This exception is thrown when the requested operation is not permitted.
  4274. //
  4275. // - UnsupportedOperationException
  4276. // This exception is thrown when the requested operation is not supported.
  4277. //
  4278. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy
  4279. func (c *CloudTrail) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) {
  4280. req, out := c.PutResourcePolicyRequest(input)
  4281. return out, req.Send()
  4282. }
  4283. // PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of
  4284. // the ability to pass a context and additional request options.
  4285. //
  4286. // See PutResourcePolicy for details on how to use this API operation.
  4287. //
  4288. // The context must be non-nil and will be used for request cancellation. If
  4289. // the context is nil a panic will occur. In the future the SDK may create
  4290. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4291. // for more information on using Contexts.
  4292. func (c *CloudTrail) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) {
  4293. req, out := c.PutResourcePolicyRequest(input)
  4294. req.SetContext(ctx)
  4295. req.ApplyOptions(opts...)
  4296. return out, req.Send()
  4297. }
  4298. const opRegisterOrganizationDelegatedAdmin = "RegisterOrganizationDelegatedAdmin"
  4299. // RegisterOrganizationDelegatedAdminRequest generates a "aws/request.Request" representing the
  4300. // client's request for the RegisterOrganizationDelegatedAdmin operation. The "output" return
  4301. // value will be populated with the request's response once the request completes
  4302. // successfully.
  4303. //
  4304. // Use "Send" method on the returned Request to send the API call to the service.
  4305. // the "output" return value is not valid until after Send returns without error.
  4306. //
  4307. // See RegisterOrganizationDelegatedAdmin for more information on using the RegisterOrganizationDelegatedAdmin
  4308. // API call, and error handling.
  4309. //
  4310. // This method is useful when you want to inject custom logic or configuration
  4311. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4312. //
  4313. // // Example sending a request using the RegisterOrganizationDelegatedAdminRequest method.
  4314. // req, resp := client.RegisterOrganizationDelegatedAdminRequest(params)
  4315. //
  4316. // err := req.Send()
  4317. // if err == nil { // resp is now filled
  4318. // fmt.Println(resp)
  4319. // }
  4320. //
  4321. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin
  4322. func (c *CloudTrail) RegisterOrganizationDelegatedAdminRequest(input *RegisterOrganizationDelegatedAdminInput) (req *request.Request, output *RegisterOrganizationDelegatedAdminOutput) {
  4323. op := &request.Operation{
  4324. Name: opRegisterOrganizationDelegatedAdmin,
  4325. HTTPMethod: "POST",
  4326. HTTPPath: "/",
  4327. }
  4328. if input == nil {
  4329. input = &RegisterOrganizationDelegatedAdminInput{}
  4330. }
  4331. output = &RegisterOrganizationDelegatedAdminOutput{}
  4332. req = c.newRequest(op, input, output)
  4333. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4334. return
  4335. }
  4336. // RegisterOrganizationDelegatedAdmin API operation for AWS CloudTrail.
  4337. //
  4338. // Registers an organization’s member account as the CloudTrail delegated
  4339. // administrator.
  4340. //
  4341. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4342. // with awserr.Error's Code and Message methods to get detailed information about
  4343. // the error.
  4344. //
  4345. // See the AWS API reference guide for AWS CloudTrail's
  4346. // API operation RegisterOrganizationDelegatedAdmin for usage and error information.
  4347. //
  4348. // Returned Error Types:
  4349. //
  4350. // - AccountRegisteredException
  4351. // This exception is thrown when the account is already registered as the CloudTrail
  4352. // delegated administrator.
  4353. //
  4354. // - AccountNotFoundException
  4355. // This exception is thrown when the specified account is not found or not part
  4356. // of an organization.
  4357. //
  4358. // - InsufficientDependencyServiceAccessPermissionException
  4359. // This exception is thrown when the IAM user or role that is used to create
  4360. // the organization resource lacks one or more required permissions for creating
  4361. // an organization resource in a required service.
  4362. //
  4363. // - InvalidParameterException
  4364. // The request includes a parameter that is not valid.
  4365. //
  4366. // - CannotDelegateManagementAccountException
  4367. // This exception is thrown when the management account of an organization is
  4368. // registered as the CloudTrail delegated administrator.
  4369. //
  4370. // - AccessNotEnabledException
  4371. // This exception is thrown when trusted access has not been enabled between
  4372. // CloudTrail and Organizations. For more information, see Enabling Trusted
  4373. // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  4374. // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  4375. //
  4376. // - ConflictException
  4377. // This exception is thrown when the specified resource is not ready for an
  4378. // operation. This can occur when you try to run an operation on a resource
  4379. // before CloudTrail has time to fully load the resource, or because another
  4380. // operation is modifying the resource. If this exception occurs, wait a few
  4381. // minutes, and then try the operation again.
  4382. //
  4383. // - DelegatedAdminAccountLimitExceededException
  4384. // This exception is thrown when the maximum number of CloudTrail delegated
  4385. // administrators is reached.
  4386. //
  4387. // - NotOrganizationManagementAccountException
  4388. // This exception is thrown when the account making the request is not the organization's
  4389. // management account.
  4390. //
  4391. // - OrganizationNotInAllFeaturesModeException
  4392. // This exception is thrown when Organizations is not configured to support
  4393. // all features. All features must be enabled in Organizations to support creating
  4394. // an organization trail or event data store.
  4395. //
  4396. // - OrganizationsNotInUseException
  4397. // This exception is thrown when the request is made from an Amazon Web Services
  4398. // account that is not a member of an organization. To make this request, sign
  4399. // in using the credentials of an account that belongs to an organization.
  4400. //
  4401. // - UnsupportedOperationException
  4402. // This exception is thrown when the requested operation is not supported.
  4403. //
  4404. // - OperationNotPermittedException
  4405. // This exception is thrown when the requested operation is not permitted.
  4406. //
  4407. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin
  4408. func (c *CloudTrail) RegisterOrganizationDelegatedAdmin(input *RegisterOrganizationDelegatedAdminInput) (*RegisterOrganizationDelegatedAdminOutput, error) {
  4409. req, out := c.RegisterOrganizationDelegatedAdminRequest(input)
  4410. return out, req.Send()
  4411. }
  4412. // RegisterOrganizationDelegatedAdminWithContext is the same as RegisterOrganizationDelegatedAdmin with the addition of
  4413. // the ability to pass a context and additional request options.
  4414. //
  4415. // See RegisterOrganizationDelegatedAdmin for details on how to use this API operation.
  4416. //
  4417. // The context must be non-nil and will be used for request cancellation. If
  4418. // the context is nil a panic will occur. In the future the SDK may create
  4419. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4420. // for more information on using Contexts.
  4421. func (c *CloudTrail) RegisterOrganizationDelegatedAdminWithContext(ctx aws.Context, input *RegisterOrganizationDelegatedAdminInput, opts ...request.Option) (*RegisterOrganizationDelegatedAdminOutput, error) {
  4422. req, out := c.RegisterOrganizationDelegatedAdminRequest(input)
  4423. req.SetContext(ctx)
  4424. req.ApplyOptions(opts...)
  4425. return out, req.Send()
  4426. }
  4427. const opRemoveTags = "RemoveTags"
  4428. // RemoveTagsRequest generates a "aws/request.Request" representing the
  4429. // client's request for the RemoveTags operation. The "output" return
  4430. // value will be populated with the request's response once the request completes
  4431. // successfully.
  4432. //
  4433. // Use "Send" method on the returned Request to send the API call to the service.
  4434. // the "output" return value is not valid until after Send returns without error.
  4435. //
  4436. // See RemoveTags for more information on using the RemoveTags
  4437. // API call, and error handling.
  4438. //
  4439. // This method is useful when you want to inject custom logic or configuration
  4440. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4441. //
  4442. // // Example sending a request using the RemoveTagsRequest method.
  4443. // req, resp := client.RemoveTagsRequest(params)
  4444. //
  4445. // err := req.Send()
  4446. // if err == nil { // resp is now filled
  4447. // fmt.Println(resp)
  4448. // }
  4449. //
  4450. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
  4451. func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
  4452. op := &request.Operation{
  4453. Name: opRemoveTags,
  4454. HTTPMethod: "POST",
  4455. HTTPPath: "/",
  4456. }
  4457. if input == nil {
  4458. input = &RemoveTagsInput{}
  4459. }
  4460. output = &RemoveTagsOutput{}
  4461. req = c.newRequest(op, input, output)
  4462. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4463. return
  4464. }
  4465. // RemoveTags API operation for AWS CloudTrail.
  4466. //
  4467. // Removes the specified tags from a trail, event data store, or channel.
  4468. //
  4469. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4470. // with awserr.Error's Code and Message methods to get detailed information about
  4471. // the error.
  4472. //
  4473. // See the AWS API reference guide for AWS CloudTrail's
  4474. // API operation RemoveTags for usage and error information.
  4475. //
  4476. // Returned Error Types:
  4477. //
  4478. // - ResourceNotFoundException
  4479. // This exception is thrown when the specified resource is not found.
  4480. //
  4481. // - ARNInvalidException
  4482. // This exception is thrown when an operation is called with a trail ARN that
  4483. // is not valid. The following is the format of a trail ARN.
  4484. //
  4485. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  4486. //
  4487. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  4488. // event data store, or channel with a resource ARN that is not valid.
  4489. //
  4490. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  4491. //
  4492. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  4493. //
  4494. // - ResourceTypeNotSupportedException
  4495. // This exception is thrown when the specified resource type is not supported
  4496. // by CloudTrail.
  4497. //
  4498. // - InvalidTrailNameException
  4499. // This exception is thrown when the provided trail name is not valid. Trail
  4500. // names must meet the following requirements:
  4501. //
  4502. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  4503. // (_), or dashes (-)
  4504. //
  4505. // - Start with a letter or number, and end with a letter or number
  4506. //
  4507. // - Be between 3 and 128 characters
  4508. //
  4509. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  4510. // and my--namespace are not valid.
  4511. //
  4512. // - Not be in IP address format (for example, 192.168.5.4)
  4513. //
  4514. // - InvalidTagParameterException
  4515. // This exception is thrown when the specified tag key or values are not valid.
  4516. // It can also occur if there are duplicate tags or too many tags on the resource.
  4517. //
  4518. // - InactiveEventDataStoreException
  4519. // The event data store is inactive.
  4520. //
  4521. // - EventDataStoreNotFoundException
  4522. // The specified event data store was not found.
  4523. //
  4524. // - ChannelNotFoundException
  4525. // This exception is thrown when CloudTrail cannot find the specified channel.
  4526. //
  4527. // - UnsupportedOperationException
  4528. // This exception is thrown when the requested operation is not supported.
  4529. //
  4530. // - OperationNotPermittedException
  4531. // This exception is thrown when the requested operation is not permitted.
  4532. //
  4533. // - NotOrganizationMasterAccountException
  4534. // This exception is thrown when the Amazon Web Services account making the
  4535. // request to create or update an organization trail or event data store is
  4536. // not the management account for an organization in Organizations. For more
  4537. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  4538. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  4539. //
  4540. // - NoManagementAccountSLRExistsException
  4541. // This exception is thrown when the management account does not have a service-linked
  4542. // role.
  4543. //
  4544. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
  4545. func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
  4546. req, out := c.RemoveTagsRequest(input)
  4547. return out, req.Send()
  4548. }
  4549. // RemoveTagsWithContext is the same as RemoveTags with the addition of
  4550. // the ability to pass a context and additional request options.
  4551. //
  4552. // See RemoveTags for details on how to use this API operation.
  4553. //
  4554. // The context must be non-nil and will be used for request cancellation. If
  4555. // the context is nil a panic will occur. In the future the SDK may create
  4556. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4557. // for more information on using Contexts.
  4558. func (c *CloudTrail) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) {
  4559. req, out := c.RemoveTagsRequest(input)
  4560. req.SetContext(ctx)
  4561. req.ApplyOptions(opts...)
  4562. return out, req.Send()
  4563. }
  4564. const opRestoreEventDataStore = "RestoreEventDataStore"
  4565. // RestoreEventDataStoreRequest generates a "aws/request.Request" representing the
  4566. // client's request for the RestoreEventDataStore operation. The "output" return
  4567. // value will be populated with the request's response once the request completes
  4568. // successfully.
  4569. //
  4570. // Use "Send" method on the returned Request to send the API call to the service.
  4571. // the "output" return value is not valid until after Send returns without error.
  4572. //
  4573. // See RestoreEventDataStore for more information on using the RestoreEventDataStore
  4574. // API call, and error handling.
  4575. //
  4576. // This method is useful when you want to inject custom logic or configuration
  4577. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4578. //
  4579. // // Example sending a request using the RestoreEventDataStoreRequest method.
  4580. // req, resp := client.RestoreEventDataStoreRequest(params)
  4581. //
  4582. // err := req.Send()
  4583. // if err == nil { // resp is now filled
  4584. // fmt.Println(resp)
  4585. // }
  4586. //
  4587. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore
  4588. func (c *CloudTrail) RestoreEventDataStoreRequest(input *RestoreEventDataStoreInput) (req *request.Request, output *RestoreEventDataStoreOutput) {
  4589. op := &request.Operation{
  4590. Name: opRestoreEventDataStore,
  4591. HTTPMethod: "POST",
  4592. HTTPPath: "/",
  4593. }
  4594. if input == nil {
  4595. input = &RestoreEventDataStoreInput{}
  4596. }
  4597. output = &RestoreEventDataStoreOutput{}
  4598. req = c.newRequest(op, input, output)
  4599. return
  4600. }
  4601. // RestoreEventDataStore API operation for AWS CloudTrail.
  4602. //
  4603. // Restores a deleted event data store specified by EventDataStore, which accepts
  4604. // an event data store ARN. You can only restore a deleted event data store
  4605. // within the seven-day wait period after deletion. Restoring an event data
  4606. // store can take several minutes, depending on the size of the event data store.
  4607. //
  4608. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4609. // with awserr.Error's Code and Message methods to get detailed information about
  4610. // the error.
  4611. //
  4612. // See the AWS API reference guide for AWS CloudTrail's
  4613. // API operation RestoreEventDataStore for usage and error information.
  4614. //
  4615. // Returned Error Types:
  4616. //
  4617. // - EventDataStoreARNInvalidException
  4618. // The specified event data store ARN is not valid or does not map to an event
  4619. // data store in your account.
  4620. //
  4621. // - EventDataStoreNotFoundException
  4622. // The specified event data store was not found.
  4623. //
  4624. // - EventDataStoreMaxLimitExceededException
  4625. // Your account has used the maximum number of event data stores.
  4626. //
  4627. // - InvalidEventDataStoreStatusException
  4628. // The event data store is not in a status that supports the operation.
  4629. //
  4630. // - InvalidParameterException
  4631. // The request includes a parameter that is not valid.
  4632. //
  4633. // - OperationNotPermittedException
  4634. // This exception is thrown when the requested operation is not permitted.
  4635. //
  4636. // - UnsupportedOperationException
  4637. // This exception is thrown when the requested operation is not supported.
  4638. //
  4639. // - AccessNotEnabledException
  4640. // This exception is thrown when trusted access has not been enabled between
  4641. // CloudTrail and Organizations. For more information, see Enabling Trusted
  4642. // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  4643. // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  4644. //
  4645. // - InsufficientDependencyServiceAccessPermissionException
  4646. // This exception is thrown when the IAM user or role that is used to create
  4647. // the organization resource lacks one or more required permissions for creating
  4648. // an organization resource in a required service.
  4649. //
  4650. // - OrganizationsNotInUseException
  4651. // This exception is thrown when the request is made from an Amazon Web Services
  4652. // account that is not a member of an organization. To make this request, sign
  4653. // in using the credentials of an account that belongs to an organization.
  4654. //
  4655. // - NotOrganizationMasterAccountException
  4656. // This exception is thrown when the Amazon Web Services account making the
  4657. // request to create or update an organization trail or event data store is
  4658. // not the management account for an organization in Organizations. For more
  4659. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  4660. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  4661. //
  4662. // - NoManagementAccountSLRExistsException
  4663. // This exception is thrown when the management account does not have a service-linked
  4664. // role.
  4665. //
  4666. // - OrganizationNotInAllFeaturesModeException
  4667. // This exception is thrown when Organizations is not configured to support
  4668. // all features. All features must be enabled in Organizations to support creating
  4669. // an organization trail or event data store.
  4670. //
  4671. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore
  4672. func (c *CloudTrail) RestoreEventDataStore(input *RestoreEventDataStoreInput) (*RestoreEventDataStoreOutput, error) {
  4673. req, out := c.RestoreEventDataStoreRequest(input)
  4674. return out, req.Send()
  4675. }
  4676. // RestoreEventDataStoreWithContext is the same as RestoreEventDataStore with the addition of
  4677. // the ability to pass a context and additional request options.
  4678. //
  4679. // See RestoreEventDataStore for details on how to use this API operation.
  4680. //
  4681. // The context must be non-nil and will be used for request cancellation. If
  4682. // the context is nil a panic will occur. In the future the SDK may create
  4683. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4684. // for more information on using Contexts.
  4685. func (c *CloudTrail) RestoreEventDataStoreWithContext(ctx aws.Context, input *RestoreEventDataStoreInput, opts ...request.Option) (*RestoreEventDataStoreOutput, error) {
  4686. req, out := c.RestoreEventDataStoreRequest(input)
  4687. req.SetContext(ctx)
  4688. req.ApplyOptions(opts...)
  4689. return out, req.Send()
  4690. }
  4691. const opStartImport = "StartImport"
  4692. // StartImportRequest generates a "aws/request.Request" representing the
  4693. // client's request for the StartImport operation. The "output" return
  4694. // value will be populated with the request's response once the request completes
  4695. // successfully.
  4696. //
  4697. // Use "Send" method on the returned Request to send the API call to the service.
  4698. // the "output" return value is not valid until after Send returns without error.
  4699. //
  4700. // See StartImport for more information on using the StartImport
  4701. // API call, and error handling.
  4702. //
  4703. // This method is useful when you want to inject custom logic or configuration
  4704. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4705. //
  4706. // // Example sending a request using the StartImportRequest method.
  4707. // req, resp := client.StartImportRequest(params)
  4708. //
  4709. // err := req.Send()
  4710. // if err == nil { // resp is now filled
  4711. // fmt.Println(resp)
  4712. // }
  4713. //
  4714. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport
  4715. func (c *CloudTrail) StartImportRequest(input *StartImportInput) (req *request.Request, output *StartImportOutput) {
  4716. op := &request.Operation{
  4717. Name: opStartImport,
  4718. HTTPMethod: "POST",
  4719. HTTPPath: "/",
  4720. }
  4721. if input == nil {
  4722. input = &StartImportInput{}
  4723. }
  4724. output = &StartImportOutput{}
  4725. req = c.newRequest(op, input, output)
  4726. return
  4727. }
  4728. // StartImport API operation for AWS CloudTrail.
  4729. //
  4730. // Starts an import of logged trail events from a source S3 bucket to a destination
  4731. // event data store. By default, CloudTrail only imports events contained in
  4732. // the S3 bucket's CloudTrail prefix and the prefixes inside the CloudTrail
  4733. // prefix, and does not check prefixes for other Amazon Web Services services.
  4734. // If you want to import CloudTrail events contained in another prefix, you
  4735. // must include the prefix in the S3LocationUri. For more considerations about
  4736. // importing trail events, see Considerations (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations).
  4737. //
  4738. // When you start a new import, the Destinations and ImportSource parameters
  4739. // are required. Before starting a new import, disable any access control lists
  4740. // (ACLs) attached to the source S3 bucket. For more information about disabling
  4741. // ACLs, see Controlling ownership of objects and disabling ACLs for your bucket
  4742. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html).
  4743. //
  4744. // When you retry an import, the ImportID parameter is required.
  4745. //
  4746. // If the destination event data store is for an organization, you must use
  4747. // the management account to import trail events. You cannot use the delegated
  4748. // administrator account for the organization.
  4749. //
  4750. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4751. // with awserr.Error's Code and Message methods to get detailed information about
  4752. // the error.
  4753. //
  4754. // See the AWS API reference guide for AWS CloudTrail's
  4755. // API operation StartImport for usage and error information.
  4756. //
  4757. // Returned Error Types:
  4758. //
  4759. // - AccountHasOngoingImportException
  4760. // This exception is thrown when you start a new import and a previous import
  4761. // is still in progress.
  4762. //
  4763. // - EventDataStoreARNInvalidException
  4764. // The specified event data store ARN is not valid or does not map to an event
  4765. // data store in your account.
  4766. //
  4767. // - EventDataStoreNotFoundException
  4768. // The specified event data store was not found.
  4769. //
  4770. // - InvalidEventDataStoreStatusException
  4771. // The event data store is not in a status that supports the operation.
  4772. //
  4773. // - InvalidEventDataStoreCategoryException
  4774. // This exception is thrown when event categories of specified event data stores
  4775. // are not valid.
  4776. //
  4777. // - InactiveEventDataStoreException
  4778. // The event data store is inactive.
  4779. //
  4780. // - InvalidImportSourceException
  4781. // This exception is thrown when the provided source S3 bucket is not valid
  4782. // for import.
  4783. //
  4784. // - ImportNotFoundException
  4785. // The specified import was not found.
  4786. //
  4787. // - InvalidParameterException
  4788. // The request includes a parameter that is not valid.
  4789. //
  4790. // - OperationNotPermittedException
  4791. // This exception is thrown when the requested operation is not permitted.
  4792. //
  4793. // - UnsupportedOperationException
  4794. // This exception is thrown when the requested operation is not supported.
  4795. //
  4796. // - OperationNotPermittedException
  4797. // This exception is thrown when the requested operation is not permitted.
  4798. //
  4799. // - UnsupportedOperationException
  4800. // This exception is thrown when the requested operation is not supported.
  4801. //
  4802. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport
  4803. func (c *CloudTrail) StartImport(input *StartImportInput) (*StartImportOutput, error) {
  4804. req, out := c.StartImportRequest(input)
  4805. return out, req.Send()
  4806. }
  4807. // StartImportWithContext is the same as StartImport with the addition of
  4808. // the ability to pass a context and additional request options.
  4809. //
  4810. // See StartImport for details on how to use this API operation.
  4811. //
  4812. // The context must be non-nil and will be used for request cancellation. If
  4813. // the context is nil a panic will occur. In the future the SDK may create
  4814. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4815. // for more information on using Contexts.
  4816. func (c *CloudTrail) StartImportWithContext(ctx aws.Context, input *StartImportInput, opts ...request.Option) (*StartImportOutput, error) {
  4817. req, out := c.StartImportRequest(input)
  4818. req.SetContext(ctx)
  4819. req.ApplyOptions(opts...)
  4820. return out, req.Send()
  4821. }
  4822. const opStartLogging = "StartLogging"
  4823. // StartLoggingRequest generates a "aws/request.Request" representing the
  4824. // client's request for the StartLogging operation. The "output" return
  4825. // value will be populated with the request's response once the request completes
  4826. // successfully.
  4827. //
  4828. // Use "Send" method on the returned Request to send the API call to the service.
  4829. // the "output" return value is not valid until after Send returns without error.
  4830. //
  4831. // See StartLogging for more information on using the StartLogging
  4832. // API call, and error handling.
  4833. //
  4834. // This method is useful when you want to inject custom logic or configuration
  4835. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4836. //
  4837. // // Example sending a request using the StartLoggingRequest method.
  4838. // req, resp := client.StartLoggingRequest(params)
  4839. //
  4840. // err := req.Send()
  4841. // if err == nil { // resp is now filled
  4842. // fmt.Println(resp)
  4843. // }
  4844. //
  4845. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
  4846. func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput) {
  4847. op := &request.Operation{
  4848. Name: opStartLogging,
  4849. HTTPMethod: "POST",
  4850. HTTPPath: "/",
  4851. }
  4852. if input == nil {
  4853. input = &StartLoggingInput{}
  4854. }
  4855. output = &StartLoggingOutput{}
  4856. req = c.newRequest(op, input, output)
  4857. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4858. return
  4859. }
  4860. // StartLogging API operation for AWS CloudTrail.
  4861. //
  4862. // Starts the recording of Amazon Web Services API calls and log file delivery
  4863. // for a trail. For a trail that is enabled in all regions, this operation must
  4864. // be called from the region in which the trail was created. This operation
  4865. // cannot be called on the shadow trails (replicated trails in other regions)
  4866. // of a trail that is enabled in all regions.
  4867. //
  4868. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4869. // with awserr.Error's Code and Message methods to get detailed information about
  4870. // the error.
  4871. //
  4872. // See the AWS API reference guide for AWS CloudTrail's
  4873. // API operation StartLogging for usage and error information.
  4874. //
  4875. // Returned Error Types:
  4876. //
  4877. // - ARNInvalidException
  4878. // This exception is thrown when an operation is called with a trail ARN that
  4879. // is not valid. The following is the format of a trail ARN.
  4880. //
  4881. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  4882. //
  4883. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  4884. // event data store, or channel with a resource ARN that is not valid.
  4885. //
  4886. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  4887. //
  4888. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  4889. //
  4890. // - ConflictException
  4891. // This exception is thrown when the specified resource is not ready for an
  4892. // operation. This can occur when you try to run an operation on a resource
  4893. // before CloudTrail has time to fully load the resource, or because another
  4894. // operation is modifying the resource. If this exception occurs, wait a few
  4895. // minutes, and then try the operation again.
  4896. //
  4897. // - TrailNotFoundException
  4898. // This exception is thrown when the trail with the given name is not found.
  4899. //
  4900. // - InvalidTrailNameException
  4901. // This exception is thrown when the provided trail name is not valid. Trail
  4902. // names must meet the following requirements:
  4903. //
  4904. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  4905. // (_), or dashes (-)
  4906. //
  4907. // - Start with a letter or number, and end with a letter or number
  4908. //
  4909. // - Be between 3 and 128 characters
  4910. //
  4911. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  4912. // and my--namespace are not valid.
  4913. //
  4914. // - Not be in IP address format (for example, 192.168.5.4)
  4915. //
  4916. // - InvalidHomeRegionException
  4917. // This exception is thrown when an operation is called on a trail from a region
  4918. // other than the region in which the trail was created.
  4919. //
  4920. // - UnsupportedOperationException
  4921. // This exception is thrown when the requested operation is not supported.
  4922. //
  4923. // - OperationNotPermittedException
  4924. // This exception is thrown when the requested operation is not permitted.
  4925. //
  4926. // - NotOrganizationMasterAccountException
  4927. // This exception is thrown when the Amazon Web Services account making the
  4928. // request to create or update an organization trail or event data store is
  4929. // not the management account for an organization in Organizations. For more
  4930. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  4931. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  4932. //
  4933. // - NoManagementAccountSLRExistsException
  4934. // This exception is thrown when the management account does not have a service-linked
  4935. // role.
  4936. //
  4937. // - InsufficientDependencyServiceAccessPermissionException
  4938. // This exception is thrown when the IAM user or role that is used to create
  4939. // the organization resource lacks one or more required permissions for creating
  4940. // an organization resource in a required service.
  4941. //
  4942. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
  4943. func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error) {
  4944. req, out := c.StartLoggingRequest(input)
  4945. return out, req.Send()
  4946. }
  4947. // StartLoggingWithContext is the same as StartLogging with the addition of
  4948. // the ability to pass a context and additional request options.
  4949. //
  4950. // See StartLogging for details on how to use this API operation.
  4951. //
  4952. // The context must be non-nil and will be used for request cancellation. If
  4953. // the context is nil a panic will occur. In the future the SDK may create
  4954. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4955. // for more information on using Contexts.
  4956. func (c *CloudTrail) StartLoggingWithContext(ctx aws.Context, input *StartLoggingInput, opts ...request.Option) (*StartLoggingOutput, error) {
  4957. req, out := c.StartLoggingRequest(input)
  4958. req.SetContext(ctx)
  4959. req.ApplyOptions(opts...)
  4960. return out, req.Send()
  4961. }
  4962. const opStartQuery = "StartQuery"
  4963. // StartQueryRequest generates a "aws/request.Request" representing the
  4964. // client's request for the StartQuery operation. The "output" return
  4965. // value will be populated with the request's response once the request completes
  4966. // successfully.
  4967. //
  4968. // Use "Send" method on the returned Request to send the API call to the service.
  4969. // the "output" return value is not valid until after Send returns without error.
  4970. //
  4971. // See StartQuery for more information on using the StartQuery
  4972. // API call, and error handling.
  4973. //
  4974. // This method is useful when you want to inject custom logic or configuration
  4975. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4976. //
  4977. // // Example sending a request using the StartQueryRequest method.
  4978. // req, resp := client.StartQueryRequest(params)
  4979. //
  4980. // err := req.Send()
  4981. // if err == nil { // resp is now filled
  4982. // fmt.Println(resp)
  4983. // }
  4984. //
  4985. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery
  4986. func (c *CloudTrail) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) {
  4987. op := &request.Operation{
  4988. Name: opStartQuery,
  4989. HTTPMethod: "POST",
  4990. HTTPPath: "/",
  4991. }
  4992. if input == nil {
  4993. input = &StartQueryInput{}
  4994. }
  4995. output = &StartQueryOutput{}
  4996. req = c.newRequest(op, input, output)
  4997. return
  4998. }
  4999. // StartQuery API operation for AWS CloudTrail.
  5000. //
  5001. // Starts a CloudTrail Lake query. The required QueryStatement parameter provides
  5002. // your SQL query, enclosed in single quotation marks. Use the optional DeliveryS3Uri
  5003. // parameter to deliver the query results to an S3 bucket.
  5004. //
  5005. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5006. // with awserr.Error's Code and Message methods to get detailed information about
  5007. // the error.
  5008. //
  5009. // See the AWS API reference guide for AWS CloudTrail's
  5010. // API operation StartQuery for usage and error information.
  5011. //
  5012. // Returned Error Types:
  5013. //
  5014. // - EventDataStoreARNInvalidException
  5015. // The specified event data store ARN is not valid or does not map to an event
  5016. // data store in your account.
  5017. //
  5018. // - EventDataStoreNotFoundException
  5019. // The specified event data store was not found.
  5020. //
  5021. // - InactiveEventDataStoreException
  5022. // The event data store is inactive.
  5023. //
  5024. // - InvalidParameterException
  5025. // The request includes a parameter that is not valid.
  5026. //
  5027. // - InvalidQueryStatementException
  5028. // The query that was submitted has validation errors, or uses incorrect syntax
  5029. // or unsupported keywords. For more information about writing a query, see
  5030. // Create or edit a query (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html)
  5031. // in the CloudTrail User Guide.
  5032. //
  5033. // - MaxConcurrentQueriesException
  5034. // You are already running the maximum number of concurrent queries. Wait a
  5035. // minute for some queries to finish, and then run the query again.
  5036. //
  5037. // - InsufficientEncryptionPolicyException
  5038. // This exception is thrown when the policy on the S3 bucket or KMS key does
  5039. // not have sufficient permissions for the operation.
  5040. //
  5041. // - InvalidS3PrefixException
  5042. // This exception is thrown when the provided S3 prefix is not valid.
  5043. //
  5044. // - InvalidS3BucketNameException
  5045. // This exception is thrown when the provided S3 bucket name is not valid.
  5046. //
  5047. // - InsufficientS3BucketPolicyException
  5048. // This exception is thrown when the policy on the S3 bucket is not sufficient.
  5049. //
  5050. // - S3BucketDoesNotExistException
  5051. // This exception is thrown when the specified S3 bucket does not exist.
  5052. //
  5053. // - OperationNotPermittedException
  5054. // This exception is thrown when the requested operation is not permitted.
  5055. //
  5056. // - UnsupportedOperationException
  5057. // This exception is thrown when the requested operation is not supported.
  5058. //
  5059. // - NoManagementAccountSLRExistsException
  5060. // This exception is thrown when the management account does not have a service-linked
  5061. // role.
  5062. //
  5063. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery
  5064. func (c *CloudTrail) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) {
  5065. req, out := c.StartQueryRequest(input)
  5066. return out, req.Send()
  5067. }
  5068. // StartQueryWithContext is the same as StartQuery with the addition of
  5069. // the ability to pass a context and additional request options.
  5070. //
  5071. // See StartQuery for details on how to use this API operation.
  5072. //
  5073. // The context must be non-nil and will be used for request cancellation. If
  5074. // the context is nil a panic will occur. In the future the SDK may create
  5075. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5076. // for more information on using Contexts.
  5077. func (c *CloudTrail) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) {
  5078. req, out := c.StartQueryRequest(input)
  5079. req.SetContext(ctx)
  5080. req.ApplyOptions(opts...)
  5081. return out, req.Send()
  5082. }
  5083. const opStopImport = "StopImport"
  5084. // StopImportRequest generates a "aws/request.Request" representing the
  5085. // client's request for the StopImport operation. The "output" return
  5086. // value will be populated with the request's response once the request completes
  5087. // successfully.
  5088. //
  5089. // Use "Send" method on the returned Request to send the API call to the service.
  5090. // the "output" return value is not valid until after Send returns without error.
  5091. //
  5092. // See StopImport for more information on using the StopImport
  5093. // API call, and error handling.
  5094. //
  5095. // This method is useful when you want to inject custom logic or configuration
  5096. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5097. //
  5098. // // Example sending a request using the StopImportRequest method.
  5099. // req, resp := client.StopImportRequest(params)
  5100. //
  5101. // err := req.Send()
  5102. // if err == nil { // resp is now filled
  5103. // fmt.Println(resp)
  5104. // }
  5105. //
  5106. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport
  5107. func (c *CloudTrail) StopImportRequest(input *StopImportInput) (req *request.Request, output *StopImportOutput) {
  5108. op := &request.Operation{
  5109. Name: opStopImport,
  5110. HTTPMethod: "POST",
  5111. HTTPPath: "/",
  5112. }
  5113. if input == nil {
  5114. input = &StopImportInput{}
  5115. }
  5116. output = &StopImportOutput{}
  5117. req = c.newRequest(op, input, output)
  5118. return
  5119. }
  5120. // StopImport API operation for AWS CloudTrail.
  5121. //
  5122. // Stops a specified import.
  5123. //
  5124. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5125. // with awserr.Error's Code and Message methods to get detailed information about
  5126. // the error.
  5127. //
  5128. // See the AWS API reference guide for AWS CloudTrail's
  5129. // API operation StopImport for usage and error information.
  5130. //
  5131. // Returned Error Types:
  5132. //
  5133. // - ImportNotFoundException
  5134. // The specified import was not found.
  5135. //
  5136. // - InvalidParameterException
  5137. // The request includes a parameter that is not valid.
  5138. //
  5139. // - OperationNotPermittedException
  5140. // This exception is thrown when the requested operation is not permitted.
  5141. //
  5142. // - UnsupportedOperationException
  5143. // This exception is thrown when the requested operation is not supported.
  5144. //
  5145. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport
  5146. func (c *CloudTrail) StopImport(input *StopImportInput) (*StopImportOutput, error) {
  5147. req, out := c.StopImportRequest(input)
  5148. return out, req.Send()
  5149. }
  5150. // StopImportWithContext is the same as StopImport with the addition of
  5151. // the ability to pass a context and additional request options.
  5152. //
  5153. // See StopImport for details on how to use this API operation.
  5154. //
  5155. // The context must be non-nil and will be used for request cancellation. If
  5156. // the context is nil a panic will occur. In the future the SDK may create
  5157. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5158. // for more information on using Contexts.
  5159. func (c *CloudTrail) StopImportWithContext(ctx aws.Context, input *StopImportInput, opts ...request.Option) (*StopImportOutput, error) {
  5160. req, out := c.StopImportRequest(input)
  5161. req.SetContext(ctx)
  5162. req.ApplyOptions(opts...)
  5163. return out, req.Send()
  5164. }
  5165. const opStopLogging = "StopLogging"
  5166. // StopLoggingRequest generates a "aws/request.Request" representing the
  5167. // client's request for the StopLogging operation. The "output" return
  5168. // value will be populated with the request's response once the request completes
  5169. // successfully.
  5170. //
  5171. // Use "Send" method on the returned Request to send the API call to the service.
  5172. // the "output" return value is not valid until after Send returns without error.
  5173. //
  5174. // See StopLogging for more information on using the StopLogging
  5175. // API call, and error handling.
  5176. //
  5177. // This method is useful when you want to inject custom logic or configuration
  5178. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5179. //
  5180. // // Example sending a request using the StopLoggingRequest method.
  5181. // req, resp := client.StopLoggingRequest(params)
  5182. //
  5183. // err := req.Send()
  5184. // if err == nil { // resp is now filled
  5185. // fmt.Println(resp)
  5186. // }
  5187. //
  5188. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
  5189. func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput) {
  5190. op := &request.Operation{
  5191. Name: opStopLogging,
  5192. HTTPMethod: "POST",
  5193. HTTPPath: "/",
  5194. }
  5195. if input == nil {
  5196. input = &StopLoggingInput{}
  5197. }
  5198. output = &StopLoggingOutput{}
  5199. req = c.newRequest(op, input, output)
  5200. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5201. return
  5202. }
  5203. // StopLogging API operation for AWS CloudTrail.
  5204. //
  5205. // Suspends the recording of Amazon Web Services API calls and log file delivery
  5206. // for the specified trail. Under most circumstances, there is no need to use
  5207. // this action. You can update a trail without stopping it first. This action
  5208. // is the only way to stop recording. For a trail enabled in all regions, this
  5209. // operation must be called from the region in which the trail was created,
  5210. // or an InvalidHomeRegionException will occur. This operation cannot be called
  5211. // on the shadow trails (replicated trails in other regions) of a trail enabled
  5212. // in all regions.
  5213. //
  5214. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5215. // with awserr.Error's Code and Message methods to get detailed information about
  5216. // the error.
  5217. //
  5218. // See the AWS API reference guide for AWS CloudTrail's
  5219. // API operation StopLogging for usage and error information.
  5220. //
  5221. // Returned Error Types:
  5222. //
  5223. // - TrailNotFoundException
  5224. // This exception is thrown when the trail with the given name is not found.
  5225. //
  5226. // - InvalidTrailNameException
  5227. // This exception is thrown when the provided trail name is not valid. Trail
  5228. // names must meet the following requirements:
  5229. //
  5230. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  5231. // (_), or dashes (-)
  5232. //
  5233. // - Start with a letter or number, and end with a letter or number
  5234. //
  5235. // - Be between 3 and 128 characters
  5236. //
  5237. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  5238. // and my--namespace are not valid.
  5239. //
  5240. // - Not be in IP address format (for example, 192.168.5.4)
  5241. //
  5242. // - ARNInvalidException
  5243. // This exception is thrown when an operation is called with a trail ARN that
  5244. // is not valid. The following is the format of a trail ARN.
  5245. //
  5246. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  5247. //
  5248. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  5249. // event data store, or channel with a resource ARN that is not valid.
  5250. //
  5251. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  5252. //
  5253. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  5254. //
  5255. // - ConflictException
  5256. // This exception is thrown when the specified resource is not ready for an
  5257. // operation. This can occur when you try to run an operation on a resource
  5258. // before CloudTrail has time to fully load the resource, or because another
  5259. // operation is modifying the resource. If this exception occurs, wait a few
  5260. // minutes, and then try the operation again.
  5261. //
  5262. // - InvalidHomeRegionException
  5263. // This exception is thrown when an operation is called on a trail from a region
  5264. // other than the region in which the trail was created.
  5265. //
  5266. // - UnsupportedOperationException
  5267. // This exception is thrown when the requested operation is not supported.
  5268. //
  5269. // - OperationNotPermittedException
  5270. // This exception is thrown when the requested operation is not permitted.
  5271. //
  5272. // - NotOrganizationMasterAccountException
  5273. // This exception is thrown when the Amazon Web Services account making the
  5274. // request to create or update an organization trail or event data store is
  5275. // not the management account for an organization in Organizations. For more
  5276. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  5277. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  5278. //
  5279. // - NoManagementAccountSLRExistsException
  5280. // This exception is thrown when the management account does not have a service-linked
  5281. // role.
  5282. //
  5283. // - InsufficientDependencyServiceAccessPermissionException
  5284. // This exception is thrown when the IAM user or role that is used to create
  5285. // the organization resource lacks one or more required permissions for creating
  5286. // an organization resource in a required service.
  5287. //
  5288. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
  5289. func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error) {
  5290. req, out := c.StopLoggingRequest(input)
  5291. return out, req.Send()
  5292. }
  5293. // StopLoggingWithContext is the same as StopLogging with the addition of
  5294. // the ability to pass a context and additional request options.
  5295. //
  5296. // See StopLogging for details on how to use this API operation.
  5297. //
  5298. // The context must be non-nil and will be used for request cancellation. If
  5299. // the context is nil a panic will occur. In the future the SDK may create
  5300. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5301. // for more information on using Contexts.
  5302. func (c *CloudTrail) StopLoggingWithContext(ctx aws.Context, input *StopLoggingInput, opts ...request.Option) (*StopLoggingOutput, error) {
  5303. req, out := c.StopLoggingRequest(input)
  5304. req.SetContext(ctx)
  5305. req.ApplyOptions(opts...)
  5306. return out, req.Send()
  5307. }
  5308. const opUpdateChannel = "UpdateChannel"
  5309. // UpdateChannelRequest generates a "aws/request.Request" representing the
  5310. // client's request for the UpdateChannel operation. The "output" return
  5311. // value will be populated with the request's response once the request completes
  5312. // successfully.
  5313. //
  5314. // Use "Send" method on the returned Request to send the API call to the service.
  5315. // the "output" return value is not valid until after Send returns without error.
  5316. //
  5317. // See UpdateChannel for more information on using the UpdateChannel
  5318. // API call, and error handling.
  5319. //
  5320. // This method is useful when you want to inject custom logic or configuration
  5321. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5322. //
  5323. // // Example sending a request using the UpdateChannelRequest method.
  5324. // req, resp := client.UpdateChannelRequest(params)
  5325. //
  5326. // err := req.Send()
  5327. // if err == nil { // resp is now filled
  5328. // fmt.Println(resp)
  5329. // }
  5330. //
  5331. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel
  5332. func (c *CloudTrail) UpdateChannelRequest(input *UpdateChannelInput) (req *request.Request, output *UpdateChannelOutput) {
  5333. op := &request.Operation{
  5334. Name: opUpdateChannel,
  5335. HTTPMethod: "POST",
  5336. HTTPPath: "/",
  5337. }
  5338. if input == nil {
  5339. input = &UpdateChannelInput{}
  5340. }
  5341. output = &UpdateChannelOutput{}
  5342. req = c.newRequest(op, input, output)
  5343. return
  5344. }
  5345. // UpdateChannel API operation for AWS CloudTrail.
  5346. //
  5347. // Updates a channel specified by a required channel ARN or UUID.
  5348. //
  5349. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5350. // with awserr.Error's Code and Message methods to get detailed information about
  5351. // the error.
  5352. //
  5353. // See the AWS API reference guide for AWS CloudTrail's
  5354. // API operation UpdateChannel for usage and error information.
  5355. //
  5356. // Returned Error Types:
  5357. //
  5358. // - ChannelARNInvalidException
  5359. // This exception is thrown when the specified value of ChannelARN is not valid.
  5360. //
  5361. // - ChannelNotFoundException
  5362. // This exception is thrown when CloudTrail cannot find the specified channel.
  5363. //
  5364. // - ChannelAlreadyExistsException
  5365. // This exception is thrown when the provided channel already exists.
  5366. //
  5367. // - EventDataStoreARNInvalidException
  5368. // The specified event data store ARN is not valid or does not map to an event
  5369. // data store in your account.
  5370. //
  5371. // - EventDataStoreNotFoundException
  5372. // The specified event data store was not found.
  5373. //
  5374. // - InvalidEventDataStoreCategoryException
  5375. // This exception is thrown when event categories of specified event data stores
  5376. // are not valid.
  5377. //
  5378. // - InactiveEventDataStoreException
  5379. // The event data store is inactive.
  5380. //
  5381. // - InvalidParameterException
  5382. // The request includes a parameter that is not valid.
  5383. //
  5384. // - OperationNotPermittedException
  5385. // This exception is thrown when the requested operation is not permitted.
  5386. //
  5387. // - UnsupportedOperationException
  5388. // This exception is thrown when the requested operation is not supported.
  5389. //
  5390. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel
  5391. func (c *CloudTrail) UpdateChannel(input *UpdateChannelInput) (*UpdateChannelOutput, error) {
  5392. req, out := c.UpdateChannelRequest(input)
  5393. return out, req.Send()
  5394. }
  5395. // UpdateChannelWithContext is the same as UpdateChannel with the addition of
  5396. // the ability to pass a context and additional request options.
  5397. //
  5398. // See UpdateChannel for details on how to use this API operation.
  5399. //
  5400. // The context must be non-nil and will be used for request cancellation. If
  5401. // the context is nil a panic will occur. In the future the SDK may create
  5402. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5403. // for more information on using Contexts.
  5404. func (c *CloudTrail) UpdateChannelWithContext(ctx aws.Context, input *UpdateChannelInput, opts ...request.Option) (*UpdateChannelOutput, error) {
  5405. req, out := c.UpdateChannelRequest(input)
  5406. req.SetContext(ctx)
  5407. req.ApplyOptions(opts...)
  5408. return out, req.Send()
  5409. }
  5410. const opUpdateEventDataStore = "UpdateEventDataStore"
  5411. // UpdateEventDataStoreRequest generates a "aws/request.Request" representing the
  5412. // client's request for the UpdateEventDataStore operation. The "output" return
  5413. // value will be populated with the request's response once the request completes
  5414. // successfully.
  5415. //
  5416. // Use "Send" method on the returned Request to send the API call to the service.
  5417. // the "output" return value is not valid until after Send returns without error.
  5418. //
  5419. // See UpdateEventDataStore for more information on using the UpdateEventDataStore
  5420. // API call, and error handling.
  5421. //
  5422. // This method is useful when you want to inject custom logic or configuration
  5423. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5424. //
  5425. // // Example sending a request using the UpdateEventDataStoreRequest method.
  5426. // req, resp := client.UpdateEventDataStoreRequest(params)
  5427. //
  5428. // err := req.Send()
  5429. // if err == nil { // resp is now filled
  5430. // fmt.Println(resp)
  5431. // }
  5432. //
  5433. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore
  5434. func (c *CloudTrail) UpdateEventDataStoreRequest(input *UpdateEventDataStoreInput) (req *request.Request, output *UpdateEventDataStoreOutput) {
  5435. op := &request.Operation{
  5436. Name: opUpdateEventDataStore,
  5437. HTTPMethod: "POST",
  5438. HTTPPath: "/",
  5439. }
  5440. if input == nil {
  5441. input = &UpdateEventDataStoreInput{}
  5442. }
  5443. output = &UpdateEventDataStoreOutput{}
  5444. req = c.newRequest(op, input, output)
  5445. return
  5446. }
  5447. // UpdateEventDataStore API operation for AWS CloudTrail.
  5448. //
  5449. // Updates an event data store. The required EventDataStore value is an ARN
  5450. // or the ID portion of the ARN. Other parameters are optional, but at least
  5451. // one optional parameter must be specified, or CloudTrail throws an error.
  5452. // RetentionPeriod is in days, and valid values are integers between 90 and
  5453. // 2557. By default, TerminationProtection is enabled.
  5454. //
  5455. // For event data stores for CloudTrail events, AdvancedEventSelectors includes
  5456. // or excludes management and data events in your event data store. For more
  5457. // information about AdvancedEventSelectors, see PutEventSelectorsRequest$AdvancedEventSelectors.
  5458. //
  5459. // For event data stores for Config configuration items, Audit Manager evidence,
  5460. // or non-Amazon Web Services events, AdvancedEventSelectors includes events
  5461. // of that type in your event data store.
  5462. //
  5463. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5464. // with awserr.Error's Code and Message methods to get detailed information about
  5465. // the error.
  5466. //
  5467. // See the AWS API reference guide for AWS CloudTrail's
  5468. // API operation UpdateEventDataStore for usage and error information.
  5469. //
  5470. // Returned Error Types:
  5471. //
  5472. // - EventDataStoreARNInvalidException
  5473. // The specified event data store ARN is not valid or does not map to an event
  5474. // data store in your account.
  5475. //
  5476. // - EventDataStoreNotFoundException
  5477. // The specified event data store was not found.
  5478. //
  5479. // - InvalidEventSelectorsException
  5480. // This exception is thrown when the PutEventSelectors operation is called with
  5481. // a number of event selectors, advanced event selectors, or data resources
  5482. // that is not valid. The combination of event selectors or advanced event selectors
  5483. // and data resources is not valid. A trail can have up to 5 event selectors.
  5484. // If a trail uses advanced event selectors, a maximum of 500 total values for
  5485. // all conditions in all advanced event selectors is allowed. A trail is limited
  5486. // to 250 data resources. These data resources can be distributed across event
  5487. // selectors, but the overall total cannot exceed 250.
  5488. //
  5489. // You can:
  5490. //
  5491. // - Specify a valid number of event selectors (1 to 5) for a trail.
  5492. //
  5493. // - Specify a valid number of data resources (1 to 250) for an event selector.
  5494. // The limit of number of resources on an individual event selector is configurable
  5495. // up to 250. However, this upper limit is allowed only if the total number
  5496. // of data resources does not exceed 250 across all event selectors for a
  5497. // trail.
  5498. //
  5499. // - Specify up to 500 values for all conditions in all advanced event selectors
  5500. // for a trail.
  5501. //
  5502. // - Specify a valid value for a parameter. For example, specifying the ReadWriteType
  5503. // parameter with a value of read-only is not valid.
  5504. //
  5505. // - EventDataStoreHasOngoingImportException
  5506. // This exception is thrown when you try to update or delete an event data store
  5507. // that currently has an import in progress.
  5508. //
  5509. // - InactiveEventDataStoreException
  5510. // The event data store is inactive.
  5511. //
  5512. // - InvalidParameterException
  5513. // The request includes a parameter that is not valid.
  5514. //
  5515. // - OperationNotPermittedException
  5516. // This exception is thrown when the requested operation is not permitted.
  5517. //
  5518. // - UnsupportedOperationException
  5519. // This exception is thrown when the requested operation is not supported.
  5520. //
  5521. // - InsufficientEncryptionPolicyException
  5522. // This exception is thrown when the policy on the S3 bucket or KMS key does
  5523. // not have sufficient permissions for the operation.
  5524. //
  5525. // - InvalidKmsKeyIdException
  5526. // This exception is thrown when the KMS key ARN is not valid.
  5527. //
  5528. // - KmsKeyNotFoundException
  5529. // This exception is thrown when the KMS key does not exist, when the S3 bucket
  5530. // and the KMS key are not in the same region, or when the KMS key associated
  5531. // with the Amazon SNS topic either does not exist or is not in the same region.
  5532. //
  5533. // - KmsException
  5534. // This exception is thrown when there is an issue with the specified KMS key
  5535. // and the trail or event data store can't be updated.
  5536. //
  5537. // - AccessNotEnabledException
  5538. // This exception is thrown when trusted access has not been enabled between
  5539. // CloudTrail and Organizations. For more information, see Enabling Trusted
  5540. // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  5541. // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  5542. //
  5543. // - InsufficientDependencyServiceAccessPermissionException
  5544. // This exception is thrown when the IAM user or role that is used to create
  5545. // the organization resource lacks one or more required permissions for creating
  5546. // an organization resource in a required service.
  5547. //
  5548. // - OrganizationsNotInUseException
  5549. // This exception is thrown when the request is made from an Amazon Web Services
  5550. // account that is not a member of an organization. To make this request, sign
  5551. // in using the credentials of an account that belongs to an organization.
  5552. //
  5553. // - NotOrganizationMasterAccountException
  5554. // This exception is thrown when the Amazon Web Services account making the
  5555. // request to create or update an organization trail or event data store is
  5556. // not the management account for an organization in Organizations. For more
  5557. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  5558. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  5559. //
  5560. // - NoManagementAccountSLRExistsException
  5561. // This exception is thrown when the management account does not have a service-linked
  5562. // role.
  5563. //
  5564. // - OrganizationNotInAllFeaturesModeException
  5565. // This exception is thrown when Organizations is not configured to support
  5566. // all features. All features must be enabled in Organizations to support creating
  5567. // an organization trail or event data store.
  5568. //
  5569. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore
  5570. func (c *CloudTrail) UpdateEventDataStore(input *UpdateEventDataStoreInput) (*UpdateEventDataStoreOutput, error) {
  5571. req, out := c.UpdateEventDataStoreRequest(input)
  5572. return out, req.Send()
  5573. }
  5574. // UpdateEventDataStoreWithContext is the same as UpdateEventDataStore with the addition of
  5575. // the ability to pass a context and additional request options.
  5576. //
  5577. // See UpdateEventDataStore for details on how to use this API operation.
  5578. //
  5579. // The context must be non-nil and will be used for request cancellation. If
  5580. // the context is nil a panic will occur. In the future the SDK may create
  5581. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5582. // for more information on using Contexts.
  5583. func (c *CloudTrail) UpdateEventDataStoreWithContext(ctx aws.Context, input *UpdateEventDataStoreInput, opts ...request.Option) (*UpdateEventDataStoreOutput, error) {
  5584. req, out := c.UpdateEventDataStoreRequest(input)
  5585. req.SetContext(ctx)
  5586. req.ApplyOptions(opts...)
  5587. return out, req.Send()
  5588. }
  5589. const opUpdateTrail = "UpdateTrail"
  5590. // UpdateTrailRequest generates a "aws/request.Request" representing the
  5591. // client's request for the UpdateTrail operation. The "output" return
  5592. // value will be populated with the request's response once the request completes
  5593. // successfully.
  5594. //
  5595. // Use "Send" method on the returned Request to send the API call to the service.
  5596. // the "output" return value is not valid until after Send returns without error.
  5597. //
  5598. // See UpdateTrail for more information on using the UpdateTrail
  5599. // API call, and error handling.
  5600. //
  5601. // This method is useful when you want to inject custom logic or configuration
  5602. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5603. //
  5604. // // Example sending a request using the UpdateTrailRequest method.
  5605. // req, resp := client.UpdateTrailRequest(params)
  5606. //
  5607. // err := req.Send()
  5608. // if err == nil { // resp is now filled
  5609. // fmt.Println(resp)
  5610. // }
  5611. //
  5612. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
  5613. func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput) {
  5614. op := &request.Operation{
  5615. Name: opUpdateTrail,
  5616. HTTPMethod: "POST",
  5617. HTTPPath: "/",
  5618. }
  5619. if input == nil {
  5620. input = &UpdateTrailInput{}
  5621. }
  5622. output = &UpdateTrailOutput{}
  5623. req = c.newRequest(op, input, output)
  5624. return
  5625. }
  5626. // UpdateTrail API operation for AWS CloudTrail.
  5627. //
  5628. // Updates trail settings that control what events you are logging, and how
  5629. // to handle log files. Changes to a trail do not require stopping the CloudTrail
  5630. // service. Use this action to designate an existing bucket for log delivery.
  5631. // If the existing bucket has previously been a target for CloudTrail log files,
  5632. // an IAM policy exists for the bucket. UpdateTrail must be called from the
  5633. // region in which the trail was created; otherwise, an InvalidHomeRegionException
  5634. // is thrown.
  5635. //
  5636. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5637. // with awserr.Error's Code and Message methods to get detailed information about
  5638. // the error.
  5639. //
  5640. // See the AWS API reference guide for AWS CloudTrail's
  5641. // API operation UpdateTrail for usage and error information.
  5642. //
  5643. // Returned Error Types:
  5644. //
  5645. // - S3BucketDoesNotExistException
  5646. // This exception is thrown when the specified S3 bucket does not exist.
  5647. //
  5648. // - InsufficientS3BucketPolicyException
  5649. // This exception is thrown when the policy on the S3 bucket is not sufficient.
  5650. //
  5651. // - InsufficientSnsTopicPolicyException
  5652. // This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
  5653. //
  5654. // - InsufficientEncryptionPolicyException
  5655. // This exception is thrown when the policy on the S3 bucket or KMS key does
  5656. // not have sufficient permissions for the operation.
  5657. //
  5658. // - TrailNotFoundException
  5659. // This exception is thrown when the trail with the given name is not found.
  5660. //
  5661. // - InvalidS3BucketNameException
  5662. // This exception is thrown when the provided S3 bucket name is not valid.
  5663. //
  5664. // - InvalidS3PrefixException
  5665. // This exception is thrown when the provided S3 prefix is not valid.
  5666. //
  5667. // - InvalidSnsTopicNameException
  5668. // This exception is thrown when the provided SNS topic name is not valid.
  5669. //
  5670. // - InvalidKmsKeyIdException
  5671. // This exception is thrown when the KMS key ARN is not valid.
  5672. //
  5673. // - InvalidTrailNameException
  5674. // This exception is thrown when the provided trail name is not valid. Trail
  5675. // names must meet the following requirements:
  5676. //
  5677. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  5678. // (_), or dashes (-)
  5679. //
  5680. // - Start with a letter or number, and end with a letter or number
  5681. //
  5682. // - Be between 3 and 128 characters
  5683. //
  5684. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  5685. // and my--namespace are not valid.
  5686. //
  5687. // - Not be in IP address format (for example, 192.168.5.4)
  5688. //
  5689. // - TrailNotProvidedException
  5690. // This exception is no longer in use.
  5691. //
  5692. // - InvalidEventSelectorsException
  5693. // This exception is thrown when the PutEventSelectors operation is called with
  5694. // a number of event selectors, advanced event selectors, or data resources
  5695. // that is not valid. The combination of event selectors or advanced event selectors
  5696. // and data resources is not valid. A trail can have up to 5 event selectors.
  5697. // If a trail uses advanced event selectors, a maximum of 500 total values for
  5698. // all conditions in all advanced event selectors is allowed. A trail is limited
  5699. // to 250 data resources. These data resources can be distributed across event
  5700. // selectors, but the overall total cannot exceed 250.
  5701. //
  5702. // You can:
  5703. //
  5704. // - Specify a valid number of event selectors (1 to 5) for a trail.
  5705. //
  5706. // - Specify a valid number of data resources (1 to 250) for an event selector.
  5707. // The limit of number of resources on an individual event selector is configurable
  5708. // up to 250. However, this upper limit is allowed only if the total number
  5709. // of data resources does not exceed 250 across all event selectors for a
  5710. // trail.
  5711. //
  5712. // - Specify up to 500 values for all conditions in all advanced event selectors
  5713. // for a trail.
  5714. //
  5715. // - Specify a valid value for a parameter. For example, specifying the ReadWriteType
  5716. // parameter with a value of read-only is not valid.
  5717. //
  5718. // - ARNInvalidException
  5719. // This exception is thrown when an operation is called with a trail ARN that
  5720. // is not valid. The following is the format of a trail ARN.
  5721. //
  5722. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  5723. //
  5724. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  5725. // event data store, or channel with a resource ARN that is not valid.
  5726. //
  5727. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  5728. //
  5729. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  5730. //
  5731. // - ConflictException
  5732. // This exception is thrown when the specified resource is not ready for an
  5733. // operation. This can occur when you try to run an operation on a resource
  5734. // before CloudTrail has time to fully load the resource, or because another
  5735. // operation is modifying the resource. If this exception occurs, wait a few
  5736. // minutes, and then try the operation again.
  5737. //
  5738. // - InvalidParameterCombinationException
  5739. // This exception is thrown when the combination of parameters provided is not
  5740. // valid.
  5741. //
  5742. // - InvalidHomeRegionException
  5743. // This exception is thrown when an operation is called on a trail from a region
  5744. // other than the region in which the trail was created.
  5745. //
  5746. // - KmsKeyNotFoundException
  5747. // This exception is thrown when the KMS key does not exist, when the S3 bucket
  5748. // and the KMS key are not in the same region, or when the KMS key associated
  5749. // with the Amazon SNS topic either does not exist or is not in the same region.
  5750. //
  5751. // - KmsKeyDisabledException
  5752. // This exception is no longer in use.
  5753. //
  5754. // - KmsException
  5755. // This exception is thrown when there is an issue with the specified KMS key
  5756. // and the trail or event data store can't be updated.
  5757. //
  5758. // - InvalidCloudWatchLogsLogGroupArnException
  5759. // This exception is thrown when the provided CloudWatch Logs log group is not
  5760. // valid.
  5761. //
  5762. // - InvalidCloudWatchLogsRoleArnException
  5763. // This exception is thrown when the provided role is not valid.
  5764. //
  5765. // - CloudWatchLogsDeliveryUnavailableException
  5766. // Cannot set a CloudWatch Logs delivery for this region.
  5767. //
  5768. // - UnsupportedOperationException
  5769. // This exception is thrown when the requested operation is not supported.
  5770. //
  5771. // - OperationNotPermittedException
  5772. // This exception is thrown when the requested operation is not permitted.
  5773. //
  5774. // - AccessNotEnabledException
  5775. // This exception is thrown when trusted access has not been enabled between
  5776. // CloudTrail and Organizations. For more information, see Enabling Trusted
  5777. // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  5778. // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  5779. //
  5780. // - InsufficientDependencyServiceAccessPermissionException
  5781. // This exception is thrown when the IAM user or role that is used to create
  5782. // the organization resource lacks one or more required permissions for creating
  5783. // an organization resource in a required service.
  5784. //
  5785. // - OrganizationsNotInUseException
  5786. // This exception is thrown when the request is made from an Amazon Web Services
  5787. // account that is not a member of an organization. To make this request, sign
  5788. // in using the credentials of an account that belongs to an organization.
  5789. //
  5790. // - NotOrganizationMasterAccountException
  5791. // This exception is thrown when the Amazon Web Services account making the
  5792. // request to create or update an organization trail or event data store is
  5793. // not the management account for an organization in Organizations. For more
  5794. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  5795. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  5796. //
  5797. // - OrganizationNotInAllFeaturesModeException
  5798. // This exception is thrown when Organizations is not configured to support
  5799. // all features. All features must be enabled in Organizations to support creating
  5800. // an organization trail or event data store.
  5801. //
  5802. // - NoManagementAccountSLRExistsException
  5803. // This exception is thrown when the management account does not have a service-linked
  5804. // role.
  5805. //
  5806. // - CloudTrailInvalidClientTokenIdException
  5807. // This exception is thrown when a call results in the InvalidClientTokenId
  5808. // error code. This can occur when you are creating or updating a trail to send
  5809. // notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
  5810. // account.
  5811. //
  5812. // - InvalidParameterException
  5813. // The request includes a parameter that is not valid.
  5814. //
  5815. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
  5816. func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error) {
  5817. req, out := c.UpdateTrailRequest(input)
  5818. return out, req.Send()
  5819. }
  5820. // UpdateTrailWithContext is the same as UpdateTrail with the addition of
  5821. // the ability to pass a context and additional request options.
  5822. //
  5823. // See UpdateTrail for details on how to use this API operation.
  5824. //
  5825. // The context must be non-nil and will be used for request cancellation. If
  5826. // the context is nil a panic will occur. In the future the SDK may create
  5827. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5828. // for more information on using Contexts.
  5829. func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailInput, opts ...request.Option) (*UpdateTrailOutput, error) {
  5830. req, out := c.UpdateTrailRequest(input)
  5831. req.SetContext(ctx)
  5832. req.ApplyOptions(opts...)
  5833. return out, req.Send()
  5834. }
  5835. // This exception is thrown when an operation is called with a trail ARN that
  5836. // is not valid. The following is the format of a trail ARN.
  5837. //
  5838. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  5839. //
  5840. // This exception is also thrown when you call AddTags or RemoveTags on a trail,
  5841. // event data store, or channel with a resource ARN that is not valid.
  5842. //
  5843. // The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  5844. //
  5845. // The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  5846. type ARNInvalidException struct {
  5847. _ struct{} `type:"structure"`
  5848. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5849. Message_ *string `locationName:"message" type:"string"`
  5850. }
  5851. // String returns the string representation.
  5852. //
  5853. // API parameter values that are decorated as "sensitive" in the API will not
  5854. // be included in the string output. The member name will be present, but the
  5855. // value will be replaced with "sensitive".
  5856. func (s ARNInvalidException) String() string {
  5857. return awsutil.Prettify(s)
  5858. }
  5859. // GoString returns the string representation.
  5860. //
  5861. // API parameter values that are decorated as "sensitive" in the API will not
  5862. // be included in the string output. The member name will be present, but the
  5863. // value will be replaced with "sensitive".
  5864. func (s ARNInvalidException) GoString() string {
  5865. return s.String()
  5866. }
  5867. func newErrorARNInvalidException(v protocol.ResponseMetadata) error {
  5868. return &ARNInvalidException{
  5869. RespMetadata: v,
  5870. }
  5871. }
  5872. // Code returns the exception type name.
  5873. func (s *ARNInvalidException) Code() string {
  5874. return "CloudTrailARNInvalidException"
  5875. }
  5876. // Message returns the exception's message.
  5877. func (s *ARNInvalidException) Message() string {
  5878. if s.Message_ != nil {
  5879. return *s.Message_
  5880. }
  5881. return ""
  5882. }
  5883. // OrigErr always returns nil, satisfies awserr.Error interface.
  5884. func (s *ARNInvalidException) OrigErr() error {
  5885. return nil
  5886. }
  5887. func (s *ARNInvalidException) Error() string {
  5888. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5889. }
  5890. // Status code returns the HTTP status code for the request's response error.
  5891. func (s *ARNInvalidException) StatusCode() int {
  5892. return s.RespMetadata.StatusCode
  5893. }
  5894. // RequestID returns the service's response RequestID for request.
  5895. func (s *ARNInvalidException) RequestID() string {
  5896. return s.RespMetadata.RequestID
  5897. }
  5898. // This exception is thrown when trusted access has not been enabled between
  5899. // CloudTrail and Organizations. For more information, see Enabling Trusted
  5900. // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  5901. // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  5902. type AccessNotEnabledException struct {
  5903. _ struct{} `type:"structure"`
  5904. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5905. Message_ *string `locationName:"message" type:"string"`
  5906. }
  5907. // String returns the string representation.
  5908. //
  5909. // API parameter values that are decorated as "sensitive" in the API will not
  5910. // be included in the string output. The member name will be present, but the
  5911. // value will be replaced with "sensitive".
  5912. func (s AccessNotEnabledException) String() string {
  5913. return awsutil.Prettify(s)
  5914. }
  5915. // GoString returns the string representation.
  5916. //
  5917. // API parameter values that are decorated as "sensitive" in the API will not
  5918. // be included in the string output. The member name will be present, but the
  5919. // value will be replaced with "sensitive".
  5920. func (s AccessNotEnabledException) GoString() string {
  5921. return s.String()
  5922. }
  5923. func newErrorAccessNotEnabledException(v protocol.ResponseMetadata) error {
  5924. return &AccessNotEnabledException{
  5925. RespMetadata: v,
  5926. }
  5927. }
  5928. // Code returns the exception type name.
  5929. func (s *AccessNotEnabledException) Code() string {
  5930. return "CloudTrailAccessNotEnabledException"
  5931. }
  5932. // Message returns the exception's message.
  5933. func (s *AccessNotEnabledException) Message() string {
  5934. if s.Message_ != nil {
  5935. return *s.Message_
  5936. }
  5937. return ""
  5938. }
  5939. // OrigErr always returns nil, satisfies awserr.Error interface.
  5940. func (s *AccessNotEnabledException) OrigErr() error {
  5941. return nil
  5942. }
  5943. func (s *AccessNotEnabledException) Error() string {
  5944. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5945. }
  5946. // Status code returns the HTTP status code for the request's response error.
  5947. func (s *AccessNotEnabledException) StatusCode() int {
  5948. return s.RespMetadata.StatusCode
  5949. }
  5950. // RequestID returns the service's response RequestID for request.
  5951. func (s *AccessNotEnabledException) RequestID() string {
  5952. return s.RespMetadata.RequestID
  5953. }
  5954. // This exception is thrown when you start a new import and a previous import
  5955. // is still in progress.
  5956. type AccountHasOngoingImportException struct {
  5957. _ struct{} `type:"structure"`
  5958. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5959. Message_ *string `locationName:"message" type:"string"`
  5960. }
  5961. // String returns the string representation.
  5962. //
  5963. // API parameter values that are decorated as "sensitive" in the API will not
  5964. // be included in the string output. The member name will be present, but the
  5965. // value will be replaced with "sensitive".
  5966. func (s AccountHasOngoingImportException) String() string {
  5967. return awsutil.Prettify(s)
  5968. }
  5969. // GoString returns the string representation.
  5970. //
  5971. // API parameter values that are decorated as "sensitive" in the API will not
  5972. // be included in the string output. The member name will be present, but the
  5973. // value will be replaced with "sensitive".
  5974. func (s AccountHasOngoingImportException) GoString() string {
  5975. return s.String()
  5976. }
  5977. func newErrorAccountHasOngoingImportException(v protocol.ResponseMetadata) error {
  5978. return &AccountHasOngoingImportException{
  5979. RespMetadata: v,
  5980. }
  5981. }
  5982. // Code returns the exception type name.
  5983. func (s *AccountHasOngoingImportException) Code() string {
  5984. return "AccountHasOngoingImportException"
  5985. }
  5986. // Message returns the exception's message.
  5987. func (s *AccountHasOngoingImportException) Message() string {
  5988. if s.Message_ != nil {
  5989. return *s.Message_
  5990. }
  5991. return ""
  5992. }
  5993. // OrigErr always returns nil, satisfies awserr.Error interface.
  5994. func (s *AccountHasOngoingImportException) OrigErr() error {
  5995. return nil
  5996. }
  5997. func (s *AccountHasOngoingImportException) Error() string {
  5998. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5999. }
  6000. // Status code returns the HTTP status code for the request's response error.
  6001. func (s *AccountHasOngoingImportException) StatusCode() int {
  6002. return s.RespMetadata.StatusCode
  6003. }
  6004. // RequestID returns the service's response RequestID for request.
  6005. func (s *AccountHasOngoingImportException) RequestID() string {
  6006. return s.RespMetadata.RequestID
  6007. }
  6008. // This exception is thrown when the specified account is not found or not part
  6009. // of an organization.
  6010. type AccountNotFoundException struct {
  6011. _ struct{} `type:"structure"`
  6012. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6013. Message_ *string `locationName:"message" type:"string"`
  6014. }
  6015. // String returns the string representation.
  6016. //
  6017. // API parameter values that are decorated as "sensitive" in the API will not
  6018. // be included in the string output. The member name will be present, but the
  6019. // value will be replaced with "sensitive".
  6020. func (s AccountNotFoundException) String() string {
  6021. return awsutil.Prettify(s)
  6022. }
  6023. // GoString returns the string representation.
  6024. //
  6025. // API parameter values that are decorated as "sensitive" in the API will not
  6026. // be included in the string output. The member name will be present, but the
  6027. // value will be replaced with "sensitive".
  6028. func (s AccountNotFoundException) GoString() string {
  6029. return s.String()
  6030. }
  6031. func newErrorAccountNotFoundException(v protocol.ResponseMetadata) error {
  6032. return &AccountNotFoundException{
  6033. RespMetadata: v,
  6034. }
  6035. }
  6036. // Code returns the exception type name.
  6037. func (s *AccountNotFoundException) Code() string {
  6038. return "AccountNotFoundException"
  6039. }
  6040. // Message returns the exception's message.
  6041. func (s *AccountNotFoundException) Message() string {
  6042. if s.Message_ != nil {
  6043. return *s.Message_
  6044. }
  6045. return ""
  6046. }
  6047. // OrigErr always returns nil, satisfies awserr.Error interface.
  6048. func (s *AccountNotFoundException) OrigErr() error {
  6049. return nil
  6050. }
  6051. func (s *AccountNotFoundException) Error() string {
  6052. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6053. }
  6054. // Status code returns the HTTP status code for the request's response error.
  6055. func (s *AccountNotFoundException) StatusCode() int {
  6056. return s.RespMetadata.StatusCode
  6057. }
  6058. // RequestID returns the service's response RequestID for request.
  6059. func (s *AccountNotFoundException) RequestID() string {
  6060. return s.RespMetadata.RequestID
  6061. }
  6062. // This exception is thrown when the specified account is not registered as
  6063. // the CloudTrail delegated administrator.
  6064. type AccountNotRegisteredException struct {
  6065. _ struct{} `type:"structure"`
  6066. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6067. Message_ *string `locationName:"message" type:"string"`
  6068. }
  6069. // String returns the string representation.
  6070. //
  6071. // API parameter values that are decorated as "sensitive" in the API will not
  6072. // be included in the string output. The member name will be present, but the
  6073. // value will be replaced with "sensitive".
  6074. func (s AccountNotRegisteredException) String() string {
  6075. return awsutil.Prettify(s)
  6076. }
  6077. // GoString returns the string representation.
  6078. //
  6079. // API parameter values that are decorated as "sensitive" in the API will not
  6080. // be included in the string output. The member name will be present, but the
  6081. // value will be replaced with "sensitive".
  6082. func (s AccountNotRegisteredException) GoString() string {
  6083. return s.String()
  6084. }
  6085. func newErrorAccountNotRegisteredException(v protocol.ResponseMetadata) error {
  6086. return &AccountNotRegisteredException{
  6087. RespMetadata: v,
  6088. }
  6089. }
  6090. // Code returns the exception type name.
  6091. func (s *AccountNotRegisteredException) Code() string {
  6092. return "AccountNotRegisteredException"
  6093. }
  6094. // Message returns the exception's message.
  6095. func (s *AccountNotRegisteredException) Message() string {
  6096. if s.Message_ != nil {
  6097. return *s.Message_
  6098. }
  6099. return ""
  6100. }
  6101. // OrigErr always returns nil, satisfies awserr.Error interface.
  6102. func (s *AccountNotRegisteredException) OrigErr() error {
  6103. return nil
  6104. }
  6105. func (s *AccountNotRegisteredException) Error() string {
  6106. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6107. }
  6108. // Status code returns the HTTP status code for the request's response error.
  6109. func (s *AccountNotRegisteredException) StatusCode() int {
  6110. return s.RespMetadata.StatusCode
  6111. }
  6112. // RequestID returns the service's response RequestID for request.
  6113. func (s *AccountNotRegisteredException) RequestID() string {
  6114. return s.RespMetadata.RequestID
  6115. }
  6116. // This exception is thrown when the account is already registered as the CloudTrail
  6117. // delegated administrator.
  6118. type AccountRegisteredException struct {
  6119. _ struct{} `type:"structure"`
  6120. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6121. Message_ *string `locationName:"message" type:"string"`
  6122. }
  6123. // String returns the string representation.
  6124. //
  6125. // API parameter values that are decorated as "sensitive" in the API will not
  6126. // be included in the string output. The member name will be present, but the
  6127. // value will be replaced with "sensitive".
  6128. func (s AccountRegisteredException) String() string {
  6129. return awsutil.Prettify(s)
  6130. }
  6131. // GoString returns the string representation.
  6132. //
  6133. // API parameter values that are decorated as "sensitive" in the API will not
  6134. // be included in the string output. The member name will be present, but the
  6135. // value will be replaced with "sensitive".
  6136. func (s AccountRegisteredException) GoString() string {
  6137. return s.String()
  6138. }
  6139. func newErrorAccountRegisteredException(v protocol.ResponseMetadata) error {
  6140. return &AccountRegisteredException{
  6141. RespMetadata: v,
  6142. }
  6143. }
  6144. // Code returns the exception type name.
  6145. func (s *AccountRegisteredException) Code() string {
  6146. return "AccountRegisteredException"
  6147. }
  6148. // Message returns the exception's message.
  6149. func (s *AccountRegisteredException) Message() string {
  6150. if s.Message_ != nil {
  6151. return *s.Message_
  6152. }
  6153. return ""
  6154. }
  6155. // OrigErr always returns nil, satisfies awserr.Error interface.
  6156. func (s *AccountRegisteredException) OrigErr() error {
  6157. return nil
  6158. }
  6159. func (s *AccountRegisteredException) Error() string {
  6160. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6161. }
  6162. // Status code returns the HTTP status code for the request's response error.
  6163. func (s *AccountRegisteredException) StatusCode() int {
  6164. return s.RespMetadata.StatusCode
  6165. }
  6166. // RequestID returns the service's response RequestID for request.
  6167. func (s *AccountRegisteredException) RequestID() string {
  6168. return s.RespMetadata.RequestID
  6169. }
  6170. // Specifies the tags to add to a trail, event data store, or channel.
  6171. type AddTagsInput struct {
  6172. _ struct{} `type:"structure"`
  6173. // Specifies the ARN of the trail, event data store, or channel to which one
  6174. // or more tags will be added.
  6175. //
  6176. // The format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  6177. //
  6178. // The format of an event data store ARN is: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  6179. //
  6180. // The format of a channel ARN is: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  6181. //
  6182. // ResourceId is a required field
  6183. ResourceId *string `type:"string" required:"true"`
  6184. // Contains a list of tags, up to a limit of 50
  6185. //
  6186. // TagsList is a required field
  6187. TagsList []*Tag `type:"list" required:"true"`
  6188. }
  6189. // String returns the string representation.
  6190. //
  6191. // API parameter values that are decorated as "sensitive" in the API will not
  6192. // be included in the string output. The member name will be present, but the
  6193. // value will be replaced with "sensitive".
  6194. func (s AddTagsInput) String() string {
  6195. return awsutil.Prettify(s)
  6196. }
  6197. // GoString returns the string representation.
  6198. //
  6199. // API parameter values that are decorated as "sensitive" in the API will not
  6200. // be included in the string output. The member name will be present, but the
  6201. // value will be replaced with "sensitive".
  6202. func (s AddTagsInput) GoString() string {
  6203. return s.String()
  6204. }
  6205. // Validate inspects the fields of the type to determine if they are valid.
  6206. func (s *AddTagsInput) Validate() error {
  6207. invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
  6208. if s.ResourceId == nil {
  6209. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6210. }
  6211. if s.TagsList == nil {
  6212. invalidParams.Add(request.NewErrParamRequired("TagsList"))
  6213. }
  6214. if s.TagsList != nil {
  6215. for i, v := range s.TagsList {
  6216. if v == nil {
  6217. continue
  6218. }
  6219. if err := v.Validate(); err != nil {
  6220. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  6221. }
  6222. }
  6223. }
  6224. if invalidParams.Len() > 0 {
  6225. return invalidParams
  6226. }
  6227. return nil
  6228. }
  6229. // SetResourceId sets the ResourceId field's value.
  6230. func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput {
  6231. s.ResourceId = &v
  6232. return s
  6233. }
  6234. // SetTagsList sets the TagsList field's value.
  6235. func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput {
  6236. s.TagsList = v
  6237. return s
  6238. }
  6239. // Returns the objects or data if successful. Otherwise, returns an error.
  6240. type AddTagsOutput struct {
  6241. _ struct{} `type:"structure"`
  6242. }
  6243. // String returns the string representation.
  6244. //
  6245. // API parameter values that are decorated as "sensitive" in the API will not
  6246. // be included in the string output. The member name will be present, but the
  6247. // value will be replaced with "sensitive".
  6248. func (s AddTagsOutput) String() string {
  6249. return awsutil.Prettify(s)
  6250. }
  6251. // GoString returns the string representation.
  6252. //
  6253. // API parameter values that are decorated as "sensitive" in the API will not
  6254. // be included in the string output. The member name will be present, but the
  6255. // value will be replaced with "sensitive".
  6256. func (s AddTagsOutput) GoString() string {
  6257. return s.String()
  6258. }
  6259. // Advanced event selectors let you create fine-grained selectors for the following
  6260. // CloudTrail event record fields. They help you control costs by logging only
  6261. // those events that are important to you. For more information about advanced
  6262. // event selectors, see Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
  6263. // in the CloudTrail User Guide.
  6264. //
  6265. // - readOnly
  6266. //
  6267. // - eventSource
  6268. //
  6269. // - eventName
  6270. //
  6271. // - eventCategory
  6272. //
  6273. // - resources.type
  6274. //
  6275. // - resources.ARN
  6276. //
  6277. // You cannot apply both event selectors and advanced event selectors to a trail.
  6278. type AdvancedEventSelector struct {
  6279. _ struct{} `type:"structure"`
  6280. // Contains all selector statements in an advanced event selector.
  6281. //
  6282. // FieldSelectors is a required field
  6283. FieldSelectors []*AdvancedFieldSelector `min:"1" type:"list" required:"true"`
  6284. // An optional, descriptive name for an advanced event selector, such as "Log
  6285. // data events for only two S3 buckets".
  6286. Name *string `type:"string"`
  6287. }
  6288. // String returns the string representation.
  6289. //
  6290. // API parameter values that are decorated as "sensitive" in the API will not
  6291. // be included in the string output. The member name will be present, but the
  6292. // value will be replaced with "sensitive".
  6293. func (s AdvancedEventSelector) String() string {
  6294. return awsutil.Prettify(s)
  6295. }
  6296. // GoString returns the string representation.
  6297. //
  6298. // API parameter values that are decorated as "sensitive" in the API will not
  6299. // be included in the string output. The member name will be present, but the
  6300. // value will be replaced with "sensitive".
  6301. func (s AdvancedEventSelector) GoString() string {
  6302. return s.String()
  6303. }
  6304. // Validate inspects the fields of the type to determine if they are valid.
  6305. func (s *AdvancedEventSelector) Validate() error {
  6306. invalidParams := request.ErrInvalidParams{Context: "AdvancedEventSelector"}
  6307. if s.FieldSelectors == nil {
  6308. invalidParams.Add(request.NewErrParamRequired("FieldSelectors"))
  6309. }
  6310. if s.FieldSelectors != nil && len(s.FieldSelectors) < 1 {
  6311. invalidParams.Add(request.NewErrParamMinLen("FieldSelectors", 1))
  6312. }
  6313. if s.FieldSelectors != nil {
  6314. for i, v := range s.FieldSelectors {
  6315. if v == nil {
  6316. continue
  6317. }
  6318. if err := v.Validate(); err != nil {
  6319. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FieldSelectors", i), err.(request.ErrInvalidParams))
  6320. }
  6321. }
  6322. }
  6323. if invalidParams.Len() > 0 {
  6324. return invalidParams
  6325. }
  6326. return nil
  6327. }
  6328. // SetFieldSelectors sets the FieldSelectors field's value.
  6329. func (s *AdvancedEventSelector) SetFieldSelectors(v []*AdvancedFieldSelector) *AdvancedEventSelector {
  6330. s.FieldSelectors = v
  6331. return s
  6332. }
  6333. // SetName sets the Name field's value.
  6334. func (s *AdvancedEventSelector) SetName(v string) *AdvancedEventSelector {
  6335. s.Name = &v
  6336. return s
  6337. }
  6338. // A single selector statement in an advanced event selector.
  6339. type AdvancedFieldSelector struct {
  6340. _ struct{} `type:"structure"`
  6341. // An operator that includes events that match the last few characters of the
  6342. // event record field specified as the value of Field.
  6343. EndsWith []*string `min:"1" type:"list"`
  6344. // An operator that includes events that match the exact value of the event
  6345. // record field specified as the value of Field. This is the only valid operator
  6346. // that you can use with the readOnly, eventCategory, and resources.type fields.
  6347. Equals []*string `min:"1" type:"list"`
  6348. // A field in a CloudTrail event record on which to filter events to be logged.
  6349. // For event data stores for Config configuration items, Audit Manager evidence,
  6350. // or non-Amazon Web Services events, the field is used only for selecting events
  6351. // as filtering is not supported.
  6352. //
  6353. // For CloudTrail event records, supported fields include readOnly, eventCategory,
  6354. // eventSource (for management events), eventName, resources.type, and resources.ARN.
  6355. //
  6356. // For event data stores for Config configuration items, Audit Manager evidence,
  6357. // or non-Amazon Web Services events, the only supported field is eventCategory.
  6358. //
  6359. // * readOnly - Optional. Can be set to Equals a value of true or false.
  6360. // If you do not add this field, CloudTrail logs both read and write events.
  6361. // A value of true logs only read events. A value of false logs only write
  6362. // events.
  6363. //
  6364. // * eventSource - For filtering management events only. This can be set
  6365. // only to NotEquals kms.amazonaws.com.
  6366. //
  6367. // * eventName - Can use any operator. You can use it to filter in or filter
  6368. // out any data event logged to CloudTrail, such as PutBucket or GetSnapshotBlock.
  6369. // You can have multiple values for this field, separated by commas.
  6370. //
  6371. // * eventCategory - This is required and must be set to Equals. For CloudTrail
  6372. // event records, the value must be Management or Data. For Config configuration
  6373. // items, the value must be ConfigurationItem. For Audit Manager evidence,
  6374. // the value must be Evidence. For non-Amazon Web Services events, the value
  6375. // must be ActivityAuditLog.
  6376. //
  6377. // * resources.type - This field is required for CloudTrail data events.
  6378. // resources.type can only use the Equals operator, and the value can be
  6379. // one of the following: AWS::CloudTrail::Channel AWS::S3::Object AWS::Lambda::Function
  6380. // AWS::DynamoDB::Table AWS::S3Outposts::Object AWS::ManagedBlockchain::Node
  6381. // AWS::S3ObjectLambda::AccessPoint AWS::EC2::Snapshot AWS::S3::AccessPoint
  6382. // AWS::DynamoDB::Stream AWS::Glue::Table AWS::FinSpace::Environment AWS::SageMaker::ExperimentTrialComponent
  6383. // AWS::SageMaker::FeatureGroup You can have only one resources.type field
  6384. // per selector. To log data events on more than one resource type, add another
  6385. // selector.
  6386. //
  6387. // * resources.ARN - You can use any operator with resources.ARN, but if
  6388. // you use Equals or NotEquals, the value must exactly match the ARN of a
  6389. // valid resource of the type you've specified in the template as the value
  6390. // of resources.type. For example, if resources.type equals AWS::S3::Object,
  6391. // the ARN must be in one of the following formats. To log all data events
  6392. // for all objects in a specific S3 bucket, use the StartsWith operator,
  6393. // and include only the bucket ARN as the matching value. The trailing slash
  6394. // is intentional; do not exclude it. Replace the text between less than
  6395. // and greater than symbols (<>) with resource-specific information. arn:<partition>:s3:::<bucket_name>/
  6396. // arn:<partition>:s3:::<bucket_name>/<object_path>/ When resources.type
  6397. // equals AWS::S3::AccessPoint, and the operator is set to Equals or NotEquals,
  6398. // the ARN must be in one of the following formats. To log events on all
  6399. // objects in an S3 access point, we recommend that you use only the access
  6400. // point ARN, don’t include the object path, and use the StartsWith or
  6401. // NotStartsWith operators. arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
  6402. // arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
  6403. // When resources.type equals AWS::Lambda::Function, and the operator is
  6404. // set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
  6405. // When resources.type equals AWS::DynamoDB::Table, and the operator is set
  6406. // to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
  6407. // When resources.type equals AWS::CloudTrail::Channel, and the operator
  6408. // is set to Equals or NotEquals, the ARN must be in the following format:
  6409. // arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
  6410. // When resources.type equals AWS::S3Outposts::Object, and the operator is
  6411. // set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
  6412. // When resources.type equals AWS::ManagedBlockchain::Node, and the operator
  6413. // is set to Equals or NotEquals, the ARN must be in the following format:
  6414. // arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
  6415. // When resources.type equals AWS::S3ObjectLambda::AccessPoint, and the operator
  6416. // is set to Equals or NotEquals, the ARN must be in the following format:
  6417. // arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
  6418. // When resources.type equals AWS::EC2::Snapshot, and the operator is set
  6419. // to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
  6420. // When resources.type equals AWS::DynamoDB::Stream, and the operator is
  6421. // set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
  6422. // When resources.type equals AWS::Glue::Table, and the operator is set to
  6423. // Equals or NotEquals, the ARN must be in the following format: arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
  6424. // When resources.type equals AWS::FinSpace::Environment, and the operator
  6425. // is set to Equals or NotEquals, the ARN must be in the following format:
  6426. // arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
  6427. // When resources.type equals AWS::SageMaker::ExperimentTrialComponent, and
  6428. // the operator is set to Equals or NotEquals, the ARN must be in the following
  6429. // format: arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
  6430. // When resources.type equals AWS::SageMaker::FeatureGroup, and the operator
  6431. // is set to Equals or NotEquals, the ARN must be in the following format:
  6432. // arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
  6433. //
  6434. // Field is a required field
  6435. Field *string `min:"1" type:"string" required:"true"`
  6436. // An operator that excludes events that match the last few characters of the
  6437. // event record field specified as the value of Field.
  6438. NotEndsWith []*string `min:"1" type:"list"`
  6439. // An operator that excludes events that match the exact value of the event
  6440. // record field specified as the value of Field.
  6441. NotEquals []*string `min:"1" type:"list"`
  6442. // An operator that excludes events that match the first few characters of the
  6443. // event record field specified as the value of Field.
  6444. NotStartsWith []*string `min:"1" type:"list"`
  6445. // An operator that includes events that match the first few characters of the
  6446. // event record field specified as the value of Field.
  6447. StartsWith []*string `min:"1" type:"list"`
  6448. }
  6449. // String returns the string representation.
  6450. //
  6451. // API parameter values that are decorated as "sensitive" in the API will not
  6452. // be included in the string output. The member name will be present, but the
  6453. // value will be replaced with "sensitive".
  6454. func (s AdvancedFieldSelector) String() string {
  6455. return awsutil.Prettify(s)
  6456. }
  6457. // GoString returns the string representation.
  6458. //
  6459. // API parameter values that are decorated as "sensitive" in the API will not
  6460. // be included in the string output. The member name will be present, but the
  6461. // value will be replaced with "sensitive".
  6462. func (s AdvancedFieldSelector) GoString() string {
  6463. return s.String()
  6464. }
  6465. // Validate inspects the fields of the type to determine if they are valid.
  6466. func (s *AdvancedFieldSelector) Validate() error {
  6467. invalidParams := request.ErrInvalidParams{Context: "AdvancedFieldSelector"}
  6468. if s.EndsWith != nil && len(s.EndsWith) < 1 {
  6469. invalidParams.Add(request.NewErrParamMinLen("EndsWith", 1))
  6470. }
  6471. if s.Equals != nil && len(s.Equals) < 1 {
  6472. invalidParams.Add(request.NewErrParamMinLen("Equals", 1))
  6473. }
  6474. if s.Field == nil {
  6475. invalidParams.Add(request.NewErrParamRequired("Field"))
  6476. }
  6477. if s.Field != nil && len(*s.Field) < 1 {
  6478. invalidParams.Add(request.NewErrParamMinLen("Field", 1))
  6479. }
  6480. if s.NotEndsWith != nil && len(s.NotEndsWith) < 1 {
  6481. invalidParams.Add(request.NewErrParamMinLen("NotEndsWith", 1))
  6482. }
  6483. if s.NotEquals != nil && len(s.NotEquals) < 1 {
  6484. invalidParams.Add(request.NewErrParamMinLen("NotEquals", 1))
  6485. }
  6486. if s.NotStartsWith != nil && len(s.NotStartsWith) < 1 {
  6487. invalidParams.Add(request.NewErrParamMinLen("NotStartsWith", 1))
  6488. }
  6489. if s.StartsWith != nil && len(s.StartsWith) < 1 {
  6490. invalidParams.Add(request.NewErrParamMinLen("StartsWith", 1))
  6491. }
  6492. if invalidParams.Len() > 0 {
  6493. return invalidParams
  6494. }
  6495. return nil
  6496. }
  6497. // SetEndsWith sets the EndsWith field's value.
  6498. func (s *AdvancedFieldSelector) SetEndsWith(v []*string) *AdvancedFieldSelector {
  6499. s.EndsWith = v
  6500. return s
  6501. }
  6502. // SetEquals sets the Equals field's value.
  6503. func (s *AdvancedFieldSelector) SetEquals(v []*string) *AdvancedFieldSelector {
  6504. s.Equals = v
  6505. return s
  6506. }
  6507. // SetField sets the Field field's value.
  6508. func (s *AdvancedFieldSelector) SetField(v string) *AdvancedFieldSelector {
  6509. s.Field = &v
  6510. return s
  6511. }
  6512. // SetNotEndsWith sets the NotEndsWith field's value.
  6513. func (s *AdvancedFieldSelector) SetNotEndsWith(v []*string) *AdvancedFieldSelector {
  6514. s.NotEndsWith = v
  6515. return s
  6516. }
  6517. // SetNotEquals sets the NotEquals field's value.
  6518. func (s *AdvancedFieldSelector) SetNotEquals(v []*string) *AdvancedFieldSelector {
  6519. s.NotEquals = v
  6520. return s
  6521. }
  6522. // SetNotStartsWith sets the NotStartsWith field's value.
  6523. func (s *AdvancedFieldSelector) SetNotStartsWith(v []*string) *AdvancedFieldSelector {
  6524. s.NotStartsWith = v
  6525. return s
  6526. }
  6527. // SetStartsWith sets the StartsWith field's value.
  6528. func (s *AdvancedFieldSelector) SetStartsWith(v []*string) *AdvancedFieldSelector {
  6529. s.StartsWith = v
  6530. return s
  6531. }
  6532. type CancelQueryInput struct {
  6533. _ struct{} `type:"structure"`
  6534. // The ARN (or the ID suffix of the ARN) of an event data store on which the
  6535. // specified query is running.
  6536. //
  6537. // Deprecated: EventDataStore is no longer required by CancelQueryRequest
  6538. EventDataStore *string `min:"3" deprecated:"true" type:"string"`
  6539. // The ID of the query that you want to cancel. The QueryId comes from the response
  6540. // of a StartQuery operation.
  6541. //
  6542. // QueryId is a required field
  6543. QueryId *string `min:"36" type:"string" required:"true"`
  6544. }
  6545. // String returns the string representation.
  6546. //
  6547. // API parameter values that are decorated as "sensitive" in the API will not
  6548. // be included in the string output. The member name will be present, but the
  6549. // value will be replaced with "sensitive".
  6550. func (s CancelQueryInput) String() string {
  6551. return awsutil.Prettify(s)
  6552. }
  6553. // GoString returns the string representation.
  6554. //
  6555. // API parameter values that are decorated as "sensitive" in the API will not
  6556. // be included in the string output. The member name will be present, but the
  6557. // value will be replaced with "sensitive".
  6558. func (s CancelQueryInput) GoString() string {
  6559. return s.String()
  6560. }
  6561. // Validate inspects the fields of the type to determine if they are valid.
  6562. func (s *CancelQueryInput) Validate() error {
  6563. invalidParams := request.ErrInvalidParams{Context: "CancelQueryInput"}
  6564. if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
  6565. invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
  6566. }
  6567. if s.QueryId == nil {
  6568. invalidParams.Add(request.NewErrParamRequired("QueryId"))
  6569. }
  6570. if s.QueryId != nil && len(*s.QueryId) < 36 {
  6571. invalidParams.Add(request.NewErrParamMinLen("QueryId", 36))
  6572. }
  6573. if invalidParams.Len() > 0 {
  6574. return invalidParams
  6575. }
  6576. return nil
  6577. }
  6578. // SetEventDataStore sets the EventDataStore field's value.
  6579. func (s *CancelQueryInput) SetEventDataStore(v string) *CancelQueryInput {
  6580. s.EventDataStore = &v
  6581. return s
  6582. }
  6583. // SetQueryId sets the QueryId field's value.
  6584. func (s *CancelQueryInput) SetQueryId(v string) *CancelQueryInput {
  6585. s.QueryId = &v
  6586. return s
  6587. }
  6588. type CancelQueryOutput struct {
  6589. _ struct{} `type:"structure"`
  6590. // The ID of the canceled query.
  6591. //
  6592. // QueryId is a required field
  6593. QueryId *string `min:"36" type:"string" required:"true"`
  6594. // Shows the status of a query after a CancelQuery request. Typically, the values
  6595. // shown are either RUNNING or CANCELLED.
  6596. //
  6597. // QueryStatus is a required field
  6598. QueryStatus *string `type:"string" required:"true" enum:"QueryStatus"`
  6599. }
  6600. // String returns the string representation.
  6601. //
  6602. // API parameter values that are decorated as "sensitive" in the API will not
  6603. // be included in the string output. The member name will be present, but the
  6604. // value will be replaced with "sensitive".
  6605. func (s CancelQueryOutput) String() string {
  6606. return awsutil.Prettify(s)
  6607. }
  6608. // GoString returns the string representation.
  6609. //
  6610. // API parameter values that are decorated as "sensitive" in the API will not
  6611. // be included in the string output. The member name will be present, but the
  6612. // value will be replaced with "sensitive".
  6613. func (s CancelQueryOutput) GoString() string {
  6614. return s.String()
  6615. }
  6616. // SetQueryId sets the QueryId field's value.
  6617. func (s *CancelQueryOutput) SetQueryId(v string) *CancelQueryOutput {
  6618. s.QueryId = &v
  6619. return s
  6620. }
  6621. // SetQueryStatus sets the QueryStatus field's value.
  6622. func (s *CancelQueryOutput) SetQueryStatus(v string) *CancelQueryOutput {
  6623. s.QueryStatus = &v
  6624. return s
  6625. }
  6626. // This exception is thrown when the management account of an organization is
  6627. // registered as the CloudTrail delegated administrator.
  6628. type CannotDelegateManagementAccountException struct {
  6629. _ struct{} `type:"structure"`
  6630. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6631. Message_ *string `locationName:"message" type:"string"`
  6632. }
  6633. // String returns the string representation.
  6634. //
  6635. // API parameter values that are decorated as "sensitive" in the API will not
  6636. // be included in the string output. The member name will be present, but the
  6637. // value will be replaced with "sensitive".
  6638. func (s CannotDelegateManagementAccountException) String() string {
  6639. return awsutil.Prettify(s)
  6640. }
  6641. // GoString returns the string representation.
  6642. //
  6643. // API parameter values that are decorated as "sensitive" in the API will not
  6644. // be included in the string output. The member name will be present, but the
  6645. // value will be replaced with "sensitive".
  6646. func (s CannotDelegateManagementAccountException) GoString() string {
  6647. return s.String()
  6648. }
  6649. func newErrorCannotDelegateManagementAccountException(v protocol.ResponseMetadata) error {
  6650. return &CannotDelegateManagementAccountException{
  6651. RespMetadata: v,
  6652. }
  6653. }
  6654. // Code returns the exception type name.
  6655. func (s *CannotDelegateManagementAccountException) Code() string {
  6656. return "CannotDelegateManagementAccountException"
  6657. }
  6658. // Message returns the exception's message.
  6659. func (s *CannotDelegateManagementAccountException) Message() string {
  6660. if s.Message_ != nil {
  6661. return *s.Message_
  6662. }
  6663. return ""
  6664. }
  6665. // OrigErr always returns nil, satisfies awserr.Error interface.
  6666. func (s *CannotDelegateManagementAccountException) OrigErr() error {
  6667. return nil
  6668. }
  6669. func (s *CannotDelegateManagementAccountException) Error() string {
  6670. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6671. }
  6672. // Status code returns the HTTP status code for the request's response error.
  6673. func (s *CannotDelegateManagementAccountException) StatusCode() int {
  6674. return s.RespMetadata.StatusCode
  6675. }
  6676. // RequestID returns the service's response RequestID for request.
  6677. func (s *CannotDelegateManagementAccountException) RequestID() string {
  6678. return s.RespMetadata.RequestID
  6679. }
  6680. // Contains information about a returned CloudTrail channel.
  6681. type Channel struct {
  6682. _ struct{} `type:"structure"`
  6683. // The Amazon Resource Name (ARN) of a channel.
  6684. ChannelArn *string `min:"3" type:"string"`
  6685. // The name of the CloudTrail channel. For service-linked channels, the name
  6686. // is aws-service-channel/service-name/custom-suffix where service-name represents
  6687. // the name of the Amazon Web Services service that created the channel and
  6688. // custom-suffix represents the suffix created by the Amazon Web Services service.
  6689. Name *string `min:"3" type:"string"`
  6690. }
  6691. // String returns the string representation.
  6692. //
  6693. // API parameter values that are decorated as "sensitive" in the API will not
  6694. // be included in the string output. The member name will be present, but the
  6695. // value will be replaced with "sensitive".
  6696. func (s Channel) String() string {
  6697. return awsutil.Prettify(s)
  6698. }
  6699. // GoString returns the string representation.
  6700. //
  6701. // API parameter values that are decorated as "sensitive" in the API will not
  6702. // be included in the string output. The member name will be present, but the
  6703. // value will be replaced with "sensitive".
  6704. func (s Channel) GoString() string {
  6705. return s.String()
  6706. }
  6707. // SetChannelArn sets the ChannelArn field's value.
  6708. func (s *Channel) SetChannelArn(v string) *Channel {
  6709. s.ChannelArn = &v
  6710. return s
  6711. }
  6712. // SetName sets the Name field's value.
  6713. func (s *Channel) SetName(v string) *Channel {
  6714. s.Name = &v
  6715. return s
  6716. }
  6717. // This exception is thrown when the specified value of ChannelARN is not valid.
  6718. type ChannelARNInvalidException struct {
  6719. _ struct{} `type:"structure"`
  6720. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6721. Message_ *string `locationName:"message" type:"string"`
  6722. }
  6723. // String returns the string representation.
  6724. //
  6725. // API parameter values that are decorated as "sensitive" in the API will not
  6726. // be included in the string output. The member name will be present, but the
  6727. // value will be replaced with "sensitive".
  6728. func (s ChannelARNInvalidException) String() string {
  6729. return awsutil.Prettify(s)
  6730. }
  6731. // GoString returns the string representation.
  6732. //
  6733. // API parameter values that are decorated as "sensitive" in the API will not
  6734. // be included in the string output. The member name will be present, but the
  6735. // value will be replaced with "sensitive".
  6736. func (s ChannelARNInvalidException) GoString() string {
  6737. return s.String()
  6738. }
  6739. func newErrorChannelARNInvalidException(v protocol.ResponseMetadata) error {
  6740. return &ChannelARNInvalidException{
  6741. RespMetadata: v,
  6742. }
  6743. }
  6744. // Code returns the exception type name.
  6745. func (s *ChannelARNInvalidException) Code() string {
  6746. return "ChannelARNInvalidException"
  6747. }
  6748. // Message returns the exception's message.
  6749. func (s *ChannelARNInvalidException) Message() string {
  6750. if s.Message_ != nil {
  6751. return *s.Message_
  6752. }
  6753. return ""
  6754. }
  6755. // OrigErr always returns nil, satisfies awserr.Error interface.
  6756. func (s *ChannelARNInvalidException) OrigErr() error {
  6757. return nil
  6758. }
  6759. func (s *ChannelARNInvalidException) Error() string {
  6760. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6761. }
  6762. // Status code returns the HTTP status code for the request's response error.
  6763. func (s *ChannelARNInvalidException) StatusCode() int {
  6764. return s.RespMetadata.StatusCode
  6765. }
  6766. // RequestID returns the service's response RequestID for request.
  6767. func (s *ChannelARNInvalidException) RequestID() string {
  6768. return s.RespMetadata.RequestID
  6769. }
  6770. // This exception is thrown when the provided channel already exists.
  6771. type ChannelAlreadyExistsException struct {
  6772. _ struct{} `type:"structure"`
  6773. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6774. Message_ *string `locationName:"message" type:"string"`
  6775. }
  6776. // String returns the string representation.
  6777. //
  6778. // API parameter values that are decorated as "sensitive" in the API will not
  6779. // be included in the string output. The member name will be present, but the
  6780. // value will be replaced with "sensitive".
  6781. func (s ChannelAlreadyExistsException) String() string {
  6782. return awsutil.Prettify(s)
  6783. }
  6784. // GoString returns the string representation.
  6785. //
  6786. // API parameter values that are decorated as "sensitive" in the API will not
  6787. // be included in the string output. The member name will be present, but the
  6788. // value will be replaced with "sensitive".
  6789. func (s ChannelAlreadyExistsException) GoString() string {
  6790. return s.String()
  6791. }
  6792. func newErrorChannelAlreadyExistsException(v protocol.ResponseMetadata) error {
  6793. return &ChannelAlreadyExistsException{
  6794. RespMetadata: v,
  6795. }
  6796. }
  6797. // Code returns the exception type name.
  6798. func (s *ChannelAlreadyExistsException) Code() string {
  6799. return "ChannelAlreadyExistsException"
  6800. }
  6801. // Message returns the exception's message.
  6802. func (s *ChannelAlreadyExistsException) Message() string {
  6803. if s.Message_ != nil {
  6804. return *s.Message_
  6805. }
  6806. return ""
  6807. }
  6808. // OrigErr always returns nil, satisfies awserr.Error interface.
  6809. func (s *ChannelAlreadyExistsException) OrigErr() error {
  6810. return nil
  6811. }
  6812. func (s *ChannelAlreadyExistsException) Error() string {
  6813. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6814. }
  6815. // Status code returns the HTTP status code for the request's response error.
  6816. func (s *ChannelAlreadyExistsException) StatusCode() int {
  6817. return s.RespMetadata.StatusCode
  6818. }
  6819. // RequestID returns the service's response RequestID for request.
  6820. func (s *ChannelAlreadyExistsException) RequestID() string {
  6821. return s.RespMetadata.RequestID
  6822. }
  6823. // This exception is thrown when the specified event data store cannot yet be
  6824. // deleted because it is in use by a channel.
  6825. type ChannelExistsForEDSException struct {
  6826. _ struct{} `type:"structure"`
  6827. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6828. Message_ *string `locationName:"message" type:"string"`
  6829. }
  6830. // String returns the string representation.
  6831. //
  6832. // API parameter values that are decorated as "sensitive" in the API will not
  6833. // be included in the string output. The member name will be present, but the
  6834. // value will be replaced with "sensitive".
  6835. func (s ChannelExistsForEDSException) String() string {
  6836. return awsutil.Prettify(s)
  6837. }
  6838. // GoString returns the string representation.
  6839. //
  6840. // API parameter values that are decorated as "sensitive" in the API will not
  6841. // be included in the string output. The member name will be present, but the
  6842. // value will be replaced with "sensitive".
  6843. func (s ChannelExistsForEDSException) GoString() string {
  6844. return s.String()
  6845. }
  6846. func newErrorChannelExistsForEDSException(v protocol.ResponseMetadata) error {
  6847. return &ChannelExistsForEDSException{
  6848. RespMetadata: v,
  6849. }
  6850. }
  6851. // Code returns the exception type name.
  6852. func (s *ChannelExistsForEDSException) Code() string {
  6853. return "ChannelExistsForEDSException"
  6854. }
  6855. // Message returns the exception's message.
  6856. func (s *ChannelExistsForEDSException) Message() string {
  6857. if s.Message_ != nil {
  6858. return *s.Message_
  6859. }
  6860. return ""
  6861. }
  6862. // OrigErr always returns nil, satisfies awserr.Error interface.
  6863. func (s *ChannelExistsForEDSException) OrigErr() error {
  6864. return nil
  6865. }
  6866. func (s *ChannelExistsForEDSException) Error() string {
  6867. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6868. }
  6869. // Status code returns the HTTP status code for the request's response error.
  6870. func (s *ChannelExistsForEDSException) StatusCode() int {
  6871. return s.RespMetadata.StatusCode
  6872. }
  6873. // RequestID returns the service's response RequestID for request.
  6874. func (s *ChannelExistsForEDSException) RequestID() string {
  6875. return s.RespMetadata.RequestID
  6876. }
  6877. // This exception is thrown when the maximum number of channels limit is exceeded.
  6878. type ChannelMaxLimitExceededException struct {
  6879. _ struct{} `type:"structure"`
  6880. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6881. Message_ *string `locationName:"message" type:"string"`
  6882. }
  6883. // String returns the string representation.
  6884. //
  6885. // API parameter values that are decorated as "sensitive" in the API will not
  6886. // be included in the string output. The member name will be present, but the
  6887. // value will be replaced with "sensitive".
  6888. func (s ChannelMaxLimitExceededException) String() string {
  6889. return awsutil.Prettify(s)
  6890. }
  6891. // GoString returns the string representation.
  6892. //
  6893. // API parameter values that are decorated as "sensitive" in the API will not
  6894. // be included in the string output. The member name will be present, but the
  6895. // value will be replaced with "sensitive".
  6896. func (s ChannelMaxLimitExceededException) GoString() string {
  6897. return s.String()
  6898. }
  6899. func newErrorChannelMaxLimitExceededException(v protocol.ResponseMetadata) error {
  6900. return &ChannelMaxLimitExceededException{
  6901. RespMetadata: v,
  6902. }
  6903. }
  6904. // Code returns the exception type name.
  6905. func (s *ChannelMaxLimitExceededException) Code() string {
  6906. return "ChannelMaxLimitExceededException"
  6907. }
  6908. // Message returns the exception's message.
  6909. func (s *ChannelMaxLimitExceededException) Message() string {
  6910. if s.Message_ != nil {
  6911. return *s.Message_
  6912. }
  6913. return ""
  6914. }
  6915. // OrigErr always returns nil, satisfies awserr.Error interface.
  6916. func (s *ChannelMaxLimitExceededException) OrigErr() error {
  6917. return nil
  6918. }
  6919. func (s *ChannelMaxLimitExceededException) Error() string {
  6920. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6921. }
  6922. // Status code returns the HTTP status code for the request's response error.
  6923. func (s *ChannelMaxLimitExceededException) StatusCode() int {
  6924. return s.RespMetadata.StatusCode
  6925. }
  6926. // RequestID returns the service's response RequestID for request.
  6927. func (s *ChannelMaxLimitExceededException) RequestID() string {
  6928. return s.RespMetadata.RequestID
  6929. }
  6930. // This exception is thrown when CloudTrail cannot find the specified channel.
  6931. type ChannelNotFoundException struct {
  6932. _ struct{} `type:"structure"`
  6933. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6934. Message_ *string `locationName:"message" type:"string"`
  6935. }
  6936. // String returns the string representation.
  6937. //
  6938. // API parameter values that are decorated as "sensitive" in the API will not
  6939. // be included in the string output. The member name will be present, but the
  6940. // value will be replaced with "sensitive".
  6941. func (s ChannelNotFoundException) String() string {
  6942. return awsutil.Prettify(s)
  6943. }
  6944. // GoString returns the string representation.
  6945. //
  6946. // API parameter values that are decorated as "sensitive" in the API will not
  6947. // be included in the string output. The member name will be present, but the
  6948. // value will be replaced with "sensitive".
  6949. func (s ChannelNotFoundException) GoString() string {
  6950. return s.String()
  6951. }
  6952. func newErrorChannelNotFoundException(v protocol.ResponseMetadata) error {
  6953. return &ChannelNotFoundException{
  6954. RespMetadata: v,
  6955. }
  6956. }
  6957. // Code returns the exception type name.
  6958. func (s *ChannelNotFoundException) Code() string {
  6959. return "ChannelNotFoundException"
  6960. }
  6961. // Message returns the exception's message.
  6962. func (s *ChannelNotFoundException) Message() string {
  6963. if s.Message_ != nil {
  6964. return *s.Message_
  6965. }
  6966. return ""
  6967. }
  6968. // OrigErr always returns nil, satisfies awserr.Error interface.
  6969. func (s *ChannelNotFoundException) OrigErr() error {
  6970. return nil
  6971. }
  6972. func (s *ChannelNotFoundException) Error() string {
  6973. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6974. }
  6975. // Status code returns the HTTP status code for the request's response error.
  6976. func (s *ChannelNotFoundException) StatusCode() int {
  6977. return s.RespMetadata.StatusCode
  6978. }
  6979. // RequestID returns the service's response RequestID for request.
  6980. func (s *ChannelNotFoundException) RequestID() string {
  6981. return s.RespMetadata.RequestID
  6982. }
  6983. // This exception is thrown when a call results in the InvalidClientTokenId
  6984. // error code. This can occur when you are creating or updating a trail to send
  6985. // notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
  6986. // account.
  6987. type CloudTrailInvalidClientTokenIdException struct {
  6988. _ struct{} `type:"structure"`
  6989. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6990. Message_ *string `locationName:"message" type:"string"`
  6991. }
  6992. // String returns the string representation.
  6993. //
  6994. // API parameter values that are decorated as "sensitive" in the API will not
  6995. // be included in the string output. The member name will be present, but the
  6996. // value will be replaced with "sensitive".
  6997. func (s CloudTrailInvalidClientTokenIdException) String() string {
  6998. return awsutil.Prettify(s)
  6999. }
  7000. // GoString returns the string representation.
  7001. //
  7002. // API parameter values that are decorated as "sensitive" in the API will not
  7003. // be included in the string output. The member name will be present, but the
  7004. // value will be replaced with "sensitive".
  7005. func (s CloudTrailInvalidClientTokenIdException) GoString() string {
  7006. return s.String()
  7007. }
  7008. func newErrorCloudTrailInvalidClientTokenIdException(v protocol.ResponseMetadata) error {
  7009. return &CloudTrailInvalidClientTokenIdException{
  7010. RespMetadata: v,
  7011. }
  7012. }
  7013. // Code returns the exception type name.
  7014. func (s *CloudTrailInvalidClientTokenIdException) Code() string {
  7015. return "CloudTrailInvalidClientTokenIdException"
  7016. }
  7017. // Message returns the exception's message.
  7018. func (s *CloudTrailInvalidClientTokenIdException) Message() string {
  7019. if s.Message_ != nil {
  7020. return *s.Message_
  7021. }
  7022. return ""
  7023. }
  7024. // OrigErr always returns nil, satisfies awserr.Error interface.
  7025. func (s *CloudTrailInvalidClientTokenIdException) OrigErr() error {
  7026. return nil
  7027. }
  7028. func (s *CloudTrailInvalidClientTokenIdException) Error() string {
  7029. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7030. }
  7031. // Status code returns the HTTP status code for the request's response error.
  7032. func (s *CloudTrailInvalidClientTokenIdException) StatusCode() int {
  7033. return s.RespMetadata.StatusCode
  7034. }
  7035. // RequestID returns the service's response RequestID for request.
  7036. func (s *CloudTrailInvalidClientTokenIdException) RequestID() string {
  7037. return s.RespMetadata.RequestID
  7038. }
  7039. // Cannot set a CloudWatch Logs delivery for this region.
  7040. type CloudWatchLogsDeliveryUnavailableException struct {
  7041. _ struct{} `type:"structure"`
  7042. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7043. Message_ *string `locationName:"message" type:"string"`
  7044. }
  7045. // String returns the string representation.
  7046. //
  7047. // API parameter values that are decorated as "sensitive" in the API will not
  7048. // be included in the string output. The member name will be present, but the
  7049. // value will be replaced with "sensitive".
  7050. func (s CloudWatchLogsDeliveryUnavailableException) String() string {
  7051. return awsutil.Prettify(s)
  7052. }
  7053. // GoString returns the string representation.
  7054. //
  7055. // API parameter values that are decorated as "sensitive" in the API will not
  7056. // be included in the string output. The member name will be present, but the
  7057. // value will be replaced with "sensitive".
  7058. func (s CloudWatchLogsDeliveryUnavailableException) GoString() string {
  7059. return s.String()
  7060. }
  7061. func newErrorCloudWatchLogsDeliveryUnavailableException(v protocol.ResponseMetadata) error {
  7062. return &CloudWatchLogsDeliveryUnavailableException{
  7063. RespMetadata: v,
  7064. }
  7065. }
  7066. // Code returns the exception type name.
  7067. func (s *CloudWatchLogsDeliveryUnavailableException) Code() string {
  7068. return "CloudWatchLogsDeliveryUnavailableException"
  7069. }
  7070. // Message returns the exception's message.
  7071. func (s *CloudWatchLogsDeliveryUnavailableException) Message() string {
  7072. if s.Message_ != nil {
  7073. return *s.Message_
  7074. }
  7075. return ""
  7076. }
  7077. // OrigErr always returns nil, satisfies awserr.Error interface.
  7078. func (s *CloudWatchLogsDeliveryUnavailableException) OrigErr() error {
  7079. return nil
  7080. }
  7081. func (s *CloudWatchLogsDeliveryUnavailableException) Error() string {
  7082. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7083. }
  7084. // Status code returns the HTTP status code for the request's response error.
  7085. func (s *CloudWatchLogsDeliveryUnavailableException) StatusCode() int {
  7086. return s.RespMetadata.StatusCode
  7087. }
  7088. // RequestID returns the service's response RequestID for request.
  7089. func (s *CloudWatchLogsDeliveryUnavailableException) RequestID() string {
  7090. return s.RespMetadata.RequestID
  7091. }
  7092. // This exception is thrown when the specified resource is not ready for an
  7093. // operation. This can occur when you try to run an operation on a resource
  7094. // before CloudTrail has time to fully load the resource, or because another
  7095. // operation is modifying the resource. If this exception occurs, wait a few
  7096. // minutes, and then try the operation again.
  7097. type ConflictException struct {
  7098. _ struct{} `type:"structure"`
  7099. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7100. Message_ *string `locationName:"message" type:"string"`
  7101. }
  7102. // String returns the string representation.
  7103. //
  7104. // API parameter values that are decorated as "sensitive" in the API will not
  7105. // be included in the string output. The member name will be present, but the
  7106. // value will be replaced with "sensitive".
  7107. func (s ConflictException) String() string {
  7108. return awsutil.Prettify(s)
  7109. }
  7110. // GoString returns the string representation.
  7111. //
  7112. // API parameter values that are decorated as "sensitive" in the API will not
  7113. // be included in the string output. The member name will be present, but the
  7114. // value will be replaced with "sensitive".
  7115. func (s ConflictException) GoString() string {
  7116. return s.String()
  7117. }
  7118. func newErrorConflictException(v protocol.ResponseMetadata) error {
  7119. return &ConflictException{
  7120. RespMetadata: v,
  7121. }
  7122. }
  7123. // Code returns the exception type name.
  7124. func (s *ConflictException) Code() string {
  7125. return "ConflictException"
  7126. }
  7127. // Message returns the exception's message.
  7128. func (s *ConflictException) Message() string {
  7129. if s.Message_ != nil {
  7130. return *s.Message_
  7131. }
  7132. return ""
  7133. }
  7134. // OrigErr always returns nil, satisfies awserr.Error interface.
  7135. func (s *ConflictException) OrigErr() error {
  7136. return nil
  7137. }
  7138. func (s *ConflictException) Error() string {
  7139. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7140. }
  7141. // Status code returns the HTTP status code for the request's response error.
  7142. func (s *ConflictException) StatusCode() int {
  7143. return s.RespMetadata.StatusCode
  7144. }
  7145. // RequestID returns the service's response RequestID for request.
  7146. func (s *ConflictException) RequestID() string {
  7147. return s.RespMetadata.RequestID
  7148. }
  7149. type CreateChannelInput struct {
  7150. _ struct{} `type:"structure"`
  7151. // One or more event data stores to which events arriving through a channel
  7152. // will be logged.
  7153. //
  7154. // Destinations is a required field
  7155. Destinations []*Destination `min:"1" type:"list" required:"true"`
  7156. // The name of the channel.
  7157. //
  7158. // Name is a required field
  7159. Name *string `min:"3" type:"string" required:"true"`
  7160. // The name of the partner or external event source. You cannot change this
  7161. // name after you create the channel. A maximum of one channel is allowed per
  7162. // source.
  7163. //
  7164. // A source can be either Custom for all valid non-Amazon Web Services events,
  7165. // or the name of a partner event source. For information about the source names
  7166. // for available partners, see Additional information about integration partners
  7167. // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store-integration.html#cloudtrail-lake-partner-information)
  7168. // in the CloudTrail User Guide.
  7169. //
  7170. // Source is a required field
  7171. Source *string `min:"1" type:"string" required:"true"`
  7172. // A list of tags.
  7173. Tags []*Tag `type:"list"`
  7174. }
  7175. // String returns the string representation.
  7176. //
  7177. // API parameter values that are decorated as "sensitive" in the API will not
  7178. // be included in the string output. The member name will be present, but the
  7179. // value will be replaced with "sensitive".
  7180. func (s CreateChannelInput) String() string {
  7181. return awsutil.Prettify(s)
  7182. }
  7183. // GoString returns the string representation.
  7184. //
  7185. // API parameter values that are decorated as "sensitive" in the API will not
  7186. // be included in the string output. The member name will be present, but the
  7187. // value will be replaced with "sensitive".
  7188. func (s CreateChannelInput) GoString() string {
  7189. return s.String()
  7190. }
  7191. // Validate inspects the fields of the type to determine if they are valid.
  7192. func (s *CreateChannelInput) Validate() error {
  7193. invalidParams := request.ErrInvalidParams{Context: "CreateChannelInput"}
  7194. if s.Destinations == nil {
  7195. invalidParams.Add(request.NewErrParamRequired("Destinations"))
  7196. }
  7197. if s.Destinations != nil && len(s.Destinations) < 1 {
  7198. invalidParams.Add(request.NewErrParamMinLen("Destinations", 1))
  7199. }
  7200. if s.Name == nil {
  7201. invalidParams.Add(request.NewErrParamRequired("Name"))
  7202. }
  7203. if s.Name != nil && len(*s.Name) < 3 {
  7204. invalidParams.Add(request.NewErrParamMinLen("Name", 3))
  7205. }
  7206. if s.Source == nil {
  7207. invalidParams.Add(request.NewErrParamRequired("Source"))
  7208. }
  7209. if s.Source != nil && len(*s.Source) < 1 {
  7210. invalidParams.Add(request.NewErrParamMinLen("Source", 1))
  7211. }
  7212. if s.Destinations != nil {
  7213. for i, v := range s.Destinations {
  7214. if v == nil {
  7215. continue
  7216. }
  7217. if err := v.Validate(); err != nil {
  7218. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams))
  7219. }
  7220. }
  7221. }
  7222. if s.Tags != nil {
  7223. for i, v := range s.Tags {
  7224. if v == nil {
  7225. continue
  7226. }
  7227. if err := v.Validate(); err != nil {
  7228. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  7229. }
  7230. }
  7231. }
  7232. if invalidParams.Len() > 0 {
  7233. return invalidParams
  7234. }
  7235. return nil
  7236. }
  7237. // SetDestinations sets the Destinations field's value.
  7238. func (s *CreateChannelInput) SetDestinations(v []*Destination) *CreateChannelInput {
  7239. s.Destinations = v
  7240. return s
  7241. }
  7242. // SetName sets the Name field's value.
  7243. func (s *CreateChannelInput) SetName(v string) *CreateChannelInput {
  7244. s.Name = &v
  7245. return s
  7246. }
  7247. // SetSource sets the Source field's value.
  7248. func (s *CreateChannelInput) SetSource(v string) *CreateChannelInput {
  7249. s.Source = &v
  7250. return s
  7251. }
  7252. // SetTags sets the Tags field's value.
  7253. func (s *CreateChannelInput) SetTags(v []*Tag) *CreateChannelInput {
  7254. s.Tags = v
  7255. return s
  7256. }
  7257. type CreateChannelOutput struct {
  7258. _ struct{} `type:"structure"`
  7259. // The Amazon Resource Name (ARN) of the new channel.
  7260. ChannelArn *string `min:"3" type:"string"`
  7261. // The event data stores that log the events arriving through the channel.
  7262. Destinations []*Destination `min:"1" type:"list"`
  7263. // The name of the new channel.
  7264. Name *string `min:"3" type:"string"`
  7265. // The partner or external event source name.
  7266. Source *string `min:"1" type:"string"`
  7267. // A list of tags.
  7268. Tags []*Tag `type:"list"`
  7269. }
  7270. // String returns the string representation.
  7271. //
  7272. // API parameter values that are decorated as "sensitive" in the API will not
  7273. // be included in the string output. The member name will be present, but the
  7274. // value will be replaced with "sensitive".
  7275. func (s CreateChannelOutput) String() string {
  7276. return awsutil.Prettify(s)
  7277. }
  7278. // GoString returns the string representation.
  7279. //
  7280. // API parameter values that are decorated as "sensitive" in the API will not
  7281. // be included in the string output. The member name will be present, but the
  7282. // value will be replaced with "sensitive".
  7283. func (s CreateChannelOutput) GoString() string {
  7284. return s.String()
  7285. }
  7286. // SetChannelArn sets the ChannelArn field's value.
  7287. func (s *CreateChannelOutput) SetChannelArn(v string) *CreateChannelOutput {
  7288. s.ChannelArn = &v
  7289. return s
  7290. }
  7291. // SetDestinations sets the Destinations field's value.
  7292. func (s *CreateChannelOutput) SetDestinations(v []*Destination) *CreateChannelOutput {
  7293. s.Destinations = v
  7294. return s
  7295. }
  7296. // SetName sets the Name field's value.
  7297. func (s *CreateChannelOutput) SetName(v string) *CreateChannelOutput {
  7298. s.Name = &v
  7299. return s
  7300. }
  7301. // SetSource sets the Source field's value.
  7302. func (s *CreateChannelOutput) SetSource(v string) *CreateChannelOutput {
  7303. s.Source = &v
  7304. return s
  7305. }
  7306. // SetTags sets the Tags field's value.
  7307. func (s *CreateChannelOutput) SetTags(v []*Tag) *CreateChannelOutput {
  7308. s.Tags = v
  7309. return s
  7310. }
  7311. type CreateEventDataStoreInput struct {
  7312. _ struct{} `type:"structure"`
  7313. // The advanced event selectors to use to select the events for the data store.
  7314. // You can configure up to five advanced event selectors for each event data
  7315. // store.
  7316. //
  7317. // For more information about how to use advanced event selectors to log CloudTrail
  7318. // events, see Log events by using advanced event selectors (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced)
  7319. // in the CloudTrail User Guide.
  7320. //
  7321. // For more information about how to use advanced event selectors to include
  7322. // Config configuration items in your event data store, see Create an event
  7323. // data store for Config configuration items (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-lake-cli.html#lake-cli-create-eds-config)
  7324. // in the CloudTrail User Guide.
  7325. //
  7326. // For more information about how to use advanced event selectors to include
  7327. // non-Amazon Web Services events in your event data store, see Create an integration
  7328. // to log events from outside Amazon Web Services (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-lake-cli.html#lake-cli-create-integration)
  7329. // in the CloudTrail User Guide.
  7330. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  7331. // Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail.
  7332. // The value can be an alias name prefixed by alias/, a fully specified ARN
  7333. // to an alias, a fully specified ARN to a key, or a globally unique identifier.
  7334. //
  7335. // Disabling or deleting the KMS key, or removing CloudTrail permissions on
  7336. // the key, prevents CloudTrail from logging events to the event data store,
  7337. // and prevents users from querying the data in the event data store that was
  7338. // encrypted with the key. After you associate an event data store with a KMS
  7339. // key, the KMS key cannot be removed or changed. Before you disable or delete
  7340. // a KMS key that you are using with an event data store, delete or back up
  7341. // your event data store.
  7342. //
  7343. // CloudTrail also supports KMS multi-Region keys. For more information about
  7344. // multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
  7345. // in the Key Management Service Developer Guide.
  7346. //
  7347. // Examples:
  7348. //
  7349. // * alias/MyAliasName
  7350. //
  7351. // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  7352. //
  7353. // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  7354. //
  7355. // * 12345678-1234-1234-1234-123456789012
  7356. KmsKeyId *string `min:"1" type:"string"`
  7357. // Specifies whether the event data store includes events from all regions,
  7358. // or only from the region in which the event data store is created.
  7359. MultiRegionEnabled *bool `type:"boolean"`
  7360. // The name of the event data store.
  7361. //
  7362. // Name is a required field
  7363. Name *string `min:"3" type:"string" required:"true"`
  7364. // Specifies whether an event data store collects events logged for an organization
  7365. // in Organizations.
  7366. OrganizationEnabled *bool `type:"boolean"`
  7367. // The retention period of the event data store, in days. You can set a retention
  7368. // period of up to 2557 days, the equivalent of seven years.
  7369. RetentionPeriod *int64 `min:"7" type:"integer"`
  7370. // A list of tags.
  7371. TagsList []*Tag `type:"list"`
  7372. // Specifies whether termination protection is enabled for the event data store.
  7373. // If termination protection is enabled, you cannot delete the event data store
  7374. // until termination protection is disabled.
  7375. TerminationProtectionEnabled *bool `type:"boolean"`
  7376. }
  7377. // String returns the string representation.
  7378. //
  7379. // API parameter values that are decorated as "sensitive" in the API will not
  7380. // be included in the string output. The member name will be present, but the
  7381. // value will be replaced with "sensitive".
  7382. func (s CreateEventDataStoreInput) String() string {
  7383. return awsutil.Prettify(s)
  7384. }
  7385. // GoString returns the string representation.
  7386. //
  7387. // API parameter values that are decorated as "sensitive" in the API will not
  7388. // be included in the string output. The member name will be present, but the
  7389. // value will be replaced with "sensitive".
  7390. func (s CreateEventDataStoreInput) GoString() string {
  7391. return s.String()
  7392. }
  7393. // Validate inspects the fields of the type to determine if they are valid.
  7394. func (s *CreateEventDataStoreInput) Validate() error {
  7395. invalidParams := request.ErrInvalidParams{Context: "CreateEventDataStoreInput"}
  7396. if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 {
  7397. invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1))
  7398. }
  7399. if s.Name == nil {
  7400. invalidParams.Add(request.NewErrParamRequired("Name"))
  7401. }
  7402. if s.Name != nil && len(*s.Name) < 3 {
  7403. invalidParams.Add(request.NewErrParamMinLen("Name", 3))
  7404. }
  7405. if s.RetentionPeriod != nil && *s.RetentionPeriod < 7 {
  7406. invalidParams.Add(request.NewErrParamMinValue("RetentionPeriod", 7))
  7407. }
  7408. if s.AdvancedEventSelectors != nil {
  7409. for i, v := range s.AdvancedEventSelectors {
  7410. if v == nil {
  7411. continue
  7412. }
  7413. if err := v.Validate(); err != nil {
  7414. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdvancedEventSelectors", i), err.(request.ErrInvalidParams))
  7415. }
  7416. }
  7417. }
  7418. if s.TagsList != nil {
  7419. for i, v := range s.TagsList {
  7420. if v == nil {
  7421. continue
  7422. }
  7423. if err := v.Validate(); err != nil {
  7424. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  7425. }
  7426. }
  7427. }
  7428. if invalidParams.Len() > 0 {
  7429. return invalidParams
  7430. }
  7431. return nil
  7432. }
  7433. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  7434. func (s *CreateEventDataStoreInput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *CreateEventDataStoreInput {
  7435. s.AdvancedEventSelectors = v
  7436. return s
  7437. }
  7438. // SetKmsKeyId sets the KmsKeyId field's value.
  7439. func (s *CreateEventDataStoreInput) SetKmsKeyId(v string) *CreateEventDataStoreInput {
  7440. s.KmsKeyId = &v
  7441. return s
  7442. }
  7443. // SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
  7444. func (s *CreateEventDataStoreInput) SetMultiRegionEnabled(v bool) *CreateEventDataStoreInput {
  7445. s.MultiRegionEnabled = &v
  7446. return s
  7447. }
  7448. // SetName sets the Name field's value.
  7449. func (s *CreateEventDataStoreInput) SetName(v string) *CreateEventDataStoreInput {
  7450. s.Name = &v
  7451. return s
  7452. }
  7453. // SetOrganizationEnabled sets the OrganizationEnabled field's value.
  7454. func (s *CreateEventDataStoreInput) SetOrganizationEnabled(v bool) *CreateEventDataStoreInput {
  7455. s.OrganizationEnabled = &v
  7456. return s
  7457. }
  7458. // SetRetentionPeriod sets the RetentionPeriod field's value.
  7459. func (s *CreateEventDataStoreInput) SetRetentionPeriod(v int64) *CreateEventDataStoreInput {
  7460. s.RetentionPeriod = &v
  7461. return s
  7462. }
  7463. // SetTagsList sets the TagsList field's value.
  7464. func (s *CreateEventDataStoreInput) SetTagsList(v []*Tag) *CreateEventDataStoreInput {
  7465. s.TagsList = v
  7466. return s
  7467. }
  7468. // SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
  7469. func (s *CreateEventDataStoreInput) SetTerminationProtectionEnabled(v bool) *CreateEventDataStoreInput {
  7470. s.TerminationProtectionEnabled = &v
  7471. return s
  7472. }
  7473. type CreateEventDataStoreOutput struct {
  7474. _ struct{} `type:"structure"`
  7475. // The advanced event selectors that were used to select the events for the
  7476. // data store.
  7477. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  7478. // The timestamp that shows when the event data store was created.
  7479. CreatedTimestamp *time.Time `type:"timestamp"`
  7480. // The ARN of the event data store.
  7481. EventDataStoreArn *string `min:"3" type:"string"`
  7482. // Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
  7483. // The value is a fully specified ARN to a KMS key in the following format.
  7484. //
  7485. // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  7486. KmsKeyId *string `min:"1" type:"string"`
  7487. // Indicates whether the event data store collects events from all regions,
  7488. // or only from the region in which it was created.
  7489. MultiRegionEnabled *bool `type:"boolean"`
  7490. // The name of the event data store.
  7491. Name *string `min:"3" type:"string"`
  7492. // Indicates whether an event data store is collecting logged events for an
  7493. // organization in Organizations.
  7494. OrganizationEnabled *bool `type:"boolean"`
  7495. // The retention period of an event data store, in days.
  7496. RetentionPeriod *int64 `min:"7" type:"integer"`
  7497. // The status of event data store creation.
  7498. Status *string `type:"string" enum:"EventDataStoreStatus"`
  7499. // A list of tags.
  7500. TagsList []*Tag `type:"list"`
  7501. // Indicates whether termination protection is enabled for the event data store.
  7502. TerminationProtectionEnabled *bool `type:"boolean"`
  7503. // The timestamp that shows when an event data store was updated, if applicable.
  7504. // UpdatedTimestamp is always either the same or newer than the time shown in
  7505. // CreatedTimestamp.
  7506. UpdatedTimestamp *time.Time `type:"timestamp"`
  7507. }
  7508. // String returns the string representation.
  7509. //
  7510. // API parameter values that are decorated as "sensitive" in the API will not
  7511. // be included in the string output. The member name will be present, but the
  7512. // value will be replaced with "sensitive".
  7513. func (s CreateEventDataStoreOutput) String() string {
  7514. return awsutil.Prettify(s)
  7515. }
  7516. // GoString returns the string representation.
  7517. //
  7518. // API parameter values that are decorated as "sensitive" in the API will not
  7519. // be included in the string output. The member name will be present, but the
  7520. // value will be replaced with "sensitive".
  7521. func (s CreateEventDataStoreOutput) GoString() string {
  7522. return s.String()
  7523. }
  7524. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  7525. func (s *CreateEventDataStoreOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *CreateEventDataStoreOutput {
  7526. s.AdvancedEventSelectors = v
  7527. return s
  7528. }
  7529. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  7530. func (s *CreateEventDataStoreOutput) SetCreatedTimestamp(v time.Time) *CreateEventDataStoreOutput {
  7531. s.CreatedTimestamp = &v
  7532. return s
  7533. }
  7534. // SetEventDataStoreArn sets the EventDataStoreArn field's value.
  7535. func (s *CreateEventDataStoreOutput) SetEventDataStoreArn(v string) *CreateEventDataStoreOutput {
  7536. s.EventDataStoreArn = &v
  7537. return s
  7538. }
  7539. // SetKmsKeyId sets the KmsKeyId field's value.
  7540. func (s *CreateEventDataStoreOutput) SetKmsKeyId(v string) *CreateEventDataStoreOutput {
  7541. s.KmsKeyId = &v
  7542. return s
  7543. }
  7544. // SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
  7545. func (s *CreateEventDataStoreOutput) SetMultiRegionEnabled(v bool) *CreateEventDataStoreOutput {
  7546. s.MultiRegionEnabled = &v
  7547. return s
  7548. }
  7549. // SetName sets the Name field's value.
  7550. func (s *CreateEventDataStoreOutput) SetName(v string) *CreateEventDataStoreOutput {
  7551. s.Name = &v
  7552. return s
  7553. }
  7554. // SetOrganizationEnabled sets the OrganizationEnabled field's value.
  7555. func (s *CreateEventDataStoreOutput) SetOrganizationEnabled(v bool) *CreateEventDataStoreOutput {
  7556. s.OrganizationEnabled = &v
  7557. return s
  7558. }
  7559. // SetRetentionPeriod sets the RetentionPeriod field's value.
  7560. func (s *CreateEventDataStoreOutput) SetRetentionPeriod(v int64) *CreateEventDataStoreOutput {
  7561. s.RetentionPeriod = &v
  7562. return s
  7563. }
  7564. // SetStatus sets the Status field's value.
  7565. func (s *CreateEventDataStoreOutput) SetStatus(v string) *CreateEventDataStoreOutput {
  7566. s.Status = &v
  7567. return s
  7568. }
  7569. // SetTagsList sets the TagsList field's value.
  7570. func (s *CreateEventDataStoreOutput) SetTagsList(v []*Tag) *CreateEventDataStoreOutput {
  7571. s.TagsList = v
  7572. return s
  7573. }
  7574. // SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
  7575. func (s *CreateEventDataStoreOutput) SetTerminationProtectionEnabled(v bool) *CreateEventDataStoreOutput {
  7576. s.TerminationProtectionEnabled = &v
  7577. return s
  7578. }
  7579. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  7580. func (s *CreateEventDataStoreOutput) SetUpdatedTimestamp(v time.Time) *CreateEventDataStoreOutput {
  7581. s.UpdatedTimestamp = &v
  7582. return s
  7583. }
  7584. // Specifies the settings for each trail.
  7585. type CreateTrailInput struct {
  7586. _ struct{} `type:"structure"`
  7587. // Specifies a log group name using an Amazon Resource Name (ARN), a unique
  7588. // identifier that represents the log group to which CloudTrail logs will be
  7589. // delivered. You must use a log group that exists in your account.
  7590. //
  7591. // Not required unless you specify CloudWatchLogsRoleArn.
  7592. CloudWatchLogsLogGroupArn *string `type:"string"`
  7593. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  7594. // a user's log group. You must use a role that exists in your account.
  7595. CloudWatchLogsRoleArn *string `type:"string"`
  7596. // Specifies whether log file integrity validation is enabled. The default is
  7597. // false.
  7598. //
  7599. // When you disable log file integrity validation, the chain of digest files
  7600. // is broken after one hour. CloudTrail does not create digest files for log
  7601. // files that were delivered during a period in which log file integrity validation
  7602. // was disabled. For example, if you enable log file integrity validation at
  7603. // noon on January 1, disable it at noon on January 2, and re-enable it at noon
  7604. // on January 10, digest files will not be created for the log files delivered
  7605. // from noon on January 2 to noon on January 10. The same applies whenever you
  7606. // stop CloudTrail logging or delete a trail.
  7607. EnableLogFileValidation *bool `type:"boolean"`
  7608. // Specifies whether the trail is publishing events from global services such
  7609. // as IAM to the log files.
  7610. IncludeGlobalServiceEvents *bool `type:"boolean"`
  7611. // Specifies whether the trail is created in the current region or in all regions.
  7612. // The default is false, which creates a trail only in the region where you
  7613. // are signed in. As a best practice, consider creating trails that log events
  7614. // in all regions.
  7615. IsMultiRegionTrail *bool `type:"boolean"`
  7616. // Specifies whether the trail is created for all accounts in an organization
  7617. // in Organizations, or only for the current Amazon Web Services account. The
  7618. // default is false, and cannot be true unless the call is made on behalf of
  7619. // an Amazon Web Services account that is the management account or delegated
  7620. // administrator account for an organization in Organizations.
  7621. IsOrganizationTrail *bool `type:"boolean"`
  7622. // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
  7623. // The value can be an alias name prefixed by alias/, a fully specified ARN
  7624. // to an alias, a fully specified ARN to a key, or a globally unique identifier.
  7625. //
  7626. // CloudTrail also supports KMS multi-Region keys. For more information about
  7627. // multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
  7628. // in the Key Management Service Developer Guide.
  7629. //
  7630. // Examples:
  7631. //
  7632. // * alias/MyAliasName
  7633. //
  7634. // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  7635. //
  7636. // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  7637. //
  7638. // * 12345678-1234-1234-1234-123456789012
  7639. KmsKeyId *string `type:"string"`
  7640. // Specifies the name of the trail. The name must meet the following requirements:
  7641. //
  7642. // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  7643. // (_), or dashes (-)
  7644. //
  7645. // * Start with a letter or number, and end with a letter or number
  7646. //
  7647. // * Be between 3 and 128 characters
  7648. //
  7649. // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  7650. // and my--namespace are not valid.
  7651. //
  7652. // * Not be in IP address format (for example, 192.168.5.4)
  7653. //
  7654. // Name is a required field
  7655. Name *string `type:"string" required:"true"`
  7656. // Specifies the name of the Amazon S3 bucket designated for publishing log
  7657. // files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  7658. //
  7659. // S3BucketName is a required field
  7660. S3BucketName *string `type:"string" required:"true"`
  7661. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  7662. // you have designated for log file delivery. For more information, see Finding
  7663. // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  7664. // The maximum length is 200 characters.
  7665. S3KeyPrefix *string `type:"string"`
  7666. // Specifies the name of the Amazon SNS topic defined for notification of log
  7667. // file delivery. The maximum length is 256 characters.
  7668. SnsTopicName *string `type:"string"`
  7669. // A list of tags.
  7670. TagsList []*Tag `type:"list"`
  7671. }
  7672. // String returns the string representation.
  7673. //
  7674. // API parameter values that are decorated as "sensitive" in the API will not
  7675. // be included in the string output. The member name will be present, but the
  7676. // value will be replaced with "sensitive".
  7677. func (s CreateTrailInput) String() string {
  7678. return awsutil.Prettify(s)
  7679. }
  7680. // GoString returns the string representation.
  7681. //
  7682. // API parameter values that are decorated as "sensitive" in the API will not
  7683. // be included in the string output. The member name will be present, but the
  7684. // value will be replaced with "sensitive".
  7685. func (s CreateTrailInput) GoString() string {
  7686. return s.String()
  7687. }
  7688. // Validate inspects the fields of the type to determine if they are valid.
  7689. func (s *CreateTrailInput) Validate() error {
  7690. invalidParams := request.ErrInvalidParams{Context: "CreateTrailInput"}
  7691. if s.Name == nil {
  7692. invalidParams.Add(request.NewErrParamRequired("Name"))
  7693. }
  7694. if s.S3BucketName == nil {
  7695. invalidParams.Add(request.NewErrParamRequired("S3BucketName"))
  7696. }
  7697. if s.TagsList != nil {
  7698. for i, v := range s.TagsList {
  7699. if v == nil {
  7700. continue
  7701. }
  7702. if err := v.Validate(); err != nil {
  7703. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  7704. }
  7705. }
  7706. }
  7707. if invalidParams.Len() > 0 {
  7708. return invalidParams
  7709. }
  7710. return nil
  7711. }
  7712. // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  7713. func (s *CreateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailInput {
  7714. s.CloudWatchLogsLogGroupArn = &v
  7715. return s
  7716. }
  7717. // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  7718. func (s *CreateTrailInput) SetCloudWatchLogsRoleArn(v string) *CreateTrailInput {
  7719. s.CloudWatchLogsRoleArn = &v
  7720. return s
  7721. }
  7722. // SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
  7723. func (s *CreateTrailInput) SetEnableLogFileValidation(v bool) *CreateTrailInput {
  7724. s.EnableLogFileValidation = &v
  7725. return s
  7726. }
  7727. // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  7728. func (s *CreateTrailInput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailInput {
  7729. s.IncludeGlobalServiceEvents = &v
  7730. return s
  7731. }
  7732. // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  7733. func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput {
  7734. s.IsMultiRegionTrail = &v
  7735. return s
  7736. }
  7737. // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  7738. func (s *CreateTrailInput) SetIsOrganizationTrail(v bool) *CreateTrailInput {
  7739. s.IsOrganizationTrail = &v
  7740. return s
  7741. }
  7742. // SetKmsKeyId sets the KmsKeyId field's value.
  7743. func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput {
  7744. s.KmsKeyId = &v
  7745. return s
  7746. }
  7747. // SetName sets the Name field's value.
  7748. func (s *CreateTrailInput) SetName(v string) *CreateTrailInput {
  7749. s.Name = &v
  7750. return s
  7751. }
  7752. // SetS3BucketName sets the S3BucketName field's value.
  7753. func (s *CreateTrailInput) SetS3BucketName(v string) *CreateTrailInput {
  7754. s.S3BucketName = &v
  7755. return s
  7756. }
  7757. // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  7758. func (s *CreateTrailInput) SetS3KeyPrefix(v string) *CreateTrailInput {
  7759. s.S3KeyPrefix = &v
  7760. return s
  7761. }
  7762. // SetSnsTopicName sets the SnsTopicName field's value.
  7763. func (s *CreateTrailInput) SetSnsTopicName(v string) *CreateTrailInput {
  7764. s.SnsTopicName = &v
  7765. return s
  7766. }
  7767. // SetTagsList sets the TagsList field's value.
  7768. func (s *CreateTrailInput) SetTagsList(v []*Tag) *CreateTrailInput {
  7769. s.TagsList = v
  7770. return s
  7771. }
  7772. // Returns the objects or data listed below if successful. Otherwise, returns
  7773. // an error.
  7774. type CreateTrailOutput struct {
  7775. _ struct{} `type:"structure"`
  7776. // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
  7777. // logs will be delivered.
  7778. CloudWatchLogsLogGroupArn *string `type:"string"`
  7779. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  7780. // a user's log group.
  7781. CloudWatchLogsRoleArn *string `type:"string"`
  7782. // Specifies whether the trail is publishing events from global services such
  7783. // as IAM to the log files.
  7784. IncludeGlobalServiceEvents *bool `type:"boolean"`
  7785. // Specifies whether the trail exists in one region or in all regions.
  7786. IsMultiRegionTrail *bool `type:"boolean"`
  7787. // Specifies whether the trail is an organization trail.
  7788. IsOrganizationTrail *bool `type:"boolean"`
  7789. // Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
  7790. // The value is a fully specified ARN to a KMS key in the following format.
  7791. //
  7792. // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  7793. KmsKeyId *string `type:"string"`
  7794. // Specifies whether log file integrity validation is enabled.
  7795. LogFileValidationEnabled *bool `type:"boolean"`
  7796. // Specifies the name of the trail.
  7797. Name *string `type:"string"`
  7798. // Specifies the name of the Amazon S3 bucket designated for publishing log
  7799. // files.
  7800. S3BucketName *string `type:"string"`
  7801. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  7802. // you have designated for log file delivery. For more information, see Finding
  7803. // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  7804. S3KeyPrefix *string `type:"string"`
  7805. // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  7806. // when log files are delivered. The format of a topic ARN is:
  7807. //
  7808. // arn:aws:sns:us-east-2:123456789012:MyTopic
  7809. SnsTopicARN *string `type:"string"`
  7810. // This field is no longer in use. Use SnsTopicARN.
  7811. //
  7812. // Deprecated: SnsTopicName has been deprecated
  7813. SnsTopicName *string `deprecated:"true" type:"string"`
  7814. // Specifies the ARN of the trail that was created. The format of a trail ARN
  7815. // is:
  7816. //
  7817. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  7818. TrailARN *string `type:"string"`
  7819. }
  7820. // String returns the string representation.
  7821. //
  7822. // API parameter values that are decorated as "sensitive" in the API will not
  7823. // be included in the string output. The member name will be present, but the
  7824. // value will be replaced with "sensitive".
  7825. func (s CreateTrailOutput) String() string {
  7826. return awsutil.Prettify(s)
  7827. }
  7828. // GoString returns the string representation.
  7829. //
  7830. // API parameter values that are decorated as "sensitive" in the API will not
  7831. // be included in the string output. The member name will be present, but the
  7832. // value will be replaced with "sensitive".
  7833. func (s CreateTrailOutput) GoString() string {
  7834. return s.String()
  7835. }
  7836. // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  7837. func (s *CreateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailOutput {
  7838. s.CloudWatchLogsLogGroupArn = &v
  7839. return s
  7840. }
  7841. // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  7842. func (s *CreateTrailOutput) SetCloudWatchLogsRoleArn(v string) *CreateTrailOutput {
  7843. s.CloudWatchLogsRoleArn = &v
  7844. return s
  7845. }
  7846. // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  7847. func (s *CreateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailOutput {
  7848. s.IncludeGlobalServiceEvents = &v
  7849. return s
  7850. }
  7851. // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  7852. func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput {
  7853. s.IsMultiRegionTrail = &v
  7854. return s
  7855. }
  7856. // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  7857. func (s *CreateTrailOutput) SetIsOrganizationTrail(v bool) *CreateTrailOutput {
  7858. s.IsOrganizationTrail = &v
  7859. return s
  7860. }
  7861. // SetKmsKeyId sets the KmsKeyId field's value.
  7862. func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput {
  7863. s.KmsKeyId = &v
  7864. return s
  7865. }
  7866. // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
  7867. func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput {
  7868. s.LogFileValidationEnabled = &v
  7869. return s
  7870. }
  7871. // SetName sets the Name field's value.
  7872. func (s *CreateTrailOutput) SetName(v string) *CreateTrailOutput {
  7873. s.Name = &v
  7874. return s
  7875. }
  7876. // SetS3BucketName sets the S3BucketName field's value.
  7877. func (s *CreateTrailOutput) SetS3BucketName(v string) *CreateTrailOutput {
  7878. s.S3BucketName = &v
  7879. return s
  7880. }
  7881. // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  7882. func (s *CreateTrailOutput) SetS3KeyPrefix(v string) *CreateTrailOutput {
  7883. s.S3KeyPrefix = &v
  7884. return s
  7885. }
  7886. // SetSnsTopicARN sets the SnsTopicARN field's value.
  7887. func (s *CreateTrailOutput) SetSnsTopicARN(v string) *CreateTrailOutput {
  7888. s.SnsTopicARN = &v
  7889. return s
  7890. }
  7891. // SetSnsTopicName sets the SnsTopicName field's value.
  7892. func (s *CreateTrailOutput) SetSnsTopicName(v string) *CreateTrailOutput {
  7893. s.SnsTopicName = &v
  7894. return s
  7895. }
  7896. // SetTrailARN sets the TrailARN field's value.
  7897. func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput {
  7898. s.TrailARN = &v
  7899. return s
  7900. }
  7901. // The Amazon S3 buckets, Lambda functions, or Amazon DynamoDB tables that you
  7902. // specify in your event selectors for your trail to log data events. Data events
  7903. // provide information about the resource operations performed on or within
  7904. // a resource itself. These are also known as data plane operations. You can
  7905. // specify up to 250 data resources for a trail.
  7906. //
  7907. // The total number of allowed data resources is 250. This number can be distributed
  7908. // between 1 and 5 event selectors, but the total cannot exceed 250 across all
  7909. // selectors for the trail.
  7910. //
  7911. // If you are using advanced event selectors, the maximum total number of values
  7912. // for all conditions, across all advanced event selectors for the trail, is
  7913. // 500.
  7914. //
  7915. // The following example demonstrates how logging works when you configure logging
  7916. // of all data events for an S3 bucket named bucket-1. In this example, the
  7917. // CloudTrail user specified an empty prefix, and the option to log both Read
  7918. // and Write data events.
  7919. //
  7920. // A user uploads an image file to bucket-1.
  7921. //
  7922. // The PutObject API operation is an Amazon S3 object-level API. It is recorded
  7923. // as a data event in CloudTrail. Because the CloudTrail user specified an S3
  7924. // bucket with an empty prefix, events that occur on any object in that bucket
  7925. // are logged. The trail processes and logs the event.
  7926. //
  7927. // A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2.
  7928. //
  7929. // The PutObject API operation occurred for an object in an S3 bucket that the
  7930. // CloudTrail user didn't specify for the trail. The trail doesn’t log the
  7931. // event.
  7932. //
  7933. // The following example demonstrates how logging works when you configure logging
  7934. // of Lambda data events for a Lambda function named MyLambdaFunction, but not
  7935. // for all Lambda functions.
  7936. //
  7937. // A user runs a script that includes a call to the MyLambdaFunction function
  7938. // and the MyOtherLambdaFunction function.
  7939. //
  7940. // The Invoke API operation on MyLambdaFunction is an Lambda API. It is recorded
  7941. // as a data event in CloudTrail. Because the CloudTrail user specified logging
  7942. // data events for MyLambdaFunction, any invocations of that function are logged.
  7943. // The trail processes and logs the event.
  7944. //
  7945. // The Invoke API operation on MyOtherLambdaFunction is an Lambda API. Because
  7946. // the CloudTrail user did not specify logging data events for all Lambda functions,
  7947. // the Invoke operation for MyOtherLambdaFunction does not match the function
  7948. // specified for the trail. The trail doesn’t log the event.
  7949. type DataResource struct {
  7950. _ struct{} `type:"structure"`
  7951. // The resource type in which you want to log data events. You can specify the
  7952. // following basic event selector resource types:
  7953. //
  7954. // * AWS::S3::Object
  7955. //
  7956. // * AWS::Lambda::Function
  7957. //
  7958. // * AWS::DynamoDB::Table
  7959. //
  7960. // The following resource types are also available through advanced event selectors.
  7961. // Basic event selector resource types are valid in advanced event selectors,
  7962. // but advanced event selector resource types are not valid in basic event selectors.
  7963. // For more information, see AdvancedFieldSelector$Field.
  7964. //
  7965. // * AWS::CloudTrail::Channel
  7966. //
  7967. // * AWS::S3Outposts::Object
  7968. //
  7969. // * AWS::ManagedBlockchain::Node
  7970. //
  7971. // * AWS::S3ObjectLambda::AccessPoint
  7972. //
  7973. // * AWS::EC2::Snapshot
  7974. //
  7975. // * AWS::S3::AccessPoint
  7976. //
  7977. // * AWS::DynamoDB::Stream
  7978. //
  7979. // * AWS::Glue::Table
  7980. //
  7981. // * AWS::FinSpace::Environment
  7982. //
  7983. // * AWS::SageMaker::ExperimentTrialComponent
  7984. //
  7985. // * AWS::SageMaker::FeatureGroup
  7986. Type *string `type:"string"`
  7987. // An array of Amazon Resource Name (ARN) strings or partial ARN strings for
  7988. // the specified objects.
  7989. //
  7990. // * To log data events for all objects in all S3 buckets in your Amazon
  7991. // Web Services account, specify the prefix as arn:aws:s3. This also enables
  7992. // logging of data event activity performed by any user or role in your Amazon
  7993. // Web Services account, even if that activity is performed on a bucket that
  7994. // belongs to another Amazon Web Services account.
  7995. //
  7996. // * To log data events for all objects in an S3 bucket, specify the bucket
  7997. // and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs
  7998. // data events for all objects in this S3 bucket.
  7999. //
  8000. // * To log data events for specific objects, specify the S3 bucket and object
  8001. // prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data
  8002. // events for objects in this S3 bucket that match the prefix.
  8003. //
  8004. // * To log data events for all Lambda functions in your Amazon Web Services
  8005. // account, specify the prefix as arn:aws:lambda. This also enables logging
  8006. // of Invoke activity performed by any user or role in your Amazon Web Services
  8007. // account, even if that activity is performed on a function that belongs
  8008. // to another Amazon Web Services account.
  8009. //
  8010. // * To log data events for a specific Lambda function, specify the function
  8011. // ARN. Lambda function ARNs are exact. For example, if you specify a function
  8012. // ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, data events
  8013. // will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld.
  8014. // They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2.
  8015. //
  8016. // * To log data events for all DynamoDB tables in your Amazon Web Services
  8017. // account, specify the prefix as arn:aws:dynamodb.
  8018. Values []*string `type:"list"`
  8019. }
  8020. // String returns the string representation.
  8021. //
  8022. // API parameter values that are decorated as "sensitive" in the API will not
  8023. // be included in the string output. The member name will be present, but the
  8024. // value will be replaced with "sensitive".
  8025. func (s DataResource) String() string {
  8026. return awsutil.Prettify(s)
  8027. }
  8028. // GoString returns the string representation.
  8029. //
  8030. // API parameter values that are decorated as "sensitive" in the API will not
  8031. // be included in the string output. The member name will be present, but the
  8032. // value will be replaced with "sensitive".
  8033. func (s DataResource) GoString() string {
  8034. return s.String()
  8035. }
  8036. // SetType sets the Type field's value.
  8037. func (s *DataResource) SetType(v string) *DataResource {
  8038. s.Type = &v
  8039. return s
  8040. }
  8041. // SetValues sets the Values field's value.
  8042. func (s *DataResource) SetValues(v []*string) *DataResource {
  8043. s.Values = v
  8044. return s
  8045. }
  8046. // This exception is thrown when the maximum number of CloudTrail delegated
  8047. // administrators is reached.
  8048. type DelegatedAdminAccountLimitExceededException struct {
  8049. _ struct{} `type:"structure"`
  8050. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8051. Message_ *string `locationName:"message" type:"string"`
  8052. }
  8053. // String returns the string representation.
  8054. //
  8055. // API parameter values that are decorated as "sensitive" in the API will not
  8056. // be included in the string output. The member name will be present, but the
  8057. // value will be replaced with "sensitive".
  8058. func (s DelegatedAdminAccountLimitExceededException) String() string {
  8059. return awsutil.Prettify(s)
  8060. }
  8061. // GoString returns the string representation.
  8062. //
  8063. // API parameter values that are decorated as "sensitive" in the API will not
  8064. // be included in the string output. The member name will be present, but the
  8065. // value will be replaced with "sensitive".
  8066. func (s DelegatedAdminAccountLimitExceededException) GoString() string {
  8067. return s.String()
  8068. }
  8069. func newErrorDelegatedAdminAccountLimitExceededException(v protocol.ResponseMetadata) error {
  8070. return &DelegatedAdminAccountLimitExceededException{
  8071. RespMetadata: v,
  8072. }
  8073. }
  8074. // Code returns the exception type name.
  8075. func (s *DelegatedAdminAccountLimitExceededException) Code() string {
  8076. return "DelegatedAdminAccountLimitExceededException"
  8077. }
  8078. // Message returns the exception's message.
  8079. func (s *DelegatedAdminAccountLimitExceededException) Message() string {
  8080. if s.Message_ != nil {
  8081. return *s.Message_
  8082. }
  8083. return ""
  8084. }
  8085. // OrigErr always returns nil, satisfies awserr.Error interface.
  8086. func (s *DelegatedAdminAccountLimitExceededException) OrigErr() error {
  8087. return nil
  8088. }
  8089. func (s *DelegatedAdminAccountLimitExceededException) Error() string {
  8090. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  8091. }
  8092. // Status code returns the HTTP status code for the request's response error.
  8093. func (s *DelegatedAdminAccountLimitExceededException) StatusCode() int {
  8094. return s.RespMetadata.StatusCode
  8095. }
  8096. // RequestID returns the service's response RequestID for request.
  8097. func (s *DelegatedAdminAccountLimitExceededException) RequestID() string {
  8098. return s.RespMetadata.RequestID
  8099. }
  8100. type DeleteChannelInput struct {
  8101. _ struct{} `type:"structure"`
  8102. // The ARN or the UUID value of the channel that you want to delete.
  8103. //
  8104. // Channel is a required field
  8105. Channel *string `min:"3" type:"string" required:"true"`
  8106. }
  8107. // String returns the string representation.
  8108. //
  8109. // API parameter values that are decorated as "sensitive" in the API will not
  8110. // be included in the string output. The member name will be present, but the
  8111. // value will be replaced with "sensitive".
  8112. func (s DeleteChannelInput) String() string {
  8113. return awsutil.Prettify(s)
  8114. }
  8115. // GoString returns the string representation.
  8116. //
  8117. // API parameter values that are decorated as "sensitive" in the API will not
  8118. // be included in the string output. The member name will be present, but the
  8119. // value will be replaced with "sensitive".
  8120. func (s DeleteChannelInput) GoString() string {
  8121. return s.String()
  8122. }
  8123. // Validate inspects the fields of the type to determine if they are valid.
  8124. func (s *DeleteChannelInput) Validate() error {
  8125. invalidParams := request.ErrInvalidParams{Context: "DeleteChannelInput"}
  8126. if s.Channel == nil {
  8127. invalidParams.Add(request.NewErrParamRequired("Channel"))
  8128. }
  8129. if s.Channel != nil && len(*s.Channel) < 3 {
  8130. invalidParams.Add(request.NewErrParamMinLen("Channel", 3))
  8131. }
  8132. if invalidParams.Len() > 0 {
  8133. return invalidParams
  8134. }
  8135. return nil
  8136. }
  8137. // SetChannel sets the Channel field's value.
  8138. func (s *DeleteChannelInput) SetChannel(v string) *DeleteChannelInput {
  8139. s.Channel = &v
  8140. return s
  8141. }
  8142. type DeleteChannelOutput struct {
  8143. _ struct{} `type:"structure"`
  8144. }
  8145. // String returns the string representation.
  8146. //
  8147. // API parameter values that are decorated as "sensitive" in the API will not
  8148. // be included in the string output. The member name will be present, but the
  8149. // value will be replaced with "sensitive".
  8150. func (s DeleteChannelOutput) String() string {
  8151. return awsutil.Prettify(s)
  8152. }
  8153. // GoString returns the string representation.
  8154. //
  8155. // API parameter values that are decorated as "sensitive" in the API will not
  8156. // be included in the string output. The member name will be present, but the
  8157. // value will be replaced with "sensitive".
  8158. func (s DeleteChannelOutput) GoString() string {
  8159. return s.String()
  8160. }
  8161. type DeleteEventDataStoreInput struct {
  8162. _ struct{} `type:"structure"`
  8163. // The ARN (or the ID suffix of the ARN) of the event data store to delete.
  8164. //
  8165. // EventDataStore is a required field
  8166. EventDataStore *string `min:"3" type:"string" required:"true"`
  8167. }
  8168. // String returns the string representation.
  8169. //
  8170. // API parameter values that are decorated as "sensitive" in the API will not
  8171. // be included in the string output. The member name will be present, but the
  8172. // value will be replaced with "sensitive".
  8173. func (s DeleteEventDataStoreInput) String() string {
  8174. return awsutil.Prettify(s)
  8175. }
  8176. // GoString returns the string representation.
  8177. //
  8178. // API parameter values that are decorated as "sensitive" in the API will not
  8179. // be included in the string output. The member name will be present, but the
  8180. // value will be replaced with "sensitive".
  8181. func (s DeleteEventDataStoreInput) GoString() string {
  8182. return s.String()
  8183. }
  8184. // Validate inspects the fields of the type to determine if they are valid.
  8185. func (s *DeleteEventDataStoreInput) Validate() error {
  8186. invalidParams := request.ErrInvalidParams{Context: "DeleteEventDataStoreInput"}
  8187. if s.EventDataStore == nil {
  8188. invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
  8189. }
  8190. if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
  8191. invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
  8192. }
  8193. if invalidParams.Len() > 0 {
  8194. return invalidParams
  8195. }
  8196. return nil
  8197. }
  8198. // SetEventDataStore sets the EventDataStore field's value.
  8199. func (s *DeleteEventDataStoreInput) SetEventDataStore(v string) *DeleteEventDataStoreInput {
  8200. s.EventDataStore = &v
  8201. return s
  8202. }
  8203. type DeleteEventDataStoreOutput struct {
  8204. _ struct{} `type:"structure"`
  8205. }
  8206. // String returns the string representation.
  8207. //
  8208. // API parameter values that are decorated as "sensitive" in the API will not
  8209. // be included in the string output. The member name will be present, but the
  8210. // value will be replaced with "sensitive".
  8211. func (s DeleteEventDataStoreOutput) String() string {
  8212. return awsutil.Prettify(s)
  8213. }
  8214. // GoString returns the string representation.
  8215. //
  8216. // API parameter values that are decorated as "sensitive" in the API will not
  8217. // be included in the string output. The member name will be present, but the
  8218. // value will be replaced with "sensitive".
  8219. func (s DeleteEventDataStoreOutput) GoString() string {
  8220. return s.String()
  8221. }
  8222. type DeleteResourcePolicyInput struct {
  8223. _ struct{} `type:"structure"`
  8224. // The Amazon Resource Name (ARN) of the CloudTrail channel you're deleting
  8225. // the resource-based policy from. The following is the format of a resource
  8226. // ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
  8227. //
  8228. // ResourceArn is a required field
  8229. ResourceArn *string `min:"3" type:"string" required:"true"`
  8230. }
  8231. // String returns the string representation.
  8232. //
  8233. // API parameter values that are decorated as "sensitive" in the API will not
  8234. // be included in the string output. The member name will be present, but the
  8235. // value will be replaced with "sensitive".
  8236. func (s DeleteResourcePolicyInput) String() string {
  8237. return awsutil.Prettify(s)
  8238. }
  8239. // GoString returns the string representation.
  8240. //
  8241. // API parameter values that are decorated as "sensitive" in the API will not
  8242. // be included in the string output. The member name will be present, but the
  8243. // value will be replaced with "sensitive".
  8244. func (s DeleteResourcePolicyInput) GoString() string {
  8245. return s.String()
  8246. }
  8247. // Validate inspects the fields of the type to determine if they are valid.
  8248. func (s *DeleteResourcePolicyInput) Validate() error {
  8249. invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"}
  8250. if s.ResourceArn == nil {
  8251. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  8252. }
  8253. if s.ResourceArn != nil && len(*s.ResourceArn) < 3 {
  8254. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 3))
  8255. }
  8256. if invalidParams.Len() > 0 {
  8257. return invalidParams
  8258. }
  8259. return nil
  8260. }
  8261. // SetResourceArn sets the ResourceArn field's value.
  8262. func (s *DeleteResourcePolicyInput) SetResourceArn(v string) *DeleteResourcePolicyInput {
  8263. s.ResourceArn = &v
  8264. return s
  8265. }
  8266. type DeleteResourcePolicyOutput struct {
  8267. _ struct{} `type:"structure"`
  8268. }
  8269. // String returns the string representation.
  8270. //
  8271. // API parameter values that are decorated as "sensitive" in the API will not
  8272. // be included in the string output. The member name will be present, but the
  8273. // value will be replaced with "sensitive".
  8274. func (s DeleteResourcePolicyOutput) String() string {
  8275. return awsutil.Prettify(s)
  8276. }
  8277. // GoString returns the string representation.
  8278. //
  8279. // API parameter values that are decorated as "sensitive" in the API will not
  8280. // be included in the string output. The member name will be present, but the
  8281. // value will be replaced with "sensitive".
  8282. func (s DeleteResourcePolicyOutput) GoString() string {
  8283. return s.String()
  8284. }
  8285. // The request that specifies the name of a trail to delete.
  8286. type DeleteTrailInput struct {
  8287. _ struct{} `type:"structure"`
  8288. // Specifies the name or the CloudTrail ARN of the trail to be deleted. The
  8289. // following is the format of a trail ARN. arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  8290. //
  8291. // Name is a required field
  8292. Name *string `type:"string" required:"true"`
  8293. }
  8294. // String returns the string representation.
  8295. //
  8296. // API parameter values that are decorated as "sensitive" in the API will not
  8297. // be included in the string output. The member name will be present, but the
  8298. // value will be replaced with "sensitive".
  8299. func (s DeleteTrailInput) String() string {
  8300. return awsutil.Prettify(s)
  8301. }
  8302. // GoString returns the string representation.
  8303. //
  8304. // API parameter values that are decorated as "sensitive" in the API will not
  8305. // be included in the string output. The member name will be present, but the
  8306. // value will be replaced with "sensitive".
  8307. func (s DeleteTrailInput) GoString() string {
  8308. return s.String()
  8309. }
  8310. // Validate inspects the fields of the type to determine if they are valid.
  8311. func (s *DeleteTrailInput) Validate() error {
  8312. invalidParams := request.ErrInvalidParams{Context: "DeleteTrailInput"}
  8313. if s.Name == nil {
  8314. invalidParams.Add(request.NewErrParamRequired("Name"))
  8315. }
  8316. if invalidParams.Len() > 0 {
  8317. return invalidParams
  8318. }
  8319. return nil
  8320. }
  8321. // SetName sets the Name field's value.
  8322. func (s *DeleteTrailInput) SetName(v string) *DeleteTrailInput {
  8323. s.Name = &v
  8324. return s
  8325. }
  8326. // Returns the objects or data listed below if successful. Otherwise, returns
  8327. // an error.
  8328. type DeleteTrailOutput struct {
  8329. _ struct{} `type:"structure"`
  8330. }
  8331. // String returns the string representation.
  8332. //
  8333. // API parameter values that are decorated as "sensitive" in the API will not
  8334. // be included in the string output. The member name will be present, but the
  8335. // value will be replaced with "sensitive".
  8336. func (s DeleteTrailOutput) String() string {
  8337. return awsutil.Prettify(s)
  8338. }
  8339. // GoString returns the string representation.
  8340. //
  8341. // API parameter values that are decorated as "sensitive" in the API will not
  8342. // be included in the string output. The member name will be present, but the
  8343. // value will be replaced with "sensitive".
  8344. func (s DeleteTrailOutput) GoString() string {
  8345. return s.String()
  8346. }
  8347. // Removes CloudTrail delegated administrator permissions from a specified member
  8348. // account in an organization that is currently designated as a delegated administrator.
  8349. type DeregisterOrganizationDelegatedAdminInput struct {
  8350. _ struct{} `type:"structure"`
  8351. // A delegated administrator account ID. This is a member account in an organization
  8352. // that is currently designated as a delegated administrator.
  8353. //
  8354. // DelegatedAdminAccountId is a required field
  8355. DelegatedAdminAccountId *string `min:"12" type:"string" required:"true"`
  8356. }
  8357. // String returns the string representation.
  8358. //
  8359. // API parameter values that are decorated as "sensitive" in the API will not
  8360. // be included in the string output. The member name will be present, but the
  8361. // value will be replaced with "sensitive".
  8362. func (s DeregisterOrganizationDelegatedAdminInput) String() string {
  8363. return awsutil.Prettify(s)
  8364. }
  8365. // GoString returns the string representation.
  8366. //
  8367. // API parameter values that are decorated as "sensitive" in the API will not
  8368. // be included in the string output. The member name will be present, but the
  8369. // value will be replaced with "sensitive".
  8370. func (s DeregisterOrganizationDelegatedAdminInput) GoString() string {
  8371. return s.String()
  8372. }
  8373. // Validate inspects the fields of the type to determine if they are valid.
  8374. func (s *DeregisterOrganizationDelegatedAdminInput) Validate() error {
  8375. invalidParams := request.ErrInvalidParams{Context: "DeregisterOrganizationDelegatedAdminInput"}
  8376. if s.DelegatedAdminAccountId == nil {
  8377. invalidParams.Add(request.NewErrParamRequired("DelegatedAdminAccountId"))
  8378. }
  8379. if s.DelegatedAdminAccountId != nil && len(*s.DelegatedAdminAccountId) < 12 {
  8380. invalidParams.Add(request.NewErrParamMinLen("DelegatedAdminAccountId", 12))
  8381. }
  8382. if invalidParams.Len() > 0 {
  8383. return invalidParams
  8384. }
  8385. return nil
  8386. }
  8387. // SetDelegatedAdminAccountId sets the DelegatedAdminAccountId field's value.
  8388. func (s *DeregisterOrganizationDelegatedAdminInput) SetDelegatedAdminAccountId(v string) *DeregisterOrganizationDelegatedAdminInput {
  8389. s.DelegatedAdminAccountId = &v
  8390. return s
  8391. }
  8392. // Returns the following response if successful. Otherwise, returns an error.
  8393. type DeregisterOrganizationDelegatedAdminOutput struct {
  8394. _ struct{} `type:"structure"`
  8395. }
  8396. // String 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 DeregisterOrganizationDelegatedAdminOutput) String() string {
  8402. return awsutil.Prettify(s)
  8403. }
  8404. // GoString returns the string representation.
  8405. //
  8406. // API parameter values that are decorated as "sensitive" in the API will not
  8407. // be included in the string output. The member name will be present, but the
  8408. // value will be replaced with "sensitive".
  8409. func (s DeregisterOrganizationDelegatedAdminOutput) GoString() string {
  8410. return s.String()
  8411. }
  8412. type DescribeQueryInput struct {
  8413. _ struct{} `type:"structure"`
  8414. // The ARN (or the ID suffix of the ARN) of an event data store on which the
  8415. // specified query was run.
  8416. //
  8417. // Deprecated: EventDataStore is no longer required by DescribeQueryRequest
  8418. EventDataStore *string `min:"3" deprecated:"true" type:"string"`
  8419. // The query ID.
  8420. //
  8421. // QueryId is a required field
  8422. QueryId *string `min:"36" type:"string" required:"true"`
  8423. }
  8424. // String returns the string representation.
  8425. //
  8426. // API parameter values that are decorated as "sensitive" in the API will not
  8427. // be included in the string output. The member name will be present, but the
  8428. // value will be replaced with "sensitive".
  8429. func (s DescribeQueryInput) String() string {
  8430. return awsutil.Prettify(s)
  8431. }
  8432. // GoString returns the string representation.
  8433. //
  8434. // API parameter values that are decorated as "sensitive" in the API will not
  8435. // be included in the string output. The member name will be present, but the
  8436. // value will be replaced with "sensitive".
  8437. func (s DescribeQueryInput) GoString() string {
  8438. return s.String()
  8439. }
  8440. // Validate inspects the fields of the type to determine if they are valid.
  8441. func (s *DescribeQueryInput) Validate() error {
  8442. invalidParams := request.ErrInvalidParams{Context: "DescribeQueryInput"}
  8443. if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
  8444. invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
  8445. }
  8446. if s.QueryId == nil {
  8447. invalidParams.Add(request.NewErrParamRequired("QueryId"))
  8448. }
  8449. if s.QueryId != nil && len(*s.QueryId) < 36 {
  8450. invalidParams.Add(request.NewErrParamMinLen("QueryId", 36))
  8451. }
  8452. if invalidParams.Len() > 0 {
  8453. return invalidParams
  8454. }
  8455. return nil
  8456. }
  8457. // SetEventDataStore sets the EventDataStore field's value.
  8458. func (s *DescribeQueryInput) SetEventDataStore(v string) *DescribeQueryInput {
  8459. s.EventDataStore = &v
  8460. return s
  8461. }
  8462. // SetQueryId sets the QueryId field's value.
  8463. func (s *DescribeQueryInput) SetQueryId(v string) *DescribeQueryInput {
  8464. s.QueryId = &v
  8465. return s
  8466. }
  8467. type DescribeQueryOutput struct {
  8468. _ struct{} `type:"structure"`
  8469. // The URI for the S3 bucket where CloudTrail delivered query results, if applicable.
  8470. DeliveryS3Uri *string `type:"string"`
  8471. // The delivery status.
  8472. DeliveryStatus *string `type:"string" enum:"DeliveryStatus"`
  8473. // The error message returned if a query failed.
  8474. ErrorMessage *string `min:"4" type:"string"`
  8475. // The ID of the query.
  8476. QueryId *string `min:"36" type:"string"`
  8477. // Metadata about a query, including the number of events that were matched,
  8478. // the total number of events scanned, the query run time in milliseconds, and
  8479. // the query's creation time.
  8480. QueryStatistics *QueryStatisticsForDescribeQuery `type:"structure"`
  8481. // The status of a query. Values for QueryStatus include QUEUED, RUNNING, FINISHED,
  8482. // FAILED, TIMED_OUT, or CANCELLED
  8483. QueryStatus *string `type:"string" enum:"QueryStatus"`
  8484. // The SQL code of a query.
  8485. QueryString *string `min:"1" type:"string"`
  8486. }
  8487. // String returns the string representation.
  8488. //
  8489. // API parameter values that are decorated as "sensitive" in the API will not
  8490. // be included in the string output. The member name will be present, but the
  8491. // value will be replaced with "sensitive".
  8492. func (s DescribeQueryOutput) String() string {
  8493. return awsutil.Prettify(s)
  8494. }
  8495. // GoString returns the string representation.
  8496. //
  8497. // API parameter values that are decorated as "sensitive" in the API will not
  8498. // be included in the string output. The member name will be present, but the
  8499. // value will be replaced with "sensitive".
  8500. func (s DescribeQueryOutput) GoString() string {
  8501. return s.String()
  8502. }
  8503. // SetDeliveryS3Uri sets the DeliveryS3Uri field's value.
  8504. func (s *DescribeQueryOutput) SetDeliveryS3Uri(v string) *DescribeQueryOutput {
  8505. s.DeliveryS3Uri = &v
  8506. return s
  8507. }
  8508. // SetDeliveryStatus sets the DeliveryStatus field's value.
  8509. func (s *DescribeQueryOutput) SetDeliveryStatus(v string) *DescribeQueryOutput {
  8510. s.DeliveryStatus = &v
  8511. return s
  8512. }
  8513. // SetErrorMessage sets the ErrorMessage field's value.
  8514. func (s *DescribeQueryOutput) SetErrorMessage(v string) *DescribeQueryOutput {
  8515. s.ErrorMessage = &v
  8516. return s
  8517. }
  8518. // SetQueryId sets the QueryId field's value.
  8519. func (s *DescribeQueryOutput) SetQueryId(v string) *DescribeQueryOutput {
  8520. s.QueryId = &v
  8521. return s
  8522. }
  8523. // SetQueryStatistics sets the QueryStatistics field's value.
  8524. func (s *DescribeQueryOutput) SetQueryStatistics(v *QueryStatisticsForDescribeQuery) *DescribeQueryOutput {
  8525. s.QueryStatistics = v
  8526. return s
  8527. }
  8528. // SetQueryStatus sets the QueryStatus field's value.
  8529. func (s *DescribeQueryOutput) SetQueryStatus(v string) *DescribeQueryOutput {
  8530. s.QueryStatus = &v
  8531. return s
  8532. }
  8533. // SetQueryString sets the QueryString field's value.
  8534. func (s *DescribeQueryOutput) SetQueryString(v string) *DescribeQueryOutput {
  8535. s.QueryString = &v
  8536. return s
  8537. }
  8538. // Returns information about the trail.
  8539. type DescribeTrailsInput struct {
  8540. _ struct{} `type:"structure"`
  8541. // Specifies whether to include shadow trails in the response. A shadow trail
  8542. // is the replication in a region of a trail that was created in a different
  8543. // region, or in the case of an organization trail, the replication of an organization
  8544. // trail in member accounts. If you do not include shadow trails, organization
  8545. // trails in a member account and region replication trails will not be returned.
  8546. // The default is true.
  8547. IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"`
  8548. // Specifies a list of trail names, trail ARNs, or both, of the trails to describe.
  8549. // The format of a trail ARN is:
  8550. //
  8551. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  8552. //
  8553. // If an empty list is specified, information for the trail in the current region
  8554. // is returned.
  8555. //
  8556. // * If an empty list is specified and IncludeShadowTrails is false, then
  8557. // information for all trails in the current region is returned.
  8558. //
  8559. // * If an empty list is specified and IncludeShadowTrails is null or true,
  8560. // then information for all trails in the current region and any associated
  8561. // shadow trails in other regions is returned.
  8562. //
  8563. // If one or more trail names are specified, information is returned only if
  8564. // the names match the names of trails belonging only to the current region
  8565. // and current account. To return information about a trail in another region,
  8566. // you must specify its trail ARN.
  8567. TrailNameList []*string `locationName:"trailNameList" type:"list"`
  8568. }
  8569. // String returns the string representation.
  8570. //
  8571. // API parameter values that are decorated as "sensitive" in the API will not
  8572. // be included in the string output. The member name will be present, but the
  8573. // value will be replaced with "sensitive".
  8574. func (s DescribeTrailsInput) String() string {
  8575. return awsutil.Prettify(s)
  8576. }
  8577. // GoString returns the string representation.
  8578. //
  8579. // API parameter values that are decorated as "sensitive" in the API will not
  8580. // be included in the string output. The member name will be present, but the
  8581. // value will be replaced with "sensitive".
  8582. func (s DescribeTrailsInput) GoString() string {
  8583. return s.String()
  8584. }
  8585. // SetIncludeShadowTrails sets the IncludeShadowTrails field's value.
  8586. func (s *DescribeTrailsInput) SetIncludeShadowTrails(v bool) *DescribeTrailsInput {
  8587. s.IncludeShadowTrails = &v
  8588. return s
  8589. }
  8590. // SetTrailNameList sets the TrailNameList field's value.
  8591. func (s *DescribeTrailsInput) SetTrailNameList(v []*string) *DescribeTrailsInput {
  8592. s.TrailNameList = v
  8593. return s
  8594. }
  8595. // Returns the objects or data listed below if successful. Otherwise, returns
  8596. // an error.
  8597. type DescribeTrailsOutput struct {
  8598. _ struct{} `type:"structure"`
  8599. // The list of trail objects. Trail objects with string values are only returned
  8600. // if values for the objects exist in a trail's configuration. For example,
  8601. // SNSTopicName and SNSTopicARN are only returned in results if a trail is configured
  8602. // to send SNS notifications. Similarly, KMSKeyId only appears in results if
  8603. // a trail's log files are encrypted with KMS customer managed keys.
  8604. TrailList []*Trail `locationName:"trailList" type:"list"`
  8605. }
  8606. // String returns the string representation.
  8607. //
  8608. // API parameter values that are decorated as "sensitive" in the API will not
  8609. // be included in the string output. The member name will be present, but the
  8610. // value will be replaced with "sensitive".
  8611. func (s DescribeTrailsOutput) String() string {
  8612. return awsutil.Prettify(s)
  8613. }
  8614. // GoString returns the string representation.
  8615. //
  8616. // API parameter values that are decorated as "sensitive" in the API will not
  8617. // be included in the string output. The member name will be present, but the
  8618. // value will be replaced with "sensitive".
  8619. func (s DescribeTrailsOutput) GoString() string {
  8620. return s.String()
  8621. }
  8622. // SetTrailList sets the TrailList field's value.
  8623. func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput {
  8624. s.TrailList = v
  8625. return s
  8626. }
  8627. // Contains information about the destination receiving events.
  8628. type Destination struct {
  8629. _ struct{} `type:"structure"`
  8630. // For channels used for a CloudTrail Lake integration, the location is the
  8631. // ARN of an event data store that receives events from a channel. For service-linked
  8632. // channels, the location is the name of the Amazon Web Services service.
  8633. //
  8634. // Location is a required field
  8635. Location *string `min:"3" type:"string" required:"true"`
  8636. // The type of destination for events arriving from a channel. For channels
  8637. // used for a CloudTrail Lake integration, the value is EventDataStore. For
  8638. // service-linked channels, the value is AWS_SERVICE.
  8639. //
  8640. // Type is a required field
  8641. Type *string `type:"string" required:"true" enum:"DestinationType"`
  8642. }
  8643. // String returns the string representation.
  8644. //
  8645. // API parameter values that are decorated as "sensitive" in the API will not
  8646. // be included in the string output. The member name will be present, but the
  8647. // value will be replaced with "sensitive".
  8648. func (s Destination) String() string {
  8649. return awsutil.Prettify(s)
  8650. }
  8651. // GoString returns the string representation.
  8652. //
  8653. // API parameter values that are decorated as "sensitive" in the API will not
  8654. // be included in the string output. The member name will be present, but the
  8655. // value will be replaced with "sensitive".
  8656. func (s Destination) GoString() string {
  8657. return s.String()
  8658. }
  8659. // Validate inspects the fields of the type to determine if they are valid.
  8660. func (s *Destination) Validate() error {
  8661. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  8662. if s.Location == nil {
  8663. invalidParams.Add(request.NewErrParamRequired("Location"))
  8664. }
  8665. if s.Location != nil && len(*s.Location) < 3 {
  8666. invalidParams.Add(request.NewErrParamMinLen("Location", 3))
  8667. }
  8668. if s.Type == nil {
  8669. invalidParams.Add(request.NewErrParamRequired("Type"))
  8670. }
  8671. if invalidParams.Len() > 0 {
  8672. return invalidParams
  8673. }
  8674. return nil
  8675. }
  8676. // SetLocation sets the Location field's value.
  8677. func (s *Destination) SetLocation(v string) *Destination {
  8678. s.Location = &v
  8679. return s
  8680. }
  8681. // SetType sets the Type field's value.
  8682. func (s *Destination) SetType(v string) *Destination {
  8683. s.Type = &v
  8684. return s
  8685. }
  8686. // Contains information about an event that was returned by a lookup request.
  8687. // The result includes a representation of a CloudTrail event.
  8688. type Event struct {
  8689. _ struct{} `type:"structure"`
  8690. // The Amazon Web Services access key ID that was used to sign the request.
  8691. // If the request was made with temporary security credentials, this is the
  8692. // access key ID of the temporary credentials.
  8693. AccessKeyId *string `type:"string"`
  8694. // A JSON string that contains a representation of the event returned.
  8695. CloudTrailEvent *string `type:"string"`
  8696. // The CloudTrail ID of the event returned.
  8697. EventId *string `type:"string"`
  8698. // The name of the event returned.
  8699. EventName *string `type:"string"`
  8700. // The Amazon Web Services service to which the request was made.
  8701. EventSource *string `type:"string"`
  8702. // The date and time of the event returned.
  8703. EventTime *time.Time `type:"timestamp"`
  8704. // Information about whether the event is a write event or a read event.
  8705. ReadOnly *string `type:"string"`
  8706. // A list of resources referenced by the event returned.
  8707. Resources []*Resource `type:"list"`
  8708. // A user name or role name of the requester that called the API in the event
  8709. // returned.
  8710. Username *string `type:"string"`
  8711. }
  8712. // String returns the string representation.
  8713. //
  8714. // API parameter values that are decorated as "sensitive" in the API will not
  8715. // be included in the string output. The member name will be present, but the
  8716. // value will be replaced with "sensitive".
  8717. func (s Event) String() string {
  8718. return awsutil.Prettify(s)
  8719. }
  8720. // GoString returns the string representation.
  8721. //
  8722. // API parameter values that are decorated as "sensitive" in the API will not
  8723. // be included in the string output. The member name will be present, but the
  8724. // value will be replaced with "sensitive".
  8725. func (s Event) GoString() string {
  8726. return s.String()
  8727. }
  8728. // SetAccessKeyId sets the AccessKeyId field's value.
  8729. func (s *Event) SetAccessKeyId(v string) *Event {
  8730. s.AccessKeyId = &v
  8731. return s
  8732. }
  8733. // SetCloudTrailEvent sets the CloudTrailEvent field's value.
  8734. func (s *Event) SetCloudTrailEvent(v string) *Event {
  8735. s.CloudTrailEvent = &v
  8736. return s
  8737. }
  8738. // SetEventId sets the EventId field's value.
  8739. func (s *Event) SetEventId(v string) *Event {
  8740. s.EventId = &v
  8741. return s
  8742. }
  8743. // SetEventName sets the EventName field's value.
  8744. func (s *Event) SetEventName(v string) *Event {
  8745. s.EventName = &v
  8746. return s
  8747. }
  8748. // SetEventSource sets the EventSource field's value.
  8749. func (s *Event) SetEventSource(v string) *Event {
  8750. s.EventSource = &v
  8751. return s
  8752. }
  8753. // SetEventTime sets the EventTime field's value.
  8754. func (s *Event) SetEventTime(v time.Time) *Event {
  8755. s.EventTime = &v
  8756. return s
  8757. }
  8758. // SetReadOnly sets the ReadOnly field's value.
  8759. func (s *Event) SetReadOnly(v string) *Event {
  8760. s.ReadOnly = &v
  8761. return s
  8762. }
  8763. // SetResources sets the Resources field's value.
  8764. func (s *Event) SetResources(v []*Resource) *Event {
  8765. s.Resources = v
  8766. return s
  8767. }
  8768. // SetUsername sets the Username field's value.
  8769. func (s *Event) SetUsername(v string) *Event {
  8770. s.Username = &v
  8771. return s
  8772. }
  8773. // A storage lake of event data against which you can run complex SQL-based
  8774. // queries. An event data store can include events that you have logged on your
  8775. // account from the last 90 to 2557 days (about three months to up to seven
  8776. // years). To select events for an event data store, use advanced event selectors
  8777. // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced).
  8778. type EventDataStore struct {
  8779. _ struct{} `type:"structure"`
  8780. // The advanced event selectors that were used to select events for the data
  8781. // store.
  8782. //
  8783. // Deprecated: AdvancedEventSelectors is no longer returned by ListEventDataStores
  8784. AdvancedEventSelectors []*AdvancedEventSelector `deprecated:"true" type:"list"`
  8785. // The timestamp of the event data store's creation.
  8786. //
  8787. // Deprecated: CreatedTimestamp is no longer returned by ListEventDataStores
  8788. CreatedTimestamp *time.Time `deprecated:"true" type:"timestamp"`
  8789. // The ARN of the event data store.
  8790. EventDataStoreArn *string `min:"3" type:"string"`
  8791. // Indicates whether the event data store includes events from all regions,
  8792. // or only from the region in which it was created.
  8793. //
  8794. // Deprecated: MultiRegionEnabled is no longer returned by ListEventDataStores
  8795. MultiRegionEnabled *bool `deprecated:"true" type:"boolean"`
  8796. // The name of the event data store.
  8797. Name *string `min:"3" type:"string"`
  8798. // Indicates that an event data store is collecting logged events for an organization.
  8799. //
  8800. // Deprecated: OrganizationEnabled is no longer returned by ListEventDataStores
  8801. OrganizationEnabled *bool `deprecated:"true" type:"boolean"`
  8802. // The retention period, in days.
  8803. //
  8804. // Deprecated: RetentionPeriod is no longer returned by ListEventDataStores
  8805. RetentionPeriod *int64 `min:"7" deprecated:"true" type:"integer"`
  8806. // The status of an event data store. Values are ENABLED and PENDING_DELETION.
  8807. //
  8808. // Deprecated: Status is no longer returned by ListEventDataStores
  8809. Status *string `deprecated:"true" type:"string" enum:"EventDataStoreStatus"`
  8810. // Indicates whether the event data store is protected from termination.
  8811. //
  8812. // Deprecated: TerminationProtectionEnabled is no longer returned by ListEventDataStores
  8813. TerminationProtectionEnabled *bool `deprecated:"true" type:"boolean"`
  8814. // The timestamp showing when an event data store was updated, if applicable.
  8815. // UpdatedTimestamp is always either the same or newer than the time shown in
  8816. // CreatedTimestamp.
  8817. //
  8818. // Deprecated: UpdatedTimestamp is no longer returned by ListEventDataStores
  8819. UpdatedTimestamp *time.Time `deprecated:"true" type:"timestamp"`
  8820. }
  8821. // String returns the string representation.
  8822. //
  8823. // API parameter values that are decorated as "sensitive" in the API will not
  8824. // be included in the string output. The member name will be present, but the
  8825. // value will be replaced with "sensitive".
  8826. func (s EventDataStore) String() string {
  8827. return awsutil.Prettify(s)
  8828. }
  8829. // GoString returns the string representation.
  8830. //
  8831. // API parameter values that are decorated as "sensitive" in the API will not
  8832. // be included in the string output. The member name will be present, but the
  8833. // value will be replaced with "sensitive".
  8834. func (s EventDataStore) GoString() string {
  8835. return s.String()
  8836. }
  8837. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  8838. func (s *EventDataStore) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *EventDataStore {
  8839. s.AdvancedEventSelectors = v
  8840. return s
  8841. }
  8842. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  8843. func (s *EventDataStore) SetCreatedTimestamp(v time.Time) *EventDataStore {
  8844. s.CreatedTimestamp = &v
  8845. return s
  8846. }
  8847. // SetEventDataStoreArn sets the EventDataStoreArn field's value.
  8848. func (s *EventDataStore) SetEventDataStoreArn(v string) *EventDataStore {
  8849. s.EventDataStoreArn = &v
  8850. return s
  8851. }
  8852. // SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
  8853. func (s *EventDataStore) SetMultiRegionEnabled(v bool) *EventDataStore {
  8854. s.MultiRegionEnabled = &v
  8855. return s
  8856. }
  8857. // SetName sets the Name field's value.
  8858. func (s *EventDataStore) SetName(v string) *EventDataStore {
  8859. s.Name = &v
  8860. return s
  8861. }
  8862. // SetOrganizationEnabled sets the OrganizationEnabled field's value.
  8863. func (s *EventDataStore) SetOrganizationEnabled(v bool) *EventDataStore {
  8864. s.OrganizationEnabled = &v
  8865. return s
  8866. }
  8867. // SetRetentionPeriod sets the RetentionPeriod field's value.
  8868. func (s *EventDataStore) SetRetentionPeriod(v int64) *EventDataStore {
  8869. s.RetentionPeriod = &v
  8870. return s
  8871. }
  8872. // SetStatus sets the Status field's value.
  8873. func (s *EventDataStore) SetStatus(v string) *EventDataStore {
  8874. s.Status = &v
  8875. return s
  8876. }
  8877. // SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
  8878. func (s *EventDataStore) SetTerminationProtectionEnabled(v bool) *EventDataStore {
  8879. s.TerminationProtectionEnabled = &v
  8880. return s
  8881. }
  8882. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  8883. func (s *EventDataStore) SetUpdatedTimestamp(v time.Time) *EventDataStore {
  8884. s.UpdatedTimestamp = &v
  8885. return s
  8886. }
  8887. // The specified event data store ARN is not valid or does not map to an event
  8888. // data store in your account.
  8889. type EventDataStoreARNInvalidException struct {
  8890. _ struct{} `type:"structure"`
  8891. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8892. Message_ *string `locationName:"message" type:"string"`
  8893. }
  8894. // String returns the string representation.
  8895. //
  8896. // API parameter values that are decorated as "sensitive" in the API will not
  8897. // be included in the string output. The member name will be present, but the
  8898. // value will be replaced with "sensitive".
  8899. func (s EventDataStoreARNInvalidException) String() string {
  8900. return awsutil.Prettify(s)
  8901. }
  8902. // GoString returns the string representation.
  8903. //
  8904. // API parameter values that are decorated as "sensitive" in the API will not
  8905. // be included in the string output. The member name will be present, but the
  8906. // value will be replaced with "sensitive".
  8907. func (s EventDataStoreARNInvalidException) GoString() string {
  8908. return s.String()
  8909. }
  8910. func newErrorEventDataStoreARNInvalidException(v protocol.ResponseMetadata) error {
  8911. return &EventDataStoreARNInvalidException{
  8912. RespMetadata: v,
  8913. }
  8914. }
  8915. // Code returns the exception type name.
  8916. func (s *EventDataStoreARNInvalidException) Code() string {
  8917. return "EventDataStoreARNInvalidException"
  8918. }
  8919. // Message returns the exception's message.
  8920. func (s *EventDataStoreARNInvalidException) Message() string {
  8921. if s.Message_ != nil {
  8922. return *s.Message_
  8923. }
  8924. return ""
  8925. }
  8926. // OrigErr always returns nil, satisfies awserr.Error interface.
  8927. func (s *EventDataStoreARNInvalidException) OrigErr() error {
  8928. return nil
  8929. }
  8930. func (s *EventDataStoreARNInvalidException) Error() string {
  8931. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  8932. }
  8933. // Status code returns the HTTP status code for the request's response error.
  8934. func (s *EventDataStoreARNInvalidException) StatusCode() int {
  8935. return s.RespMetadata.StatusCode
  8936. }
  8937. // RequestID returns the service's response RequestID for request.
  8938. func (s *EventDataStoreARNInvalidException) RequestID() string {
  8939. return s.RespMetadata.RequestID
  8940. }
  8941. // An event data store with that name already exists.
  8942. type EventDataStoreAlreadyExistsException struct {
  8943. _ struct{} `type:"structure"`
  8944. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8945. Message_ *string `locationName:"message" type:"string"`
  8946. }
  8947. // String returns the string representation.
  8948. //
  8949. // API parameter values that are decorated as "sensitive" in the API will not
  8950. // be included in the string output. The member name will be present, but the
  8951. // value will be replaced with "sensitive".
  8952. func (s EventDataStoreAlreadyExistsException) String() string {
  8953. return awsutil.Prettify(s)
  8954. }
  8955. // GoString returns the string representation.
  8956. //
  8957. // API parameter values that are decorated as "sensitive" in the API will not
  8958. // be included in the string output. The member name will be present, but the
  8959. // value will be replaced with "sensitive".
  8960. func (s EventDataStoreAlreadyExistsException) GoString() string {
  8961. return s.String()
  8962. }
  8963. func newErrorEventDataStoreAlreadyExistsException(v protocol.ResponseMetadata) error {
  8964. return &EventDataStoreAlreadyExistsException{
  8965. RespMetadata: v,
  8966. }
  8967. }
  8968. // Code returns the exception type name.
  8969. func (s *EventDataStoreAlreadyExistsException) Code() string {
  8970. return "EventDataStoreAlreadyExistsException"
  8971. }
  8972. // Message returns the exception's message.
  8973. func (s *EventDataStoreAlreadyExistsException) Message() string {
  8974. if s.Message_ != nil {
  8975. return *s.Message_
  8976. }
  8977. return ""
  8978. }
  8979. // OrigErr always returns nil, satisfies awserr.Error interface.
  8980. func (s *EventDataStoreAlreadyExistsException) OrigErr() error {
  8981. return nil
  8982. }
  8983. func (s *EventDataStoreAlreadyExistsException) Error() string {
  8984. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  8985. }
  8986. // Status code returns the HTTP status code for the request's response error.
  8987. func (s *EventDataStoreAlreadyExistsException) StatusCode() int {
  8988. return s.RespMetadata.StatusCode
  8989. }
  8990. // RequestID returns the service's response RequestID for request.
  8991. func (s *EventDataStoreAlreadyExistsException) RequestID() string {
  8992. return s.RespMetadata.RequestID
  8993. }
  8994. // This exception is thrown when you try to update or delete an event data store
  8995. // that currently has an import in progress.
  8996. type EventDataStoreHasOngoingImportException struct {
  8997. _ struct{} `type:"structure"`
  8998. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8999. Message_ *string `locationName:"message" type:"string"`
  9000. }
  9001. // String returns the string representation.
  9002. //
  9003. // API parameter values that are decorated as "sensitive" in the API will not
  9004. // be included in the string output. The member name will be present, but the
  9005. // value will be replaced with "sensitive".
  9006. func (s EventDataStoreHasOngoingImportException) String() string {
  9007. return awsutil.Prettify(s)
  9008. }
  9009. // GoString returns the string representation.
  9010. //
  9011. // API parameter values that are decorated as "sensitive" in the API will not
  9012. // be included in the string output. The member name will be present, but the
  9013. // value will be replaced with "sensitive".
  9014. func (s EventDataStoreHasOngoingImportException) GoString() string {
  9015. return s.String()
  9016. }
  9017. func newErrorEventDataStoreHasOngoingImportException(v protocol.ResponseMetadata) error {
  9018. return &EventDataStoreHasOngoingImportException{
  9019. RespMetadata: v,
  9020. }
  9021. }
  9022. // Code returns the exception type name.
  9023. func (s *EventDataStoreHasOngoingImportException) Code() string {
  9024. return "EventDataStoreHasOngoingImportException"
  9025. }
  9026. // Message returns the exception's message.
  9027. func (s *EventDataStoreHasOngoingImportException) Message() string {
  9028. if s.Message_ != nil {
  9029. return *s.Message_
  9030. }
  9031. return ""
  9032. }
  9033. // OrigErr always returns nil, satisfies awserr.Error interface.
  9034. func (s *EventDataStoreHasOngoingImportException) OrigErr() error {
  9035. return nil
  9036. }
  9037. func (s *EventDataStoreHasOngoingImportException) Error() string {
  9038. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  9039. }
  9040. // Status code returns the HTTP status code for the request's response error.
  9041. func (s *EventDataStoreHasOngoingImportException) StatusCode() int {
  9042. return s.RespMetadata.StatusCode
  9043. }
  9044. // RequestID returns the service's response RequestID for request.
  9045. func (s *EventDataStoreHasOngoingImportException) RequestID() string {
  9046. return s.RespMetadata.RequestID
  9047. }
  9048. // Your account has used the maximum number of event data stores.
  9049. type EventDataStoreMaxLimitExceededException struct {
  9050. _ struct{} `type:"structure"`
  9051. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  9052. Message_ *string `locationName:"message" type:"string"`
  9053. }
  9054. // String returns the string representation.
  9055. //
  9056. // API parameter values that are decorated as "sensitive" in the API will not
  9057. // be included in the string output. The member name will be present, but the
  9058. // value will be replaced with "sensitive".
  9059. func (s EventDataStoreMaxLimitExceededException) String() string {
  9060. return awsutil.Prettify(s)
  9061. }
  9062. // GoString returns the string representation.
  9063. //
  9064. // API parameter values that are decorated as "sensitive" in the API will not
  9065. // be included in the string output. The member name will be present, but the
  9066. // value will be replaced with "sensitive".
  9067. func (s EventDataStoreMaxLimitExceededException) GoString() string {
  9068. return s.String()
  9069. }
  9070. func newErrorEventDataStoreMaxLimitExceededException(v protocol.ResponseMetadata) error {
  9071. return &EventDataStoreMaxLimitExceededException{
  9072. RespMetadata: v,
  9073. }
  9074. }
  9075. // Code returns the exception type name.
  9076. func (s *EventDataStoreMaxLimitExceededException) Code() string {
  9077. return "EventDataStoreMaxLimitExceededException"
  9078. }
  9079. // Message returns the exception's message.
  9080. func (s *EventDataStoreMaxLimitExceededException) Message() string {
  9081. if s.Message_ != nil {
  9082. return *s.Message_
  9083. }
  9084. return ""
  9085. }
  9086. // OrigErr always returns nil, satisfies awserr.Error interface.
  9087. func (s *EventDataStoreMaxLimitExceededException) OrigErr() error {
  9088. return nil
  9089. }
  9090. func (s *EventDataStoreMaxLimitExceededException) Error() string {
  9091. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  9092. }
  9093. // Status code returns the HTTP status code for the request's response error.
  9094. func (s *EventDataStoreMaxLimitExceededException) StatusCode() int {
  9095. return s.RespMetadata.StatusCode
  9096. }
  9097. // RequestID returns the service's response RequestID for request.
  9098. func (s *EventDataStoreMaxLimitExceededException) RequestID() string {
  9099. return s.RespMetadata.RequestID
  9100. }
  9101. // The specified event data store was not found.
  9102. type EventDataStoreNotFoundException struct {
  9103. _ struct{} `type:"structure"`
  9104. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  9105. Message_ *string `locationName:"message" type:"string"`
  9106. }
  9107. // String returns the string representation.
  9108. //
  9109. // API parameter values that are decorated as "sensitive" in the API will not
  9110. // be included in the string output. The member name will be present, but the
  9111. // value will be replaced with "sensitive".
  9112. func (s EventDataStoreNotFoundException) String() string {
  9113. return awsutil.Prettify(s)
  9114. }
  9115. // GoString returns the string representation.
  9116. //
  9117. // API parameter values that are decorated as "sensitive" in the API will not
  9118. // be included in the string output. The member name will be present, but the
  9119. // value will be replaced with "sensitive".
  9120. func (s EventDataStoreNotFoundException) GoString() string {
  9121. return s.String()
  9122. }
  9123. func newErrorEventDataStoreNotFoundException(v protocol.ResponseMetadata) error {
  9124. return &EventDataStoreNotFoundException{
  9125. RespMetadata: v,
  9126. }
  9127. }
  9128. // Code returns the exception type name.
  9129. func (s *EventDataStoreNotFoundException) Code() string {
  9130. return "EventDataStoreNotFoundException"
  9131. }
  9132. // Message returns the exception's message.
  9133. func (s *EventDataStoreNotFoundException) Message() string {
  9134. if s.Message_ != nil {
  9135. return *s.Message_
  9136. }
  9137. return ""
  9138. }
  9139. // OrigErr always returns nil, satisfies awserr.Error interface.
  9140. func (s *EventDataStoreNotFoundException) OrigErr() error {
  9141. return nil
  9142. }
  9143. func (s *EventDataStoreNotFoundException) Error() string {
  9144. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  9145. }
  9146. // Status code returns the HTTP status code for the request's response error.
  9147. func (s *EventDataStoreNotFoundException) StatusCode() int {
  9148. return s.RespMetadata.StatusCode
  9149. }
  9150. // RequestID returns the service's response RequestID for request.
  9151. func (s *EventDataStoreNotFoundException) RequestID() string {
  9152. return s.RespMetadata.RequestID
  9153. }
  9154. // The event data store cannot be deleted because termination protection is
  9155. // enabled for it.
  9156. type EventDataStoreTerminationProtectedException struct {
  9157. _ struct{} `type:"structure"`
  9158. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  9159. Message_ *string `locationName:"message" type:"string"`
  9160. }
  9161. // String returns the string representation.
  9162. //
  9163. // API parameter values that are decorated as "sensitive" in the API will not
  9164. // be included in the string output. The member name will be present, but the
  9165. // value will be replaced with "sensitive".
  9166. func (s EventDataStoreTerminationProtectedException) String() string {
  9167. return awsutil.Prettify(s)
  9168. }
  9169. // GoString returns the string representation.
  9170. //
  9171. // API parameter values that are decorated as "sensitive" in the API will not
  9172. // be included in the string output. The member name will be present, but the
  9173. // value will be replaced with "sensitive".
  9174. func (s EventDataStoreTerminationProtectedException) GoString() string {
  9175. return s.String()
  9176. }
  9177. func newErrorEventDataStoreTerminationProtectedException(v protocol.ResponseMetadata) error {
  9178. return &EventDataStoreTerminationProtectedException{
  9179. RespMetadata: v,
  9180. }
  9181. }
  9182. // Code returns the exception type name.
  9183. func (s *EventDataStoreTerminationProtectedException) Code() string {
  9184. return "EventDataStoreTerminationProtectedException"
  9185. }
  9186. // Message returns the exception's message.
  9187. func (s *EventDataStoreTerminationProtectedException) Message() string {
  9188. if s.Message_ != nil {
  9189. return *s.Message_
  9190. }
  9191. return ""
  9192. }
  9193. // OrigErr always returns nil, satisfies awserr.Error interface.
  9194. func (s *EventDataStoreTerminationProtectedException) OrigErr() error {
  9195. return nil
  9196. }
  9197. func (s *EventDataStoreTerminationProtectedException) Error() string {
  9198. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  9199. }
  9200. // Status code returns the HTTP status code for the request's response error.
  9201. func (s *EventDataStoreTerminationProtectedException) StatusCode() int {
  9202. return s.RespMetadata.StatusCode
  9203. }
  9204. // RequestID returns the service's response RequestID for request.
  9205. func (s *EventDataStoreTerminationProtectedException) RequestID() string {
  9206. return s.RespMetadata.RequestID
  9207. }
  9208. // Use event selectors to further specify the management and data event settings
  9209. // for your trail. By default, trails created without specific event selectors
  9210. // will be configured to log all read and write management events, and no data
  9211. // events. When an event occurs in your account, CloudTrail evaluates the event
  9212. // selector for all trails. For each trail, if the event matches any event selector,
  9213. // the trail processes and logs the event. If the event doesn't match any event
  9214. // selector, the trail doesn't log the event.
  9215. //
  9216. // You can configure up to five event selectors for a trail.
  9217. //
  9218. // You cannot apply both event selectors and advanced event selectors to a trail.
  9219. type EventSelector struct {
  9220. _ struct{} `type:"structure"`
  9221. // CloudTrail supports data event logging for Amazon S3 objects, Lambda functions,
  9222. // and Amazon DynamoDB tables with basic event selectors. You can specify up
  9223. // to 250 resources for an individual event selector, but the total number of
  9224. // data resources cannot exceed 250 across all event selectors in a trail. This
  9225. // limit does not apply if you configure resource logging for all data events.
  9226. //
  9227. // For more information, see Data Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
  9228. // and Limits in CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
  9229. // in the CloudTrail User Guide.
  9230. DataResources []*DataResource `type:"list"`
  9231. // An optional list of service event sources from which you do not want management
  9232. // events to be logged on your trail. In this release, the list can be empty
  9233. // (disables the filter), or it can filter out Key Management Service or Amazon
  9234. // RDS Data API events by containing kms.amazonaws.com or rdsdata.amazonaws.com.
  9235. // By default, ExcludeManagementEventSources is empty, and KMS and Amazon RDS
  9236. // Data API events are logged to your trail. You can exclude management event
  9237. // sources only in regions that support the event source.
  9238. ExcludeManagementEventSources []*string `type:"list"`
  9239. // Specify if you want your event selector to include management events for
  9240. // your trail.
  9241. //
  9242. // For more information, see Management Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html)
  9243. // in the CloudTrail User Guide.
  9244. //
  9245. // By default, the value is true.
  9246. //
  9247. // The first copy of management events is free. You are charged for additional
  9248. // copies of management events that you are logging on any subsequent trail
  9249. // in the same region. For more information about CloudTrail pricing, see CloudTrail
  9250. // Pricing (http://aws.amazon.com/cloudtrail/pricing/).
  9251. IncludeManagementEvents *bool `type:"boolean"`
  9252. // Specify if you want your trail to log read-only events, write-only events,
  9253. // or all. For example, the EC2 GetConsoleOutput is a read-only API operation
  9254. // and RunInstances is a write-only API operation.
  9255. //
  9256. // By default, the value is All.
  9257. ReadWriteType *string `type:"string" enum:"ReadWriteType"`
  9258. }
  9259. // String returns the string representation.
  9260. //
  9261. // API parameter values that are decorated as "sensitive" in the API will not
  9262. // be included in the string output. The member name will be present, but the
  9263. // value will be replaced with "sensitive".
  9264. func (s EventSelector) String() string {
  9265. return awsutil.Prettify(s)
  9266. }
  9267. // GoString returns the string representation.
  9268. //
  9269. // API parameter values that are decorated as "sensitive" in the API will not
  9270. // be included in the string output. The member name will be present, but the
  9271. // value will be replaced with "sensitive".
  9272. func (s EventSelector) GoString() string {
  9273. return s.String()
  9274. }
  9275. // SetDataResources sets the DataResources field's value.
  9276. func (s *EventSelector) SetDataResources(v []*DataResource) *EventSelector {
  9277. s.DataResources = v
  9278. return s
  9279. }
  9280. // SetExcludeManagementEventSources sets the ExcludeManagementEventSources field's value.
  9281. func (s *EventSelector) SetExcludeManagementEventSources(v []*string) *EventSelector {
  9282. s.ExcludeManagementEventSources = v
  9283. return s
  9284. }
  9285. // SetIncludeManagementEvents sets the IncludeManagementEvents field's value.
  9286. func (s *EventSelector) SetIncludeManagementEvents(v bool) *EventSelector {
  9287. s.IncludeManagementEvents = &v
  9288. return s
  9289. }
  9290. // SetReadWriteType sets the ReadWriteType field's value.
  9291. func (s *EventSelector) SetReadWriteType(v string) *EventSelector {
  9292. s.ReadWriteType = &v
  9293. return s
  9294. }
  9295. type GetChannelInput struct {
  9296. _ struct{} `type:"structure"`
  9297. // The ARN or UUID of a channel.
  9298. //
  9299. // Channel is a required field
  9300. Channel *string `min:"3" type:"string" required:"true"`
  9301. }
  9302. // String returns the string representation.
  9303. //
  9304. // API parameter values that are decorated as "sensitive" in the API will not
  9305. // be included in the string output. The member name will be present, but the
  9306. // value will be replaced with "sensitive".
  9307. func (s GetChannelInput) String() string {
  9308. return awsutil.Prettify(s)
  9309. }
  9310. // GoString returns the string representation.
  9311. //
  9312. // API parameter values that are decorated as "sensitive" in the API will not
  9313. // be included in the string output. The member name will be present, but the
  9314. // value will be replaced with "sensitive".
  9315. func (s GetChannelInput) GoString() string {
  9316. return s.String()
  9317. }
  9318. // Validate inspects the fields of the type to determine if they are valid.
  9319. func (s *GetChannelInput) Validate() error {
  9320. invalidParams := request.ErrInvalidParams{Context: "GetChannelInput"}
  9321. if s.Channel == nil {
  9322. invalidParams.Add(request.NewErrParamRequired("Channel"))
  9323. }
  9324. if s.Channel != nil && len(*s.Channel) < 3 {
  9325. invalidParams.Add(request.NewErrParamMinLen("Channel", 3))
  9326. }
  9327. if invalidParams.Len() > 0 {
  9328. return invalidParams
  9329. }
  9330. return nil
  9331. }
  9332. // SetChannel sets the Channel field's value.
  9333. func (s *GetChannelInput) SetChannel(v string) *GetChannelInput {
  9334. s.Channel = &v
  9335. return s
  9336. }
  9337. type GetChannelOutput struct {
  9338. _ struct{} `type:"structure"`
  9339. // The ARN of an channel returned by a GetChannel request.
  9340. ChannelArn *string `min:"3" type:"string"`
  9341. // The destinations for the channel. For channels created for integrations,
  9342. // the destinations are the event data stores that log events arriving through
  9343. // the channel. For service-linked channels, the destination is the Amazon Web
  9344. // Services service that created the service-linked channel to receive events.
  9345. Destinations []*Destination `min:"1" type:"list"`
  9346. // A table showing information about the most recent successful and failed attempts
  9347. // to ingest events.
  9348. IngestionStatus *IngestionStatus `type:"structure"`
  9349. // The name of the CloudTrail channel. For service-linked channels, the name
  9350. // is aws-service-channel/service-name/custom-suffix where service-name represents
  9351. // the name of the Amazon Web Services service that created the channel and
  9352. // custom-suffix represents the suffix generated by the Amazon Web Services
  9353. // service.
  9354. Name *string `min:"3" type:"string"`
  9355. // The source for the CloudTrail channel.
  9356. Source *string `min:"1" type:"string"`
  9357. // Provides information about the advanced event selectors configured for the
  9358. // channel, and whether the channel applies to all regions or a single region.
  9359. SourceConfig *SourceConfig `type:"structure"`
  9360. }
  9361. // String returns the string representation.
  9362. //
  9363. // API parameter values that are decorated as "sensitive" in the API will not
  9364. // be included in the string output. The member name will be present, but the
  9365. // value will be replaced with "sensitive".
  9366. func (s GetChannelOutput) String() string {
  9367. return awsutil.Prettify(s)
  9368. }
  9369. // GoString returns the string representation.
  9370. //
  9371. // API parameter values that are decorated as "sensitive" in the API will not
  9372. // be included in the string output. The member name will be present, but the
  9373. // value will be replaced with "sensitive".
  9374. func (s GetChannelOutput) GoString() string {
  9375. return s.String()
  9376. }
  9377. // SetChannelArn sets the ChannelArn field's value.
  9378. func (s *GetChannelOutput) SetChannelArn(v string) *GetChannelOutput {
  9379. s.ChannelArn = &v
  9380. return s
  9381. }
  9382. // SetDestinations sets the Destinations field's value.
  9383. func (s *GetChannelOutput) SetDestinations(v []*Destination) *GetChannelOutput {
  9384. s.Destinations = v
  9385. return s
  9386. }
  9387. // SetIngestionStatus sets the IngestionStatus field's value.
  9388. func (s *GetChannelOutput) SetIngestionStatus(v *IngestionStatus) *GetChannelOutput {
  9389. s.IngestionStatus = v
  9390. return s
  9391. }
  9392. // SetName sets the Name field's value.
  9393. func (s *GetChannelOutput) SetName(v string) *GetChannelOutput {
  9394. s.Name = &v
  9395. return s
  9396. }
  9397. // SetSource sets the Source field's value.
  9398. func (s *GetChannelOutput) SetSource(v string) *GetChannelOutput {
  9399. s.Source = &v
  9400. return s
  9401. }
  9402. // SetSourceConfig sets the SourceConfig field's value.
  9403. func (s *GetChannelOutput) SetSourceConfig(v *SourceConfig) *GetChannelOutput {
  9404. s.SourceConfig = v
  9405. return s
  9406. }
  9407. type GetEventDataStoreInput struct {
  9408. _ struct{} `type:"structure"`
  9409. // The ARN (or ID suffix of the ARN) of the event data store about which you
  9410. // want information.
  9411. //
  9412. // EventDataStore is a required field
  9413. EventDataStore *string `min:"3" type:"string" required:"true"`
  9414. }
  9415. // String returns the string representation.
  9416. //
  9417. // API parameter values that are decorated as "sensitive" in the API will not
  9418. // be included in the string output. The member name will be present, but the
  9419. // value will be replaced with "sensitive".
  9420. func (s GetEventDataStoreInput) String() string {
  9421. return awsutil.Prettify(s)
  9422. }
  9423. // GoString returns the string representation.
  9424. //
  9425. // API parameter values that are decorated as "sensitive" in the API will not
  9426. // be included in the string output. The member name will be present, but the
  9427. // value will be replaced with "sensitive".
  9428. func (s GetEventDataStoreInput) GoString() string {
  9429. return s.String()
  9430. }
  9431. // Validate inspects the fields of the type to determine if they are valid.
  9432. func (s *GetEventDataStoreInput) Validate() error {
  9433. invalidParams := request.ErrInvalidParams{Context: "GetEventDataStoreInput"}
  9434. if s.EventDataStore == nil {
  9435. invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
  9436. }
  9437. if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
  9438. invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
  9439. }
  9440. if invalidParams.Len() > 0 {
  9441. return invalidParams
  9442. }
  9443. return nil
  9444. }
  9445. // SetEventDataStore sets the EventDataStore field's value.
  9446. func (s *GetEventDataStoreInput) SetEventDataStore(v string) *GetEventDataStoreInput {
  9447. s.EventDataStore = &v
  9448. return s
  9449. }
  9450. type GetEventDataStoreOutput struct {
  9451. _ struct{} `type:"structure"`
  9452. // The advanced event selectors used to select events for the data store.
  9453. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  9454. // The timestamp of the event data store's creation.
  9455. CreatedTimestamp *time.Time `type:"timestamp"`
  9456. // The event data store Amazon Resource Number (ARN).
  9457. EventDataStoreArn *string `min:"3" type:"string"`
  9458. // Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
  9459. // The value is a fully specified ARN to a KMS key in the following format.
  9460. //
  9461. // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  9462. KmsKeyId *string `min:"1" type:"string"`
  9463. // Indicates whether the event data store includes events from all regions,
  9464. // or only from the region in which it was created.
  9465. MultiRegionEnabled *bool `type:"boolean"`
  9466. // The name of the event data store.
  9467. Name *string `min:"3" type:"string"`
  9468. // Indicates whether an event data store is collecting logged events for an
  9469. // organization in Organizations.
  9470. OrganizationEnabled *bool `type:"boolean"`
  9471. // The retention period of the event data store, in days.
  9472. RetentionPeriod *int64 `min:"7" type:"integer"`
  9473. // The status of an event data store. Values can be ENABLED and PENDING_DELETION.
  9474. Status *string `type:"string" enum:"EventDataStoreStatus"`
  9475. // Indicates that termination protection is enabled.
  9476. TerminationProtectionEnabled *bool `type:"boolean"`
  9477. // Shows the time that an event data store was updated, if applicable. UpdatedTimestamp
  9478. // is always either the same or newer than the time shown in CreatedTimestamp.
  9479. UpdatedTimestamp *time.Time `type:"timestamp"`
  9480. }
  9481. // String returns the string representation.
  9482. //
  9483. // API parameter values that are decorated as "sensitive" in the API will not
  9484. // be included in the string output. The member name will be present, but the
  9485. // value will be replaced with "sensitive".
  9486. func (s GetEventDataStoreOutput) String() string {
  9487. return awsutil.Prettify(s)
  9488. }
  9489. // GoString returns the string representation.
  9490. //
  9491. // API parameter values that are decorated as "sensitive" in the API will not
  9492. // be included in the string output. The member name will be present, but the
  9493. // value will be replaced with "sensitive".
  9494. func (s GetEventDataStoreOutput) GoString() string {
  9495. return s.String()
  9496. }
  9497. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  9498. func (s *GetEventDataStoreOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *GetEventDataStoreOutput {
  9499. s.AdvancedEventSelectors = v
  9500. return s
  9501. }
  9502. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  9503. func (s *GetEventDataStoreOutput) SetCreatedTimestamp(v time.Time) *GetEventDataStoreOutput {
  9504. s.CreatedTimestamp = &v
  9505. return s
  9506. }
  9507. // SetEventDataStoreArn sets the EventDataStoreArn field's value.
  9508. func (s *GetEventDataStoreOutput) SetEventDataStoreArn(v string) *GetEventDataStoreOutput {
  9509. s.EventDataStoreArn = &v
  9510. return s
  9511. }
  9512. // SetKmsKeyId sets the KmsKeyId field's value.
  9513. func (s *GetEventDataStoreOutput) SetKmsKeyId(v string) *GetEventDataStoreOutput {
  9514. s.KmsKeyId = &v
  9515. return s
  9516. }
  9517. // SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
  9518. func (s *GetEventDataStoreOutput) SetMultiRegionEnabled(v bool) *GetEventDataStoreOutput {
  9519. s.MultiRegionEnabled = &v
  9520. return s
  9521. }
  9522. // SetName sets the Name field's value.
  9523. func (s *GetEventDataStoreOutput) SetName(v string) *GetEventDataStoreOutput {
  9524. s.Name = &v
  9525. return s
  9526. }
  9527. // SetOrganizationEnabled sets the OrganizationEnabled field's value.
  9528. func (s *GetEventDataStoreOutput) SetOrganizationEnabled(v bool) *GetEventDataStoreOutput {
  9529. s.OrganizationEnabled = &v
  9530. return s
  9531. }
  9532. // SetRetentionPeriod sets the RetentionPeriod field's value.
  9533. func (s *GetEventDataStoreOutput) SetRetentionPeriod(v int64) *GetEventDataStoreOutput {
  9534. s.RetentionPeriod = &v
  9535. return s
  9536. }
  9537. // SetStatus sets the Status field's value.
  9538. func (s *GetEventDataStoreOutput) SetStatus(v string) *GetEventDataStoreOutput {
  9539. s.Status = &v
  9540. return s
  9541. }
  9542. // SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
  9543. func (s *GetEventDataStoreOutput) SetTerminationProtectionEnabled(v bool) *GetEventDataStoreOutput {
  9544. s.TerminationProtectionEnabled = &v
  9545. return s
  9546. }
  9547. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  9548. func (s *GetEventDataStoreOutput) SetUpdatedTimestamp(v time.Time) *GetEventDataStoreOutput {
  9549. s.UpdatedTimestamp = &v
  9550. return s
  9551. }
  9552. type GetEventSelectorsInput struct {
  9553. _ struct{} `type:"structure"`
  9554. // Specifies the name of the trail or trail ARN. If you specify a trail name,
  9555. // the string must meet the following requirements:
  9556. //
  9557. // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  9558. // (_), or dashes (-)
  9559. //
  9560. // * Start with a letter or number, and end with a letter or number
  9561. //
  9562. // * Be between 3 and 128 characters
  9563. //
  9564. // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  9565. // and my--namespace are not valid.
  9566. //
  9567. // * Not be in IP address format (for example, 192.168.5.4)
  9568. //
  9569. // If you specify a trail ARN, it must be in the format:
  9570. //
  9571. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  9572. //
  9573. // TrailName is a required field
  9574. TrailName *string `type:"string" required:"true"`
  9575. }
  9576. // String returns the string representation.
  9577. //
  9578. // API parameter values that are decorated as "sensitive" in the API will not
  9579. // be included in the string output. The member name will be present, but the
  9580. // value will be replaced with "sensitive".
  9581. func (s GetEventSelectorsInput) String() string {
  9582. return awsutil.Prettify(s)
  9583. }
  9584. // GoString returns the string representation.
  9585. //
  9586. // API parameter values that are decorated as "sensitive" in the API will not
  9587. // be included in the string output. The member name will be present, but the
  9588. // value will be replaced with "sensitive".
  9589. func (s GetEventSelectorsInput) GoString() string {
  9590. return s.String()
  9591. }
  9592. // Validate inspects the fields of the type to determine if they are valid.
  9593. func (s *GetEventSelectorsInput) Validate() error {
  9594. invalidParams := request.ErrInvalidParams{Context: "GetEventSelectorsInput"}
  9595. if s.TrailName == nil {
  9596. invalidParams.Add(request.NewErrParamRequired("TrailName"))
  9597. }
  9598. if invalidParams.Len() > 0 {
  9599. return invalidParams
  9600. }
  9601. return nil
  9602. }
  9603. // SetTrailName sets the TrailName field's value.
  9604. func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput {
  9605. s.TrailName = &v
  9606. return s
  9607. }
  9608. type GetEventSelectorsOutput struct {
  9609. _ struct{} `type:"structure"`
  9610. // The advanced event selectors that are configured for the trail.
  9611. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  9612. // The event selectors that are configured for the trail.
  9613. EventSelectors []*EventSelector `type:"list"`
  9614. // The specified trail ARN that has the event selectors.
  9615. TrailARN *string `type:"string"`
  9616. }
  9617. // String returns the string representation.
  9618. //
  9619. // API parameter values that are decorated as "sensitive" in the API will not
  9620. // be included in the string output. The member name will be present, but the
  9621. // value will be replaced with "sensitive".
  9622. func (s GetEventSelectorsOutput) String() string {
  9623. return awsutil.Prettify(s)
  9624. }
  9625. // GoString returns the string representation.
  9626. //
  9627. // API parameter values that are decorated as "sensitive" in the API will not
  9628. // be included in the string output. The member name will be present, but the
  9629. // value will be replaced with "sensitive".
  9630. func (s GetEventSelectorsOutput) GoString() string {
  9631. return s.String()
  9632. }
  9633. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  9634. func (s *GetEventSelectorsOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *GetEventSelectorsOutput {
  9635. s.AdvancedEventSelectors = v
  9636. return s
  9637. }
  9638. // SetEventSelectors sets the EventSelectors field's value.
  9639. func (s *GetEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *GetEventSelectorsOutput {
  9640. s.EventSelectors = v
  9641. return s
  9642. }
  9643. // SetTrailARN sets the TrailARN field's value.
  9644. func (s *GetEventSelectorsOutput) SetTrailARN(v string) *GetEventSelectorsOutput {
  9645. s.TrailARN = &v
  9646. return s
  9647. }
  9648. type GetImportInput struct {
  9649. _ struct{} `type:"structure"`
  9650. // The ID for the import.
  9651. //
  9652. // ImportId is a required field
  9653. ImportId *string `min:"36" type:"string" required:"true"`
  9654. }
  9655. // String returns the string representation.
  9656. //
  9657. // API parameter values that are decorated as "sensitive" in the API will not
  9658. // be included in the string output. The member name will be present, but the
  9659. // value will be replaced with "sensitive".
  9660. func (s GetImportInput) String() string {
  9661. return awsutil.Prettify(s)
  9662. }
  9663. // GoString returns the string representation.
  9664. //
  9665. // API parameter values that are decorated as "sensitive" in the API will not
  9666. // be included in the string output. The member name will be present, but the
  9667. // value will be replaced with "sensitive".
  9668. func (s GetImportInput) GoString() string {
  9669. return s.String()
  9670. }
  9671. // Validate inspects the fields of the type to determine if they are valid.
  9672. func (s *GetImportInput) Validate() error {
  9673. invalidParams := request.ErrInvalidParams{Context: "GetImportInput"}
  9674. if s.ImportId == nil {
  9675. invalidParams.Add(request.NewErrParamRequired("ImportId"))
  9676. }
  9677. if s.ImportId != nil && len(*s.ImportId) < 36 {
  9678. invalidParams.Add(request.NewErrParamMinLen("ImportId", 36))
  9679. }
  9680. if invalidParams.Len() > 0 {
  9681. return invalidParams
  9682. }
  9683. return nil
  9684. }
  9685. // SetImportId sets the ImportId field's value.
  9686. func (s *GetImportInput) SetImportId(v string) *GetImportInput {
  9687. s.ImportId = &v
  9688. return s
  9689. }
  9690. type GetImportOutput struct {
  9691. _ struct{} `type:"structure"`
  9692. // The timestamp of the import's creation.
  9693. CreatedTimestamp *time.Time `type:"timestamp"`
  9694. // The ARN of the destination event data store.
  9695. Destinations []*string `min:"1" type:"list"`
  9696. // Used with StartEventTime to bound a StartImport request, and limit imported
  9697. // trail events to only those events logged within a specified time period.
  9698. EndEventTime *time.Time `type:"timestamp"`
  9699. // The ID of the import.
  9700. ImportId *string `min:"36" type:"string"`
  9701. // The source S3 bucket.
  9702. ImportSource *ImportSource `type:"structure"`
  9703. // Provides statistics for the import. CloudTrail does not update import statistics
  9704. // in real-time. Returned values for parameters such as EventsCompleted may
  9705. // be lower than the actual value, because CloudTrail updates statistics incrementally
  9706. // over the course of the import.
  9707. ImportStatistics *ImportStatistics `type:"structure"`
  9708. // The status of the import.
  9709. ImportStatus *string `type:"string" enum:"ImportStatus"`
  9710. // Used with EndEventTime to bound a StartImport request, and limit imported
  9711. // trail events to only those events logged within a specified time period.
  9712. StartEventTime *time.Time `type:"timestamp"`
  9713. // The timestamp of when the import was updated.
  9714. UpdatedTimestamp *time.Time `type:"timestamp"`
  9715. }
  9716. // String returns the string representation.
  9717. //
  9718. // API parameter values that are decorated as "sensitive" in the API will not
  9719. // be included in the string output. The member name will be present, but the
  9720. // value will be replaced with "sensitive".
  9721. func (s GetImportOutput) String() string {
  9722. return awsutil.Prettify(s)
  9723. }
  9724. // GoString returns the string representation.
  9725. //
  9726. // API parameter values that are decorated as "sensitive" in the API will not
  9727. // be included in the string output. The member name will be present, but the
  9728. // value will be replaced with "sensitive".
  9729. func (s GetImportOutput) GoString() string {
  9730. return s.String()
  9731. }
  9732. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  9733. func (s *GetImportOutput) SetCreatedTimestamp(v time.Time) *GetImportOutput {
  9734. s.CreatedTimestamp = &v
  9735. return s
  9736. }
  9737. // SetDestinations sets the Destinations field's value.
  9738. func (s *GetImportOutput) SetDestinations(v []*string) *GetImportOutput {
  9739. s.Destinations = v
  9740. return s
  9741. }
  9742. // SetEndEventTime sets the EndEventTime field's value.
  9743. func (s *GetImportOutput) SetEndEventTime(v time.Time) *GetImportOutput {
  9744. s.EndEventTime = &v
  9745. return s
  9746. }
  9747. // SetImportId sets the ImportId field's value.
  9748. func (s *GetImportOutput) SetImportId(v string) *GetImportOutput {
  9749. s.ImportId = &v
  9750. return s
  9751. }
  9752. // SetImportSource sets the ImportSource field's value.
  9753. func (s *GetImportOutput) SetImportSource(v *ImportSource) *GetImportOutput {
  9754. s.ImportSource = v
  9755. return s
  9756. }
  9757. // SetImportStatistics sets the ImportStatistics field's value.
  9758. func (s *GetImportOutput) SetImportStatistics(v *ImportStatistics) *GetImportOutput {
  9759. s.ImportStatistics = v
  9760. return s
  9761. }
  9762. // SetImportStatus sets the ImportStatus field's value.
  9763. func (s *GetImportOutput) SetImportStatus(v string) *GetImportOutput {
  9764. s.ImportStatus = &v
  9765. return s
  9766. }
  9767. // SetStartEventTime sets the StartEventTime field's value.
  9768. func (s *GetImportOutput) SetStartEventTime(v time.Time) *GetImportOutput {
  9769. s.StartEventTime = &v
  9770. return s
  9771. }
  9772. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  9773. func (s *GetImportOutput) SetUpdatedTimestamp(v time.Time) *GetImportOutput {
  9774. s.UpdatedTimestamp = &v
  9775. return s
  9776. }
  9777. type GetInsightSelectorsInput struct {
  9778. _ struct{} `type:"structure"`
  9779. // Specifies the name of the trail or trail ARN. If you specify a trail name,
  9780. // the string must meet the following requirements:
  9781. //
  9782. // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  9783. // (_), or dashes (-)
  9784. //
  9785. // * Start with a letter or number, and end with a letter or number
  9786. //
  9787. // * Be between 3 and 128 characters
  9788. //
  9789. // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  9790. // and my--namespace are not valid.
  9791. //
  9792. // * Not be in IP address format (for example, 192.168.5.4)
  9793. //
  9794. // If you specify a trail ARN, it must be in the format:
  9795. //
  9796. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  9797. //
  9798. // TrailName is a required field
  9799. TrailName *string `type:"string" required:"true"`
  9800. }
  9801. // String returns the string representation.
  9802. //
  9803. // API parameter values that are decorated as "sensitive" in the API will not
  9804. // be included in the string output. The member name will be present, but the
  9805. // value will be replaced with "sensitive".
  9806. func (s GetInsightSelectorsInput) String() string {
  9807. return awsutil.Prettify(s)
  9808. }
  9809. // GoString returns the string representation.
  9810. //
  9811. // API parameter values that are decorated as "sensitive" in the API will not
  9812. // be included in the string output. The member name will be present, but the
  9813. // value will be replaced with "sensitive".
  9814. func (s GetInsightSelectorsInput) GoString() string {
  9815. return s.String()
  9816. }
  9817. // Validate inspects the fields of the type to determine if they are valid.
  9818. func (s *GetInsightSelectorsInput) Validate() error {
  9819. invalidParams := request.ErrInvalidParams{Context: "GetInsightSelectorsInput"}
  9820. if s.TrailName == nil {
  9821. invalidParams.Add(request.NewErrParamRequired("TrailName"))
  9822. }
  9823. if invalidParams.Len() > 0 {
  9824. return invalidParams
  9825. }
  9826. return nil
  9827. }
  9828. // SetTrailName sets the TrailName field's value.
  9829. func (s *GetInsightSelectorsInput) SetTrailName(v string) *GetInsightSelectorsInput {
  9830. s.TrailName = &v
  9831. return s
  9832. }
  9833. type GetInsightSelectorsOutput struct {
  9834. _ struct{} `type:"structure"`
  9835. // A JSON string that contains the insight types you want to log on a trail.
  9836. // In this release, ApiErrorRateInsight and ApiCallRateInsight are supported
  9837. // as insight types.
  9838. InsightSelectors []*InsightSelector `type:"list"`
  9839. // The Amazon Resource Name (ARN) of a trail for which you want to get Insights
  9840. // selectors.
  9841. TrailARN *string `type:"string"`
  9842. }
  9843. // String returns the string representation.
  9844. //
  9845. // API parameter values that are decorated as "sensitive" in the API will not
  9846. // be included in the string output. The member name will be present, but the
  9847. // value will be replaced with "sensitive".
  9848. func (s GetInsightSelectorsOutput) String() string {
  9849. return awsutil.Prettify(s)
  9850. }
  9851. // GoString returns the string representation.
  9852. //
  9853. // API parameter values that are decorated as "sensitive" in the API will not
  9854. // be included in the string output. The member name will be present, but the
  9855. // value will be replaced with "sensitive".
  9856. func (s GetInsightSelectorsOutput) GoString() string {
  9857. return s.String()
  9858. }
  9859. // SetInsightSelectors sets the InsightSelectors field's value.
  9860. func (s *GetInsightSelectorsOutput) SetInsightSelectors(v []*InsightSelector) *GetInsightSelectorsOutput {
  9861. s.InsightSelectors = v
  9862. return s
  9863. }
  9864. // SetTrailARN sets the TrailARN field's value.
  9865. func (s *GetInsightSelectorsOutput) SetTrailARN(v string) *GetInsightSelectorsOutput {
  9866. s.TrailARN = &v
  9867. return s
  9868. }
  9869. type GetQueryResultsInput struct {
  9870. _ struct{} `type:"structure"`
  9871. // The ARN (or ID suffix of the ARN) of the event data store against which the
  9872. // query was run.
  9873. //
  9874. // Deprecated: EventDataStore is no longer required by GetQueryResultsRequest
  9875. EventDataStore *string `min:"3" deprecated:"true" type:"string"`
  9876. // The maximum number of query results to display on a single page.
  9877. MaxQueryResults *int64 `min:"1" type:"integer"`
  9878. // A token you can use to get the next page of query results.
  9879. NextToken *string `min:"4" type:"string"`
  9880. // The ID of the query for which you want to get results.
  9881. //
  9882. // QueryId is a required field
  9883. QueryId *string `min:"36" type:"string" required:"true"`
  9884. }
  9885. // String returns the string representation.
  9886. //
  9887. // API parameter values that are decorated as "sensitive" in the API will not
  9888. // be included in the string output. The member name will be present, but the
  9889. // value will be replaced with "sensitive".
  9890. func (s GetQueryResultsInput) String() string {
  9891. return awsutil.Prettify(s)
  9892. }
  9893. // GoString returns the string representation.
  9894. //
  9895. // API parameter values that are decorated as "sensitive" in the API will not
  9896. // be included in the string output. The member name will be present, but the
  9897. // value will be replaced with "sensitive".
  9898. func (s GetQueryResultsInput) GoString() string {
  9899. return s.String()
  9900. }
  9901. // Validate inspects the fields of the type to determine if they are valid.
  9902. func (s *GetQueryResultsInput) Validate() error {
  9903. invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"}
  9904. if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
  9905. invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
  9906. }
  9907. if s.MaxQueryResults != nil && *s.MaxQueryResults < 1 {
  9908. invalidParams.Add(request.NewErrParamMinValue("MaxQueryResults", 1))
  9909. }
  9910. if s.NextToken != nil && len(*s.NextToken) < 4 {
  9911. invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
  9912. }
  9913. if s.QueryId == nil {
  9914. invalidParams.Add(request.NewErrParamRequired("QueryId"))
  9915. }
  9916. if s.QueryId != nil && len(*s.QueryId) < 36 {
  9917. invalidParams.Add(request.NewErrParamMinLen("QueryId", 36))
  9918. }
  9919. if invalidParams.Len() > 0 {
  9920. return invalidParams
  9921. }
  9922. return nil
  9923. }
  9924. // SetEventDataStore sets the EventDataStore field's value.
  9925. func (s *GetQueryResultsInput) SetEventDataStore(v string) *GetQueryResultsInput {
  9926. s.EventDataStore = &v
  9927. return s
  9928. }
  9929. // SetMaxQueryResults sets the MaxQueryResults field's value.
  9930. func (s *GetQueryResultsInput) SetMaxQueryResults(v int64) *GetQueryResultsInput {
  9931. s.MaxQueryResults = &v
  9932. return s
  9933. }
  9934. // SetNextToken sets the NextToken field's value.
  9935. func (s *GetQueryResultsInput) SetNextToken(v string) *GetQueryResultsInput {
  9936. s.NextToken = &v
  9937. return s
  9938. }
  9939. // SetQueryId sets the QueryId field's value.
  9940. func (s *GetQueryResultsInput) SetQueryId(v string) *GetQueryResultsInput {
  9941. s.QueryId = &v
  9942. return s
  9943. }
  9944. type GetQueryResultsOutput struct {
  9945. _ struct{} `type:"structure"`
  9946. // The error message returned if a query failed.
  9947. ErrorMessage *string `min:"4" type:"string"`
  9948. // A token you can use to get the next page of query results.
  9949. NextToken *string `min:"4" type:"string"`
  9950. // Contains the individual event results of the query.
  9951. QueryResultRows [][]map[string]*string `type:"list"`
  9952. // Shows the count of query results.
  9953. QueryStatistics *QueryStatistics `type:"structure"`
  9954. // The status of the query. Values include QUEUED, RUNNING, FINISHED, FAILED,
  9955. // TIMED_OUT, or CANCELLED.
  9956. QueryStatus *string `type:"string" enum:"QueryStatus"`
  9957. }
  9958. // String returns the string representation.
  9959. //
  9960. // API parameter values that are decorated as "sensitive" in the API will not
  9961. // be included in the string output. The member name will be present, but the
  9962. // value will be replaced with "sensitive".
  9963. func (s GetQueryResultsOutput) String() string {
  9964. return awsutil.Prettify(s)
  9965. }
  9966. // GoString returns the string representation.
  9967. //
  9968. // API parameter values that are decorated as "sensitive" in the API will not
  9969. // be included in the string output. The member name will be present, but the
  9970. // value will be replaced with "sensitive".
  9971. func (s GetQueryResultsOutput) GoString() string {
  9972. return s.String()
  9973. }
  9974. // SetErrorMessage sets the ErrorMessage field's value.
  9975. func (s *GetQueryResultsOutput) SetErrorMessage(v string) *GetQueryResultsOutput {
  9976. s.ErrorMessage = &v
  9977. return s
  9978. }
  9979. // SetNextToken sets the NextToken field's value.
  9980. func (s *GetQueryResultsOutput) SetNextToken(v string) *GetQueryResultsOutput {
  9981. s.NextToken = &v
  9982. return s
  9983. }
  9984. // SetQueryResultRows sets the QueryResultRows field's value.
  9985. func (s *GetQueryResultsOutput) SetQueryResultRows(v [][]map[string]*string) *GetQueryResultsOutput {
  9986. s.QueryResultRows = v
  9987. return s
  9988. }
  9989. // SetQueryStatistics sets the QueryStatistics field's value.
  9990. func (s *GetQueryResultsOutput) SetQueryStatistics(v *QueryStatistics) *GetQueryResultsOutput {
  9991. s.QueryStatistics = v
  9992. return s
  9993. }
  9994. // SetQueryStatus sets the QueryStatus field's value.
  9995. func (s *GetQueryResultsOutput) SetQueryStatus(v string) *GetQueryResultsOutput {
  9996. s.QueryStatus = &v
  9997. return s
  9998. }
  9999. type GetResourcePolicyInput struct {
  10000. _ struct{} `type:"structure"`
  10001. // The Amazon Resource Name (ARN) of the CloudTrail channel attached to the
  10002. // resource-based policy. The following is the format of a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
  10003. //
  10004. // ResourceArn is a required field
  10005. ResourceArn *string `min:"3" type:"string" required:"true"`
  10006. }
  10007. // String returns the string representation.
  10008. //
  10009. // API parameter values that are decorated as "sensitive" in the API will not
  10010. // be included in the string output. The member name will be present, but the
  10011. // value will be replaced with "sensitive".
  10012. func (s GetResourcePolicyInput) String() string {
  10013. return awsutil.Prettify(s)
  10014. }
  10015. // GoString returns the string representation.
  10016. //
  10017. // API parameter values that are decorated as "sensitive" in the API will not
  10018. // be included in the string output. The member name will be present, but the
  10019. // value will be replaced with "sensitive".
  10020. func (s GetResourcePolicyInput) GoString() string {
  10021. return s.String()
  10022. }
  10023. // Validate inspects the fields of the type to determine if they are valid.
  10024. func (s *GetResourcePolicyInput) Validate() error {
  10025. invalidParams := request.ErrInvalidParams{Context: "GetResourcePolicyInput"}
  10026. if s.ResourceArn == nil {
  10027. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  10028. }
  10029. if s.ResourceArn != nil && len(*s.ResourceArn) < 3 {
  10030. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 3))
  10031. }
  10032. if invalidParams.Len() > 0 {
  10033. return invalidParams
  10034. }
  10035. return nil
  10036. }
  10037. // SetResourceArn sets the ResourceArn field's value.
  10038. func (s *GetResourcePolicyInput) SetResourceArn(v string) *GetResourcePolicyInput {
  10039. s.ResourceArn = &v
  10040. return s
  10041. }
  10042. type GetResourcePolicyOutput struct {
  10043. _ struct{} `type:"structure"`
  10044. // The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based
  10045. // policy.
  10046. ResourceArn *string `min:"3" type:"string"`
  10047. // A JSON-formatted string that contains the resource-based policy attached
  10048. // to the CloudTrail channel.
  10049. ResourcePolicy *string `min:"1" type:"string"`
  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 GetResourcePolicyOutput) 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 GetResourcePolicyOutput) GoString() string {
  10065. return s.String()
  10066. }
  10067. // SetResourceArn sets the ResourceArn field's value.
  10068. func (s *GetResourcePolicyOutput) SetResourceArn(v string) *GetResourcePolicyOutput {
  10069. s.ResourceArn = &v
  10070. return s
  10071. }
  10072. // SetResourcePolicy sets the ResourcePolicy field's value.
  10073. func (s *GetResourcePolicyOutput) SetResourcePolicy(v string) *GetResourcePolicyOutput {
  10074. s.ResourcePolicy = &v
  10075. return s
  10076. }
  10077. type GetTrailInput struct {
  10078. _ struct{} `type:"structure"`
  10079. // The name or the Amazon Resource Name (ARN) of the trail for which you want
  10080. // to retrieve settings information.
  10081. //
  10082. // Name is a required field
  10083. Name *string `type:"string" required:"true"`
  10084. }
  10085. // String returns the string representation.
  10086. //
  10087. // API parameter values that are decorated as "sensitive" in the API will not
  10088. // be included in the string output. The member name will be present, but the
  10089. // value will be replaced with "sensitive".
  10090. func (s GetTrailInput) String() string {
  10091. return awsutil.Prettify(s)
  10092. }
  10093. // GoString returns the string representation.
  10094. //
  10095. // API parameter values that are decorated as "sensitive" in the API will not
  10096. // be included in the string output. The member name will be present, but the
  10097. // value will be replaced with "sensitive".
  10098. func (s GetTrailInput) GoString() string {
  10099. return s.String()
  10100. }
  10101. // Validate inspects the fields of the type to determine if they are valid.
  10102. func (s *GetTrailInput) Validate() error {
  10103. invalidParams := request.ErrInvalidParams{Context: "GetTrailInput"}
  10104. if s.Name == nil {
  10105. invalidParams.Add(request.NewErrParamRequired("Name"))
  10106. }
  10107. if invalidParams.Len() > 0 {
  10108. return invalidParams
  10109. }
  10110. return nil
  10111. }
  10112. // SetName sets the Name field's value.
  10113. func (s *GetTrailInput) SetName(v string) *GetTrailInput {
  10114. s.Name = &v
  10115. return s
  10116. }
  10117. type GetTrailOutput struct {
  10118. _ struct{} `type:"structure"`
  10119. // The settings for a trail.
  10120. Trail *Trail `type:"structure"`
  10121. }
  10122. // String returns the string representation.
  10123. //
  10124. // API parameter values that are decorated as "sensitive" in the API will not
  10125. // be included in the string output. The member name will be present, but the
  10126. // value will be replaced with "sensitive".
  10127. func (s GetTrailOutput) String() string {
  10128. return awsutil.Prettify(s)
  10129. }
  10130. // GoString returns the string representation.
  10131. //
  10132. // API parameter values that are decorated as "sensitive" in the API will not
  10133. // be included in the string output. The member name will be present, but the
  10134. // value will be replaced with "sensitive".
  10135. func (s GetTrailOutput) GoString() string {
  10136. return s.String()
  10137. }
  10138. // SetTrail sets the Trail field's value.
  10139. func (s *GetTrailOutput) SetTrail(v *Trail) *GetTrailOutput {
  10140. s.Trail = v
  10141. return s
  10142. }
  10143. // The name of a trail about which you want the current status.
  10144. type GetTrailStatusInput struct {
  10145. _ struct{} `type:"structure"`
  10146. // Specifies the name or the CloudTrail ARN of the trail for which you are requesting
  10147. // status. To get the status of a shadow trail (a replication of the trail in
  10148. // another region), you must specify its ARN. The following is the format of
  10149. // a trail ARN.
  10150. //
  10151. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  10152. //
  10153. // Name is a required field
  10154. Name *string `type:"string" required:"true"`
  10155. }
  10156. // String returns the string representation.
  10157. //
  10158. // API parameter values that are decorated as "sensitive" in the API will not
  10159. // be included in the string output. The member name will be present, but the
  10160. // value will be replaced with "sensitive".
  10161. func (s GetTrailStatusInput) String() string {
  10162. return awsutil.Prettify(s)
  10163. }
  10164. // GoString returns the string representation.
  10165. //
  10166. // API parameter values that are decorated as "sensitive" in the API will not
  10167. // be included in the string output. The member name will be present, but the
  10168. // value will be replaced with "sensitive".
  10169. func (s GetTrailStatusInput) GoString() string {
  10170. return s.String()
  10171. }
  10172. // Validate inspects the fields of the type to determine if they are valid.
  10173. func (s *GetTrailStatusInput) Validate() error {
  10174. invalidParams := request.ErrInvalidParams{Context: "GetTrailStatusInput"}
  10175. if s.Name == nil {
  10176. invalidParams.Add(request.NewErrParamRequired("Name"))
  10177. }
  10178. if invalidParams.Len() > 0 {
  10179. return invalidParams
  10180. }
  10181. return nil
  10182. }
  10183. // SetName sets the Name field's value.
  10184. func (s *GetTrailStatusInput) SetName(v string) *GetTrailStatusInput {
  10185. s.Name = &v
  10186. return s
  10187. }
  10188. // Returns the objects or data listed below if successful. Otherwise, returns
  10189. // an error.
  10190. type GetTrailStatusOutput struct {
  10191. _ struct{} `type:"structure"`
  10192. // Whether the CloudTrail trail is currently logging Amazon Web Services API
  10193. // calls.
  10194. IsLogging *bool `type:"boolean"`
  10195. // Displays any CloudWatch Logs error that CloudTrail encountered when attempting
  10196. // to deliver logs to CloudWatch Logs.
  10197. LatestCloudWatchLogsDeliveryError *string `type:"string"`
  10198. // Displays the most recent date and time when CloudTrail delivered logs to
  10199. // CloudWatch Logs.
  10200. LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp"`
  10201. // This field is no longer in use.
  10202. LatestDeliveryAttemptSucceeded *string `type:"string"`
  10203. // This field is no longer in use.
  10204. LatestDeliveryAttemptTime *string `type:"string"`
  10205. // Displays any Amazon S3 error that CloudTrail encountered when attempting
  10206. // to deliver log files to the designated bucket. For more information, see
  10207. // Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
  10208. // in the Amazon S3 API Reference.
  10209. //
  10210. // This error occurs only when there is a problem with the destination S3 bucket,
  10211. // and does not occur for requests that time out. To resolve the issue, create
  10212. // a new bucket, and then call UpdateTrail to specify the new bucket; or fix
  10213. // the existing objects so that CloudTrail can again write to the bucket.
  10214. LatestDeliveryError *string `type:"string"`
  10215. // Specifies the date and time that CloudTrail last delivered log files to an
  10216. // account's Amazon S3 bucket.
  10217. LatestDeliveryTime *time.Time `type:"timestamp"`
  10218. // Displays any Amazon S3 error that CloudTrail encountered when attempting
  10219. // to deliver a digest file to the designated bucket. For more information,
  10220. // see Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
  10221. // in the Amazon S3 API Reference.
  10222. //
  10223. // This error occurs only when there is a problem with the destination S3 bucket,
  10224. // and does not occur for requests that time out. To resolve the issue, create
  10225. // a new bucket, and then call UpdateTrail to specify the new bucket; or fix
  10226. // the existing objects so that CloudTrail can again write to the bucket.
  10227. LatestDigestDeliveryError *string `type:"string"`
  10228. // Specifies the date and time that CloudTrail last delivered a digest file
  10229. // to an account's Amazon S3 bucket.
  10230. LatestDigestDeliveryTime *time.Time `type:"timestamp"`
  10231. // This field is no longer in use.
  10232. LatestNotificationAttemptSucceeded *string `type:"string"`
  10233. // This field is no longer in use.
  10234. LatestNotificationAttemptTime *string `type:"string"`
  10235. // Displays any Amazon SNS error that CloudTrail encountered when attempting
  10236. // to send a notification. For more information about Amazon SNS errors, see
  10237. // the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
  10238. LatestNotificationError *string `type:"string"`
  10239. // Specifies the date and time of the most recent Amazon SNS notification that
  10240. // CloudTrail has written a new log file to an account's Amazon S3 bucket.
  10241. LatestNotificationTime *time.Time `type:"timestamp"`
  10242. // Specifies the most recent date and time when CloudTrail started recording
  10243. // API calls for an Amazon Web Services account.
  10244. StartLoggingTime *time.Time `type:"timestamp"`
  10245. // Specifies the most recent date and time when CloudTrail stopped recording
  10246. // API calls for an Amazon Web Services account.
  10247. StopLoggingTime *time.Time `type:"timestamp"`
  10248. // This field is no longer in use.
  10249. TimeLoggingStarted *string `type:"string"`
  10250. // This field is no longer in use.
  10251. TimeLoggingStopped *string `type:"string"`
  10252. }
  10253. // String returns the string representation.
  10254. //
  10255. // API parameter values that are decorated as "sensitive" in the API will not
  10256. // be included in the string output. The member name will be present, but the
  10257. // value will be replaced with "sensitive".
  10258. func (s GetTrailStatusOutput) String() string {
  10259. return awsutil.Prettify(s)
  10260. }
  10261. // GoString returns the string representation.
  10262. //
  10263. // API parameter values that are decorated as "sensitive" in the API will not
  10264. // be included in the string output. The member name will be present, but the
  10265. // value will be replaced with "sensitive".
  10266. func (s GetTrailStatusOutput) GoString() string {
  10267. return s.String()
  10268. }
  10269. // SetIsLogging sets the IsLogging field's value.
  10270. func (s *GetTrailStatusOutput) SetIsLogging(v bool) *GetTrailStatusOutput {
  10271. s.IsLogging = &v
  10272. return s
  10273. }
  10274. // SetLatestCloudWatchLogsDeliveryError sets the LatestCloudWatchLogsDeliveryError field's value.
  10275. func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError(v string) *GetTrailStatusOutput {
  10276. s.LatestCloudWatchLogsDeliveryError = &v
  10277. return s
  10278. }
  10279. // SetLatestCloudWatchLogsDeliveryTime sets the LatestCloudWatchLogsDeliveryTime field's value.
  10280. func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime(v time.Time) *GetTrailStatusOutput {
  10281. s.LatestCloudWatchLogsDeliveryTime = &v
  10282. return s
  10283. }
  10284. // SetLatestDeliveryAttemptSucceeded sets the LatestDeliveryAttemptSucceeded field's value.
  10285. func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded(v string) *GetTrailStatusOutput {
  10286. s.LatestDeliveryAttemptSucceeded = &v
  10287. return s
  10288. }
  10289. // SetLatestDeliveryAttemptTime sets the LatestDeliveryAttemptTime field's value.
  10290. func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptTime(v string) *GetTrailStatusOutput {
  10291. s.LatestDeliveryAttemptTime = &v
  10292. return s
  10293. }
  10294. // SetLatestDeliveryError sets the LatestDeliveryError field's value.
  10295. func (s *GetTrailStatusOutput) SetLatestDeliveryError(v string) *GetTrailStatusOutput {
  10296. s.LatestDeliveryError = &v
  10297. return s
  10298. }
  10299. // SetLatestDeliveryTime sets the LatestDeliveryTime field's value.
  10300. func (s *GetTrailStatusOutput) SetLatestDeliveryTime(v time.Time) *GetTrailStatusOutput {
  10301. s.LatestDeliveryTime = &v
  10302. return s
  10303. }
  10304. // SetLatestDigestDeliveryError sets the LatestDigestDeliveryError field's value.
  10305. func (s *GetTrailStatusOutput) SetLatestDigestDeliveryError(v string) *GetTrailStatusOutput {
  10306. s.LatestDigestDeliveryError = &v
  10307. return s
  10308. }
  10309. // SetLatestDigestDeliveryTime sets the LatestDigestDeliveryTime field's value.
  10310. func (s *GetTrailStatusOutput) SetLatestDigestDeliveryTime(v time.Time) *GetTrailStatusOutput {
  10311. s.LatestDigestDeliveryTime = &v
  10312. return s
  10313. }
  10314. // SetLatestNotificationAttemptSucceeded sets the LatestNotificationAttemptSucceeded field's value.
  10315. func (s *GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded(v string) *GetTrailStatusOutput {
  10316. s.LatestNotificationAttemptSucceeded = &v
  10317. return s
  10318. }
  10319. // SetLatestNotificationAttemptTime sets the LatestNotificationAttemptTime field's value.
  10320. func (s *GetTrailStatusOutput) SetLatestNotificationAttemptTime(v string) *GetTrailStatusOutput {
  10321. s.LatestNotificationAttemptTime = &v
  10322. return s
  10323. }
  10324. // SetLatestNotificationError sets the LatestNotificationError field's value.
  10325. func (s *GetTrailStatusOutput) SetLatestNotificationError(v string) *GetTrailStatusOutput {
  10326. s.LatestNotificationError = &v
  10327. return s
  10328. }
  10329. // SetLatestNotificationTime sets the LatestNotificationTime field's value.
  10330. func (s *GetTrailStatusOutput) SetLatestNotificationTime(v time.Time) *GetTrailStatusOutput {
  10331. s.LatestNotificationTime = &v
  10332. return s
  10333. }
  10334. // SetStartLoggingTime sets the StartLoggingTime field's value.
  10335. func (s *GetTrailStatusOutput) SetStartLoggingTime(v time.Time) *GetTrailStatusOutput {
  10336. s.StartLoggingTime = &v
  10337. return s
  10338. }
  10339. // SetStopLoggingTime sets the StopLoggingTime field's value.
  10340. func (s *GetTrailStatusOutput) SetStopLoggingTime(v time.Time) *GetTrailStatusOutput {
  10341. s.StopLoggingTime = &v
  10342. return s
  10343. }
  10344. // SetTimeLoggingStarted sets the TimeLoggingStarted field's value.
  10345. func (s *GetTrailStatusOutput) SetTimeLoggingStarted(v string) *GetTrailStatusOutput {
  10346. s.TimeLoggingStarted = &v
  10347. return s
  10348. }
  10349. // SetTimeLoggingStopped sets the TimeLoggingStopped field's value.
  10350. func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOutput {
  10351. s.TimeLoggingStopped = &v
  10352. return s
  10353. }
  10354. // Provides information about an import failure.
  10355. type ImportFailureListItem struct {
  10356. _ struct{} `type:"structure"`
  10357. // Provides the reason the import failed.
  10358. ErrorMessage *string `type:"string"`
  10359. // The type of import error.
  10360. ErrorType *string `type:"string"`
  10361. // When the import was last updated.
  10362. LastUpdatedTime *time.Time `type:"timestamp"`
  10363. // The location of the failure in the S3 bucket.
  10364. Location *string `type:"string"`
  10365. // The status of the import.
  10366. Status *string `type:"string" enum:"ImportFailureStatus"`
  10367. }
  10368. // String returns the string representation.
  10369. //
  10370. // API parameter values that are decorated as "sensitive" in the API will not
  10371. // be included in the string output. The member name will be present, but the
  10372. // value will be replaced with "sensitive".
  10373. func (s ImportFailureListItem) String() string {
  10374. return awsutil.Prettify(s)
  10375. }
  10376. // GoString returns the string representation.
  10377. //
  10378. // API parameter values that are decorated as "sensitive" in the API will not
  10379. // be included in the string output. The member name will be present, but the
  10380. // value will be replaced with "sensitive".
  10381. func (s ImportFailureListItem) GoString() string {
  10382. return s.String()
  10383. }
  10384. // SetErrorMessage sets the ErrorMessage field's value.
  10385. func (s *ImportFailureListItem) SetErrorMessage(v string) *ImportFailureListItem {
  10386. s.ErrorMessage = &v
  10387. return s
  10388. }
  10389. // SetErrorType sets the ErrorType field's value.
  10390. func (s *ImportFailureListItem) SetErrorType(v string) *ImportFailureListItem {
  10391. s.ErrorType = &v
  10392. return s
  10393. }
  10394. // SetLastUpdatedTime sets the LastUpdatedTime field's value.
  10395. func (s *ImportFailureListItem) SetLastUpdatedTime(v time.Time) *ImportFailureListItem {
  10396. s.LastUpdatedTime = &v
  10397. return s
  10398. }
  10399. // SetLocation sets the Location field's value.
  10400. func (s *ImportFailureListItem) SetLocation(v string) *ImportFailureListItem {
  10401. s.Location = &v
  10402. return s
  10403. }
  10404. // SetStatus sets the Status field's value.
  10405. func (s *ImportFailureListItem) SetStatus(v string) *ImportFailureListItem {
  10406. s.Status = &v
  10407. return s
  10408. }
  10409. // The specified import was not found.
  10410. type ImportNotFoundException struct {
  10411. _ struct{} `type:"structure"`
  10412. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  10413. Message_ *string `locationName:"message" type:"string"`
  10414. }
  10415. // String returns the string representation.
  10416. //
  10417. // API parameter values that are decorated as "sensitive" in the API will not
  10418. // be included in the string output. The member name will be present, but the
  10419. // value will be replaced with "sensitive".
  10420. func (s ImportNotFoundException) String() string {
  10421. return awsutil.Prettify(s)
  10422. }
  10423. // GoString returns the string representation.
  10424. //
  10425. // API parameter values that are decorated as "sensitive" in the API will not
  10426. // be included in the string output. The member name will be present, but the
  10427. // value will be replaced with "sensitive".
  10428. func (s ImportNotFoundException) GoString() string {
  10429. return s.String()
  10430. }
  10431. func newErrorImportNotFoundException(v protocol.ResponseMetadata) error {
  10432. return &ImportNotFoundException{
  10433. RespMetadata: v,
  10434. }
  10435. }
  10436. // Code returns the exception type name.
  10437. func (s *ImportNotFoundException) Code() string {
  10438. return "ImportNotFoundException"
  10439. }
  10440. // Message returns the exception's message.
  10441. func (s *ImportNotFoundException) Message() string {
  10442. if s.Message_ != nil {
  10443. return *s.Message_
  10444. }
  10445. return ""
  10446. }
  10447. // OrigErr always returns nil, satisfies awserr.Error interface.
  10448. func (s *ImportNotFoundException) OrigErr() error {
  10449. return nil
  10450. }
  10451. func (s *ImportNotFoundException) Error() string {
  10452. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  10453. }
  10454. // Status code returns the HTTP status code for the request's response error.
  10455. func (s *ImportNotFoundException) StatusCode() int {
  10456. return s.RespMetadata.StatusCode
  10457. }
  10458. // RequestID returns the service's response RequestID for request.
  10459. func (s *ImportNotFoundException) RequestID() string {
  10460. return s.RespMetadata.RequestID
  10461. }
  10462. // The import source.
  10463. type ImportSource struct {
  10464. _ struct{} `type:"structure"`
  10465. // The source S3 bucket.
  10466. //
  10467. // S3 is a required field
  10468. S3 *S3ImportSource `type:"structure" required:"true"`
  10469. }
  10470. // String returns the string representation.
  10471. //
  10472. // API parameter values that are decorated as "sensitive" in the API will not
  10473. // be included in the string output. The member name will be present, but the
  10474. // value will be replaced with "sensitive".
  10475. func (s ImportSource) String() string {
  10476. return awsutil.Prettify(s)
  10477. }
  10478. // GoString returns the string representation.
  10479. //
  10480. // API parameter values that are decorated as "sensitive" in the API will not
  10481. // be included in the string output. The member name will be present, but the
  10482. // value will be replaced with "sensitive".
  10483. func (s ImportSource) GoString() string {
  10484. return s.String()
  10485. }
  10486. // Validate inspects the fields of the type to determine if they are valid.
  10487. func (s *ImportSource) Validate() error {
  10488. invalidParams := request.ErrInvalidParams{Context: "ImportSource"}
  10489. if s.S3 == nil {
  10490. invalidParams.Add(request.NewErrParamRequired("S3"))
  10491. }
  10492. if s.S3 != nil {
  10493. if err := s.S3.Validate(); err != nil {
  10494. invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
  10495. }
  10496. }
  10497. if invalidParams.Len() > 0 {
  10498. return invalidParams
  10499. }
  10500. return nil
  10501. }
  10502. // SetS3 sets the S3 field's value.
  10503. func (s *ImportSource) SetS3(v *S3ImportSource) *ImportSource {
  10504. s.S3 = v
  10505. return s
  10506. }
  10507. // Provides statistics for the specified ImportID. CloudTrail does not update
  10508. // import statistics in real-time. Returned values for parameters such as EventsCompleted
  10509. // may be lower than the actual value, because CloudTrail updates statistics
  10510. // incrementally over the course of the import.
  10511. type ImportStatistics struct {
  10512. _ struct{} `type:"structure"`
  10513. // The number of trail events imported into the event data store.
  10514. EventsCompleted *int64 `type:"long"`
  10515. // The number of failed entries.
  10516. FailedEntries *int64 `type:"long"`
  10517. // The number of log files that completed import.
  10518. FilesCompleted *int64 `type:"long"`
  10519. // The number of S3 prefixes that completed import.
  10520. PrefixesCompleted *int64 `type:"long"`
  10521. // The number of S3 prefixes found for the import.
  10522. PrefixesFound *int64 `type:"long"`
  10523. }
  10524. // String returns the string representation.
  10525. //
  10526. // API parameter values that are decorated as "sensitive" in the API will not
  10527. // be included in the string output. The member name will be present, but the
  10528. // value will be replaced with "sensitive".
  10529. func (s ImportStatistics) String() string {
  10530. return awsutil.Prettify(s)
  10531. }
  10532. // GoString returns the string representation.
  10533. //
  10534. // API parameter values that are decorated as "sensitive" in the API will not
  10535. // be included in the string output. The member name will be present, but the
  10536. // value will be replaced with "sensitive".
  10537. func (s ImportStatistics) GoString() string {
  10538. return s.String()
  10539. }
  10540. // SetEventsCompleted sets the EventsCompleted field's value.
  10541. func (s *ImportStatistics) SetEventsCompleted(v int64) *ImportStatistics {
  10542. s.EventsCompleted = &v
  10543. return s
  10544. }
  10545. // SetFailedEntries sets the FailedEntries field's value.
  10546. func (s *ImportStatistics) SetFailedEntries(v int64) *ImportStatistics {
  10547. s.FailedEntries = &v
  10548. return s
  10549. }
  10550. // SetFilesCompleted sets the FilesCompleted field's value.
  10551. func (s *ImportStatistics) SetFilesCompleted(v int64) *ImportStatistics {
  10552. s.FilesCompleted = &v
  10553. return s
  10554. }
  10555. // SetPrefixesCompleted sets the PrefixesCompleted field's value.
  10556. func (s *ImportStatistics) SetPrefixesCompleted(v int64) *ImportStatistics {
  10557. s.PrefixesCompleted = &v
  10558. return s
  10559. }
  10560. // SetPrefixesFound sets the PrefixesFound field's value.
  10561. func (s *ImportStatistics) SetPrefixesFound(v int64) *ImportStatistics {
  10562. s.PrefixesFound = &v
  10563. return s
  10564. }
  10565. // Contains information about an import that was returned by a lookup request.
  10566. type ImportsListItem struct {
  10567. _ struct{} `type:"structure"`
  10568. // The timestamp of the import's creation.
  10569. CreatedTimestamp *time.Time `type:"timestamp"`
  10570. // The ARN of the destination event data store.
  10571. Destinations []*string `min:"1" type:"list"`
  10572. // The ID of the import.
  10573. ImportId *string `min:"36" type:"string"`
  10574. // The status of the import.
  10575. ImportStatus *string `type:"string" enum:"ImportStatus"`
  10576. // The timestamp of the import's last update.
  10577. UpdatedTimestamp *time.Time `type:"timestamp"`
  10578. }
  10579. // String returns the string representation.
  10580. //
  10581. // API parameter values that are decorated as "sensitive" in the API will not
  10582. // be included in the string output. The member name will be present, but the
  10583. // value will be replaced with "sensitive".
  10584. func (s ImportsListItem) String() string {
  10585. return awsutil.Prettify(s)
  10586. }
  10587. // GoString returns the string representation.
  10588. //
  10589. // API parameter values that are decorated as "sensitive" in the API will not
  10590. // be included in the string output. The member name will be present, but the
  10591. // value will be replaced with "sensitive".
  10592. func (s ImportsListItem) GoString() string {
  10593. return s.String()
  10594. }
  10595. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  10596. func (s *ImportsListItem) SetCreatedTimestamp(v time.Time) *ImportsListItem {
  10597. s.CreatedTimestamp = &v
  10598. return s
  10599. }
  10600. // SetDestinations sets the Destinations field's value.
  10601. func (s *ImportsListItem) SetDestinations(v []*string) *ImportsListItem {
  10602. s.Destinations = v
  10603. return s
  10604. }
  10605. // SetImportId sets the ImportId field's value.
  10606. func (s *ImportsListItem) SetImportId(v string) *ImportsListItem {
  10607. s.ImportId = &v
  10608. return s
  10609. }
  10610. // SetImportStatus sets the ImportStatus field's value.
  10611. func (s *ImportsListItem) SetImportStatus(v string) *ImportsListItem {
  10612. s.ImportStatus = &v
  10613. return s
  10614. }
  10615. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  10616. func (s *ImportsListItem) SetUpdatedTimestamp(v time.Time) *ImportsListItem {
  10617. s.UpdatedTimestamp = &v
  10618. return s
  10619. }
  10620. // The event data store is inactive.
  10621. type InactiveEventDataStoreException struct {
  10622. _ struct{} `type:"structure"`
  10623. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  10624. Message_ *string `locationName:"message" type:"string"`
  10625. }
  10626. // String returns the string representation.
  10627. //
  10628. // API parameter values that are decorated as "sensitive" in the API will not
  10629. // be included in the string output. The member name will be present, but the
  10630. // value will be replaced with "sensitive".
  10631. func (s InactiveEventDataStoreException) String() string {
  10632. return awsutil.Prettify(s)
  10633. }
  10634. // GoString returns the string representation.
  10635. //
  10636. // API parameter values that are decorated as "sensitive" in the API will not
  10637. // be included in the string output. The member name will be present, but the
  10638. // value will be replaced with "sensitive".
  10639. func (s InactiveEventDataStoreException) GoString() string {
  10640. return s.String()
  10641. }
  10642. func newErrorInactiveEventDataStoreException(v protocol.ResponseMetadata) error {
  10643. return &InactiveEventDataStoreException{
  10644. RespMetadata: v,
  10645. }
  10646. }
  10647. // Code returns the exception type name.
  10648. func (s *InactiveEventDataStoreException) Code() string {
  10649. return "InactiveEventDataStoreException"
  10650. }
  10651. // Message returns the exception's message.
  10652. func (s *InactiveEventDataStoreException) Message() string {
  10653. if s.Message_ != nil {
  10654. return *s.Message_
  10655. }
  10656. return ""
  10657. }
  10658. // OrigErr always returns nil, satisfies awserr.Error interface.
  10659. func (s *InactiveEventDataStoreException) OrigErr() error {
  10660. return nil
  10661. }
  10662. func (s *InactiveEventDataStoreException) Error() string {
  10663. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  10664. }
  10665. // Status code returns the HTTP status code for the request's response error.
  10666. func (s *InactiveEventDataStoreException) StatusCode() int {
  10667. return s.RespMetadata.StatusCode
  10668. }
  10669. // RequestID returns the service's response RequestID for request.
  10670. func (s *InactiveEventDataStoreException) RequestID() string {
  10671. return s.RespMetadata.RequestID
  10672. }
  10673. // The specified query cannot be canceled because it is in the FINISHED, FAILED,
  10674. // TIMED_OUT, or CANCELLED state.
  10675. type InactiveQueryException struct {
  10676. _ struct{} `type:"structure"`
  10677. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  10678. Message_ *string `locationName:"message" type:"string"`
  10679. }
  10680. // String returns the string representation.
  10681. //
  10682. // API parameter values that are decorated as "sensitive" in the API will not
  10683. // be included in the string output. The member name will be present, but the
  10684. // value will be replaced with "sensitive".
  10685. func (s InactiveQueryException) String() string {
  10686. return awsutil.Prettify(s)
  10687. }
  10688. // GoString returns the string representation.
  10689. //
  10690. // API parameter values that are decorated as "sensitive" in the API will not
  10691. // be included in the string output. The member name will be present, but the
  10692. // value will be replaced with "sensitive".
  10693. func (s InactiveQueryException) GoString() string {
  10694. return s.String()
  10695. }
  10696. func newErrorInactiveQueryException(v protocol.ResponseMetadata) error {
  10697. return &InactiveQueryException{
  10698. RespMetadata: v,
  10699. }
  10700. }
  10701. // Code returns the exception type name.
  10702. func (s *InactiveQueryException) Code() string {
  10703. return "InactiveQueryException"
  10704. }
  10705. // Message returns the exception's message.
  10706. func (s *InactiveQueryException) Message() string {
  10707. if s.Message_ != nil {
  10708. return *s.Message_
  10709. }
  10710. return ""
  10711. }
  10712. // OrigErr always returns nil, satisfies awserr.Error interface.
  10713. func (s *InactiveQueryException) OrigErr() error {
  10714. return nil
  10715. }
  10716. func (s *InactiveQueryException) Error() string {
  10717. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  10718. }
  10719. // Status code returns the HTTP status code for the request's response error.
  10720. func (s *InactiveQueryException) StatusCode() int {
  10721. return s.RespMetadata.StatusCode
  10722. }
  10723. // RequestID returns the service's response RequestID for request.
  10724. func (s *InactiveQueryException) RequestID() string {
  10725. return s.RespMetadata.RequestID
  10726. }
  10727. // A table showing information about the most recent successful and failed attempts
  10728. // to ingest events.
  10729. type IngestionStatus struct {
  10730. _ struct{} `type:"structure"`
  10731. // The event ID of the most recent attempt to ingest events.
  10732. LatestIngestionAttemptEventID *string `min:"36" type:"string"`
  10733. // The time stamp of the most recent attempt to ingest events on the channel.
  10734. LatestIngestionAttemptTime *time.Time `type:"timestamp"`
  10735. // The error code for the most recent failure to ingest events.
  10736. LatestIngestionErrorCode *string `min:"4" type:"string"`
  10737. // The event ID of the most recent successful ingestion of events.
  10738. LatestIngestionSuccessEventID *string `min:"36" type:"string"`
  10739. // The time stamp of the most recent successful ingestion of events for the
  10740. // channel.
  10741. LatestIngestionSuccessTime *time.Time `type:"timestamp"`
  10742. }
  10743. // String returns the string representation.
  10744. //
  10745. // API parameter values that are decorated as "sensitive" in the API will not
  10746. // be included in the string output. The member name will be present, but the
  10747. // value will be replaced with "sensitive".
  10748. func (s IngestionStatus) String() string {
  10749. return awsutil.Prettify(s)
  10750. }
  10751. // GoString returns the string representation.
  10752. //
  10753. // API parameter values that are decorated as "sensitive" in the API will not
  10754. // be included in the string output. The member name will be present, but the
  10755. // value will be replaced with "sensitive".
  10756. func (s IngestionStatus) GoString() string {
  10757. return s.String()
  10758. }
  10759. // SetLatestIngestionAttemptEventID sets the LatestIngestionAttemptEventID field's value.
  10760. func (s *IngestionStatus) SetLatestIngestionAttemptEventID(v string) *IngestionStatus {
  10761. s.LatestIngestionAttemptEventID = &v
  10762. return s
  10763. }
  10764. // SetLatestIngestionAttemptTime sets the LatestIngestionAttemptTime field's value.
  10765. func (s *IngestionStatus) SetLatestIngestionAttemptTime(v time.Time) *IngestionStatus {
  10766. s.LatestIngestionAttemptTime = &v
  10767. return s
  10768. }
  10769. // SetLatestIngestionErrorCode sets the LatestIngestionErrorCode field's value.
  10770. func (s *IngestionStatus) SetLatestIngestionErrorCode(v string) *IngestionStatus {
  10771. s.LatestIngestionErrorCode = &v
  10772. return s
  10773. }
  10774. // SetLatestIngestionSuccessEventID sets the LatestIngestionSuccessEventID field's value.
  10775. func (s *IngestionStatus) SetLatestIngestionSuccessEventID(v string) *IngestionStatus {
  10776. s.LatestIngestionSuccessEventID = &v
  10777. return s
  10778. }
  10779. // SetLatestIngestionSuccessTime sets the LatestIngestionSuccessTime field's value.
  10780. func (s *IngestionStatus) SetLatestIngestionSuccessTime(v time.Time) *IngestionStatus {
  10781. s.LatestIngestionSuccessTime = &v
  10782. return s
  10783. }
  10784. // If you run GetInsightSelectors on a trail that does not have Insights events
  10785. // enabled, the operation throws the exception InsightNotEnabledException.
  10786. type InsightNotEnabledException struct {
  10787. _ struct{} `type:"structure"`
  10788. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  10789. Message_ *string `locationName:"message" type:"string"`
  10790. }
  10791. // String returns the string representation.
  10792. //
  10793. // API parameter values that are decorated as "sensitive" in the API will not
  10794. // be included in the string output. The member name will be present, but the
  10795. // value will be replaced with "sensitive".
  10796. func (s InsightNotEnabledException) String() string {
  10797. return awsutil.Prettify(s)
  10798. }
  10799. // GoString returns the string representation.
  10800. //
  10801. // API parameter values that are decorated as "sensitive" in the API will not
  10802. // be included in the string output. The member name will be present, but the
  10803. // value will be replaced with "sensitive".
  10804. func (s InsightNotEnabledException) GoString() string {
  10805. return s.String()
  10806. }
  10807. func newErrorInsightNotEnabledException(v protocol.ResponseMetadata) error {
  10808. return &InsightNotEnabledException{
  10809. RespMetadata: v,
  10810. }
  10811. }
  10812. // Code returns the exception type name.
  10813. func (s *InsightNotEnabledException) Code() string {
  10814. return "InsightNotEnabledException"
  10815. }
  10816. // Message returns the exception's message.
  10817. func (s *InsightNotEnabledException) Message() string {
  10818. if s.Message_ != nil {
  10819. return *s.Message_
  10820. }
  10821. return ""
  10822. }
  10823. // OrigErr always returns nil, satisfies awserr.Error interface.
  10824. func (s *InsightNotEnabledException) OrigErr() error {
  10825. return nil
  10826. }
  10827. func (s *InsightNotEnabledException) Error() string {
  10828. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  10829. }
  10830. // Status code returns the HTTP status code for the request's response error.
  10831. func (s *InsightNotEnabledException) StatusCode() int {
  10832. return s.RespMetadata.StatusCode
  10833. }
  10834. // RequestID returns the service's response RequestID for request.
  10835. func (s *InsightNotEnabledException) RequestID() string {
  10836. return s.RespMetadata.RequestID
  10837. }
  10838. // A JSON string that contains a list of insight types that are logged on a
  10839. // trail.
  10840. type InsightSelector struct {
  10841. _ struct{} `type:"structure"`
  10842. // The type of insights to log on a trail. ApiCallRateInsight and ApiErrorRateInsight
  10843. // are valid insight types.
  10844. InsightType *string `type:"string" enum:"InsightType"`
  10845. }
  10846. // String returns the string representation.
  10847. //
  10848. // API parameter values that are decorated as "sensitive" in the API will not
  10849. // be included in the string output. The member name will be present, but the
  10850. // value will be replaced with "sensitive".
  10851. func (s InsightSelector) String() string {
  10852. return awsutil.Prettify(s)
  10853. }
  10854. // GoString returns the string representation.
  10855. //
  10856. // API parameter values that are decorated as "sensitive" in the API will not
  10857. // be included in the string output. The member name will be present, but the
  10858. // value will be replaced with "sensitive".
  10859. func (s InsightSelector) GoString() string {
  10860. return s.String()
  10861. }
  10862. // SetInsightType sets the InsightType field's value.
  10863. func (s *InsightSelector) SetInsightType(v string) *InsightSelector {
  10864. s.InsightType = &v
  10865. return s
  10866. }
  10867. // This exception is thrown when the IAM user or role that is used to create
  10868. // the organization resource lacks one or more required permissions for creating
  10869. // an organization resource in a required service.
  10870. type InsufficientDependencyServiceAccessPermissionException struct {
  10871. _ struct{} `type:"structure"`
  10872. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  10873. Message_ *string `locationName:"message" type:"string"`
  10874. }
  10875. // String returns the string representation.
  10876. //
  10877. // API parameter values that are decorated as "sensitive" in the API will not
  10878. // be included in the string output. The member name will be present, but the
  10879. // value will be replaced with "sensitive".
  10880. func (s InsufficientDependencyServiceAccessPermissionException) String() string {
  10881. return awsutil.Prettify(s)
  10882. }
  10883. // GoString returns the string representation.
  10884. //
  10885. // API parameter values that are decorated as "sensitive" in the API will not
  10886. // be included in the string output. The member name will be present, but the
  10887. // value will be replaced with "sensitive".
  10888. func (s InsufficientDependencyServiceAccessPermissionException) GoString() string {
  10889. return s.String()
  10890. }
  10891. func newErrorInsufficientDependencyServiceAccessPermissionException(v protocol.ResponseMetadata) error {
  10892. return &InsufficientDependencyServiceAccessPermissionException{
  10893. RespMetadata: v,
  10894. }
  10895. }
  10896. // Code returns the exception type name.
  10897. func (s *InsufficientDependencyServiceAccessPermissionException) Code() string {
  10898. return "InsufficientDependencyServiceAccessPermissionException"
  10899. }
  10900. // Message returns the exception's message.
  10901. func (s *InsufficientDependencyServiceAccessPermissionException) Message() string {
  10902. if s.Message_ != nil {
  10903. return *s.Message_
  10904. }
  10905. return ""
  10906. }
  10907. // OrigErr always returns nil, satisfies awserr.Error interface.
  10908. func (s *InsufficientDependencyServiceAccessPermissionException) OrigErr() error {
  10909. return nil
  10910. }
  10911. func (s *InsufficientDependencyServiceAccessPermissionException) Error() string {
  10912. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  10913. }
  10914. // Status code returns the HTTP status code for the request's response error.
  10915. func (s *InsufficientDependencyServiceAccessPermissionException) StatusCode() int {
  10916. return s.RespMetadata.StatusCode
  10917. }
  10918. // RequestID returns the service's response RequestID for request.
  10919. func (s *InsufficientDependencyServiceAccessPermissionException) RequestID() string {
  10920. return s.RespMetadata.RequestID
  10921. }
  10922. // This exception is thrown when the policy on the S3 bucket or KMS key does
  10923. // not have sufficient permissions for the operation.
  10924. type InsufficientEncryptionPolicyException struct {
  10925. _ struct{} `type:"structure"`
  10926. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  10927. Message_ *string `locationName:"message" type:"string"`
  10928. }
  10929. // String returns the string representation.
  10930. //
  10931. // API parameter values that are decorated as "sensitive" in the API will not
  10932. // be included in the string output. The member name will be present, but the
  10933. // value will be replaced with "sensitive".
  10934. func (s InsufficientEncryptionPolicyException) String() string {
  10935. return awsutil.Prettify(s)
  10936. }
  10937. // GoString returns the string representation.
  10938. //
  10939. // API parameter values that are decorated as "sensitive" in the API will not
  10940. // be included in the string output. The member name will be present, but the
  10941. // value will be replaced with "sensitive".
  10942. func (s InsufficientEncryptionPolicyException) GoString() string {
  10943. return s.String()
  10944. }
  10945. func newErrorInsufficientEncryptionPolicyException(v protocol.ResponseMetadata) error {
  10946. return &InsufficientEncryptionPolicyException{
  10947. RespMetadata: v,
  10948. }
  10949. }
  10950. // Code returns the exception type name.
  10951. func (s *InsufficientEncryptionPolicyException) Code() string {
  10952. return "InsufficientEncryptionPolicyException"
  10953. }
  10954. // Message returns the exception's message.
  10955. func (s *InsufficientEncryptionPolicyException) Message() string {
  10956. if s.Message_ != nil {
  10957. return *s.Message_
  10958. }
  10959. return ""
  10960. }
  10961. // OrigErr always returns nil, satisfies awserr.Error interface.
  10962. func (s *InsufficientEncryptionPolicyException) OrigErr() error {
  10963. return nil
  10964. }
  10965. func (s *InsufficientEncryptionPolicyException) Error() string {
  10966. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  10967. }
  10968. // Status code returns the HTTP status code for the request's response error.
  10969. func (s *InsufficientEncryptionPolicyException) StatusCode() int {
  10970. return s.RespMetadata.StatusCode
  10971. }
  10972. // RequestID returns the service's response RequestID for request.
  10973. func (s *InsufficientEncryptionPolicyException) RequestID() string {
  10974. return s.RespMetadata.RequestID
  10975. }
  10976. // This exception is thrown when the policy on the S3 bucket is not sufficient.
  10977. type InsufficientS3BucketPolicyException struct {
  10978. _ struct{} `type:"structure"`
  10979. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  10980. Message_ *string `locationName:"message" type:"string"`
  10981. }
  10982. // String returns the string representation.
  10983. //
  10984. // API parameter values that are decorated as "sensitive" in the API will not
  10985. // be included in the string output. The member name will be present, but the
  10986. // value will be replaced with "sensitive".
  10987. func (s InsufficientS3BucketPolicyException) String() string {
  10988. return awsutil.Prettify(s)
  10989. }
  10990. // GoString returns the string representation.
  10991. //
  10992. // API parameter values that are decorated as "sensitive" in the API will not
  10993. // be included in the string output. The member name will be present, but the
  10994. // value will be replaced with "sensitive".
  10995. func (s InsufficientS3BucketPolicyException) GoString() string {
  10996. return s.String()
  10997. }
  10998. func newErrorInsufficientS3BucketPolicyException(v protocol.ResponseMetadata) error {
  10999. return &InsufficientS3BucketPolicyException{
  11000. RespMetadata: v,
  11001. }
  11002. }
  11003. // Code returns the exception type name.
  11004. func (s *InsufficientS3BucketPolicyException) Code() string {
  11005. return "InsufficientS3BucketPolicyException"
  11006. }
  11007. // Message returns the exception's message.
  11008. func (s *InsufficientS3BucketPolicyException) Message() string {
  11009. if s.Message_ != nil {
  11010. return *s.Message_
  11011. }
  11012. return ""
  11013. }
  11014. // OrigErr always returns nil, satisfies awserr.Error interface.
  11015. func (s *InsufficientS3BucketPolicyException) OrigErr() error {
  11016. return nil
  11017. }
  11018. func (s *InsufficientS3BucketPolicyException) Error() string {
  11019. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11020. }
  11021. // Status code returns the HTTP status code for the request's response error.
  11022. func (s *InsufficientS3BucketPolicyException) StatusCode() int {
  11023. return s.RespMetadata.StatusCode
  11024. }
  11025. // RequestID returns the service's response RequestID for request.
  11026. func (s *InsufficientS3BucketPolicyException) RequestID() string {
  11027. return s.RespMetadata.RequestID
  11028. }
  11029. // This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
  11030. type InsufficientSnsTopicPolicyException struct {
  11031. _ struct{} `type:"structure"`
  11032. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11033. Message_ *string `locationName:"message" type:"string"`
  11034. }
  11035. // String returns the string representation.
  11036. //
  11037. // API parameter values that are decorated as "sensitive" in the API will not
  11038. // be included in the string output. The member name will be present, but the
  11039. // value will be replaced with "sensitive".
  11040. func (s InsufficientSnsTopicPolicyException) String() string {
  11041. return awsutil.Prettify(s)
  11042. }
  11043. // GoString returns the string representation.
  11044. //
  11045. // API parameter values that are decorated as "sensitive" in the API will not
  11046. // be included in the string output. The member name will be present, but the
  11047. // value will be replaced with "sensitive".
  11048. func (s InsufficientSnsTopicPolicyException) GoString() string {
  11049. return s.String()
  11050. }
  11051. func newErrorInsufficientSnsTopicPolicyException(v protocol.ResponseMetadata) error {
  11052. return &InsufficientSnsTopicPolicyException{
  11053. RespMetadata: v,
  11054. }
  11055. }
  11056. // Code returns the exception type name.
  11057. func (s *InsufficientSnsTopicPolicyException) Code() string {
  11058. return "InsufficientSnsTopicPolicyException"
  11059. }
  11060. // Message returns the exception's message.
  11061. func (s *InsufficientSnsTopicPolicyException) Message() string {
  11062. if s.Message_ != nil {
  11063. return *s.Message_
  11064. }
  11065. return ""
  11066. }
  11067. // OrigErr always returns nil, satisfies awserr.Error interface.
  11068. func (s *InsufficientSnsTopicPolicyException) OrigErr() error {
  11069. return nil
  11070. }
  11071. func (s *InsufficientSnsTopicPolicyException) Error() string {
  11072. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11073. }
  11074. // Status code returns the HTTP status code for the request's response error.
  11075. func (s *InsufficientSnsTopicPolicyException) StatusCode() int {
  11076. return s.RespMetadata.StatusCode
  11077. }
  11078. // RequestID returns the service's response RequestID for request.
  11079. func (s *InsufficientSnsTopicPolicyException) RequestID() string {
  11080. return s.RespMetadata.RequestID
  11081. }
  11082. // This exception is thrown when the provided CloudWatch Logs log group is not
  11083. // valid.
  11084. type InvalidCloudWatchLogsLogGroupArnException struct {
  11085. _ struct{} `type:"structure"`
  11086. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11087. Message_ *string `locationName:"message" type:"string"`
  11088. }
  11089. // String returns the string representation.
  11090. //
  11091. // API parameter values that are decorated as "sensitive" in the API will not
  11092. // be included in the string output. The member name will be present, but the
  11093. // value will be replaced with "sensitive".
  11094. func (s InvalidCloudWatchLogsLogGroupArnException) String() string {
  11095. return awsutil.Prettify(s)
  11096. }
  11097. // GoString returns the string representation.
  11098. //
  11099. // API parameter values that are decorated as "sensitive" in the API will not
  11100. // be included in the string output. The member name will be present, but the
  11101. // value will be replaced with "sensitive".
  11102. func (s InvalidCloudWatchLogsLogGroupArnException) GoString() string {
  11103. return s.String()
  11104. }
  11105. func newErrorInvalidCloudWatchLogsLogGroupArnException(v protocol.ResponseMetadata) error {
  11106. return &InvalidCloudWatchLogsLogGroupArnException{
  11107. RespMetadata: v,
  11108. }
  11109. }
  11110. // Code returns the exception type name.
  11111. func (s *InvalidCloudWatchLogsLogGroupArnException) Code() string {
  11112. return "InvalidCloudWatchLogsLogGroupArnException"
  11113. }
  11114. // Message returns the exception's message.
  11115. func (s *InvalidCloudWatchLogsLogGroupArnException) Message() string {
  11116. if s.Message_ != nil {
  11117. return *s.Message_
  11118. }
  11119. return ""
  11120. }
  11121. // OrigErr always returns nil, satisfies awserr.Error interface.
  11122. func (s *InvalidCloudWatchLogsLogGroupArnException) OrigErr() error {
  11123. return nil
  11124. }
  11125. func (s *InvalidCloudWatchLogsLogGroupArnException) Error() string {
  11126. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11127. }
  11128. // Status code returns the HTTP status code for the request's response error.
  11129. func (s *InvalidCloudWatchLogsLogGroupArnException) StatusCode() int {
  11130. return s.RespMetadata.StatusCode
  11131. }
  11132. // RequestID returns the service's response RequestID for request.
  11133. func (s *InvalidCloudWatchLogsLogGroupArnException) RequestID() string {
  11134. return s.RespMetadata.RequestID
  11135. }
  11136. // This exception is thrown when the provided role is not valid.
  11137. type InvalidCloudWatchLogsRoleArnException struct {
  11138. _ struct{} `type:"structure"`
  11139. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11140. Message_ *string `locationName:"message" type:"string"`
  11141. }
  11142. // String returns the string representation.
  11143. //
  11144. // API parameter values that are decorated as "sensitive" in the API will not
  11145. // be included in the string output. The member name will be present, but the
  11146. // value will be replaced with "sensitive".
  11147. func (s InvalidCloudWatchLogsRoleArnException) String() string {
  11148. return awsutil.Prettify(s)
  11149. }
  11150. // GoString returns the string representation.
  11151. //
  11152. // API parameter values that are decorated as "sensitive" in the API will not
  11153. // be included in the string output. The member name will be present, but the
  11154. // value will be replaced with "sensitive".
  11155. func (s InvalidCloudWatchLogsRoleArnException) GoString() string {
  11156. return s.String()
  11157. }
  11158. func newErrorInvalidCloudWatchLogsRoleArnException(v protocol.ResponseMetadata) error {
  11159. return &InvalidCloudWatchLogsRoleArnException{
  11160. RespMetadata: v,
  11161. }
  11162. }
  11163. // Code returns the exception type name.
  11164. func (s *InvalidCloudWatchLogsRoleArnException) Code() string {
  11165. return "InvalidCloudWatchLogsRoleArnException"
  11166. }
  11167. // Message returns the exception's message.
  11168. func (s *InvalidCloudWatchLogsRoleArnException) Message() string {
  11169. if s.Message_ != nil {
  11170. return *s.Message_
  11171. }
  11172. return ""
  11173. }
  11174. // OrigErr always returns nil, satisfies awserr.Error interface.
  11175. func (s *InvalidCloudWatchLogsRoleArnException) OrigErr() error {
  11176. return nil
  11177. }
  11178. func (s *InvalidCloudWatchLogsRoleArnException) Error() string {
  11179. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11180. }
  11181. // Status code returns the HTTP status code for the request's response error.
  11182. func (s *InvalidCloudWatchLogsRoleArnException) StatusCode() int {
  11183. return s.RespMetadata.StatusCode
  11184. }
  11185. // RequestID returns the service's response RequestID for request.
  11186. func (s *InvalidCloudWatchLogsRoleArnException) RequestID() string {
  11187. return s.RespMetadata.RequestID
  11188. }
  11189. // A date range for the query was specified that is not valid. Be sure that
  11190. // the start time is chronologically before the end time. For more information
  11191. // about writing a query, see Create or edit a query (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html)
  11192. // in the CloudTrail User Guide.
  11193. type InvalidDateRangeException struct {
  11194. _ struct{} `type:"structure"`
  11195. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11196. Message_ *string `locationName:"message" type:"string"`
  11197. }
  11198. // String returns the string representation.
  11199. //
  11200. // API parameter values that are decorated as "sensitive" in the API will not
  11201. // be included in the string output. The member name will be present, but the
  11202. // value will be replaced with "sensitive".
  11203. func (s InvalidDateRangeException) String() string {
  11204. return awsutil.Prettify(s)
  11205. }
  11206. // GoString returns the string representation.
  11207. //
  11208. // API parameter values that are decorated as "sensitive" in the API will not
  11209. // be included in the string output. The member name will be present, but the
  11210. // value will be replaced with "sensitive".
  11211. func (s InvalidDateRangeException) GoString() string {
  11212. return s.String()
  11213. }
  11214. func newErrorInvalidDateRangeException(v protocol.ResponseMetadata) error {
  11215. return &InvalidDateRangeException{
  11216. RespMetadata: v,
  11217. }
  11218. }
  11219. // Code returns the exception type name.
  11220. func (s *InvalidDateRangeException) Code() string {
  11221. return "InvalidDateRangeException"
  11222. }
  11223. // Message returns the exception's message.
  11224. func (s *InvalidDateRangeException) Message() string {
  11225. if s.Message_ != nil {
  11226. return *s.Message_
  11227. }
  11228. return ""
  11229. }
  11230. // OrigErr always returns nil, satisfies awserr.Error interface.
  11231. func (s *InvalidDateRangeException) OrigErr() error {
  11232. return nil
  11233. }
  11234. func (s *InvalidDateRangeException) Error() string {
  11235. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11236. }
  11237. // Status code returns the HTTP status code for the request's response error.
  11238. func (s *InvalidDateRangeException) StatusCode() int {
  11239. return s.RespMetadata.StatusCode
  11240. }
  11241. // RequestID returns the service's response RequestID for request.
  11242. func (s *InvalidDateRangeException) RequestID() string {
  11243. return s.RespMetadata.RequestID
  11244. }
  11245. // Occurs if an event category that is not valid is specified as a value of
  11246. // EventCategory.
  11247. type InvalidEventCategoryException struct {
  11248. _ struct{} `type:"structure"`
  11249. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11250. Message_ *string `locationName:"message" type:"string"`
  11251. }
  11252. // String returns the string representation.
  11253. //
  11254. // API parameter values that are decorated as "sensitive" in the API will not
  11255. // be included in the string output. The member name will be present, but the
  11256. // value will be replaced with "sensitive".
  11257. func (s InvalidEventCategoryException) String() string {
  11258. return awsutil.Prettify(s)
  11259. }
  11260. // GoString returns the string representation.
  11261. //
  11262. // API parameter values that are decorated as "sensitive" in the API will not
  11263. // be included in the string output. The member name will be present, but the
  11264. // value will be replaced with "sensitive".
  11265. func (s InvalidEventCategoryException) GoString() string {
  11266. return s.String()
  11267. }
  11268. func newErrorInvalidEventCategoryException(v protocol.ResponseMetadata) error {
  11269. return &InvalidEventCategoryException{
  11270. RespMetadata: v,
  11271. }
  11272. }
  11273. // Code returns the exception type name.
  11274. func (s *InvalidEventCategoryException) Code() string {
  11275. return "InvalidEventCategoryException"
  11276. }
  11277. // Message returns the exception's message.
  11278. func (s *InvalidEventCategoryException) Message() string {
  11279. if s.Message_ != nil {
  11280. return *s.Message_
  11281. }
  11282. return ""
  11283. }
  11284. // OrigErr always returns nil, satisfies awserr.Error interface.
  11285. func (s *InvalidEventCategoryException) OrigErr() error {
  11286. return nil
  11287. }
  11288. func (s *InvalidEventCategoryException) Error() string {
  11289. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11290. }
  11291. // Status code returns the HTTP status code for the request's response error.
  11292. func (s *InvalidEventCategoryException) StatusCode() int {
  11293. return s.RespMetadata.StatusCode
  11294. }
  11295. // RequestID returns the service's response RequestID for request.
  11296. func (s *InvalidEventCategoryException) RequestID() string {
  11297. return s.RespMetadata.RequestID
  11298. }
  11299. // This exception is thrown when event categories of specified event data stores
  11300. // are not valid.
  11301. type InvalidEventDataStoreCategoryException struct {
  11302. _ struct{} `type:"structure"`
  11303. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11304. Message_ *string `locationName:"message" type:"string"`
  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 InvalidEventDataStoreCategoryException) 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 InvalidEventDataStoreCategoryException) GoString() string {
  11320. return s.String()
  11321. }
  11322. func newErrorInvalidEventDataStoreCategoryException(v protocol.ResponseMetadata) error {
  11323. return &InvalidEventDataStoreCategoryException{
  11324. RespMetadata: v,
  11325. }
  11326. }
  11327. // Code returns the exception type name.
  11328. func (s *InvalidEventDataStoreCategoryException) Code() string {
  11329. return "InvalidEventDataStoreCategoryException"
  11330. }
  11331. // Message returns the exception's message.
  11332. func (s *InvalidEventDataStoreCategoryException) Message() string {
  11333. if s.Message_ != nil {
  11334. return *s.Message_
  11335. }
  11336. return ""
  11337. }
  11338. // OrigErr always returns nil, satisfies awserr.Error interface.
  11339. func (s *InvalidEventDataStoreCategoryException) OrigErr() error {
  11340. return nil
  11341. }
  11342. func (s *InvalidEventDataStoreCategoryException) Error() string {
  11343. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11344. }
  11345. // Status code returns the HTTP status code for the request's response error.
  11346. func (s *InvalidEventDataStoreCategoryException) StatusCode() int {
  11347. return s.RespMetadata.StatusCode
  11348. }
  11349. // RequestID returns the service's response RequestID for request.
  11350. func (s *InvalidEventDataStoreCategoryException) RequestID() string {
  11351. return s.RespMetadata.RequestID
  11352. }
  11353. // The event data store is not in a status that supports the operation.
  11354. type InvalidEventDataStoreStatusException struct {
  11355. _ struct{} `type:"structure"`
  11356. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11357. Message_ *string `locationName:"message" type:"string"`
  11358. }
  11359. // String returns the string representation.
  11360. //
  11361. // API parameter values that are decorated as "sensitive" in the API will not
  11362. // be included in the string output. The member name will be present, but the
  11363. // value will be replaced with "sensitive".
  11364. func (s InvalidEventDataStoreStatusException) String() string {
  11365. return awsutil.Prettify(s)
  11366. }
  11367. // GoString returns the string representation.
  11368. //
  11369. // API parameter values that are decorated as "sensitive" in the API will not
  11370. // be included in the string output. The member name will be present, but the
  11371. // value will be replaced with "sensitive".
  11372. func (s InvalidEventDataStoreStatusException) GoString() string {
  11373. return s.String()
  11374. }
  11375. func newErrorInvalidEventDataStoreStatusException(v protocol.ResponseMetadata) error {
  11376. return &InvalidEventDataStoreStatusException{
  11377. RespMetadata: v,
  11378. }
  11379. }
  11380. // Code returns the exception type name.
  11381. func (s *InvalidEventDataStoreStatusException) Code() string {
  11382. return "InvalidEventDataStoreStatusException"
  11383. }
  11384. // Message returns the exception's message.
  11385. func (s *InvalidEventDataStoreStatusException) Message() string {
  11386. if s.Message_ != nil {
  11387. return *s.Message_
  11388. }
  11389. return ""
  11390. }
  11391. // OrigErr always returns nil, satisfies awserr.Error interface.
  11392. func (s *InvalidEventDataStoreStatusException) OrigErr() error {
  11393. return nil
  11394. }
  11395. func (s *InvalidEventDataStoreStatusException) Error() string {
  11396. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11397. }
  11398. // Status code returns the HTTP status code for the request's response error.
  11399. func (s *InvalidEventDataStoreStatusException) StatusCode() int {
  11400. return s.RespMetadata.StatusCode
  11401. }
  11402. // RequestID returns the service's response RequestID for request.
  11403. func (s *InvalidEventDataStoreStatusException) RequestID() string {
  11404. return s.RespMetadata.RequestID
  11405. }
  11406. // This exception is thrown when the PutEventSelectors operation is called with
  11407. // a number of event selectors, advanced event selectors, or data resources
  11408. // that is not valid. The combination of event selectors or advanced event selectors
  11409. // and data resources is not valid. A trail can have up to 5 event selectors.
  11410. // If a trail uses advanced event selectors, a maximum of 500 total values for
  11411. // all conditions in all advanced event selectors is allowed. A trail is limited
  11412. // to 250 data resources. These data resources can be distributed across event
  11413. // selectors, but the overall total cannot exceed 250.
  11414. //
  11415. // You can:
  11416. //
  11417. // - Specify a valid number of event selectors (1 to 5) for a trail.
  11418. //
  11419. // - Specify a valid number of data resources (1 to 250) for an event selector.
  11420. // The limit of number of resources on an individual event selector is configurable
  11421. // up to 250. However, this upper limit is allowed only if the total number
  11422. // of data resources does not exceed 250 across all event selectors for a
  11423. // trail.
  11424. //
  11425. // - Specify up to 500 values for all conditions in all advanced event selectors
  11426. // for a trail.
  11427. //
  11428. // - Specify a valid value for a parameter. For example, specifying the ReadWriteType
  11429. // parameter with a value of read-only is not valid.
  11430. type InvalidEventSelectorsException struct {
  11431. _ struct{} `type:"structure"`
  11432. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11433. Message_ *string `locationName:"message" type:"string"`
  11434. }
  11435. // String returns the string representation.
  11436. //
  11437. // API parameter values that are decorated as "sensitive" in the API will not
  11438. // be included in the string output. The member name will be present, but the
  11439. // value will be replaced with "sensitive".
  11440. func (s InvalidEventSelectorsException) String() string {
  11441. return awsutil.Prettify(s)
  11442. }
  11443. // GoString returns the string representation.
  11444. //
  11445. // API parameter values that are decorated as "sensitive" in the API will not
  11446. // be included in the string output. The member name will be present, but the
  11447. // value will be replaced with "sensitive".
  11448. func (s InvalidEventSelectorsException) GoString() string {
  11449. return s.String()
  11450. }
  11451. func newErrorInvalidEventSelectorsException(v protocol.ResponseMetadata) error {
  11452. return &InvalidEventSelectorsException{
  11453. RespMetadata: v,
  11454. }
  11455. }
  11456. // Code returns the exception type name.
  11457. func (s *InvalidEventSelectorsException) Code() string {
  11458. return "InvalidEventSelectorsException"
  11459. }
  11460. // Message returns the exception's message.
  11461. func (s *InvalidEventSelectorsException) Message() string {
  11462. if s.Message_ != nil {
  11463. return *s.Message_
  11464. }
  11465. return ""
  11466. }
  11467. // OrigErr always returns nil, satisfies awserr.Error interface.
  11468. func (s *InvalidEventSelectorsException) OrigErr() error {
  11469. return nil
  11470. }
  11471. func (s *InvalidEventSelectorsException) Error() string {
  11472. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11473. }
  11474. // Status code returns the HTTP status code for the request's response error.
  11475. func (s *InvalidEventSelectorsException) StatusCode() int {
  11476. return s.RespMetadata.StatusCode
  11477. }
  11478. // RequestID returns the service's response RequestID for request.
  11479. func (s *InvalidEventSelectorsException) RequestID() string {
  11480. return s.RespMetadata.RequestID
  11481. }
  11482. // This exception is thrown when an operation is called on a trail from a region
  11483. // other than the region in which the trail was created.
  11484. type InvalidHomeRegionException struct {
  11485. _ struct{} `type:"structure"`
  11486. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11487. Message_ *string `locationName:"message" type:"string"`
  11488. }
  11489. // String returns the string representation.
  11490. //
  11491. // API parameter values that are decorated as "sensitive" in the API will not
  11492. // be included in the string output. The member name will be present, but the
  11493. // value will be replaced with "sensitive".
  11494. func (s InvalidHomeRegionException) String() string {
  11495. return awsutil.Prettify(s)
  11496. }
  11497. // GoString returns the string representation.
  11498. //
  11499. // API parameter values that are decorated as "sensitive" in the API will not
  11500. // be included in the string output. The member name will be present, but the
  11501. // value will be replaced with "sensitive".
  11502. func (s InvalidHomeRegionException) GoString() string {
  11503. return s.String()
  11504. }
  11505. func newErrorInvalidHomeRegionException(v protocol.ResponseMetadata) error {
  11506. return &InvalidHomeRegionException{
  11507. RespMetadata: v,
  11508. }
  11509. }
  11510. // Code returns the exception type name.
  11511. func (s *InvalidHomeRegionException) Code() string {
  11512. return "InvalidHomeRegionException"
  11513. }
  11514. // Message returns the exception's message.
  11515. func (s *InvalidHomeRegionException) Message() string {
  11516. if s.Message_ != nil {
  11517. return *s.Message_
  11518. }
  11519. return ""
  11520. }
  11521. // OrigErr always returns nil, satisfies awserr.Error interface.
  11522. func (s *InvalidHomeRegionException) OrigErr() error {
  11523. return nil
  11524. }
  11525. func (s *InvalidHomeRegionException) Error() string {
  11526. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11527. }
  11528. // Status code returns the HTTP status code for the request's response error.
  11529. func (s *InvalidHomeRegionException) StatusCode() int {
  11530. return s.RespMetadata.StatusCode
  11531. }
  11532. // RequestID returns the service's response RequestID for request.
  11533. func (s *InvalidHomeRegionException) RequestID() string {
  11534. return s.RespMetadata.RequestID
  11535. }
  11536. // This exception is thrown when the provided source S3 bucket is not valid
  11537. // for import.
  11538. type InvalidImportSourceException struct {
  11539. _ struct{} `type:"structure"`
  11540. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11541. Message_ *string `locationName:"message" type:"string"`
  11542. }
  11543. // String returns the string representation.
  11544. //
  11545. // API parameter values that are decorated as "sensitive" in the API will not
  11546. // be included in the string output. The member name will be present, but the
  11547. // value will be replaced with "sensitive".
  11548. func (s InvalidImportSourceException) String() string {
  11549. return awsutil.Prettify(s)
  11550. }
  11551. // GoString returns the string representation.
  11552. //
  11553. // API parameter values that are decorated as "sensitive" in the API will not
  11554. // be included in the string output. The member name will be present, but the
  11555. // value will be replaced with "sensitive".
  11556. func (s InvalidImportSourceException) GoString() string {
  11557. return s.String()
  11558. }
  11559. func newErrorInvalidImportSourceException(v protocol.ResponseMetadata) error {
  11560. return &InvalidImportSourceException{
  11561. RespMetadata: v,
  11562. }
  11563. }
  11564. // Code returns the exception type name.
  11565. func (s *InvalidImportSourceException) Code() string {
  11566. return "InvalidImportSourceException"
  11567. }
  11568. // Message returns the exception's message.
  11569. func (s *InvalidImportSourceException) Message() string {
  11570. if s.Message_ != nil {
  11571. return *s.Message_
  11572. }
  11573. return ""
  11574. }
  11575. // OrigErr always returns nil, satisfies awserr.Error interface.
  11576. func (s *InvalidImportSourceException) OrigErr() error {
  11577. return nil
  11578. }
  11579. func (s *InvalidImportSourceException) Error() string {
  11580. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11581. }
  11582. // Status code returns the HTTP status code for the request's response error.
  11583. func (s *InvalidImportSourceException) StatusCode() int {
  11584. return s.RespMetadata.StatusCode
  11585. }
  11586. // RequestID returns the service's response RequestID for request.
  11587. func (s *InvalidImportSourceException) RequestID() string {
  11588. return s.RespMetadata.RequestID
  11589. }
  11590. // The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
  11591. // or GetInsightSelectors request is not valid, or the specified insight type
  11592. // in the InsightSelectors statement is not a valid insight type.
  11593. type InvalidInsightSelectorsException struct {
  11594. _ struct{} `type:"structure"`
  11595. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11596. Message_ *string `locationName:"message" type:"string"`
  11597. }
  11598. // String returns the string representation.
  11599. //
  11600. // API parameter values that are decorated as "sensitive" in the API will not
  11601. // be included in the string output. The member name will be present, but the
  11602. // value will be replaced with "sensitive".
  11603. func (s InvalidInsightSelectorsException) String() string {
  11604. return awsutil.Prettify(s)
  11605. }
  11606. // GoString returns the string representation.
  11607. //
  11608. // API parameter values that are decorated as "sensitive" in the API will not
  11609. // be included in the string output. The member name will be present, but the
  11610. // value will be replaced with "sensitive".
  11611. func (s InvalidInsightSelectorsException) GoString() string {
  11612. return s.String()
  11613. }
  11614. func newErrorInvalidInsightSelectorsException(v protocol.ResponseMetadata) error {
  11615. return &InvalidInsightSelectorsException{
  11616. RespMetadata: v,
  11617. }
  11618. }
  11619. // Code returns the exception type name.
  11620. func (s *InvalidInsightSelectorsException) Code() string {
  11621. return "InvalidInsightSelectorsException"
  11622. }
  11623. // Message returns the exception's message.
  11624. func (s *InvalidInsightSelectorsException) Message() string {
  11625. if s.Message_ != nil {
  11626. return *s.Message_
  11627. }
  11628. return ""
  11629. }
  11630. // OrigErr always returns nil, satisfies awserr.Error interface.
  11631. func (s *InvalidInsightSelectorsException) OrigErr() error {
  11632. return nil
  11633. }
  11634. func (s *InvalidInsightSelectorsException) Error() string {
  11635. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11636. }
  11637. // Status code returns the HTTP status code for the request's response error.
  11638. func (s *InvalidInsightSelectorsException) StatusCode() int {
  11639. return s.RespMetadata.StatusCode
  11640. }
  11641. // RequestID returns the service's response RequestID for request.
  11642. func (s *InvalidInsightSelectorsException) RequestID() string {
  11643. return s.RespMetadata.RequestID
  11644. }
  11645. // This exception is thrown when the KMS key ARN is not valid.
  11646. type InvalidKmsKeyIdException struct {
  11647. _ struct{} `type:"structure"`
  11648. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11649. Message_ *string `locationName:"message" type:"string"`
  11650. }
  11651. // String returns the string representation.
  11652. //
  11653. // API parameter values that are decorated as "sensitive" in the API will not
  11654. // be included in the string output. The member name will be present, but the
  11655. // value will be replaced with "sensitive".
  11656. func (s InvalidKmsKeyIdException) String() string {
  11657. return awsutil.Prettify(s)
  11658. }
  11659. // GoString returns the string representation.
  11660. //
  11661. // API parameter values that are decorated as "sensitive" in the API will not
  11662. // be included in the string output. The member name will be present, but the
  11663. // value will be replaced with "sensitive".
  11664. func (s InvalidKmsKeyIdException) GoString() string {
  11665. return s.String()
  11666. }
  11667. func newErrorInvalidKmsKeyIdException(v protocol.ResponseMetadata) error {
  11668. return &InvalidKmsKeyIdException{
  11669. RespMetadata: v,
  11670. }
  11671. }
  11672. // Code returns the exception type name.
  11673. func (s *InvalidKmsKeyIdException) Code() string {
  11674. return "InvalidKmsKeyIdException"
  11675. }
  11676. // Message returns the exception's message.
  11677. func (s *InvalidKmsKeyIdException) Message() string {
  11678. if s.Message_ != nil {
  11679. return *s.Message_
  11680. }
  11681. return ""
  11682. }
  11683. // OrigErr always returns nil, satisfies awserr.Error interface.
  11684. func (s *InvalidKmsKeyIdException) OrigErr() error {
  11685. return nil
  11686. }
  11687. func (s *InvalidKmsKeyIdException) Error() string {
  11688. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11689. }
  11690. // Status code returns the HTTP status code for the request's response error.
  11691. func (s *InvalidKmsKeyIdException) StatusCode() int {
  11692. return s.RespMetadata.StatusCode
  11693. }
  11694. // RequestID returns the service's response RequestID for request.
  11695. func (s *InvalidKmsKeyIdException) RequestID() string {
  11696. return s.RespMetadata.RequestID
  11697. }
  11698. // Occurs when a lookup attribute is specified that is not valid.
  11699. type InvalidLookupAttributesException struct {
  11700. _ struct{} `type:"structure"`
  11701. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11702. Message_ *string `locationName:"message" type:"string"`
  11703. }
  11704. // String returns the string representation.
  11705. //
  11706. // API parameter values that are decorated as "sensitive" in the API will not
  11707. // be included in the string output. The member name will be present, but the
  11708. // value will be replaced with "sensitive".
  11709. func (s InvalidLookupAttributesException) String() string {
  11710. return awsutil.Prettify(s)
  11711. }
  11712. // GoString returns the string representation.
  11713. //
  11714. // API parameter values that are decorated as "sensitive" in the API will not
  11715. // be included in the string output. The member name will be present, but the
  11716. // value will be replaced with "sensitive".
  11717. func (s InvalidLookupAttributesException) GoString() string {
  11718. return s.String()
  11719. }
  11720. func newErrorInvalidLookupAttributesException(v protocol.ResponseMetadata) error {
  11721. return &InvalidLookupAttributesException{
  11722. RespMetadata: v,
  11723. }
  11724. }
  11725. // Code returns the exception type name.
  11726. func (s *InvalidLookupAttributesException) Code() string {
  11727. return "InvalidLookupAttributesException"
  11728. }
  11729. // Message returns the exception's message.
  11730. func (s *InvalidLookupAttributesException) Message() string {
  11731. if s.Message_ != nil {
  11732. return *s.Message_
  11733. }
  11734. return ""
  11735. }
  11736. // OrigErr always returns nil, satisfies awserr.Error interface.
  11737. func (s *InvalidLookupAttributesException) OrigErr() error {
  11738. return nil
  11739. }
  11740. func (s *InvalidLookupAttributesException) Error() string {
  11741. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11742. }
  11743. // Status code returns the HTTP status code for the request's response error.
  11744. func (s *InvalidLookupAttributesException) StatusCode() int {
  11745. return s.RespMetadata.StatusCode
  11746. }
  11747. // RequestID returns the service's response RequestID for request.
  11748. func (s *InvalidLookupAttributesException) RequestID() string {
  11749. return s.RespMetadata.RequestID
  11750. }
  11751. // This exception is thrown if the limit specified is not valid.
  11752. type InvalidMaxResultsException struct {
  11753. _ struct{} `type:"structure"`
  11754. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11755. Message_ *string `locationName:"message" type:"string"`
  11756. }
  11757. // String returns the string representation.
  11758. //
  11759. // API parameter values that are decorated as "sensitive" in the API will not
  11760. // be included in the string output. The member name will be present, but the
  11761. // value will be replaced with "sensitive".
  11762. func (s InvalidMaxResultsException) String() string {
  11763. return awsutil.Prettify(s)
  11764. }
  11765. // GoString returns the string representation.
  11766. //
  11767. // API parameter values that are decorated as "sensitive" in the API will not
  11768. // be included in the string output. The member name will be present, but the
  11769. // value will be replaced with "sensitive".
  11770. func (s InvalidMaxResultsException) GoString() string {
  11771. return s.String()
  11772. }
  11773. func newErrorInvalidMaxResultsException(v protocol.ResponseMetadata) error {
  11774. return &InvalidMaxResultsException{
  11775. RespMetadata: v,
  11776. }
  11777. }
  11778. // Code returns the exception type name.
  11779. func (s *InvalidMaxResultsException) Code() string {
  11780. return "InvalidMaxResultsException"
  11781. }
  11782. // Message returns the exception's message.
  11783. func (s *InvalidMaxResultsException) Message() string {
  11784. if s.Message_ != nil {
  11785. return *s.Message_
  11786. }
  11787. return ""
  11788. }
  11789. // OrigErr always returns nil, satisfies awserr.Error interface.
  11790. func (s *InvalidMaxResultsException) OrigErr() error {
  11791. return nil
  11792. }
  11793. func (s *InvalidMaxResultsException) Error() string {
  11794. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11795. }
  11796. // Status code returns the HTTP status code for the request's response error.
  11797. func (s *InvalidMaxResultsException) StatusCode() int {
  11798. return s.RespMetadata.StatusCode
  11799. }
  11800. // RequestID returns the service's response RequestID for request.
  11801. func (s *InvalidMaxResultsException) RequestID() string {
  11802. return s.RespMetadata.RequestID
  11803. }
  11804. // A token that is not valid, or a token that was previously used in a request
  11805. // with different parameters. This exception is thrown if the token is not valid.
  11806. type InvalidNextTokenException struct {
  11807. _ struct{} `type:"structure"`
  11808. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11809. Message_ *string `locationName:"message" type:"string"`
  11810. }
  11811. // String returns the string representation.
  11812. //
  11813. // API parameter values that are decorated as "sensitive" in the API will not
  11814. // be included in the string output. The member name will be present, but the
  11815. // value will be replaced with "sensitive".
  11816. func (s InvalidNextTokenException) String() string {
  11817. return awsutil.Prettify(s)
  11818. }
  11819. // GoString returns the string representation.
  11820. //
  11821. // API parameter values that are decorated as "sensitive" in the API will not
  11822. // be included in the string output. The member name will be present, but the
  11823. // value will be replaced with "sensitive".
  11824. func (s InvalidNextTokenException) GoString() string {
  11825. return s.String()
  11826. }
  11827. func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error {
  11828. return &InvalidNextTokenException{
  11829. RespMetadata: v,
  11830. }
  11831. }
  11832. // Code returns the exception type name.
  11833. func (s *InvalidNextTokenException) Code() string {
  11834. return "InvalidNextTokenException"
  11835. }
  11836. // Message returns the exception's message.
  11837. func (s *InvalidNextTokenException) Message() string {
  11838. if s.Message_ != nil {
  11839. return *s.Message_
  11840. }
  11841. return ""
  11842. }
  11843. // OrigErr always returns nil, satisfies awserr.Error interface.
  11844. func (s *InvalidNextTokenException) OrigErr() error {
  11845. return nil
  11846. }
  11847. func (s *InvalidNextTokenException) Error() string {
  11848. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11849. }
  11850. // Status code returns the HTTP status code for the request's response error.
  11851. func (s *InvalidNextTokenException) StatusCode() int {
  11852. return s.RespMetadata.StatusCode
  11853. }
  11854. // RequestID returns the service's response RequestID for request.
  11855. func (s *InvalidNextTokenException) RequestID() string {
  11856. return s.RespMetadata.RequestID
  11857. }
  11858. // This exception is thrown when the combination of parameters provided is not
  11859. // valid.
  11860. type InvalidParameterCombinationException struct {
  11861. _ struct{} `type:"structure"`
  11862. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11863. Message_ *string `locationName:"message" type:"string"`
  11864. }
  11865. // String returns the string representation.
  11866. //
  11867. // API parameter values that are decorated as "sensitive" in the API will not
  11868. // be included in the string output. The member name will be present, but the
  11869. // value will be replaced with "sensitive".
  11870. func (s InvalidParameterCombinationException) String() string {
  11871. return awsutil.Prettify(s)
  11872. }
  11873. // GoString returns the string representation.
  11874. //
  11875. // API parameter values that are decorated as "sensitive" in the API will not
  11876. // be included in the string output. The member name will be present, but the
  11877. // value will be replaced with "sensitive".
  11878. func (s InvalidParameterCombinationException) GoString() string {
  11879. return s.String()
  11880. }
  11881. func newErrorInvalidParameterCombinationException(v protocol.ResponseMetadata) error {
  11882. return &InvalidParameterCombinationException{
  11883. RespMetadata: v,
  11884. }
  11885. }
  11886. // Code returns the exception type name.
  11887. func (s *InvalidParameterCombinationException) Code() string {
  11888. return "InvalidParameterCombinationException"
  11889. }
  11890. // Message returns the exception's message.
  11891. func (s *InvalidParameterCombinationException) Message() string {
  11892. if s.Message_ != nil {
  11893. return *s.Message_
  11894. }
  11895. return ""
  11896. }
  11897. // OrigErr always returns nil, satisfies awserr.Error interface.
  11898. func (s *InvalidParameterCombinationException) OrigErr() error {
  11899. return nil
  11900. }
  11901. func (s *InvalidParameterCombinationException) Error() string {
  11902. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11903. }
  11904. // Status code returns the HTTP status code for the request's response error.
  11905. func (s *InvalidParameterCombinationException) StatusCode() int {
  11906. return s.RespMetadata.StatusCode
  11907. }
  11908. // RequestID returns the service's response RequestID for request.
  11909. func (s *InvalidParameterCombinationException) RequestID() string {
  11910. return s.RespMetadata.RequestID
  11911. }
  11912. // The request includes a parameter that is not valid.
  11913. type InvalidParameterException struct {
  11914. _ struct{} `type:"structure"`
  11915. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11916. Message_ *string `locationName:"message" type:"string"`
  11917. }
  11918. // String returns the string representation.
  11919. //
  11920. // API parameter values that are decorated as "sensitive" in the API will not
  11921. // be included in the string output. The member name will be present, but the
  11922. // value will be replaced with "sensitive".
  11923. func (s InvalidParameterException) String() string {
  11924. return awsutil.Prettify(s)
  11925. }
  11926. // GoString returns the string representation.
  11927. //
  11928. // API parameter values that are decorated as "sensitive" in the API will not
  11929. // be included in the string output. The member name will be present, but the
  11930. // value will be replaced with "sensitive".
  11931. func (s InvalidParameterException) GoString() string {
  11932. return s.String()
  11933. }
  11934. func newErrorInvalidParameterException(v protocol.ResponseMetadata) error {
  11935. return &InvalidParameterException{
  11936. RespMetadata: v,
  11937. }
  11938. }
  11939. // Code returns the exception type name.
  11940. func (s *InvalidParameterException) Code() string {
  11941. return "InvalidParameterException"
  11942. }
  11943. // Message returns the exception's message.
  11944. func (s *InvalidParameterException) Message() string {
  11945. if s.Message_ != nil {
  11946. return *s.Message_
  11947. }
  11948. return ""
  11949. }
  11950. // OrigErr always returns nil, satisfies awserr.Error interface.
  11951. func (s *InvalidParameterException) OrigErr() error {
  11952. return nil
  11953. }
  11954. func (s *InvalidParameterException) Error() string {
  11955. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  11956. }
  11957. // Status code returns the HTTP status code for the request's response error.
  11958. func (s *InvalidParameterException) StatusCode() int {
  11959. return s.RespMetadata.StatusCode
  11960. }
  11961. // RequestID returns the service's response RequestID for request.
  11962. func (s *InvalidParameterException) RequestID() string {
  11963. return s.RespMetadata.RequestID
  11964. }
  11965. // The query that was submitted has validation errors, or uses incorrect syntax
  11966. // or unsupported keywords. For more information about writing a query, see
  11967. // Create or edit a query (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html)
  11968. // in the CloudTrail User Guide.
  11969. type InvalidQueryStatementException struct {
  11970. _ struct{} `type:"structure"`
  11971. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  11972. Message_ *string `locationName:"message" type:"string"`
  11973. }
  11974. // String returns the string representation.
  11975. //
  11976. // API parameter values that are decorated as "sensitive" in the API will not
  11977. // be included in the string output. The member name will be present, but the
  11978. // value will be replaced with "sensitive".
  11979. func (s InvalidQueryStatementException) String() string {
  11980. return awsutil.Prettify(s)
  11981. }
  11982. // GoString returns the string representation.
  11983. //
  11984. // API parameter values that are decorated as "sensitive" in the API will not
  11985. // be included in the string output. The member name will be present, but the
  11986. // value will be replaced with "sensitive".
  11987. func (s InvalidQueryStatementException) GoString() string {
  11988. return s.String()
  11989. }
  11990. func newErrorInvalidQueryStatementException(v protocol.ResponseMetadata) error {
  11991. return &InvalidQueryStatementException{
  11992. RespMetadata: v,
  11993. }
  11994. }
  11995. // Code returns the exception type name.
  11996. func (s *InvalidQueryStatementException) Code() string {
  11997. return "InvalidQueryStatementException"
  11998. }
  11999. // Message returns the exception's message.
  12000. func (s *InvalidQueryStatementException) Message() string {
  12001. if s.Message_ != nil {
  12002. return *s.Message_
  12003. }
  12004. return ""
  12005. }
  12006. // OrigErr always returns nil, satisfies awserr.Error interface.
  12007. func (s *InvalidQueryStatementException) OrigErr() error {
  12008. return nil
  12009. }
  12010. func (s *InvalidQueryStatementException) Error() string {
  12011. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12012. }
  12013. // Status code returns the HTTP status code for the request's response error.
  12014. func (s *InvalidQueryStatementException) StatusCode() int {
  12015. return s.RespMetadata.StatusCode
  12016. }
  12017. // RequestID returns the service's response RequestID for request.
  12018. func (s *InvalidQueryStatementException) RequestID() string {
  12019. return s.RespMetadata.RequestID
  12020. }
  12021. // The query status is not valid for the operation.
  12022. type InvalidQueryStatusException struct {
  12023. _ struct{} `type:"structure"`
  12024. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12025. Message_ *string `locationName:"message" type:"string"`
  12026. }
  12027. // String returns the string representation.
  12028. //
  12029. // API parameter values that are decorated as "sensitive" in the API will not
  12030. // be included in the string output. The member name will be present, but the
  12031. // value will be replaced with "sensitive".
  12032. func (s InvalidQueryStatusException) String() string {
  12033. return awsutil.Prettify(s)
  12034. }
  12035. // GoString 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 InvalidQueryStatusException) GoString() string {
  12041. return s.String()
  12042. }
  12043. func newErrorInvalidQueryStatusException(v protocol.ResponseMetadata) error {
  12044. return &InvalidQueryStatusException{
  12045. RespMetadata: v,
  12046. }
  12047. }
  12048. // Code returns the exception type name.
  12049. func (s *InvalidQueryStatusException) Code() string {
  12050. return "InvalidQueryStatusException"
  12051. }
  12052. // Message returns the exception's message.
  12053. func (s *InvalidQueryStatusException) Message() string {
  12054. if s.Message_ != nil {
  12055. return *s.Message_
  12056. }
  12057. return ""
  12058. }
  12059. // OrigErr always returns nil, satisfies awserr.Error interface.
  12060. func (s *InvalidQueryStatusException) OrigErr() error {
  12061. return nil
  12062. }
  12063. func (s *InvalidQueryStatusException) Error() string {
  12064. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12065. }
  12066. // Status code returns the HTTP status code for the request's response error.
  12067. func (s *InvalidQueryStatusException) StatusCode() int {
  12068. return s.RespMetadata.StatusCode
  12069. }
  12070. // RequestID returns the service's response RequestID for request.
  12071. func (s *InvalidQueryStatusException) RequestID() string {
  12072. return s.RespMetadata.RequestID
  12073. }
  12074. // This exception is thrown when the provided S3 bucket name is not valid.
  12075. type InvalidS3BucketNameException struct {
  12076. _ struct{} `type:"structure"`
  12077. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12078. Message_ *string `locationName:"message" type:"string"`
  12079. }
  12080. // String returns the string representation.
  12081. //
  12082. // API parameter values that are decorated as "sensitive" in the API will not
  12083. // be included in the string output. The member name will be present, but the
  12084. // value will be replaced with "sensitive".
  12085. func (s InvalidS3BucketNameException) String() string {
  12086. return awsutil.Prettify(s)
  12087. }
  12088. // GoString returns the string representation.
  12089. //
  12090. // API parameter values that are decorated as "sensitive" in the API will not
  12091. // be included in the string output. The member name will be present, but the
  12092. // value will be replaced with "sensitive".
  12093. func (s InvalidS3BucketNameException) GoString() string {
  12094. return s.String()
  12095. }
  12096. func newErrorInvalidS3BucketNameException(v protocol.ResponseMetadata) error {
  12097. return &InvalidS3BucketNameException{
  12098. RespMetadata: v,
  12099. }
  12100. }
  12101. // Code returns the exception type name.
  12102. func (s *InvalidS3BucketNameException) Code() string {
  12103. return "InvalidS3BucketNameException"
  12104. }
  12105. // Message returns the exception's message.
  12106. func (s *InvalidS3BucketNameException) Message() string {
  12107. if s.Message_ != nil {
  12108. return *s.Message_
  12109. }
  12110. return ""
  12111. }
  12112. // OrigErr always returns nil, satisfies awserr.Error interface.
  12113. func (s *InvalidS3BucketNameException) OrigErr() error {
  12114. return nil
  12115. }
  12116. func (s *InvalidS3BucketNameException) Error() string {
  12117. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12118. }
  12119. // Status code returns the HTTP status code for the request's response error.
  12120. func (s *InvalidS3BucketNameException) StatusCode() int {
  12121. return s.RespMetadata.StatusCode
  12122. }
  12123. // RequestID returns the service's response RequestID for request.
  12124. func (s *InvalidS3BucketNameException) RequestID() string {
  12125. return s.RespMetadata.RequestID
  12126. }
  12127. // This exception is thrown when the provided S3 prefix is not valid.
  12128. type InvalidS3PrefixException struct {
  12129. _ struct{} `type:"structure"`
  12130. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12131. Message_ *string `locationName:"message" type:"string"`
  12132. }
  12133. // String returns the string representation.
  12134. //
  12135. // API parameter values that are decorated as "sensitive" in the API will not
  12136. // be included in the string output. The member name will be present, but the
  12137. // value will be replaced with "sensitive".
  12138. func (s InvalidS3PrefixException) String() string {
  12139. return awsutil.Prettify(s)
  12140. }
  12141. // GoString returns the string representation.
  12142. //
  12143. // API parameter values that are decorated as "sensitive" in the API will not
  12144. // be included in the string output. The member name will be present, but the
  12145. // value will be replaced with "sensitive".
  12146. func (s InvalidS3PrefixException) GoString() string {
  12147. return s.String()
  12148. }
  12149. func newErrorInvalidS3PrefixException(v protocol.ResponseMetadata) error {
  12150. return &InvalidS3PrefixException{
  12151. RespMetadata: v,
  12152. }
  12153. }
  12154. // Code returns the exception type name.
  12155. func (s *InvalidS3PrefixException) Code() string {
  12156. return "InvalidS3PrefixException"
  12157. }
  12158. // Message returns the exception's message.
  12159. func (s *InvalidS3PrefixException) Message() string {
  12160. if s.Message_ != nil {
  12161. return *s.Message_
  12162. }
  12163. return ""
  12164. }
  12165. // OrigErr always returns nil, satisfies awserr.Error interface.
  12166. func (s *InvalidS3PrefixException) OrigErr() error {
  12167. return nil
  12168. }
  12169. func (s *InvalidS3PrefixException) Error() string {
  12170. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12171. }
  12172. // Status code returns the HTTP status code for the request's response error.
  12173. func (s *InvalidS3PrefixException) StatusCode() int {
  12174. return s.RespMetadata.StatusCode
  12175. }
  12176. // RequestID returns the service's response RequestID for request.
  12177. func (s *InvalidS3PrefixException) RequestID() string {
  12178. return s.RespMetadata.RequestID
  12179. }
  12180. // This exception is thrown when the provided SNS topic name is not valid.
  12181. type InvalidSnsTopicNameException struct {
  12182. _ struct{} `type:"structure"`
  12183. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12184. Message_ *string `locationName:"message" type:"string"`
  12185. }
  12186. // String returns the string representation.
  12187. //
  12188. // API parameter values that are decorated as "sensitive" in the API will not
  12189. // be included in the string output. The member name will be present, but the
  12190. // value will be replaced with "sensitive".
  12191. func (s InvalidSnsTopicNameException) String() string {
  12192. return awsutil.Prettify(s)
  12193. }
  12194. // GoString returns the string representation.
  12195. //
  12196. // API parameter values that are decorated as "sensitive" in the API will not
  12197. // be included in the string output. The member name will be present, but the
  12198. // value will be replaced with "sensitive".
  12199. func (s InvalidSnsTopicNameException) GoString() string {
  12200. return s.String()
  12201. }
  12202. func newErrorInvalidSnsTopicNameException(v protocol.ResponseMetadata) error {
  12203. return &InvalidSnsTopicNameException{
  12204. RespMetadata: v,
  12205. }
  12206. }
  12207. // Code returns the exception type name.
  12208. func (s *InvalidSnsTopicNameException) Code() string {
  12209. return "InvalidSnsTopicNameException"
  12210. }
  12211. // Message returns the exception's message.
  12212. func (s *InvalidSnsTopicNameException) Message() string {
  12213. if s.Message_ != nil {
  12214. return *s.Message_
  12215. }
  12216. return ""
  12217. }
  12218. // OrigErr always returns nil, satisfies awserr.Error interface.
  12219. func (s *InvalidSnsTopicNameException) OrigErr() error {
  12220. return nil
  12221. }
  12222. func (s *InvalidSnsTopicNameException) Error() string {
  12223. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12224. }
  12225. // Status code returns the HTTP status code for the request's response error.
  12226. func (s *InvalidSnsTopicNameException) StatusCode() int {
  12227. return s.RespMetadata.StatusCode
  12228. }
  12229. // RequestID returns the service's response RequestID for request.
  12230. func (s *InvalidSnsTopicNameException) RequestID() string {
  12231. return s.RespMetadata.RequestID
  12232. }
  12233. // This exception is thrown when the specified value of Source is not valid.
  12234. type InvalidSourceException struct {
  12235. _ struct{} `type:"structure"`
  12236. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12237. Message_ *string `locationName:"message" type:"string"`
  12238. }
  12239. // String returns the string representation.
  12240. //
  12241. // API parameter values that are decorated as "sensitive" in the API will not
  12242. // be included in the string output. The member name will be present, but the
  12243. // value will be replaced with "sensitive".
  12244. func (s InvalidSourceException) String() string {
  12245. return awsutil.Prettify(s)
  12246. }
  12247. // GoString returns the string representation.
  12248. //
  12249. // API parameter values that are decorated as "sensitive" in the API will not
  12250. // be included in the string output. The member name will be present, but the
  12251. // value will be replaced with "sensitive".
  12252. func (s InvalidSourceException) GoString() string {
  12253. return s.String()
  12254. }
  12255. func newErrorInvalidSourceException(v protocol.ResponseMetadata) error {
  12256. return &InvalidSourceException{
  12257. RespMetadata: v,
  12258. }
  12259. }
  12260. // Code returns the exception type name.
  12261. func (s *InvalidSourceException) Code() string {
  12262. return "InvalidSourceException"
  12263. }
  12264. // Message returns the exception's message.
  12265. func (s *InvalidSourceException) Message() string {
  12266. if s.Message_ != nil {
  12267. return *s.Message_
  12268. }
  12269. return ""
  12270. }
  12271. // OrigErr always returns nil, satisfies awserr.Error interface.
  12272. func (s *InvalidSourceException) OrigErr() error {
  12273. return nil
  12274. }
  12275. func (s *InvalidSourceException) Error() string {
  12276. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12277. }
  12278. // Status code returns the HTTP status code for the request's response error.
  12279. func (s *InvalidSourceException) StatusCode() int {
  12280. return s.RespMetadata.StatusCode
  12281. }
  12282. // RequestID returns the service's response RequestID for request.
  12283. func (s *InvalidSourceException) RequestID() string {
  12284. return s.RespMetadata.RequestID
  12285. }
  12286. // This exception is thrown when the specified tag key or values are not valid.
  12287. // It can also occur if there are duplicate tags or too many tags on the resource.
  12288. type InvalidTagParameterException struct {
  12289. _ struct{} `type:"structure"`
  12290. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12291. Message_ *string `locationName:"message" type:"string"`
  12292. }
  12293. // String returns the string representation.
  12294. //
  12295. // API parameter values that are decorated as "sensitive" in the API will not
  12296. // be included in the string output. The member name will be present, but the
  12297. // value will be replaced with "sensitive".
  12298. func (s InvalidTagParameterException) String() string {
  12299. return awsutil.Prettify(s)
  12300. }
  12301. // GoString returns the string representation.
  12302. //
  12303. // API parameter values that are decorated as "sensitive" in the API will not
  12304. // be included in the string output. The member name will be present, but the
  12305. // value will be replaced with "sensitive".
  12306. func (s InvalidTagParameterException) GoString() string {
  12307. return s.String()
  12308. }
  12309. func newErrorInvalidTagParameterException(v protocol.ResponseMetadata) error {
  12310. return &InvalidTagParameterException{
  12311. RespMetadata: v,
  12312. }
  12313. }
  12314. // Code returns the exception type name.
  12315. func (s *InvalidTagParameterException) Code() string {
  12316. return "InvalidTagParameterException"
  12317. }
  12318. // Message returns the exception's message.
  12319. func (s *InvalidTagParameterException) Message() string {
  12320. if s.Message_ != nil {
  12321. return *s.Message_
  12322. }
  12323. return ""
  12324. }
  12325. // OrigErr always returns nil, satisfies awserr.Error interface.
  12326. func (s *InvalidTagParameterException) OrigErr() error {
  12327. return nil
  12328. }
  12329. func (s *InvalidTagParameterException) Error() string {
  12330. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12331. }
  12332. // Status code returns the HTTP status code for the request's response error.
  12333. func (s *InvalidTagParameterException) StatusCode() int {
  12334. return s.RespMetadata.StatusCode
  12335. }
  12336. // RequestID returns the service's response RequestID for request.
  12337. func (s *InvalidTagParameterException) RequestID() string {
  12338. return s.RespMetadata.RequestID
  12339. }
  12340. // Occurs if the timestamp values are not valid. Either the start time occurs
  12341. // after the end time, or the time range is outside the range of possible values.
  12342. type InvalidTimeRangeException struct {
  12343. _ struct{} `type:"structure"`
  12344. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12345. Message_ *string `locationName:"message" type:"string"`
  12346. }
  12347. // String returns the string representation.
  12348. //
  12349. // API parameter values that are decorated as "sensitive" in the API will not
  12350. // be included in the string output. The member name will be present, but the
  12351. // value will be replaced with "sensitive".
  12352. func (s InvalidTimeRangeException) String() string {
  12353. return awsutil.Prettify(s)
  12354. }
  12355. // GoString returns the string representation.
  12356. //
  12357. // API parameter values that are decorated as "sensitive" in the API will not
  12358. // be included in the string output. The member name will be present, but the
  12359. // value will be replaced with "sensitive".
  12360. func (s InvalidTimeRangeException) GoString() string {
  12361. return s.String()
  12362. }
  12363. func newErrorInvalidTimeRangeException(v protocol.ResponseMetadata) error {
  12364. return &InvalidTimeRangeException{
  12365. RespMetadata: v,
  12366. }
  12367. }
  12368. // Code returns the exception type name.
  12369. func (s *InvalidTimeRangeException) Code() string {
  12370. return "InvalidTimeRangeException"
  12371. }
  12372. // Message returns the exception's message.
  12373. func (s *InvalidTimeRangeException) Message() string {
  12374. if s.Message_ != nil {
  12375. return *s.Message_
  12376. }
  12377. return ""
  12378. }
  12379. // OrigErr always returns nil, satisfies awserr.Error interface.
  12380. func (s *InvalidTimeRangeException) OrigErr() error {
  12381. return nil
  12382. }
  12383. func (s *InvalidTimeRangeException) Error() string {
  12384. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12385. }
  12386. // Status code returns the HTTP status code for the request's response error.
  12387. func (s *InvalidTimeRangeException) StatusCode() int {
  12388. return s.RespMetadata.StatusCode
  12389. }
  12390. // RequestID returns the service's response RequestID for request.
  12391. func (s *InvalidTimeRangeException) RequestID() string {
  12392. return s.RespMetadata.RequestID
  12393. }
  12394. // Reserved for future use.
  12395. type InvalidTokenException struct {
  12396. _ struct{} `type:"structure"`
  12397. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12398. Message_ *string `locationName:"message" type:"string"`
  12399. }
  12400. // String returns the string representation.
  12401. //
  12402. // API parameter values that are decorated as "sensitive" in the API will not
  12403. // be included in the string output. The member name will be present, but the
  12404. // value will be replaced with "sensitive".
  12405. func (s InvalidTokenException) String() string {
  12406. return awsutil.Prettify(s)
  12407. }
  12408. // GoString returns the string representation.
  12409. //
  12410. // API parameter values that are decorated as "sensitive" in the API will not
  12411. // be included in the string output. The member name will be present, but the
  12412. // value will be replaced with "sensitive".
  12413. func (s InvalidTokenException) GoString() string {
  12414. return s.String()
  12415. }
  12416. func newErrorInvalidTokenException(v protocol.ResponseMetadata) error {
  12417. return &InvalidTokenException{
  12418. RespMetadata: v,
  12419. }
  12420. }
  12421. // Code returns the exception type name.
  12422. func (s *InvalidTokenException) Code() string {
  12423. return "InvalidTokenException"
  12424. }
  12425. // Message returns the exception's message.
  12426. func (s *InvalidTokenException) Message() string {
  12427. if s.Message_ != nil {
  12428. return *s.Message_
  12429. }
  12430. return ""
  12431. }
  12432. // OrigErr always returns nil, satisfies awserr.Error interface.
  12433. func (s *InvalidTokenException) OrigErr() error {
  12434. return nil
  12435. }
  12436. func (s *InvalidTokenException) Error() string {
  12437. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12438. }
  12439. // Status code returns the HTTP status code for the request's response error.
  12440. func (s *InvalidTokenException) StatusCode() int {
  12441. return s.RespMetadata.StatusCode
  12442. }
  12443. // RequestID returns the service's response RequestID for request.
  12444. func (s *InvalidTokenException) RequestID() string {
  12445. return s.RespMetadata.RequestID
  12446. }
  12447. // This exception is thrown when the provided trail name is not valid. Trail
  12448. // names must meet the following requirements:
  12449. //
  12450. // - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  12451. // (_), or dashes (-)
  12452. //
  12453. // - Start with a letter or number, and end with a letter or number
  12454. //
  12455. // - Be between 3 and 128 characters
  12456. //
  12457. // - Have no adjacent periods, underscores or dashes. Names like my-_namespace
  12458. // and my--namespace are not valid.
  12459. //
  12460. // - Not be in IP address format (for example, 192.168.5.4)
  12461. type InvalidTrailNameException struct {
  12462. _ struct{} `type:"structure"`
  12463. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12464. Message_ *string `locationName:"message" type:"string"`
  12465. }
  12466. // String returns the string representation.
  12467. //
  12468. // API parameter values that are decorated as "sensitive" in the API will not
  12469. // be included in the string output. The member name will be present, but the
  12470. // value will be replaced with "sensitive".
  12471. func (s InvalidTrailNameException) String() string {
  12472. return awsutil.Prettify(s)
  12473. }
  12474. // GoString returns the string representation.
  12475. //
  12476. // API parameter values that are decorated as "sensitive" in the API will not
  12477. // be included in the string output. The member name will be present, but the
  12478. // value will be replaced with "sensitive".
  12479. func (s InvalidTrailNameException) GoString() string {
  12480. return s.String()
  12481. }
  12482. func newErrorInvalidTrailNameException(v protocol.ResponseMetadata) error {
  12483. return &InvalidTrailNameException{
  12484. RespMetadata: v,
  12485. }
  12486. }
  12487. // Code returns the exception type name.
  12488. func (s *InvalidTrailNameException) Code() string {
  12489. return "InvalidTrailNameException"
  12490. }
  12491. // Message returns the exception's message.
  12492. func (s *InvalidTrailNameException) Message() string {
  12493. if s.Message_ != nil {
  12494. return *s.Message_
  12495. }
  12496. return ""
  12497. }
  12498. // OrigErr always returns nil, satisfies awserr.Error interface.
  12499. func (s *InvalidTrailNameException) OrigErr() error {
  12500. return nil
  12501. }
  12502. func (s *InvalidTrailNameException) Error() string {
  12503. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12504. }
  12505. // Status code returns the HTTP status code for the request's response error.
  12506. func (s *InvalidTrailNameException) StatusCode() int {
  12507. return s.RespMetadata.StatusCode
  12508. }
  12509. // RequestID returns the service's response RequestID for request.
  12510. func (s *InvalidTrailNameException) RequestID() string {
  12511. return s.RespMetadata.RequestID
  12512. }
  12513. // This exception is thrown when there is an issue with the specified KMS key
  12514. // and the trail or event data store can't be updated.
  12515. type KmsException struct {
  12516. _ struct{} `type:"structure"`
  12517. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12518. Message_ *string `locationName:"message" type:"string"`
  12519. }
  12520. // String returns the string representation.
  12521. //
  12522. // API parameter values that are decorated as "sensitive" in the API will not
  12523. // be included in the string output. The member name will be present, but the
  12524. // value will be replaced with "sensitive".
  12525. func (s KmsException) String() string {
  12526. return awsutil.Prettify(s)
  12527. }
  12528. // GoString returns the string representation.
  12529. //
  12530. // API parameter values that are decorated as "sensitive" in the API will not
  12531. // be included in the string output. The member name will be present, but the
  12532. // value will be replaced with "sensitive".
  12533. func (s KmsException) GoString() string {
  12534. return s.String()
  12535. }
  12536. func newErrorKmsException(v protocol.ResponseMetadata) error {
  12537. return &KmsException{
  12538. RespMetadata: v,
  12539. }
  12540. }
  12541. // Code returns the exception type name.
  12542. func (s *KmsException) Code() string {
  12543. return "KmsException"
  12544. }
  12545. // Message returns the exception's message.
  12546. func (s *KmsException) Message() string {
  12547. if s.Message_ != nil {
  12548. return *s.Message_
  12549. }
  12550. return ""
  12551. }
  12552. // OrigErr always returns nil, satisfies awserr.Error interface.
  12553. func (s *KmsException) OrigErr() error {
  12554. return nil
  12555. }
  12556. func (s *KmsException) Error() string {
  12557. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12558. }
  12559. // Status code returns the HTTP status code for the request's response error.
  12560. func (s *KmsException) StatusCode() int {
  12561. return s.RespMetadata.StatusCode
  12562. }
  12563. // RequestID returns the service's response RequestID for request.
  12564. func (s *KmsException) RequestID() string {
  12565. return s.RespMetadata.RequestID
  12566. }
  12567. // This exception is no longer in use.
  12568. //
  12569. // Deprecated: KmsKeyDisabledException has been deprecated
  12570. type KmsKeyDisabledException struct {
  12571. _ struct{} `deprecated:"true" type:"structure"`
  12572. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12573. Message_ *string `locationName:"message" type:"string"`
  12574. }
  12575. // String returns the string representation.
  12576. //
  12577. // API parameter values that are decorated as "sensitive" in the API will not
  12578. // be included in the string output. The member name will be present, but the
  12579. // value will be replaced with "sensitive".
  12580. func (s KmsKeyDisabledException) String() string {
  12581. return awsutil.Prettify(s)
  12582. }
  12583. // GoString returns the string representation.
  12584. //
  12585. // API parameter values that are decorated as "sensitive" in the API will not
  12586. // be included in the string output. The member name will be present, but the
  12587. // value will be replaced with "sensitive".
  12588. func (s KmsKeyDisabledException) GoString() string {
  12589. return s.String()
  12590. }
  12591. func newErrorKmsKeyDisabledException(v protocol.ResponseMetadata) error {
  12592. return &KmsKeyDisabledException{
  12593. RespMetadata: v,
  12594. }
  12595. }
  12596. // Code returns the exception type name.
  12597. func (s *KmsKeyDisabledException) Code() string {
  12598. return "KmsKeyDisabledException"
  12599. }
  12600. // Message returns the exception's message.
  12601. func (s *KmsKeyDisabledException) Message() string {
  12602. if s.Message_ != nil {
  12603. return *s.Message_
  12604. }
  12605. return ""
  12606. }
  12607. // OrigErr always returns nil, satisfies awserr.Error interface.
  12608. func (s *KmsKeyDisabledException) OrigErr() error {
  12609. return nil
  12610. }
  12611. func (s *KmsKeyDisabledException) Error() string {
  12612. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12613. }
  12614. // Status code returns the HTTP status code for the request's response error.
  12615. func (s *KmsKeyDisabledException) StatusCode() int {
  12616. return s.RespMetadata.StatusCode
  12617. }
  12618. // RequestID returns the service's response RequestID for request.
  12619. func (s *KmsKeyDisabledException) RequestID() string {
  12620. return s.RespMetadata.RequestID
  12621. }
  12622. // This exception is thrown when the KMS key does not exist, when the S3 bucket
  12623. // and the KMS key are not in the same region, or when the KMS key associated
  12624. // with the Amazon SNS topic either does not exist or is not in the same region.
  12625. type KmsKeyNotFoundException struct {
  12626. _ struct{} `type:"structure"`
  12627. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  12628. Message_ *string `locationName:"message" type:"string"`
  12629. }
  12630. // String returns the string representation.
  12631. //
  12632. // API parameter values that are decorated as "sensitive" in the API will not
  12633. // be included in the string output. The member name will be present, but the
  12634. // value will be replaced with "sensitive".
  12635. func (s KmsKeyNotFoundException) String() string {
  12636. return awsutil.Prettify(s)
  12637. }
  12638. // GoString returns the string representation.
  12639. //
  12640. // API parameter values that are decorated as "sensitive" in the API will not
  12641. // be included in the string output. The member name will be present, but the
  12642. // value will be replaced with "sensitive".
  12643. func (s KmsKeyNotFoundException) GoString() string {
  12644. return s.String()
  12645. }
  12646. func newErrorKmsKeyNotFoundException(v protocol.ResponseMetadata) error {
  12647. return &KmsKeyNotFoundException{
  12648. RespMetadata: v,
  12649. }
  12650. }
  12651. // Code returns the exception type name.
  12652. func (s *KmsKeyNotFoundException) Code() string {
  12653. return "KmsKeyNotFoundException"
  12654. }
  12655. // Message returns the exception's message.
  12656. func (s *KmsKeyNotFoundException) Message() string {
  12657. if s.Message_ != nil {
  12658. return *s.Message_
  12659. }
  12660. return ""
  12661. }
  12662. // OrigErr always returns nil, satisfies awserr.Error interface.
  12663. func (s *KmsKeyNotFoundException) OrigErr() error {
  12664. return nil
  12665. }
  12666. func (s *KmsKeyNotFoundException) Error() string {
  12667. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  12668. }
  12669. // Status code returns the HTTP status code for the request's response error.
  12670. func (s *KmsKeyNotFoundException) StatusCode() int {
  12671. return s.RespMetadata.StatusCode
  12672. }
  12673. // RequestID returns the service's response RequestID for request.
  12674. func (s *KmsKeyNotFoundException) RequestID() string {
  12675. return s.RespMetadata.RequestID
  12676. }
  12677. type ListChannelsInput struct {
  12678. _ struct{} `type:"structure"`
  12679. // The maximum number of CloudTrail channels to display on a single page.
  12680. MaxResults *int64 `min:"1" type:"integer"`
  12681. // The token to use to get the next page of results after a previous API call.
  12682. // This token must be passed in with the same parameters that were specified
  12683. // in the original call. For example, if the original call specified an AttributeKey
  12684. // of 'Username' with a value of 'root', the call with NextToken should include
  12685. // those same parameters.
  12686. NextToken *string `min:"4" type:"string"`
  12687. }
  12688. // String returns the string representation.
  12689. //
  12690. // API parameter values that are decorated as "sensitive" in the API will not
  12691. // be included in the string output. The member name will be present, but the
  12692. // value will be replaced with "sensitive".
  12693. func (s ListChannelsInput) String() string {
  12694. return awsutil.Prettify(s)
  12695. }
  12696. // GoString returns the string representation.
  12697. //
  12698. // API parameter values that are decorated as "sensitive" in the API will not
  12699. // be included in the string output. The member name will be present, but the
  12700. // value will be replaced with "sensitive".
  12701. func (s ListChannelsInput) GoString() string {
  12702. return s.String()
  12703. }
  12704. // Validate inspects the fields of the type to determine if they are valid.
  12705. func (s *ListChannelsInput) Validate() error {
  12706. invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"}
  12707. if s.MaxResults != nil && *s.MaxResults < 1 {
  12708. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  12709. }
  12710. if s.NextToken != nil && len(*s.NextToken) < 4 {
  12711. invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
  12712. }
  12713. if invalidParams.Len() > 0 {
  12714. return invalidParams
  12715. }
  12716. return nil
  12717. }
  12718. // SetMaxResults sets the MaxResults field's value.
  12719. func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput {
  12720. s.MaxResults = &v
  12721. return s
  12722. }
  12723. // SetNextToken sets the NextToken field's value.
  12724. func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput {
  12725. s.NextToken = &v
  12726. return s
  12727. }
  12728. type ListChannelsOutput struct {
  12729. _ struct{} `type:"structure"`
  12730. // The list of channels in the account.
  12731. Channels []*Channel `type:"list"`
  12732. // The token to use to get the next page of results after a previous API call.
  12733. NextToken *string `min:"4" type:"string"`
  12734. }
  12735. // String returns the string representation.
  12736. //
  12737. // API parameter values that are decorated as "sensitive" in the API will not
  12738. // be included in the string output. The member name will be present, but the
  12739. // value will be replaced with "sensitive".
  12740. func (s ListChannelsOutput) String() string {
  12741. return awsutil.Prettify(s)
  12742. }
  12743. // GoString returns the string representation.
  12744. //
  12745. // API parameter values that are decorated as "sensitive" in the API will not
  12746. // be included in the string output. The member name will be present, but the
  12747. // value will be replaced with "sensitive".
  12748. func (s ListChannelsOutput) GoString() string {
  12749. return s.String()
  12750. }
  12751. // SetChannels sets the Channels field's value.
  12752. func (s *ListChannelsOutput) SetChannels(v []*Channel) *ListChannelsOutput {
  12753. s.Channels = v
  12754. return s
  12755. }
  12756. // SetNextToken sets the NextToken field's value.
  12757. func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput {
  12758. s.NextToken = &v
  12759. return s
  12760. }
  12761. type ListEventDataStoresInput struct {
  12762. _ struct{} `type:"structure"`
  12763. // The maximum number of event data stores to display on a single page.
  12764. MaxResults *int64 `min:"1" type:"integer"`
  12765. // A token you can use to get the next page of event data store results.
  12766. NextToken *string `min:"4" type:"string"`
  12767. }
  12768. // String returns the string representation.
  12769. //
  12770. // API parameter values that are decorated as "sensitive" in the API will not
  12771. // be included in the string output. The member name will be present, but the
  12772. // value will be replaced with "sensitive".
  12773. func (s ListEventDataStoresInput) String() string {
  12774. return awsutil.Prettify(s)
  12775. }
  12776. // GoString returns the string representation.
  12777. //
  12778. // API parameter values that are decorated as "sensitive" in the API will not
  12779. // be included in the string output. The member name will be present, but the
  12780. // value will be replaced with "sensitive".
  12781. func (s ListEventDataStoresInput) GoString() string {
  12782. return s.String()
  12783. }
  12784. // Validate inspects the fields of the type to determine if they are valid.
  12785. func (s *ListEventDataStoresInput) Validate() error {
  12786. invalidParams := request.ErrInvalidParams{Context: "ListEventDataStoresInput"}
  12787. if s.MaxResults != nil && *s.MaxResults < 1 {
  12788. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  12789. }
  12790. if s.NextToken != nil && len(*s.NextToken) < 4 {
  12791. invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
  12792. }
  12793. if invalidParams.Len() > 0 {
  12794. return invalidParams
  12795. }
  12796. return nil
  12797. }
  12798. // SetMaxResults sets the MaxResults field's value.
  12799. func (s *ListEventDataStoresInput) SetMaxResults(v int64) *ListEventDataStoresInput {
  12800. s.MaxResults = &v
  12801. return s
  12802. }
  12803. // SetNextToken sets the NextToken field's value.
  12804. func (s *ListEventDataStoresInput) SetNextToken(v string) *ListEventDataStoresInput {
  12805. s.NextToken = &v
  12806. return s
  12807. }
  12808. type ListEventDataStoresOutput struct {
  12809. _ struct{} `type:"structure"`
  12810. // Contains information about event data stores in the account, in the current
  12811. // region.
  12812. EventDataStores []*EventDataStore `type:"list"`
  12813. // A token you can use to get the next page of results.
  12814. NextToken *string `min:"4" type:"string"`
  12815. }
  12816. // String returns the string representation.
  12817. //
  12818. // API parameter values that are decorated as "sensitive" in the API will not
  12819. // be included in the string output. The member name will be present, but the
  12820. // value will be replaced with "sensitive".
  12821. func (s ListEventDataStoresOutput) String() string {
  12822. return awsutil.Prettify(s)
  12823. }
  12824. // GoString returns the string representation.
  12825. //
  12826. // API parameter values that are decorated as "sensitive" in the API will not
  12827. // be included in the string output. The member name will be present, but the
  12828. // value will be replaced with "sensitive".
  12829. func (s ListEventDataStoresOutput) GoString() string {
  12830. return s.String()
  12831. }
  12832. // SetEventDataStores sets the EventDataStores field's value.
  12833. func (s *ListEventDataStoresOutput) SetEventDataStores(v []*EventDataStore) *ListEventDataStoresOutput {
  12834. s.EventDataStores = v
  12835. return s
  12836. }
  12837. // SetNextToken sets the NextToken field's value.
  12838. func (s *ListEventDataStoresOutput) SetNextToken(v string) *ListEventDataStoresOutput {
  12839. s.NextToken = &v
  12840. return s
  12841. }
  12842. type ListImportFailuresInput struct {
  12843. _ struct{} `type:"structure"`
  12844. // The ID of the import.
  12845. //
  12846. // ImportId is a required field
  12847. ImportId *string `min:"36" type:"string" required:"true"`
  12848. // The maximum number of failures to display on a single page.
  12849. MaxResults *int64 `min:"1" type:"integer"`
  12850. // A token you can use to get the next page of import failures.
  12851. NextToken *string `min:"4" type:"string"`
  12852. }
  12853. // String returns the string representation.
  12854. //
  12855. // API parameter values that are decorated as "sensitive" in the API will not
  12856. // be included in the string output. The member name will be present, but the
  12857. // value will be replaced with "sensitive".
  12858. func (s ListImportFailuresInput) String() string {
  12859. return awsutil.Prettify(s)
  12860. }
  12861. // GoString returns the string representation.
  12862. //
  12863. // API parameter values that are decorated as "sensitive" in the API will not
  12864. // be included in the string output. The member name will be present, but the
  12865. // value will be replaced with "sensitive".
  12866. func (s ListImportFailuresInput) GoString() string {
  12867. return s.String()
  12868. }
  12869. // Validate inspects the fields of the type to determine if they are valid.
  12870. func (s *ListImportFailuresInput) Validate() error {
  12871. invalidParams := request.ErrInvalidParams{Context: "ListImportFailuresInput"}
  12872. if s.ImportId == nil {
  12873. invalidParams.Add(request.NewErrParamRequired("ImportId"))
  12874. }
  12875. if s.ImportId != nil && len(*s.ImportId) < 36 {
  12876. invalidParams.Add(request.NewErrParamMinLen("ImportId", 36))
  12877. }
  12878. if s.MaxResults != nil && *s.MaxResults < 1 {
  12879. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  12880. }
  12881. if s.NextToken != nil && len(*s.NextToken) < 4 {
  12882. invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
  12883. }
  12884. if invalidParams.Len() > 0 {
  12885. return invalidParams
  12886. }
  12887. return nil
  12888. }
  12889. // SetImportId sets the ImportId field's value.
  12890. func (s *ListImportFailuresInput) SetImportId(v string) *ListImportFailuresInput {
  12891. s.ImportId = &v
  12892. return s
  12893. }
  12894. // SetMaxResults sets the MaxResults field's value.
  12895. func (s *ListImportFailuresInput) SetMaxResults(v int64) *ListImportFailuresInput {
  12896. s.MaxResults = &v
  12897. return s
  12898. }
  12899. // SetNextToken sets the NextToken field's value.
  12900. func (s *ListImportFailuresInput) SetNextToken(v string) *ListImportFailuresInput {
  12901. s.NextToken = &v
  12902. return s
  12903. }
  12904. type ListImportFailuresOutput struct {
  12905. _ struct{} `type:"structure"`
  12906. // Contains information about the import failures.
  12907. Failures []*ImportFailureListItem `type:"list"`
  12908. // A token you can use to get the next page of results.
  12909. NextToken *string `min:"4" type:"string"`
  12910. }
  12911. // String returns the string representation.
  12912. //
  12913. // API parameter values that are decorated as "sensitive" in the API will not
  12914. // be included in the string output. The member name will be present, but the
  12915. // value will be replaced with "sensitive".
  12916. func (s ListImportFailuresOutput) String() string {
  12917. return awsutil.Prettify(s)
  12918. }
  12919. // GoString returns the string representation.
  12920. //
  12921. // API parameter values that are decorated as "sensitive" in the API will not
  12922. // be included in the string output. The member name will be present, but the
  12923. // value will be replaced with "sensitive".
  12924. func (s ListImportFailuresOutput) GoString() string {
  12925. return s.String()
  12926. }
  12927. // SetFailures sets the Failures field's value.
  12928. func (s *ListImportFailuresOutput) SetFailures(v []*ImportFailureListItem) *ListImportFailuresOutput {
  12929. s.Failures = v
  12930. return s
  12931. }
  12932. // SetNextToken sets the NextToken field's value.
  12933. func (s *ListImportFailuresOutput) SetNextToken(v string) *ListImportFailuresOutput {
  12934. s.NextToken = &v
  12935. return s
  12936. }
  12937. type ListImportsInput struct {
  12938. _ struct{} `type:"structure"`
  12939. // The ARN of the destination event data store.
  12940. Destination *string `min:"3" type:"string"`
  12941. // The status of the import.
  12942. ImportStatus *string `type:"string" enum:"ImportStatus"`
  12943. // The maximum number of imports to display on a single page.
  12944. MaxResults *int64 `min:"1" type:"integer"`
  12945. // A token you can use to get the next page of import results.
  12946. NextToken *string `min:"4" type:"string"`
  12947. }
  12948. // String returns the string representation.
  12949. //
  12950. // API parameter values that are decorated as "sensitive" in the API will not
  12951. // be included in the string output. The member name will be present, but the
  12952. // value will be replaced with "sensitive".
  12953. func (s ListImportsInput) String() string {
  12954. return awsutil.Prettify(s)
  12955. }
  12956. // GoString returns the string representation.
  12957. //
  12958. // API parameter values that are decorated as "sensitive" in the API will not
  12959. // be included in the string output. The member name will be present, but the
  12960. // value will be replaced with "sensitive".
  12961. func (s ListImportsInput) GoString() string {
  12962. return s.String()
  12963. }
  12964. // Validate inspects the fields of the type to determine if they are valid.
  12965. func (s *ListImportsInput) Validate() error {
  12966. invalidParams := request.ErrInvalidParams{Context: "ListImportsInput"}
  12967. if s.Destination != nil && len(*s.Destination) < 3 {
  12968. invalidParams.Add(request.NewErrParamMinLen("Destination", 3))
  12969. }
  12970. if s.MaxResults != nil && *s.MaxResults < 1 {
  12971. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  12972. }
  12973. if s.NextToken != nil && len(*s.NextToken) < 4 {
  12974. invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
  12975. }
  12976. if invalidParams.Len() > 0 {
  12977. return invalidParams
  12978. }
  12979. return nil
  12980. }
  12981. // SetDestination sets the Destination field's value.
  12982. func (s *ListImportsInput) SetDestination(v string) *ListImportsInput {
  12983. s.Destination = &v
  12984. return s
  12985. }
  12986. // SetImportStatus sets the ImportStatus field's value.
  12987. func (s *ListImportsInput) SetImportStatus(v string) *ListImportsInput {
  12988. s.ImportStatus = &v
  12989. return s
  12990. }
  12991. // SetMaxResults sets the MaxResults field's value.
  12992. func (s *ListImportsInput) SetMaxResults(v int64) *ListImportsInput {
  12993. s.MaxResults = &v
  12994. return s
  12995. }
  12996. // SetNextToken sets the NextToken field's value.
  12997. func (s *ListImportsInput) SetNextToken(v string) *ListImportsInput {
  12998. s.NextToken = &v
  12999. return s
  13000. }
  13001. type ListImportsOutput struct {
  13002. _ struct{} `type:"structure"`
  13003. // The list of returned imports.
  13004. Imports []*ImportsListItem `type:"list"`
  13005. // A token you can use to get the next page of import results.
  13006. NextToken *string `min:"4" type:"string"`
  13007. }
  13008. // String returns the string representation.
  13009. //
  13010. // API parameter values that are decorated as "sensitive" in the API will not
  13011. // be included in the string output. The member name will be present, but the
  13012. // value will be replaced with "sensitive".
  13013. func (s ListImportsOutput) String() string {
  13014. return awsutil.Prettify(s)
  13015. }
  13016. // GoString returns the string representation.
  13017. //
  13018. // API parameter values that are decorated as "sensitive" in the API will not
  13019. // be included in the string output. The member name will be present, but the
  13020. // value will be replaced with "sensitive".
  13021. func (s ListImportsOutput) GoString() string {
  13022. return s.String()
  13023. }
  13024. // SetImports sets the Imports field's value.
  13025. func (s *ListImportsOutput) SetImports(v []*ImportsListItem) *ListImportsOutput {
  13026. s.Imports = v
  13027. return s
  13028. }
  13029. // SetNextToken sets the NextToken field's value.
  13030. func (s *ListImportsOutput) SetNextToken(v string) *ListImportsOutput {
  13031. s.NextToken = &v
  13032. return s
  13033. }
  13034. // Requests the public keys for a specified time range.
  13035. type ListPublicKeysInput struct {
  13036. _ struct{} `type:"structure"`
  13037. // Optionally specifies, in UTC, the end of the time range to look up public
  13038. // keys for CloudTrail digest files. If not specified, the current time is used.
  13039. EndTime *time.Time `type:"timestamp"`
  13040. // Reserved for future use.
  13041. NextToken *string `type:"string"`
  13042. // Optionally specifies, in UTC, the start of the time range to look up public
  13043. // keys for CloudTrail digest files. If not specified, the current time is used,
  13044. // and the current public key is returned.
  13045. StartTime *time.Time `type:"timestamp"`
  13046. }
  13047. // String 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 ListPublicKeysInput) String() string {
  13053. return awsutil.Prettify(s)
  13054. }
  13055. // GoString returns the string representation.
  13056. //
  13057. // API parameter values that are decorated as "sensitive" in the API will not
  13058. // be included in the string output. The member name will be present, but the
  13059. // value will be replaced with "sensitive".
  13060. func (s ListPublicKeysInput) GoString() string {
  13061. return s.String()
  13062. }
  13063. // SetEndTime sets the EndTime field's value.
  13064. func (s *ListPublicKeysInput) SetEndTime(v time.Time) *ListPublicKeysInput {
  13065. s.EndTime = &v
  13066. return s
  13067. }
  13068. // SetNextToken sets the NextToken field's value.
  13069. func (s *ListPublicKeysInput) SetNextToken(v string) *ListPublicKeysInput {
  13070. s.NextToken = &v
  13071. return s
  13072. }
  13073. // SetStartTime sets the StartTime field's value.
  13074. func (s *ListPublicKeysInput) SetStartTime(v time.Time) *ListPublicKeysInput {
  13075. s.StartTime = &v
  13076. return s
  13077. }
  13078. // Returns the objects or data listed below if successful. Otherwise, returns
  13079. // an error.
  13080. type ListPublicKeysOutput struct {
  13081. _ struct{} `type:"structure"`
  13082. // Reserved for future use.
  13083. NextToken *string `type:"string"`
  13084. // Contains an array of PublicKey objects.
  13085. //
  13086. // The returned public keys may have validity time ranges that overlap.
  13087. PublicKeyList []*PublicKey `type:"list"`
  13088. }
  13089. // String returns the string representation.
  13090. //
  13091. // API parameter values that are decorated as "sensitive" in the API will not
  13092. // be included in the string output. The member name will be present, but the
  13093. // value will be replaced with "sensitive".
  13094. func (s ListPublicKeysOutput) String() string {
  13095. return awsutil.Prettify(s)
  13096. }
  13097. // GoString returns the string representation.
  13098. //
  13099. // API parameter values that are decorated as "sensitive" in the API will not
  13100. // be included in the string output. The member name will be present, but the
  13101. // value will be replaced with "sensitive".
  13102. func (s ListPublicKeysOutput) GoString() string {
  13103. return s.String()
  13104. }
  13105. // SetNextToken sets the NextToken field's value.
  13106. func (s *ListPublicKeysOutput) SetNextToken(v string) *ListPublicKeysOutput {
  13107. s.NextToken = &v
  13108. return s
  13109. }
  13110. // SetPublicKeyList sets the PublicKeyList field's value.
  13111. func (s *ListPublicKeysOutput) SetPublicKeyList(v []*PublicKey) *ListPublicKeysOutput {
  13112. s.PublicKeyList = v
  13113. return s
  13114. }
  13115. type ListQueriesInput struct {
  13116. _ struct{} `type:"structure"`
  13117. // Use with StartTime to bound a ListQueries request, and limit its results
  13118. // to only those queries run within a specified time period.
  13119. EndTime *time.Time `type:"timestamp"`
  13120. // The ARN (or the ID suffix of the ARN) of an event data store on which queries
  13121. // were run.
  13122. //
  13123. // EventDataStore is a required field
  13124. EventDataStore *string `min:"3" type:"string" required:"true"`
  13125. // The maximum number of queries to show on a page.
  13126. MaxResults *int64 `min:"1" type:"integer"`
  13127. // A token you can use to get the next page of results.
  13128. NextToken *string `min:"4" type:"string"`
  13129. // The status of queries that you want to return in results. Valid values for
  13130. // QueryStatus include QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED.
  13131. QueryStatus *string `type:"string" enum:"QueryStatus"`
  13132. // Use with EndTime to bound a ListQueries request, and limit its results to
  13133. // only those queries run within a specified time period.
  13134. StartTime *time.Time `type:"timestamp"`
  13135. }
  13136. // String returns the string representation.
  13137. //
  13138. // API parameter values that are decorated as "sensitive" in the API will not
  13139. // be included in the string output. The member name will be present, but the
  13140. // value will be replaced with "sensitive".
  13141. func (s ListQueriesInput) String() string {
  13142. return awsutil.Prettify(s)
  13143. }
  13144. // GoString returns the string representation.
  13145. //
  13146. // API parameter values that are decorated as "sensitive" in the API will not
  13147. // be included in the string output. The member name will be present, but the
  13148. // value will be replaced with "sensitive".
  13149. func (s ListQueriesInput) GoString() string {
  13150. return s.String()
  13151. }
  13152. // Validate inspects the fields of the type to determine if they are valid.
  13153. func (s *ListQueriesInput) Validate() error {
  13154. invalidParams := request.ErrInvalidParams{Context: "ListQueriesInput"}
  13155. if s.EventDataStore == nil {
  13156. invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
  13157. }
  13158. if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
  13159. invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
  13160. }
  13161. if s.MaxResults != nil && *s.MaxResults < 1 {
  13162. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  13163. }
  13164. if s.NextToken != nil && len(*s.NextToken) < 4 {
  13165. invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
  13166. }
  13167. if invalidParams.Len() > 0 {
  13168. return invalidParams
  13169. }
  13170. return nil
  13171. }
  13172. // SetEndTime sets the EndTime field's value.
  13173. func (s *ListQueriesInput) SetEndTime(v time.Time) *ListQueriesInput {
  13174. s.EndTime = &v
  13175. return s
  13176. }
  13177. // SetEventDataStore sets the EventDataStore field's value.
  13178. func (s *ListQueriesInput) SetEventDataStore(v string) *ListQueriesInput {
  13179. s.EventDataStore = &v
  13180. return s
  13181. }
  13182. // SetMaxResults sets the MaxResults field's value.
  13183. func (s *ListQueriesInput) SetMaxResults(v int64) *ListQueriesInput {
  13184. s.MaxResults = &v
  13185. return s
  13186. }
  13187. // SetNextToken sets the NextToken field's value.
  13188. func (s *ListQueriesInput) SetNextToken(v string) *ListQueriesInput {
  13189. s.NextToken = &v
  13190. return s
  13191. }
  13192. // SetQueryStatus sets the QueryStatus field's value.
  13193. func (s *ListQueriesInput) SetQueryStatus(v string) *ListQueriesInput {
  13194. s.QueryStatus = &v
  13195. return s
  13196. }
  13197. // SetStartTime sets the StartTime field's value.
  13198. func (s *ListQueriesInput) SetStartTime(v time.Time) *ListQueriesInput {
  13199. s.StartTime = &v
  13200. return s
  13201. }
  13202. type ListQueriesOutput struct {
  13203. _ struct{} `type:"structure"`
  13204. // A token you can use to get the next page of results.
  13205. NextToken *string `min:"4" type:"string"`
  13206. // Lists matching query results, and shows query ID, status, and creation time
  13207. // of each query.
  13208. Queries []*Query `type:"list"`
  13209. }
  13210. // String returns the string representation.
  13211. //
  13212. // API parameter values that are decorated as "sensitive" in the API will not
  13213. // be included in the string output. The member name will be present, but the
  13214. // value will be replaced with "sensitive".
  13215. func (s ListQueriesOutput) String() string {
  13216. return awsutil.Prettify(s)
  13217. }
  13218. // GoString returns the string representation.
  13219. //
  13220. // API parameter values that are decorated as "sensitive" in the API will not
  13221. // be included in the string output. The member name will be present, but the
  13222. // value will be replaced with "sensitive".
  13223. func (s ListQueriesOutput) GoString() string {
  13224. return s.String()
  13225. }
  13226. // SetNextToken sets the NextToken field's value.
  13227. func (s *ListQueriesOutput) SetNextToken(v string) *ListQueriesOutput {
  13228. s.NextToken = &v
  13229. return s
  13230. }
  13231. // SetQueries sets the Queries field's value.
  13232. func (s *ListQueriesOutput) SetQueries(v []*Query) *ListQueriesOutput {
  13233. s.Queries = v
  13234. return s
  13235. }
  13236. // Specifies a list of tags to return.
  13237. type ListTagsInput struct {
  13238. _ struct{} `type:"structure"`
  13239. // Reserved for future use.
  13240. NextToken *string `type:"string"`
  13241. // Specifies a list of trail, event data store, or channel ARNs whose tags will
  13242. // be listed. The list has a limit of 20 ARNs.
  13243. //
  13244. // ResourceIdList is a required field
  13245. ResourceIdList []*string `type:"list" required:"true"`
  13246. }
  13247. // String returns the string representation.
  13248. //
  13249. // API parameter values that are decorated as "sensitive" in the API will not
  13250. // be included in the string output. The member name will be present, but the
  13251. // value will be replaced with "sensitive".
  13252. func (s ListTagsInput) String() string {
  13253. return awsutil.Prettify(s)
  13254. }
  13255. // GoString returns the string representation.
  13256. //
  13257. // API parameter values that are decorated as "sensitive" in the API will not
  13258. // be included in the string output. The member name will be present, but the
  13259. // value will be replaced with "sensitive".
  13260. func (s ListTagsInput) GoString() string {
  13261. return s.String()
  13262. }
  13263. // Validate inspects the fields of the type to determine if they are valid.
  13264. func (s *ListTagsInput) Validate() error {
  13265. invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
  13266. if s.ResourceIdList == nil {
  13267. invalidParams.Add(request.NewErrParamRequired("ResourceIdList"))
  13268. }
  13269. if invalidParams.Len() > 0 {
  13270. return invalidParams
  13271. }
  13272. return nil
  13273. }
  13274. // SetNextToken sets the NextToken field's value.
  13275. func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
  13276. s.NextToken = &v
  13277. return s
  13278. }
  13279. // SetResourceIdList sets the ResourceIdList field's value.
  13280. func (s *ListTagsInput) SetResourceIdList(v []*string) *ListTagsInput {
  13281. s.ResourceIdList = v
  13282. return s
  13283. }
  13284. // Returns the objects or data listed below if successful. Otherwise, returns
  13285. // an error.
  13286. type ListTagsOutput struct {
  13287. _ struct{} `type:"structure"`
  13288. // Reserved for future use.
  13289. NextToken *string `type:"string"`
  13290. // A list of resource tags.
  13291. ResourceTagList []*ResourceTag `type:"list"`
  13292. }
  13293. // String returns the string representation.
  13294. //
  13295. // API parameter values that are decorated as "sensitive" in the API will not
  13296. // be included in the string output. The member name will be present, but the
  13297. // value will be replaced with "sensitive".
  13298. func (s ListTagsOutput) String() string {
  13299. return awsutil.Prettify(s)
  13300. }
  13301. // GoString returns the string representation.
  13302. //
  13303. // API parameter values that are decorated as "sensitive" in the API will not
  13304. // be included in the string output. The member name will be present, but the
  13305. // value will be replaced with "sensitive".
  13306. func (s ListTagsOutput) GoString() string {
  13307. return s.String()
  13308. }
  13309. // SetNextToken sets the NextToken field's value.
  13310. func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
  13311. s.NextToken = &v
  13312. return s
  13313. }
  13314. // SetResourceTagList sets the ResourceTagList field's value.
  13315. func (s *ListTagsOutput) SetResourceTagList(v []*ResourceTag) *ListTagsOutput {
  13316. s.ResourceTagList = v
  13317. return s
  13318. }
  13319. type ListTrailsInput struct {
  13320. _ struct{} `type:"structure"`
  13321. // The token to use to get the next page of results after a previous API call.
  13322. // This token must be passed in with the same parameters that were specified
  13323. // in the original call. For example, if the original call specified an AttributeKey
  13324. // of 'Username' with a value of 'root', the call with NextToken should include
  13325. // those same parameters.
  13326. NextToken *string `type:"string"`
  13327. }
  13328. // String returns the string representation.
  13329. //
  13330. // API parameter values that are decorated as "sensitive" in the API will not
  13331. // be included in the string output. The member name will be present, but the
  13332. // value will be replaced with "sensitive".
  13333. func (s ListTrailsInput) String() string {
  13334. return awsutil.Prettify(s)
  13335. }
  13336. // GoString returns the string representation.
  13337. //
  13338. // API parameter values that are decorated as "sensitive" in the API will not
  13339. // be included in the string output. The member name will be present, but the
  13340. // value will be replaced with "sensitive".
  13341. func (s ListTrailsInput) GoString() string {
  13342. return s.String()
  13343. }
  13344. // SetNextToken sets the NextToken field's value.
  13345. func (s *ListTrailsInput) SetNextToken(v string) *ListTrailsInput {
  13346. s.NextToken = &v
  13347. return s
  13348. }
  13349. type ListTrailsOutput struct {
  13350. _ struct{} `type:"structure"`
  13351. // The token to use to get the next page of results after a previous API call.
  13352. // If the token does not appear, there are no more results to return. The token
  13353. // must be passed in with the same parameters as the previous call. For example,
  13354. // if the original call specified an AttributeKey of 'Username' with a value
  13355. // of 'root', the call with NextToken should include those same parameters.
  13356. NextToken *string `type:"string"`
  13357. // Returns the name, ARN, and home region of trails in the current account.
  13358. Trails []*TrailInfo `type:"list"`
  13359. }
  13360. // String returns the string representation.
  13361. //
  13362. // API parameter values that are decorated as "sensitive" in the API will not
  13363. // be included in the string output. The member name will be present, but the
  13364. // value will be replaced with "sensitive".
  13365. func (s ListTrailsOutput) String() string {
  13366. return awsutil.Prettify(s)
  13367. }
  13368. // GoString returns the string representation.
  13369. //
  13370. // API parameter values that are decorated as "sensitive" in the API will not
  13371. // be included in the string output. The member name will be present, but the
  13372. // value will be replaced with "sensitive".
  13373. func (s ListTrailsOutput) GoString() string {
  13374. return s.String()
  13375. }
  13376. // SetNextToken sets the NextToken field's value.
  13377. func (s *ListTrailsOutput) SetNextToken(v string) *ListTrailsOutput {
  13378. s.NextToken = &v
  13379. return s
  13380. }
  13381. // SetTrails sets the Trails field's value.
  13382. func (s *ListTrailsOutput) SetTrails(v []*TrailInfo) *ListTrailsOutput {
  13383. s.Trails = v
  13384. return s
  13385. }
  13386. // Specifies an attribute and value that filter the events returned.
  13387. type LookupAttribute struct {
  13388. _ struct{} `type:"structure"`
  13389. // Specifies an attribute on which to filter the events returned.
  13390. //
  13391. // AttributeKey is a required field
  13392. AttributeKey *string `type:"string" required:"true" enum:"LookupAttributeKey"`
  13393. // Specifies a value for the specified AttributeKey.
  13394. //
  13395. // AttributeValue is a required field
  13396. AttributeValue *string `min:"1" type:"string" required:"true"`
  13397. }
  13398. // String returns the string representation.
  13399. //
  13400. // API parameter values that are decorated as "sensitive" in the API will not
  13401. // be included in the string output. The member name will be present, but the
  13402. // value will be replaced with "sensitive".
  13403. func (s LookupAttribute) String() string {
  13404. return awsutil.Prettify(s)
  13405. }
  13406. // GoString returns the string representation.
  13407. //
  13408. // API parameter values that are decorated as "sensitive" in the API will not
  13409. // be included in the string output. The member name will be present, but the
  13410. // value will be replaced with "sensitive".
  13411. func (s LookupAttribute) GoString() string {
  13412. return s.String()
  13413. }
  13414. // Validate inspects the fields of the type to determine if they are valid.
  13415. func (s *LookupAttribute) Validate() error {
  13416. invalidParams := request.ErrInvalidParams{Context: "LookupAttribute"}
  13417. if s.AttributeKey == nil {
  13418. invalidParams.Add(request.NewErrParamRequired("AttributeKey"))
  13419. }
  13420. if s.AttributeValue == nil {
  13421. invalidParams.Add(request.NewErrParamRequired("AttributeValue"))
  13422. }
  13423. if s.AttributeValue != nil && len(*s.AttributeValue) < 1 {
  13424. invalidParams.Add(request.NewErrParamMinLen("AttributeValue", 1))
  13425. }
  13426. if invalidParams.Len() > 0 {
  13427. return invalidParams
  13428. }
  13429. return nil
  13430. }
  13431. // SetAttributeKey sets the AttributeKey field's value.
  13432. func (s *LookupAttribute) SetAttributeKey(v string) *LookupAttribute {
  13433. s.AttributeKey = &v
  13434. return s
  13435. }
  13436. // SetAttributeValue sets the AttributeValue field's value.
  13437. func (s *LookupAttribute) SetAttributeValue(v string) *LookupAttribute {
  13438. s.AttributeValue = &v
  13439. return s
  13440. }
  13441. // Contains a request for LookupEvents.
  13442. type LookupEventsInput struct {
  13443. _ struct{} `type:"structure"`
  13444. // Specifies that only events that occur before or at the specified time are
  13445. // returned. If the specified end time is before the specified start time, an
  13446. // error is returned.
  13447. EndTime *time.Time `type:"timestamp"`
  13448. // Specifies the event category. If you do not specify an event category, events
  13449. // of the category are not returned in the response. For example, if you do
  13450. // not specify insight as the value of EventCategory, no Insights events are
  13451. // returned.
  13452. EventCategory *string `type:"string" enum:"EventCategory"`
  13453. // Contains a list of lookup attributes. Currently the list can contain only
  13454. // one item.
  13455. LookupAttributes []*LookupAttribute `type:"list"`
  13456. // The number of events to return. Possible values are 1 through 50. The default
  13457. // is 50.
  13458. MaxResults *int64 `min:"1" type:"integer"`
  13459. // The token to use to get the next page of results after a previous API call.
  13460. // This token must be passed in with the same parameters that were specified
  13461. // in the original call. For example, if the original call specified an AttributeKey
  13462. // of 'Username' with a value of 'root', the call with NextToken should include
  13463. // those same parameters.
  13464. NextToken *string `type:"string"`
  13465. // Specifies that only events that occur after or at the specified time are
  13466. // returned. If the specified start time is after the specified end time, an
  13467. // error is returned.
  13468. StartTime *time.Time `type:"timestamp"`
  13469. }
  13470. // String returns the string representation.
  13471. //
  13472. // API parameter values that are decorated as "sensitive" in the API will not
  13473. // be included in the string output. The member name will be present, but the
  13474. // value will be replaced with "sensitive".
  13475. func (s LookupEventsInput) String() string {
  13476. return awsutil.Prettify(s)
  13477. }
  13478. // GoString returns the string representation.
  13479. //
  13480. // API parameter values that are decorated as "sensitive" in the API will not
  13481. // be included in the string output. The member name will be present, but the
  13482. // value will be replaced with "sensitive".
  13483. func (s LookupEventsInput) GoString() string {
  13484. return s.String()
  13485. }
  13486. // Validate inspects the fields of the type to determine if they are valid.
  13487. func (s *LookupEventsInput) Validate() error {
  13488. invalidParams := request.ErrInvalidParams{Context: "LookupEventsInput"}
  13489. if s.MaxResults != nil && *s.MaxResults < 1 {
  13490. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  13491. }
  13492. if s.LookupAttributes != nil {
  13493. for i, v := range s.LookupAttributes {
  13494. if v == nil {
  13495. continue
  13496. }
  13497. if err := v.Validate(); err != nil {
  13498. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LookupAttributes", i), err.(request.ErrInvalidParams))
  13499. }
  13500. }
  13501. }
  13502. if invalidParams.Len() > 0 {
  13503. return invalidParams
  13504. }
  13505. return nil
  13506. }
  13507. // SetEndTime sets the EndTime field's value.
  13508. func (s *LookupEventsInput) SetEndTime(v time.Time) *LookupEventsInput {
  13509. s.EndTime = &v
  13510. return s
  13511. }
  13512. // SetEventCategory sets the EventCategory field's value.
  13513. func (s *LookupEventsInput) SetEventCategory(v string) *LookupEventsInput {
  13514. s.EventCategory = &v
  13515. return s
  13516. }
  13517. // SetLookupAttributes sets the LookupAttributes field's value.
  13518. func (s *LookupEventsInput) SetLookupAttributes(v []*LookupAttribute) *LookupEventsInput {
  13519. s.LookupAttributes = v
  13520. return s
  13521. }
  13522. // SetMaxResults sets the MaxResults field's value.
  13523. func (s *LookupEventsInput) SetMaxResults(v int64) *LookupEventsInput {
  13524. s.MaxResults = &v
  13525. return s
  13526. }
  13527. // SetNextToken sets the NextToken field's value.
  13528. func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput {
  13529. s.NextToken = &v
  13530. return s
  13531. }
  13532. // SetStartTime sets the StartTime field's value.
  13533. func (s *LookupEventsInput) SetStartTime(v time.Time) *LookupEventsInput {
  13534. s.StartTime = &v
  13535. return s
  13536. }
  13537. // Contains a response to a LookupEvents action.
  13538. type LookupEventsOutput struct {
  13539. _ struct{} `type:"structure"`
  13540. // A list of events returned based on the lookup attributes specified and the
  13541. // CloudTrail event. The events list is sorted by time. The most recent event
  13542. // is listed first.
  13543. Events []*Event `type:"list"`
  13544. // The token to use to get the next page of results after a previous API call.
  13545. // If the token does not appear, there are no more results to return. The token
  13546. // must be passed in with the same parameters as the previous call. For example,
  13547. // if the original call specified an AttributeKey of 'Username' with a value
  13548. // of 'root', the call with NextToken should include those same parameters.
  13549. NextToken *string `type:"string"`
  13550. }
  13551. // String returns the string representation.
  13552. //
  13553. // API parameter values that are decorated as "sensitive" in the API will not
  13554. // be included in the string output. The member name will be present, but the
  13555. // value will be replaced with "sensitive".
  13556. func (s LookupEventsOutput) String() string {
  13557. return awsutil.Prettify(s)
  13558. }
  13559. // GoString returns the string representation.
  13560. //
  13561. // API parameter values that are decorated as "sensitive" in the API will not
  13562. // be included in the string output. The member name will be present, but the
  13563. // value will be replaced with "sensitive".
  13564. func (s LookupEventsOutput) GoString() string {
  13565. return s.String()
  13566. }
  13567. // SetEvents sets the Events field's value.
  13568. func (s *LookupEventsOutput) SetEvents(v []*Event) *LookupEventsOutput {
  13569. s.Events = v
  13570. return s
  13571. }
  13572. // SetNextToken sets the NextToken field's value.
  13573. func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput {
  13574. s.NextToken = &v
  13575. return s
  13576. }
  13577. // You are already running the maximum number of concurrent queries. Wait a
  13578. // minute for some queries to finish, and then run the query again.
  13579. type MaxConcurrentQueriesException struct {
  13580. _ struct{} `type:"structure"`
  13581. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  13582. Message_ *string `locationName:"message" type:"string"`
  13583. }
  13584. // String returns the string representation.
  13585. //
  13586. // API parameter values that are decorated as "sensitive" in the API will not
  13587. // be included in the string output. The member name will be present, but the
  13588. // value will be replaced with "sensitive".
  13589. func (s MaxConcurrentQueriesException) String() string {
  13590. return awsutil.Prettify(s)
  13591. }
  13592. // GoString returns the string representation.
  13593. //
  13594. // API parameter values that are decorated as "sensitive" in the API will not
  13595. // be included in the string output. The member name will be present, but the
  13596. // value will be replaced with "sensitive".
  13597. func (s MaxConcurrentQueriesException) GoString() string {
  13598. return s.String()
  13599. }
  13600. func newErrorMaxConcurrentQueriesException(v protocol.ResponseMetadata) error {
  13601. return &MaxConcurrentQueriesException{
  13602. RespMetadata: v,
  13603. }
  13604. }
  13605. // Code returns the exception type name.
  13606. func (s *MaxConcurrentQueriesException) Code() string {
  13607. return "MaxConcurrentQueriesException"
  13608. }
  13609. // Message returns the exception's message.
  13610. func (s *MaxConcurrentQueriesException) Message() string {
  13611. if s.Message_ != nil {
  13612. return *s.Message_
  13613. }
  13614. return ""
  13615. }
  13616. // OrigErr always returns nil, satisfies awserr.Error interface.
  13617. func (s *MaxConcurrentQueriesException) OrigErr() error {
  13618. return nil
  13619. }
  13620. func (s *MaxConcurrentQueriesException) Error() string {
  13621. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  13622. }
  13623. // Status code returns the HTTP status code for the request's response error.
  13624. func (s *MaxConcurrentQueriesException) StatusCode() int {
  13625. return s.RespMetadata.StatusCode
  13626. }
  13627. // RequestID returns the service's response RequestID for request.
  13628. func (s *MaxConcurrentQueriesException) RequestID() string {
  13629. return s.RespMetadata.RequestID
  13630. }
  13631. // This exception is thrown when the maximum number of trails is reached.
  13632. type MaximumNumberOfTrailsExceededException struct {
  13633. _ struct{} `type:"structure"`
  13634. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  13635. Message_ *string `locationName:"message" type:"string"`
  13636. }
  13637. // String returns the string representation.
  13638. //
  13639. // API parameter values that are decorated as "sensitive" in the API will not
  13640. // be included in the string output. The member name will be present, but the
  13641. // value will be replaced with "sensitive".
  13642. func (s MaximumNumberOfTrailsExceededException) String() string {
  13643. return awsutil.Prettify(s)
  13644. }
  13645. // GoString returns the string representation.
  13646. //
  13647. // API parameter values that are decorated as "sensitive" in the API will not
  13648. // be included in the string output. The member name will be present, but the
  13649. // value will be replaced with "sensitive".
  13650. func (s MaximumNumberOfTrailsExceededException) GoString() string {
  13651. return s.String()
  13652. }
  13653. func newErrorMaximumNumberOfTrailsExceededException(v protocol.ResponseMetadata) error {
  13654. return &MaximumNumberOfTrailsExceededException{
  13655. RespMetadata: v,
  13656. }
  13657. }
  13658. // Code returns the exception type name.
  13659. func (s *MaximumNumberOfTrailsExceededException) Code() string {
  13660. return "MaximumNumberOfTrailsExceededException"
  13661. }
  13662. // Message returns the exception's message.
  13663. func (s *MaximumNumberOfTrailsExceededException) Message() string {
  13664. if s.Message_ != nil {
  13665. return *s.Message_
  13666. }
  13667. return ""
  13668. }
  13669. // OrigErr always returns nil, satisfies awserr.Error interface.
  13670. func (s *MaximumNumberOfTrailsExceededException) OrigErr() error {
  13671. return nil
  13672. }
  13673. func (s *MaximumNumberOfTrailsExceededException) Error() string {
  13674. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  13675. }
  13676. // Status code returns the HTTP status code for the request's response error.
  13677. func (s *MaximumNumberOfTrailsExceededException) StatusCode() int {
  13678. return s.RespMetadata.StatusCode
  13679. }
  13680. // RequestID returns the service's response RequestID for request.
  13681. func (s *MaximumNumberOfTrailsExceededException) RequestID() string {
  13682. return s.RespMetadata.RequestID
  13683. }
  13684. // This exception is thrown when the management account does not have a service-linked
  13685. // role.
  13686. type NoManagementAccountSLRExistsException struct {
  13687. _ struct{} `type:"structure"`
  13688. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  13689. Message_ *string `locationName:"message" type:"string"`
  13690. }
  13691. // String 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 NoManagementAccountSLRExistsException) String() string {
  13697. return awsutil.Prettify(s)
  13698. }
  13699. // GoString returns the string representation.
  13700. //
  13701. // API parameter values that are decorated as "sensitive" in the API will not
  13702. // be included in the string output. The member name will be present, but the
  13703. // value will be replaced with "sensitive".
  13704. func (s NoManagementAccountSLRExistsException) GoString() string {
  13705. return s.String()
  13706. }
  13707. func newErrorNoManagementAccountSLRExistsException(v protocol.ResponseMetadata) error {
  13708. return &NoManagementAccountSLRExistsException{
  13709. RespMetadata: v,
  13710. }
  13711. }
  13712. // Code returns the exception type name.
  13713. func (s *NoManagementAccountSLRExistsException) Code() string {
  13714. return "NoManagementAccountSLRExistsException"
  13715. }
  13716. // Message returns the exception's message.
  13717. func (s *NoManagementAccountSLRExistsException) Message() string {
  13718. if s.Message_ != nil {
  13719. return *s.Message_
  13720. }
  13721. return ""
  13722. }
  13723. // OrigErr always returns nil, satisfies awserr.Error interface.
  13724. func (s *NoManagementAccountSLRExistsException) OrigErr() error {
  13725. return nil
  13726. }
  13727. func (s *NoManagementAccountSLRExistsException) Error() string {
  13728. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  13729. }
  13730. // Status code returns the HTTP status code for the request's response error.
  13731. func (s *NoManagementAccountSLRExistsException) StatusCode() int {
  13732. return s.RespMetadata.StatusCode
  13733. }
  13734. // RequestID returns the service's response RequestID for request.
  13735. func (s *NoManagementAccountSLRExistsException) RequestID() string {
  13736. return s.RespMetadata.RequestID
  13737. }
  13738. // This exception is thrown when the account making the request is not the organization's
  13739. // management account.
  13740. type NotOrganizationManagementAccountException struct {
  13741. _ struct{} `type:"structure"`
  13742. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  13743. Message_ *string `locationName:"message" type:"string"`
  13744. }
  13745. // String returns the string representation.
  13746. //
  13747. // API parameter values that are decorated as "sensitive" in the API will not
  13748. // be included in the string output. The member name will be present, but the
  13749. // value will be replaced with "sensitive".
  13750. func (s NotOrganizationManagementAccountException) String() string {
  13751. return awsutil.Prettify(s)
  13752. }
  13753. // GoString returns the string representation.
  13754. //
  13755. // API parameter values that are decorated as "sensitive" in the API will not
  13756. // be included in the string output. The member name will be present, but the
  13757. // value will be replaced with "sensitive".
  13758. func (s NotOrganizationManagementAccountException) GoString() string {
  13759. return s.String()
  13760. }
  13761. func newErrorNotOrganizationManagementAccountException(v protocol.ResponseMetadata) error {
  13762. return &NotOrganizationManagementAccountException{
  13763. RespMetadata: v,
  13764. }
  13765. }
  13766. // Code returns the exception type name.
  13767. func (s *NotOrganizationManagementAccountException) Code() string {
  13768. return "NotOrganizationManagementAccountException"
  13769. }
  13770. // Message returns the exception's message.
  13771. func (s *NotOrganizationManagementAccountException) Message() string {
  13772. if s.Message_ != nil {
  13773. return *s.Message_
  13774. }
  13775. return ""
  13776. }
  13777. // OrigErr always returns nil, satisfies awserr.Error interface.
  13778. func (s *NotOrganizationManagementAccountException) OrigErr() error {
  13779. return nil
  13780. }
  13781. func (s *NotOrganizationManagementAccountException) Error() string {
  13782. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  13783. }
  13784. // Status code returns the HTTP status code for the request's response error.
  13785. func (s *NotOrganizationManagementAccountException) StatusCode() int {
  13786. return s.RespMetadata.StatusCode
  13787. }
  13788. // RequestID returns the service's response RequestID for request.
  13789. func (s *NotOrganizationManagementAccountException) RequestID() string {
  13790. return s.RespMetadata.RequestID
  13791. }
  13792. // This exception is thrown when the Amazon Web Services account making the
  13793. // request to create or update an organization trail or event data store is
  13794. // not the management account for an organization in Organizations. For more
  13795. // information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
  13796. // or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
  13797. type NotOrganizationMasterAccountException struct {
  13798. _ struct{} `type:"structure"`
  13799. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  13800. Message_ *string `locationName:"message" type:"string"`
  13801. }
  13802. // String returns the string representation.
  13803. //
  13804. // API parameter values that are decorated as "sensitive" in the API will not
  13805. // be included in the string output. The member name will be present, but the
  13806. // value will be replaced with "sensitive".
  13807. func (s NotOrganizationMasterAccountException) String() string {
  13808. return awsutil.Prettify(s)
  13809. }
  13810. // GoString returns the string representation.
  13811. //
  13812. // API parameter values that are decorated as "sensitive" in the API will not
  13813. // be included in the string output. The member name will be present, but the
  13814. // value will be replaced with "sensitive".
  13815. func (s NotOrganizationMasterAccountException) GoString() string {
  13816. return s.String()
  13817. }
  13818. func newErrorNotOrganizationMasterAccountException(v protocol.ResponseMetadata) error {
  13819. return &NotOrganizationMasterAccountException{
  13820. RespMetadata: v,
  13821. }
  13822. }
  13823. // Code returns the exception type name.
  13824. func (s *NotOrganizationMasterAccountException) Code() string {
  13825. return "NotOrganizationMasterAccountException"
  13826. }
  13827. // Message returns the exception's message.
  13828. func (s *NotOrganizationMasterAccountException) Message() string {
  13829. if s.Message_ != nil {
  13830. return *s.Message_
  13831. }
  13832. return ""
  13833. }
  13834. // OrigErr always returns nil, satisfies awserr.Error interface.
  13835. func (s *NotOrganizationMasterAccountException) OrigErr() error {
  13836. return nil
  13837. }
  13838. func (s *NotOrganizationMasterAccountException) Error() string {
  13839. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  13840. }
  13841. // Status code returns the HTTP status code for the request's response error.
  13842. func (s *NotOrganizationMasterAccountException) StatusCode() int {
  13843. return s.RespMetadata.StatusCode
  13844. }
  13845. // RequestID returns the service's response RequestID for request.
  13846. func (s *NotOrganizationMasterAccountException) RequestID() string {
  13847. return s.RespMetadata.RequestID
  13848. }
  13849. // This exception is thrown when the requested operation is not permitted.
  13850. type OperationNotPermittedException struct {
  13851. _ struct{} `type:"structure"`
  13852. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  13853. Message_ *string `locationName:"message" type:"string"`
  13854. }
  13855. // String returns the string representation.
  13856. //
  13857. // API parameter values that are decorated as "sensitive" in the API will not
  13858. // be included in the string output. The member name will be present, but the
  13859. // value will be replaced with "sensitive".
  13860. func (s OperationNotPermittedException) String() string {
  13861. return awsutil.Prettify(s)
  13862. }
  13863. // GoString returns the string representation.
  13864. //
  13865. // API parameter values that are decorated as "sensitive" in the API will not
  13866. // be included in the string output. The member name will be present, but the
  13867. // value will be replaced with "sensitive".
  13868. func (s OperationNotPermittedException) GoString() string {
  13869. return s.String()
  13870. }
  13871. func newErrorOperationNotPermittedException(v protocol.ResponseMetadata) error {
  13872. return &OperationNotPermittedException{
  13873. RespMetadata: v,
  13874. }
  13875. }
  13876. // Code returns the exception type name.
  13877. func (s *OperationNotPermittedException) Code() string {
  13878. return "OperationNotPermittedException"
  13879. }
  13880. // Message returns the exception's message.
  13881. func (s *OperationNotPermittedException) Message() string {
  13882. if s.Message_ != nil {
  13883. return *s.Message_
  13884. }
  13885. return ""
  13886. }
  13887. // OrigErr always returns nil, satisfies awserr.Error interface.
  13888. func (s *OperationNotPermittedException) OrigErr() error {
  13889. return nil
  13890. }
  13891. func (s *OperationNotPermittedException) Error() string {
  13892. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  13893. }
  13894. // Status code returns the HTTP status code for the request's response error.
  13895. func (s *OperationNotPermittedException) StatusCode() int {
  13896. return s.RespMetadata.StatusCode
  13897. }
  13898. // RequestID returns the service's response RequestID for request.
  13899. func (s *OperationNotPermittedException) RequestID() string {
  13900. return s.RespMetadata.RequestID
  13901. }
  13902. // This exception is thrown when Organizations is not configured to support
  13903. // all features. All features must be enabled in Organizations to support creating
  13904. // an organization trail or event data store.
  13905. type OrganizationNotInAllFeaturesModeException struct {
  13906. _ struct{} `type:"structure"`
  13907. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  13908. Message_ *string `locationName:"message" type:"string"`
  13909. }
  13910. // String returns the string representation.
  13911. //
  13912. // API parameter values that are decorated as "sensitive" in the API will not
  13913. // be included in the string output. The member name will be present, but the
  13914. // value will be replaced with "sensitive".
  13915. func (s OrganizationNotInAllFeaturesModeException) String() string {
  13916. return awsutil.Prettify(s)
  13917. }
  13918. // GoString returns the string representation.
  13919. //
  13920. // API parameter values that are decorated as "sensitive" in the API will not
  13921. // be included in the string output. The member name will be present, but the
  13922. // value will be replaced with "sensitive".
  13923. func (s OrganizationNotInAllFeaturesModeException) GoString() string {
  13924. return s.String()
  13925. }
  13926. func newErrorOrganizationNotInAllFeaturesModeException(v protocol.ResponseMetadata) error {
  13927. return &OrganizationNotInAllFeaturesModeException{
  13928. RespMetadata: v,
  13929. }
  13930. }
  13931. // Code returns the exception type name.
  13932. func (s *OrganizationNotInAllFeaturesModeException) Code() string {
  13933. return "OrganizationNotInAllFeaturesModeException"
  13934. }
  13935. // Message returns the exception's message.
  13936. func (s *OrganizationNotInAllFeaturesModeException) Message() string {
  13937. if s.Message_ != nil {
  13938. return *s.Message_
  13939. }
  13940. return ""
  13941. }
  13942. // OrigErr always returns nil, satisfies awserr.Error interface.
  13943. func (s *OrganizationNotInAllFeaturesModeException) OrigErr() error {
  13944. return nil
  13945. }
  13946. func (s *OrganizationNotInAllFeaturesModeException) Error() string {
  13947. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  13948. }
  13949. // Status code returns the HTTP status code for the request's response error.
  13950. func (s *OrganizationNotInAllFeaturesModeException) StatusCode() int {
  13951. return s.RespMetadata.StatusCode
  13952. }
  13953. // RequestID returns the service's response RequestID for request.
  13954. func (s *OrganizationNotInAllFeaturesModeException) RequestID() string {
  13955. return s.RespMetadata.RequestID
  13956. }
  13957. // This exception is thrown when the request is made from an Amazon Web Services
  13958. // account that is not a member of an organization. To make this request, sign
  13959. // in using the credentials of an account that belongs to an organization.
  13960. type OrganizationsNotInUseException struct {
  13961. _ struct{} `type:"structure"`
  13962. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  13963. Message_ *string `locationName:"message" type:"string"`
  13964. }
  13965. // String returns the string representation.
  13966. //
  13967. // API parameter values that are decorated as "sensitive" in the API will not
  13968. // be included in the string output. The member name will be present, but the
  13969. // value will be replaced with "sensitive".
  13970. func (s OrganizationsNotInUseException) String() string {
  13971. return awsutil.Prettify(s)
  13972. }
  13973. // GoString returns the string representation.
  13974. //
  13975. // API parameter values that are decorated as "sensitive" in the API will not
  13976. // be included in the string output. The member name will be present, but the
  13977. // value will be replaced with "sensitive".
  13978. func (s OrganizationsNotInUseException) GoString() string {
  13979. return s.String()
  13980. }
  13981. func newErrorOrganizationsNotInUseException(v protocol.ResponseMetadata) error {
  13982. return &OrganizationsNotInUseException{
  13983. RespMetadata: v,
  13984. }
  13985. }
  13986. // Code returns the exception type name.
  13987. func (s *OrganizationsNotInUseException) Code() string {
  13988. return "OrganizationsNotInUseException"
  13989. }
  13990. // Message returns the exception's message.
  13991. func (s *OrganizationsNotInUseException) Message() string {
  13992. if s.Message_ != nil {
  13993. return *s.Message_
  13994. }
  13995. return ""
  13996. }
  13997. // OrigErr always returns nil, satisfies awserr.Error interface.
  13998. func (s *OrganizationsNotInUseException) OrigErr() error {
  13999. return nil
  14000. }
  14001. func (s *OrganizationsNotInUseException) Error() string {
  14002. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  14003. }
  14004. // Status code returns the HTTP status code for the request's response error.
  14005. func (s *OrganizationsNotInUseException) StatusCode() int {
  14006. return s.RespMetadata.StatusCode
  14007. }
  14008. // RequestID returns the service's response RequestID for request.
  14009. func (s *OrganizationsNotInUseException) RequestID() string {
  14010. return s.RespMetadata.RequestID
  14011. }
  14012. // Contains information about a returned public key.
  14013. type PublicKey struct {
  14014. _ struct{} `type:"structure"`
  14015. // The fingerprint of the public key.
  14016. Fingerprint *string `type:"string"`
  14017. // The ending time of validity of the public key.
  14018. ValidityEndTime *time.Time `type:"timestamp"`
  14019. // The starting time of validity of the public key.
  14020. ValidityStartTime *time.Time `type:"timestamp"`
  14021. // The DER encoded public key value in PKCS#1 format.
  14022. // Value is automatically base64 encoded/decoded by the SDK.
  14023. Value []byte `type:"blob"`
  14024. }
  14025. // String returns the string representation.
  14026. //
  14027. // API parameter values that are decorated as "sensitive" in the API will not
  14028. // be included in the string output. The member name will be present, but the
  14029. // value will be replaced with "sensitive".
  14030. func (s PublicKey) String() string {
  14031. return awsutil.Prettify(s)
  14032. }
  14033. // GoString returns the string representation.
  14034. //
  14035. // API parameter values that are decorated as "sensitive" in the API will not
  14036. // be included in the string output. The member name will be present, but the
  14037. // value will be replaced with "sensitive".
  14038. func (s PublicKey) GoString() string {
  14039. return s.String()
  14040. }
  14041. // SetFingerprint sets the Fingerprint field's value.
  14042. func (s *PublicKey) SetFingerprint(v string) *PublicKey {
  14043. s.Fingerprint = &v
  14044. return s
  14045. }
  14046. // SetValidityEndTime sets the ValidityEndTime field's value.
  14047. func (s *PublicKey) SetValidityEndTime(v time.Time) *PublicKey {
  14048. s.ValidityEndTime = &v
  14049. return s
  14050. }
  14051. // SetValidityStartTime sets the ValidityStartTime field's value.
  14052. func (s *PublicKey) SetValidityStartTime(v time.Time) *PublicKey {
  14053. s.ValidityStartTime = &v
  14054. return s
  14055. }
  14056. // SetValue sets the Value field's value.
  14057. func (s *PublicKey) SetValue(v []byte) *PublicKey {
  14058. s.Value = v
  14059. return s
  14060. }
  14061. type PutEventSelectorsInput struct {
  14062. _ struct{} `type:"structure"`
  14063. // Specifies the settings for advanced event selectors. You can add advanced
  14064. // event selectors, and conditions for your advanced event selectors, up to
  14065. // a maximum of 500 values for all conditions and selectors on a trail. You
  14066. // can use either AdvancedEventSelectors or EventSelectors, but not both. If
  14067. // you apply AdvancedEventSelectors to a trail, any existing EventSelectors
  14068. // are overwritten. For more information about advanced event selectors, see
  14069. // Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
  14070. // in the CloudTrail User Guide.
  14071. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  14072. // Specifies the settings for your event selectors. You can configure up to
  14073. // five event selectors for a trail. You can use either EventSelectors or AdvancedEventSelectors
  14074. // in a PutEventSelectors request, but not both. If you apply EventSelectors
  14075. // to a trail, any existing AdvancedEventSelectors are overwritten.
  14076. EventSelectors []*EventSelector `type:"list"`
  14077. // Specifies the name of the trail or trail ARN. If you specify a trail name,
  14078. // the string must meet the following requirements:
  14079. //
  14080. // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  14081. // (_), or dashes (-)
  14082. //
  14083. // * Start with a letter or number, and end with a letter or number
  14084. //
  14085. // * Be between 3 and 128 characters
  14086. //
  14087. // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  14088. // and my--namespace are not valid.
  14089. //
  14090. // * Not be in IP address format (for example, 192.168.5.4)
  14091. //
  14092. // If you specify a trail ARN, it must be in the following format.
  14093. //
  14094. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  14095. //
  14096. // TrailName is a required field
  14097. TrailName *string `type:"string" required:"true"`
  14098. }
  14099. // String returns the string representation.
  14100. //
  14101. // API parameter values that are decorated as "sensitive" in the API will not
  14102. // be included in the string output. The member name will be present, but the
  14103. // value will be replaced with "sensitive".
  14104. func (s PutEventSelectorsInput) String() string {
  14105. return awsutil.Prettify(s)
  14106. }
  14107. // GoString returns the string representation.
  14108. //
  14109. // API parameter values that are decorated as "sensitive" in the API will not
  14110. // be included in the string output. The member name will be present, but the
  14111. // value will be replaced with "sensitive".
  14112. func (s PutEventSelectorsInput) GoString() string {
  14113. return s.String()
  14114. }
  14115. // Validate inspects the fields of the type to determine if they are valid.
  14116. func (s *PutEventSelectorsInput) Validate() error {
  14117. invalidParams := request.ErrInvalidParams{Context: "PutEventSelectorsInput"}
  14118. if s.TrailName == nil {
  14119. invalidParams.Add(request.NewErrParamRequired("TrailName"))
  14120. }
  14121. if s.AdvancedEventSelectors != nil {
  14122. for i, v := range s.AdvancedEventSelectors {
  14123. if v == nil {
  14124. continue
  14125. }
  14126. if err := v.Validate(); err != nil {
  14127. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdvancedEventSelectors", i), err.(request.ErrInvalidParams))
  14128. }
  14129. }
  14130. }
  14131. if invalidParams.Len() > 0 {
  14132. return invalidParams
  14133. }
  14134. return nil
  14135. }
  14136. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  14137. func (s *PutEventSelectorsInput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *PutEventSelectorsInput {
  14138. s.AdvancedEventSelectors = v
  14139. return s
  14140. }
  14141. // SetEventSelectors sets the EventSelectors field's value.
  14142. func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput {
  14143. s.EventSelectors = v
  14144. return s
  14145. }
  14146. // SetTrailName sets the TrailName field's value.
  14147. func (s *PutEventSelectorsInput) SetTrailName(v string) *PutEventSelectorsInput {
  14148. s.TrailName = &v
  14149. return s
  14150. }
  14151. type PutEventSelectorsOutput struct {
  14152. _ struct{} `type:"structure"`
  14153. // Specifies the advanced event selectors configured for your trail.
  14154. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  14155. // Specifies the event selectors configured for your trail.
  14156. EventSelectors []*EventSelector `type:"list"`
  14157. // Specifies the ARN of the trail that was updated with event selectors. The
  14158. // following is the format of a trail ARN.
  14159. //
  14160. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  14161. TrailARN *string `type:"string"`
  14162. }
  14163. // String returns the string representation.
  14164. //
  14165. // API parameter values that are decorated as "sensitive" in the API will not
  14166. // be included in the string output. The member name will be present, but the
  14167. // value will be replaced with "sensitive".
  14168. func (s PutEventSelectorsOutput) String() string {
  14169. return awsutil.Prettify(s)
  14170. }
  14171. // GoString returns the string representation.
  14172. //
  14173. // API parameter values that are decorated as "sensitive" in the API will not
  14174. // be included in the string output. The member name will be present, but the
  14175. // value will be replaced with "sensitive".
  14176. func (s PutEventSelectorsOutput) GoString() string {
  14177. return s.String()
  14178. }
  14179. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  14180. func (s *PutEventSelectorsOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *PutEventSelectorsOutput {
  14181. s.AdvancedEventSelectors = v
  14182. return s
  14183. }
  14184. // SetEventSelectors sets the EventSelectors field's value.
  14185. func (s *PutEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsOutput {
  14186. s.EventSelectors = v
  14187. return s
  14188. }
  14189. // SetTrailARN sets the TrailARN field's value.
  14190. func (s *PutEventSelectorsOutput) SetTrailARN(v string) *PutEventSelectorsOutput {
  14191. s.TrailARN = &v
  14192. return s
  14193. }
  14194. type PutInsightSelectorsInput struct {
  14195. _ struct{} `type:"structure"`
  14196. // A JSON string that contains the insight types you want to log on a trail.
  14197. // ApiCallRateInsight and ApiErrorRateInsight are valid insight types.
  14198. //
  14199. // InsightSelectors is a required field
  14200. InsightSelectors []*InsightSelector `type:"list" required:"true"`
  14201. // The name of the CloudTrail trail for which you want to change or add Insights
  14202. // selectors.
  14203. //
  14204. // TrailName is a required field
  14205. TrailName *string `type:"string" required:"true"`
  14206. }
  14207. // String returns the string representation.
  14208. //
  14209. // API parameter values that are decorated as "sensitive" in the API will not
  14210. // be included in the string output. The member name will be present, but the
  14211. // value will be replaced with "sensitive".
  14212. func (s PutInsightSelectorsInput) String() string {
  14213. return awsutil.Prettify(s)
  14214. }
  14215. // GoString returns the string representation.
  14216. //
  14217. // API parameter values that are decorated as "sensitive" in the API will not
  14218. // be included in the string output. The member name will be present, but the
  14219. // value will be replaced with "sensitive".
  14220. func (s PutInsightSelectorsInput) GoString() string {
  14221. return s.String()
  14222. }
  14223. // Validate inspects the fields of the type to determine if they are valid.
  14224. func (s *PutInsightSelectorsInput) Validate() error {
  14225. invalidParams := request.ErrInvalidParams{Context: "PutInsightSelectorsInput"}
  14226. if s.InsightSelectors == nil {
  14227. invalidParams.Add(request.NewErrParamRequired("InsightSelectors"))
  14228. }
  14229. if s.TrailName == nil {
  14230. invalidParams.Add(request.NewErrParamRequired("TrailName"))
  14231. }
  14232. if invalidParams.Len() > 0 {
  14233. return invalidParams
  14234. }
  14235. return nil
  14236. }
  14237. // SetInsightSelectors sets the InsightSelectors field's value.
  14238. func (s *PutInsightSelectorsInput) SetInsightSelectors(v []*InsightSelector) *PutInsightSelectorsInput {
  14239. s.InsightSelectors = v
  14240. return s
  14241. }
  14242. // SetTrailName sets the TrailName field's value.
  14243. func (s *PutInsightSelectorsInput) SetTrailName(v string) *PutInsightSelectorsInput {
  14244. s.TrailName = &v
  14245. return s
  14246. }
  14247. type PutInsightSelectorsOutput struct {
  14248. _ struct{} `type:"structure"`
  14249. // A JSON string that contains the Insights event types that you want to log
  14250. // on a trail. The valid Insights types in this release are ApiErrorRateInsight
  14251. // and ApiCallRateInsight.
  14252. InsightSelectors []*InsightSelector `type:"list"`
  14253. // The Amazon Resource Name (ARN) of a trail for which you want to change or
  14254. // add Insights selectors.
  14255. TrailARN *string `type:"string"`
  14256. }
  14257. // String returns the string representation.
  14258. //
  14259. // API parameter values that are decorated as "sensitive" in the API will not
  14260. // be included in the string output. The member name will be present, but the
  14261. // value will be replaced with "sensitive".
  14262. func (s PutInsightSelectorsOutput) String() string {
  14263. return awsutil.Prettify(s)
  14264. }
  14265. // GoString returns the string representation.
  14266. //
  14267. // API parameter values that are decorated as "sensitive" in the API will not
  14268. // be included in the string output. The member name will be present, but the
  14269. // value will be replaced with "sensitive".
  14270. func (s PutInsightSelectorsOutput) GoString() string {
  14271. return s.String()
  14272. }
  14273. // SetInsightSelectors sets the InsightSelectors field's value.
  14274. func (s *PutInsightSelectorsOutput) SetInsightSelectors(v []*InsightSelector) *PutInsightSelectorsOutput {
  14275. s.InsightSelectors = v
  14276. return s
  14277. }
  14278. // SetTrailARN sets the TrailARN field's value.
  14279. func (s *PutInsightSelectorsOutput) SetTrailARN(v string) *PutInsightSelectorsOutput {
  14280. s.TrailARN = &v
  14281. return s
  14282. }
  14283. type PutResourcePolicyInput struct {
  14284. _ struct{} `type:"structure"`
  14285. // The Amazon Resource Name (ARN) of the CloudTrail channel attached to the
  14286. // resource-based policy. The following is the format of a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
  14287. //
  14288. // ResourceArn is a required field
  14289. ResourceArn *string `min:"3" type:"string" required:"true"`
  14290. // A JSON-formatted string for an Amazon Web Services resource-based policy.
  14291. //
  14292. // The following are requirements for the resource policy:
  14293. //
  14294. // * Contains only one action: cloudtrail-data:PutAuditEvents
  14295. //
  14296. // * Contains at least one statement. The policy can have a maximum of 20
  14297. // statements.
  14298. //
  14299. // * Each statement contains at least one principal. A statement can have
  14300. // a maximum of 50 principals.
  14301. //
  14302. // ResourcePolicy is a required field
  14303. ResourcePolicy *string `min:"1" type:"string" required:"true"`
  14304. }
  14305. // String returns the string representation.
  14306. //
  14307. // API parameter values that are decorated as "sensitive" in the API will not
  14308. // be included in the string output. The member name will be present, but the
  14309. // value will be replaced with "sensitive".
  14310. func (s PutResourcePolicyInput) String() string {
  14311. return awsutil.Prettify(s)
  14312. }
  14313. // GoString returns the string representation.
  14314. //
  14315. // API parameter values that are decorated as "sensitive" in the API will not
  14316. // be included in the string output. The member name will be present, but the
  14317. // value will be replaced with "sensitive".
  14318. func (s PutResourcePolicyInput) GoString() string {
  14319. return s.String()
  14320. }
  14321. // Validate inspects the fields of the type to determine if they are valid.
  14322. func (s *PutResourcePolicyInput) Validate() error {
  14323. invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"}
  14324. if s.ResourceArn == nil {
  14325. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  14326. }
  14327. if s.ResourceArn != nil && len(*s.ResourceArn) < 3 {
  14328. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 3))
  14329. }
  14330. if s.ResourcePolicy == nil {
  14331. invalidParams.Add(request.NewErrParamRequired("ResourcePolicy"))
  14332. }
  14333. if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 {
  14334. invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1))
  14335. }
  14336. if invalidParams.Len() > 0 {
  14337. return invalidParams
  14338. }
  14339. return nil
  14340. }
  14341. // SetResourceArn sets the ResourceArn field's value.
  14342. func (s *PutResourcePolicyInput) SetResourceArn(v string) *PutResourcePolicyInput {
  14343. s.ResourceArn = &v
  14344. return s
  14345. }
  14346. // SetResourcePolicy sets the ResourcePolicy field's value.
  14347. func (s *PutResourcePolicyInput) SetResourcePolicy(v string) *PutResourcePolicyInput {
  14348. s.ResourcePolicy = &v
  14349. return s
  14350. }
  14351. type PutResourcePolicyOutput struct {
  14352. _ struct{} `type:"structure"`
  14353. // The Amazon Resource Name (ARN) of the CloudTrail channel attached to the
  14354. // resource-based policy.
  14355. ResourceArn *string `min:"3" type:"string"`
  14356. // The JSON-formatted string of the Amazon Web Services resource-based policy
  14357. // attached to the CloudTrail channel.
  14358. ResourcePolicy *string `min:"1" type:"string"`
  14359. }
  14360. // String returns the string representation.
  14361. //
  14362. // API parameter values that are decorated as "sensitive" in the API will not
  14363. // be included in the string output. The member name will be present, but the
  14364. // value will be replaced with "sensitive".
  14365. func (s PutResourcePolicyOutput) String() string {
  14366. return awsutil.Prettify(s)
  14367. }
  14368. // GoString returns the string representation.
  14369. //
  14370. // API parameter values that are decorated as "sensitive" in the API will not
  14371. // be included in the string output. The member name will be present, but the
  14372. // value will be replaced with "sensitive".
  14373. func (s PutResourcePolicyOutput) GoString() string {
  14374. return s.String()
  14375. }
  14376. // SetResourceArn sets the ResourceArn field's value.
  14377. func (s *PutResourcePolicyOutput) SetResourceArn(v string) *PutResourcePolicyOutput {
  14378. s.ResourceArn = &v
  14379. return s
  14380. }
  14381. // SetResourcePolicy sets the ResourcePolicy field's value.
  14382. func (s *PutResourcePolicyOutput) SetResourcePolicy(v string) *PutResourcePolicyOutput {
  14383. s.ResourcePolicy = &v
  14384. return s
  14385. }
  14386. // A SQL string of criteria about events that you want to collect in an event
  14387. // data store.
  14388. type Query struct {
  14389. _ struct{} `type:"structure"`
  14390. // The creation time of a query.
  14391. CreationTime *time.Time `type:"timestamp"`
  14392. // The ID of a query.
  14393. QueryId *string `min:"36" type:"string"`
  14394. // The status of the query. This can be QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT,
  14395. // or CANCELLED.
  14396. QueryStatus *string `type:"string" enum:"QueryStatus"`
  14397. }
  14398. // String returns the string representation.
  14399. //
  14400. // API parameter values that are decorated as "sensitive" in the API will not
  14401. // be included in the string output. The member name will be present, but the
  14402. // value will be replaced with "sensitive".
  14403. func (s Query) String() string {
  14404. return awsutil.Prettify(s)
  14405. }
  14406. // GoString returns the string representation.
  14407. //
  14408. // API parameter values that are decorated as "sensitive" in the API will not
  14409. // be included in the string output. The member name will be present, but the
  14410. // value will be replaced with "sensitive".
  14411. func (s Query) GoString() string {
  14412. return s.String()
  14413. }
  14414. // SetCreationTime sets the CreationTime field's value.
  14415. func (s *Query) SetCreationTime(v time.Time) *Query {
  14416. s.CreationTime = &v
  14417. return s
  14418. }
  14419. // SetQueryId sets the QueryId field's value.
  14420. func (s *Query) SetQueryId(v string) *Query {
  14421. s.QueryId = &v
  14422. return s
  14423. }
  14424. // SetQueryStatus sets the QueryStatus field's value.
  14425. func (s *Query) SetQueryStatus(v string) *Query {
  14426. s.QueryStatus = &v
  14427. return s
  14428. }
  14429. // The query ID does not exist or does not map to a query.
  14430. type QueryIdNotFoundException struct {
  14431. _ struct{} `type:"structure"`
  14432. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  14433. Message_ *string `locationName:"message" type:"string"`
  14434. }
  14435. // String returns the string representation.
  14436. //
  14437. // API parameter values that are decorated as "sensitive" in the API will not
  14438. // be included in the string output. The member name will be present, but the
  14439. // value will be replaced with "sensitive".
  14440. func (s QueryIdNotFoundException) String() string {
  14441. return awsutil.Prettify(s)
  14442. }
  14443. // GoString returns the string representation.
  14444. //
  14445. // API parameter values that are decorated as "sensitive" in the API will not
  14446. // be included in the string output. The member name will be present, but the
  14447. // value will be replaced with "sensitive".
  14448. func (s QueryIdNotFoundException) GoString() string {
  14449. return s.String()
  14450. }
  14451. func newErrorQueryIdNotFoundException(v protocol.ResponseMetadata) error {
  14452. return &QueryIdNotFoundException{
  14453. RespMetadata: v,
  14454. }
  14455. }
  14456. // Code returns the exception type name.
  14457. func (s *QueryIdNotFoundException) Code() string {
  14458. return "QueryIdNotFoundException"
  14459. }
  14460. // Message returns the exception's message.
  14461. func (s *QueryIdNotFoundException) Message() string {
  14462. if s.Message_ != nil {
  14463. return *s.Message_
  14464. }
  14465. return ""
  14466. }
  14467. // OrigErr always returns nil, satisfies awserr.Error interface.
  14468. func (s *QueryIdNotFoundException) OrigErr() error {
  14469. return nil
  14470. }
  14471. func (s *QueryIdNotFoundException) Error() string {
  14472. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  14473. }
  14474. // Status code returns the HTTP status code for the request's response error.
  14475. func (s *QueryIdNotFoundException) StatusCode() int {
  14476. return s.RespMetadata.StatusCode
  14477. }
  14478. // RequestID returns the service's response RequestID for request.
  14479. func (s *QueryIdNotFoundException) RequestID() string {
  14480. return s.RespMetadata.RequestID
  14481. }
  14482. // Metadata about a query, such as the number of results.
  14483. type QueryStatistics struct {
  14484. _ struct{} `type:"structure"`
  14485. // The total bytes that the query scanned in the event data store. This value
  14486. // matches the number of bytes for which your account is billed for the query,
  14487. // unless the query is still running.
  14488. BytesScanned *int64 `type:"long"`
  14489. // The number of results returned.
  14490. ResultsCount *int64 `type:"integer"`
  14491. // The total number of results returned by a query.
  14492. TotalResultsCount *int64 `type:"integer"`
  14493. }
  14494. // String returns the string representation.
  14495. //
  14496. // API parameter values that are decorated as "sensitive" in the API will not
  14497. // be included in the string output. The member name will be present, but the
  14498. // value will be replaced with "sensitive".
  14499. func (s QueryStatistics) String() string {
  14500. return awsutil.Prettify(s)
  14501. }
  14502. // GoString returns the string representation.
  14503. //
  14504. // API parameter values that are decorated as "sensitive" in the API will not
  14505. // be included in the string output. The member name will be present, but the
  14506. // value will be replaced with "sensitive".
  14507. func (s QueryStatistics) GoString() string {
  14508. return s.String()
  14509. }
  14510. // SetBytesScanned sets the BytesScanned field's value.
  14511. func (s *QueryStatistics) SetBytesScanned(v int64) *QueryStatistics {
  14512. s.BytesScanned = &v
  14513. return s
  14514. }
  14515. // SetResultsCount sets the ResultsCount field's value.
  14516. func (s *QueryStatistics) SetResultsCount(v int64) *QueryStatistics {
  14517. s.ResultsCount = &v
  14518. return s
  14519. }
  14520. // SetTotalResultsCount sets the TotalResultsCount field's value.
  14521. func (s *QueryStatistics) SetTotalResultsCount(v int64) *QueryStatistics {
  14522. s.TotalResultsCount = &v
  14523. return s
  14524. }
  14525. // Gets metadata about a query, including the number of events that were matched,
  14526. // the total number of events scanned, the query run time in milliseconds, and
  14527. // the query's creation time.
  14528. type QueryStatisticsForDescribeQuery struct {
  14529. _ struct{} `type:"structure"`
  14530. // The total bytes that the query scanned in the event data store. This value
  14531. // matches the number of bytes for which your account is billed for the query,
  14532. // unless the query is still running.
  14533. BytesScanned *int64 `type:"long"`
  14534. // The creation time of the query.
  14535. CreationTime *time.Time `type:"timestamp"`
  14536. // The number of events that matched a query.
  14537. EventsMatched *int64 `type:"long"`
  14538. // The number of events that the query scanned in the event data store.
  14539. EventsScanned *int64 `type:"long"`
  14540. // The query's run time, in milliseconds.
  14541. ExecutionTimeInMillis *int64 `type:"integer"`
  14542. }
  14543. // String returns the string representation.
  14544. //
  14545. // API parameter values that are decorated as "sensitive" in the API will not
  14546. // be included in the string output. The member name will be present, but the
  14547. // value will be replaced with "sensitive".
  14548. func (s QueryStatisticsForDescribeQuery) String() string {
  14549. return awsutil.Prettify(s)
  14550. }
  14551. // GoString returns the string representation.
  14552. //
  14553. // API parameter values that are decorated as "sensitive" in the API will not
  14554. // be included in the string output. The member name will be present, but the
  14555. // value will be replaced with "sensitive".
  14556. func (s QueryStatisticsForDescribeQuery) GoString() string {
  14557. return s.String()
  14558. }
  14559. // SetBytesScanned sets the BytesScanned field's value.
  14560. func (s *QueryStatisticsForDescribeQuery) SetBytesScanned(v int64) *QueryStatisticsForDescribeQuery {
  14561. s.BytesScanned = &v
  14562. return s
  14563. }
  14564. // SetCreationTime sets the CreationTime field's value.
  14565. func (s *QueryStatisticsForDescribeQuery) SetCreationTime(v time.Time) *QueryStatisticsForDescribeQuery {
  14566. s.CreationTime = &v
  14567. return s
  14568. }
  14569. // SetEventsMatched sets the EventsMatched field's value.
  14570. func (s *QueryStatisticsForDescribeQuery) SetEventsMatched(v int64) *QueryStatisticsForDescribeQuery {
  14571. s.EventsMatched = &v
  14572. return s
  14573. }
  14574. // SetEventsScanned sets the EventsScanned field's value.
  14575. func (s *QueryStatisticsForDescribeQuery) SetEventsScanned(v int64) *QueryStatisticsForDescribeQuery {
  14576. s.EventsScanned = &v
  14577. return s
  14578. }
  14579. // SetExecutionTimeInMillis sets the ExecutionTimeInMillis field's value.
  14580. func (s *QueryStatisticsForDescribeQuery) SetExecutionTimeInMillis(v int64) *QueryStatisticsForDescribeQuery {
  14581. s.ExecutionTimeInMillis = &v
  14582. return s
  14583. }
  14584. // Specifies an organization member account ID as a CloudTrail delegated administrator.
  14585. type RegisterOrganizationDelegatedAdminInput struct {
  14586. _ struct{} `type:"structure"`
  14587. // An organization member account ID that you want to designate as a delegated
  14588. // administrator.
  14589. //
  14590. // MemberAccountId is a required field
  14591. MemberAccountId *string `min:"12" type:"string" required:"true"`
  14592. }
  14593. // String returns the string representation.
  14594. //
  14595. // API parameter values that are decorated as "sensitive" in the API will not
  14596. // be included in the string output. The member name will be present, but the
  14597. // value will be replaced with "sensitive".
  14598. func (s RegisterOrganizationDelegatedAdminInput) String() string {
  14599. return awsutil.Prettify(s)
  14600. }
  14601. // GoString returns the string representation.
  14602. //
  14603. // API parameter values that are decorated as "sensitive" in the API will not
  14604. // be included in the string output. The member name will be present, but the
  14605. // value will be replaced with "sensitive".
  14606. func (s RegisterOrganizationDelegatedAdminInput) GoString() string {
  14607. return s.String()
  14608. }
  14609. // Validate inspects the fields of the type to determine if they are valid.
  14610. func (s *RegisterOrganizationDelegatedAdminInput) Validate() error {
  14611. invalidParams := request.ErrInvalidParams{Context: "RegisterOrganizationDelegatedAdminInput"}
  14612. if s.MemberAccountId == nil {
  14613. invalidParams.Add(request.NewErrParamRequired("MemberAccountId"))
  14614. }
  14615. if s.MemberAccountId != nil && len(*s.MemberAccountId) < 12 {
  14616. invalidParams.Add(request.NewErrParamMinLen("MemberAccountId", 12))
  14617. }
  14618. if invalidParams.Len() > 0 {
  14619. return invalidParams
  14620. }
  14621. return nil
  14622. }
  14623. // SetMemberAccountId sets the MemberAccountId field's value.
  14624. func (s *RegisterOrganizationDelegatedAdminInput) SetMemberAccountId(v string) *RegisterOrganizationDelegatedAdminInput {
  14625. s.MemberAccountId = &v
  14626. return s
  14627. }
  14628. // Returns the following response if successful. Otherwise, returns an error.
  14629. type RegisterOrganizationDelegatedAdminOutput struct {
  14630. _ struct{} `type:"structure"`
  14631. }
  14632. // String returns the string representation.
  14633. //
  14634. // API parameter values that are decorated as "sensitive" in the API will not
  14635. // be included in the string output. The member name will be present, but the
  14636. // value will be replaced with "sensitive".
  14637. func (s RegisterOrganizationDelegatedAdminOutput) String() string {
  14638. return awsutil.Prettify(s)
  14639. }
  14640. // GoString returns the string representation.
  14641. //
  14642. // API parameter values that are decorated as "sensitive" in the API will not
  14643. // be included in the string output. The member name will be present, but the
  14644. // value will be replaced with "sensitive".
  14645. func (s RegisterOrganizationDelegatedAdminOutput) GoString() string {
  14646. return s.String()
  14647. }
  14648. // Specifies the tags to remove from a trail, event data store, or channel.
  14649. type RemoveTagsInput struct {
  14650. _ struct{} `type:"structure"`
  14651. // Specifies the ARN of the trail, event data store, or channel from which tags
  14652. // should be removed.
  14653. //
  14654. // Example trail ARN format: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  14655. //
  14656. // Example event data store ARN format: arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
  14657. //
  14658. // Example channel ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
  14659. //
  14660. // ResourceId is a required field
  14661. ResourceId *string `type:"string" required:"true"`
  14662. // Specifies a list of tags to be removed.
  14663. //
  14664. // TagsList is a required field
  14665. TagsList []*Tag `type:"list" required:"true"`
  14666. }
  14667. // String returns the string representation.
  14668. //
  14669. // API parameter values that are decorated as "sensitive" in the API will not
  14670. // be included in the string output. The member name will be present, but the
  14671. // value will be replaced with "sensitive".
  14672. func (s RemoveTagsInput) String() string {
  14673. return awsutil.Prettify(s)
  14674. }
  14675. // GoString returns the string representation.
  14676. //
  14677. // API parameter values that are decorated as "sensitive" in the API will not
  14678. // be included in the string output. The member name will be present, but the
  14679. // value will be replaced with "sensitive".
  14680. func (s RemoveTagsInput) GoString() string {
  14681. return s.String()
  14682. }
  14683. // Validate inspects the fields of the type to determine if they are valid.
  14684. func (s *RemoveTagsInput) Validate() error {
  14685. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
  14686. if s.ResourceId == nil {
  14687. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  14688. }
  14689. if s.TagsList == nil {
  14690. invalidParams.Add(request.NewErrParamRequired("TagsList"))
  14691. }
  14692. if s.TagsList != nil {
  14693. for i, v := range s.TagsList {
  14694. if v == nil {
  14695. continue
  14696. }
  14697. if err := v.Validate(); err != nil {
  14698. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  14699. }
  14700. }
  14701. }
  14702. if invalidParams.Len() > 0 {
  14703. return invalidParams
  14704. }
  14705. return nil
  14706. }
  14707. // SetResourceId sets the ResourceId field's value.
  14708. func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput {
  14709. s.ResourceId = &v
  14710. return s
  14711. }
  14712. // SetTagsList sets the TagsList field's value.
  14713. func (s *RemoveTagsInput) SetTagsList(v []*Tag) *RemoveTagsInput {
  14714. s.TagsList = v
  14715. return s
  14716. }
  14717. // Returns the objects or data listed below if successful. Otherwise, returns
  14718. // an error.
  14719. type RemoveTagsOutput struct {
  14720. _ struct{} `type:"structure"`
  14721. }
  14722. // String returns the string representation.
  14723. //
  14724. // API parameter values that are decorated as "sensitive" in the API will not
  14725. // be included in the string output. The member name will be present, but the
  14726. // value will be replaced with "sensitive".
  14727. func (s RemoveTagsOutput) String() string {
  14728. return awsutil.Prettify(s)
  14729. }
  14730. // GoString returns the string representation.
  14731. //
  14732. // API parameter values that are decorated as "sensitive" in the API will not
  14733. // be included in the string output. The member name will be present, but the
  14734. // value will be replaced with "sensitive".
  14735. func (s RemoveTagsOutput) GoString() string {
  14736. return s.String()
  14737. }
  14738. // Specifies the type and name of a resource referenced by an event.
  14739. type Resource struct {
  14740. _ struct{} `type:"structure"`
  14741. // The name of the resource referenced by the event returned. These are user-created
  14742. // names whose values will depend on the environment. For example, the resource
  14743. // name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567"
  14744. // for an EC2 Instance.
  14745. ResourceName *string `type:"string"`
  14746. // The type of a resource referenced by the event returned. When the resource
  14747. // type cannot be determined, null is returned. Some examples of resource types
  14748. // are: Instance for EC2, Trail for CloudTrail, DBInstance for Amazon RDS, and
  14749. // AccessKey for IAM. To learn more about how to look up and filter events by
  14750. // the resource types supported for a service, see Filtering CloudTrail Events
  14751. // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html#filtering-cloudtrail-events).
  14752. ResourceType *string `type:"string"`
  14753. }
  14754. // String returns the string representation.
  14755. //
  14756. // API parameter values that are decorated as "sensitive" in the API will not
  14757. // be included in the string output. The member name will be present, but the
  14758. // value will be replaced with "sensitive".
  14759. func (s Resource) String() string {
  14760. return awsutil.Prettify(s)
  14761. }
  14762. // GoString returns the string representation.
  14763. //
  14764. // API parameter values that are decorated as "sensitive" in the API will not
  14765. // be included in the string output. The member name will be present, but the
  14766. // value will be replaced with "sensitive".
  14767. func (s Resource) GoString() string {
  14768. return s.String()
  14769. }
  14770. // SetResourceName sets the ResourceName field's value.
  14771. func (s *Resource) SetResourceName(v string) *Resource {
  14772. s.ResourceName = &v
  14773. return s
  14774. }
  14775. // SetResourceType sets the ResourceType field's value.
  14776. func (s *Resource) SetResourceType(v string) *Resource {
  14777. s.ResourceType = &v
  14778. return s
  14779. }
  14780. // This exception is thrown when the provided resource does not exist, or the
  14781. // ARN format of the resource is not valid. The following is the valid format
  14782. // for a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
  14783. type ResourceARNNotValidException struct {
  14784. _ struct{} `type:"structure"`
  14785. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  14786. Message_ *string `locationName:"message" type:"string"`
  14787. }
  14788. // String returns the string representation.
  14789. //
  14790. // API parameter values that are decorated as "sensitive" in the API will not
  14791. // be included in the string output. The member name will be present, but the
  14792. // value will be replaced with "sensitive".
  14793. func (s ResourceARNNotValidException) String() string {
  14794. return awsutil.Prettify(s)
  14795. }
  14796. // GoString returns the string representation.
  14797. //
  14798. // API parameter values that are decorated as "sensitive" in the API will not
  14799. // be included in the string output. The member name will be present, but the
  14800. // value will be replaced with "sensitive".
  14801. func (s ResourceARNNotValidException) GoString() string {
  14802. return s.String()
  14803. }
  14804. func newErrorResourceARNNotValidException(v protocol.ResponseMetadata) error {
  14805. return &ResourceARNNotValidException{
  14806. RespMetadata: v,
  14807. }
  14808. }
  14809. // Code returns the exception type name.
  14810. func (s *ResourceARNNotValidException) Code() string {
  14811. return "ResourceARNNotValidException"
  14812. }
  14813. // Message returns the exception's message.
  14814. func (s *ResourceARNNotValidException) Message() string {
  14815. if s.Message_ != nil {
  14816. return *s.Message_
  14817. }
  14818. return ""
  14819. }
  14820. // OrigErr always returns nil, satisfies awserr.Error interface.
  14821. func (s *ResourceARNNotValidException) OrigErr() error {
  14822. return nil
  14823. }
  14824. func (s *ResourceARNNotValidException) Error() string {
  14825. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  14826. }
  14827. // Status code returns the HTTP status code for the request's response error.
  14828. func (s *ResourceARNNotValidException) StatusCode() int {
  14829. return s.RespMetadata.StatusCode
  14830. }
  14831. // RequestID returns the service's response RequestID for request.
  14832. func (s *ResourceARNNotValidException) RequestID() string {
  14833. return s.RespMetadata.RequestID
  14834. }
  14835. // This exception is thrown when the specified resource is not found.
  14836. type ResourceNotFoundException struct {
  14837. _ struct{} `type:"structure"`
  14838. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  14839. Message_ *string `locationName:"message" type:"string"`
  14840. }
  14841. // String returns the string representation.
  14842. //
  14843. // API parameter values that are decorated as "sensitive" in the API will not
  14844. // be included in the string output. The member name will be present, but the
  14845. // value will be replaced with "sensitive".
  14846. func (s ResourceNotFoundException) String() string {
  14847. return awsutil.Prettify(s)
  14848. }
  14849. // GoString returns the string representation.
  14850. //
  14851. // API parameter values that are decorated as "sensitive" in the API will not
  14852. // be included in the string output. The member name will be present, but the
  14853. // value will be replaced with "sensitive".
  14854. func (s ResourceNotFoundException) GoString() string {
  14855. return s.String()
  14856. }
  14857. func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
  14858. return &ResourceNotFoundException{
  14859. RespMetadata: v,
  14860. }
  14861. }
  14862. // Code returns the exception type name.
  14863. func (s *ResourceNotFoundException) Code() string {
  14864. return "ResourceNotFoundException"
  14865. }
  14866. // Message returns the exception's message.
  14867. func (s *ResourceNotFoundException) Message() string {
  14868. if s.Message_ != nil {
  14869. return *s.Message_
  14870. }
  14871. return ""
  14872. }
  14873. // OrigErr always returns nil, satisfies awserr.Error interface.
  14874. func (s *ResourceNotFoundException) OrigErr() error {
  14875. return nil
  14876. }
  14877. func (s *ResourceNotFoundException) Error() string {
  14878. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  14879. }
  14880. // Status code returns the HTTP status code for the request's response error.
  14881. func (s *ResourceNotFoundException) StatusCode() int {
  14882. return s.RespMetadata.StatusCode
  14883. }
  14884. // RequestID returns the service's response RequestID for request.
  14885. func (s *ResourceNotFoundException) RequestID() string {
  14886. return s.RespMetadata.RequestID
  14887. }
  14888. // This exception is thrown when the specified resource policy is not found.
  14889. type ResourcePolicyNotFoundException struct {
  14890. _ struct{} `type:"structure"`
  14891. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  14892. Message_ *string `locationName:"message" type:"string"`
  14893. }
  14894. // String returns the string representation.
  14895. //
  14896. // API parameter values that are decorated as "sensitive" in the API will not
  14897. // be included in the string output. The member name will be present, but the
  14898. // value will be replaced with "sensitive".
  14899. func (s ResourcePolicyNotFoundException) String() string {
  14900. return awsutil.Prettify(s)
  14901. }
  14902. // GoString returns the string representation.
  14903. //
  14904. // API parameter values that are decorated as "sensitive" in the API will not
  14905. // be included in the string output. The member name will be present, but the
  14906. // value will be replaced with "sensitive".
  14907. func (s ResourcePolicyNotFoundException) GoString() string {
  14908. return s.String()
  14909. }
  14910. func newErrorResourcePolicyNotFoundException(v protocol.ResponseMetadata) error {
  14911. return &ResourcePolicyNotFoundException{
  14912. RespMetadata: v,
  14913. }
  14914. }
  14915. // Code returns the exception type name.
  14916. func (s *ResourcePolicyNotFoundException) Code() string {
  14917. return "ResourcePolicyNotFoundException"
  14918. }
  14919. // Message returns the exception's message.
  14920. func (s *ResourcePolicyNotFoundException) Message() string {
  14921. if s.Message_ != nil {
  14922. return *s.Message_
  14923. }
  14924. return ""
  14925. }
  14926. // OrigErr always returns nil, satisfies awserr.Error interface.
  14927. func (s *ResourcePolicyNotFoundException) OrigErr() error {
  14928. return nil
  14929. }
  14930. func (s *ResourcePolicyNotFoundException) Error() string {
  14931. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  14932. }
  14933. // Status code returns the HTTP status code for the request's response error.
  14934. func (s *ResourcePolicyNotFoundException) StatusCode() int {
  14935. return s.RespMetadata.StatusCode
  14936. }
  14937. // RequestID returns the service's response RequestID for request.
  14938. func (s *ResourcePolicyNotFoundException) RequestID() string {
  14939. return s.RespMetadata.RequestID
  14940. }
  14941. // This exception is thrown when the resouce-based policy has syntax errors,
  14942. // or contains a principal that is not valid.
  14943. //
  14944. // The following are requirements for the resource policy:
  14945. //
  14946. // - Contains only one action: cloudtrail-data:PutAuditEvents
  14947. //
  14948. // - Contains at least one statement. The policy can have a maximum of 20
  14949. // statements.
  14950. //
  14951. // - Each statement contains at least one principal. A statement can have
  14952. // a maximum of 50 principals.
  14953. type ResourcePolicyNotValidException struct {
  14954. _ struct{} `type:"structure"`
  14955. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  14956. Message_ *string `locationName:"message" type:"string"`
  14957. }
  14958. // String returns the string representation.
  14959. //
  14960. // API parameter values that are decorated as "sensitive" in the API will not
  14961. // be included in the string output. The member name will be present, but the
  14962. // value will be replaced with "sensitive".
  14963. func (s ResourcePolicyNotValidException) String() string {
  14964. return awsutil.Prettify(s)
  14965. }
  14966. // GoString returns the string representation.
  14967. //
  14968. // API parameter values that are decorated as "sensitive" in the API will not
  14969. // be included in the string output. The member name will be present, but the
  14970. // value will be replaced with "sensitive".
  14971. func (s ResourcePolicyNotValidException) GoString() string {
  14972. return s.String()
  14973. }
  14974. func newErrorResourcePolicyNotValidException(v protocol.ResponseMetadata) error {
  14975. return &ResourcePolicyNotValidException{
  14976. RespMetadata: v,
  14977. }
  14978. }
  14979. // Code returns the exception type name.
  14980. func (s *ResourcePolicyNotValidException) Code() string {
  14981. return "ResourcePolicyNotValidException"
  14982. }
  14983. // Message returns the exception's message.
  14984. func (s *ResourcePolicyNotValidException) Message() string {
  14985. if s.Message_ != nil {
  14986. return *s.Message_
  14987. }
  14988. return ""
  14989. }
  14990. // OrigErr always returns nil, satisfies awserr.Error interface.
  14991. func (s *ResourcePolicyNotValidException) OrigErr() error {
  14992. return nil
  14993. }
  14994. func (s *ResourcePolicyNotValidException) Error() string {
  14995. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  14996. }
  14997. // Status code returns the HTTP status code for the request's response error.
  14998. func (s *ResourcePolicyNotValidException) StatusCode() int {
  14999. return s.RespMetadata.StatusCode
  15000. }
  15001. // RequestID returns the service's response RequestID for request.
  15002. func (s *ResourcePolicyNotValidException) RequestID() string {
  15003. return s.RespMetadata.RequestID
  15004. }
  15005. // A resource tag.
  15006. type ResourceTag struct {
  15007. _ struct{} `type:"structure"`
  15008. // Specifies the ARN of the resource.
  15009. ResourceId *string `type:"string"`
  15010. // A list of tags.
  15011. TagsList []*Tag `type:"list"`
  15012. }
  15013. // String returns the string representation.
  15014. //
  15015. // API parameter values that are decorated as "sensitive" in the API will not
  15016. // be included in the string output. The member name will be present, but the
  15017. // value will be replaced with "sensitive".
  15018. func (s ResourceTag) String() string {
  15019. return awsutil.Prettify(s)
  15020. }
  15021. // GoString returns the string representation.
  15022. //
  15023. // API parameter values that are decorated as "sensitive" in the API will not
  15024. // be included in the string output. The member name will be present, but the
  15025. // value will be replaced with "sensitive".
  15026. func (s ResourceTag) GoString() string {
  15027. return s.String()
  15028. }
  15029. // SetResourceId sets the ResourceId field's value.
  15030. func (s *ResourceTag) SetResourceId(v string) *ResourceTag {
  15031. s.ResourceId = &v
  15032. return s
  15033. }
  15034. // SetTagsList sets the TagsList field's value.
  15035. func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag {
  15036. s.TagsList = v
  15037. return s
  15038. }
  15039. // This exception is thrown when the specified resource type is not supported
  15040. // by CloudTrail.
  15041. type ResourceTypeNotSupportedException struct {
  15042. _ struct{} `type:"structure"`
  15043. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  15044. Message_ *string `locationName:"message" type:"string"`
  15045. }
  15046. // String returns the string representation.
  15047. //
  15048. // API parameter values that are decorated as "sensitive" in the API will not
  15049. // be included in the string output. The member name will be present, but the
  15050. // value will be replaced with "sensitive".
  15051. func (s ResourceTypeNotSupportedException) String() string {
  15052. return awsutil.Prettify(s)
  15053. }
  15054. // GoString returns the string representation.
  15055. //
  15056. // API parameter values that are decorated as "sensitive" in the API will not
  15057. // be included in the string output. The member name will be present, but the
  15058. // value will be replaced with "sensitive".
  15059. func (s ResourceTypeNotSupportedException) GoString() string {
  15060. return s.String()
  15061. }
  15062. func newErrorResourceTypeNotSupportedException(v protocol.ResponseMetadata) error {
  15063. return &ResourceTypeNotSupportedException{
  15064. RespMetadata: v,
  15065. }
  15066. }
  15067. // Code returns the exception type name.
  15068. func (s *ResourceTypeNotSupportedException) Code() string {
  15069. return "ResourceTypeNotSupportedException"
  15070. }
  15071. // Message returns the exception's message.
  15072. func (s *ResourceTypeNotSupportedException) Message() string {
  15073. if s.Message_ != nil {
  15074. return *s.Message_
  15075. }
  15076. return ""
  15077. }
  15078. // OrigErr always returns nil, satisfies awserr.Error interface.
  15079. func (s *ResourceTypeNotSupportedException) OrigErr() error {
  15080. return nil
  15081. }
  15082. func (s *ResourceTypeNotSupportedException) Error() string {
  15083. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  15084. }
  15085. // Status code returns the HTTP status code for the request's response error.
  15086. func (s *ResourceTypeNotSupportedException) StatusCode() int {
  15087. return s.RespMetadata.StatusCode
  15088. }
  15089. // RequestID returns the service's response RequestID for request.
  15090. func (s *ResourceTypeNotSupportedException) RequestID() string {
  15091. return s.RespMetadata.RequestID
  15092. }
  15093. type RestoreEventDataStoreInput struct {
  15094. _ struct{} `type:"structure"`
  15095. // The ARN (or the ID suffix of the ARN) of the event data store that you want
  15096. // to restore.
  15097. //
  15098. // EventDataStore is a required field
  15099. EventDataStore *string `min:"3" type:"string" required:"true"`
  15100. }
  15101. // String returns the string representation.
  15102. //
  15103. // API parameter values that are decorated as "sensitive" in the API will not
  15104. // be included in the string output. The member name will be present, but the
  15105. // value will be replaced with "sensitive".
  15106. func (s RestoreEventDataStoreInput) String() string {
  15107. return awsutil.Prettify(s)
  15108. }
  15109. // GoString returns the string representation.
  15110. //
  15111. // API parameter values that are decorated as "sensitive" in the API will not
  15112. // be included in the string output. The member name will be present, but the
  15113. // value will be replaced with "sensitive".
  15114. func (s RestoreEventDataStoreInput) GoString() string {
  15115. return s.String()
  15116. }
  15117. // Validate inspects the fields of the type to determine if they are valid.
  15118. func (s *RestoreEventDataStoreInput) Validate() error {
  15119. invalidParams := request.ErrInvalidParams{Context: "RestoreEventDataStoreInput"}
  15120. if s.EventDataStore == nil {
  15121. invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
  15122. }
  15123. if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
  15124. invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
  15125. }
  15126. if invalidParams.Len() > 0 {
  15127. return invalidParams
  15128. }
  15129. return nil
  15130. }
  15131. // SetEventDataStore sets the EventDataStore field's value.
  15132. func (s *RestoreEventDataStoreInput) SetEventDataStore(v string) *RestoreEventDataStoreInput {
  15133. s.EventDataStore = &v
  15134. return s
  15135. }
  15136. type RestoreEventDataStoreOutput struct {
  15137. _ struct{} `type:"structure"`
  15138. // The advanced event selectors that were used to select events.
  15139. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  15140. // The timestamp of an event data store's creation.
  15141. CreatedTimestamp *time.Time `type:"timestamp"`
  15142. // The event data store ARN.
  15143. EventDataStoreArn *string `min:"3" type:"string"`
  15144. // Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
  15145. // The value is a fully specified ARN to a KMS key in the following format.
  15146. //
  15147. // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  15148. KmsKeyId *string `min:"1" type:"string"`
  15149. // Indicates whether the event data store is collecting events from all regions,
  15150. // or only from the region in which the event data store was created.
  15151. MultiRegionEnabled *bool `type:"boolean"`
  15152. // The name of the event data store.
  15153. Name *string `min:"3" type:"string"`
  15154. // Indicates whether an event data store is collecting logged events for an
  15155. // organization in Organizations.
  15156. OrganizationEnabled *bool `type:"boolean"`
  15157. // The retention period, in days.
  15158. RetentionPeriod *int64 `min:"7" type:"integer"`
  15159. // The status of the event data store.
  15160. Status *string `type:"string" enum:"EventDataStoreStatus"`
  15161. // Indicates that termination protection is enabled and the event data store
  15162. // cannot be automatically deleted.
  15163. TerminationProtectionEnabled *bool `type:"boolean"`
  15164. // The timestamp that shows when an event data store was updated, if applicable.
  15165. // UpdatedTimestamp is always either the same or newer than the time shown in
  15166. // CreatedTimestamp.
  15167. UpdatedTimestamp *time.Time `type:"timestamp"`
  15168. }
  15169. // String returns the string representation.
  15170. //
  15171. // API parameter values that are decorated as "sensitive" in the API will not
  15172. // be included in the string output. The member name will be present, but the
  15173. // value will be replaced with "sensitive".
  15174. func (s RestoreEventDataStoreOutput) String() string {
  15175. return awsutil.Prettify(s)
  15176. }
  15177. // GoString returns the string representation.
  15178. //
  15179. // API parameter values that are decorated as "sensitive" in the API will not
  15180. // be included in the string output. The member name will be present, but the
  15181. // value will be replaced with "sensitive".
  15182. func (s RestoreEventDataStoreOutput) GoString() string {
  15183. return s.String()
  15184. }
  15185. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  15186. func (s *RestoreEventDataStoreOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *RestoreEventDataStoreOutput {
  15187. s.AdvancedEventSelectors = v
  15188. return s
  15189. }
  15190. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  15191. func (s *RestoreEventDataStoreOutput) SetCreatedTimestamp(v time.Time) *RestoreEventDataStoreOutput {
  15192. s.CreatedTimestamp = &v
  15193. return s
  15194. }
  15195. // SetEventDataStoreArn sets the EventDataStoreArn field's value.
  15196. func (s *RestoreEventDataStoreOutput) SetEventDataStoreArn(v string) *RestoreEventDataStoreOutput {
  15197. s.EventDataStoreArn = &v
  15198. return s
  15199. }
  15200. // SetKmsKeyId sets the KmsKeyId field's value.
  15201. func (s *RestoreEventDataStoreOutput) SetKmsKeyId(v string) *RestoreEventDataStoreOutput {
  15202. s.KmsKeyId = &v
  15203. return s
  15204. }
  15205. // SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
  15206. func (s *RestoreEventDataStoreOutput) SetMultiRegionEnabled(v bool) *RestoreEventDataStoreOutput {
  15207. s.MultiRegionEnabled = &v
  15208. return s
  15209. }
  15210. // SetName sets the Name field's value.
  15211. func (s *RestoreEventDataStoreOutput) SetName(v string) *RestoreEventDataStoreOutput {
  15212. s.Name = &v
  15213. return s
  15214. }
  15215. // SetOrganizationEnabled sets the OrganizationEnabled field's value.
  15216. func (s *RestoreEventDataStoreOutput) SetOrganizationEnabled(v bool) *RestoreEventDataStoreOutput {
  15217. s.OrganizationEnabled = &v
  15218. return s
  15219. }
  15220. // SetRetentionPeriod sets the RetentionPeriod field's value.
  15221. func (s *RestoreEventDataStoreOutput) SetRetentionPeriod(v int64) *RestoreEventDataStoreOutput {
  15222. s.RetentionPeriod = &v
  15223. return s
  15224. }
  15225. // SetStatus sets the Status field's value.
  15226. func (s *RestoreEventDataStoreOutput) SetStatus(v string) *RestoreEventDataStoreOutput {
  15227. s.Status = &v
  15228. return s
  15229. }
  15230. // SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
  15231. func (s *RestoreEventDataStoreOutput) SetTerminationProtectionEnabled(v bool) *RestoreEventDataStoreOutput {
  15232. s.TerminationProtectionEnabled = &v
  15233. return s
  15234. }
  15235. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  15236. func (s *RestoreEventDataStoreOutput) SetUpdatedTimestamp(v time.Time) *RestoreEventDataStoreOutput {
  15237. s.UpdatedTimestamp = &v
  15238. return s
  15239. }
  15240. // This exception is thrown when the specified S3 bucket does not exist.
  15241. type S3BucketDoesNotExistException struct {
  15242. _ struct{} `type:"structure"`
  15243. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  15244. Message_ *string `locationName:"message" type:"string"`
  15245. }
  15246. // String returns the string representation.
  15247. //
  15248. // API parameter values that are decorated as "sensitive" in the API will not
  15249. // be included in the string output. The member name will be present, but the
  15250. // value will be replaced with "sensitive".
  15251. func (s S3BucketDoesNotExistException) String() string {
  15252. return awsutil.Prettify(s)
  15253. }
  15254. // GoString returns the string representation.
  15255. //
  15256. // API parameter values that are decorated as "sensitive" in the API will not
  15257. // be included in the string output. The member name will be present, but the
  15258. // value will be replaced with "sensitive".
  15259. func (s S3BucketDoesNotExistException) GoString() string {
  15260. return s.String()
  15261. }
  15262. func newErrorS3BucketDoesNotExistException(v protocol.ResponseMetadata) error {
  15263. return &S3BucketDoesNotExistException{
  15264. RespMetadata: v,
  15265. }
  15266. }
  15267. // Code returns the exception type name.
  15268. func (s *S3BucketDoesNotExistException) Code() string {
  15269. return "S3BucketDoesNotExistException"
  15270. }
  15271. // Message returns the exception's message.
  15272. func (s *S3BucketDoesNotExistException) Message() string {
  15273. if s.Message_ != nil {
  15274. return *s.Message_
  15275. }
  15276. return ""
  15277. }
  15278. // OrigErr always returns nil, satisfies awserr.Error interface.
  15279. func (s *S3BucketDoesNotExistException) OrigErr() error {
  15280. return nil
  15281. }
  15282. func (s *S3BucketDoesNotExistException) Error() string {
  15283. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  15284. }
  15285. // Status code returns the HTTP status code for the request's response error.
  15286. func (s *S3BucketDoesNotExistException) StatusCode() int {
  15287. return s.RespMetadata.StatusCode
  15288. }
  15289. // RequestID returns the service's response RequestID for request.
  15290. func (s *S3BucketDoesNotExistException) RequestID() string {
  15291. return s.RespMetadata.RequestID
  15292. }
  15293. // The settings for the source S3 bucket.
  15294. type S3ImportSource struct {
  15295. _ struct{} `type:"structure"`
  15296. // The IAM ARN role used to access the source S3 bucket.
  15297. //
  15298. // S3BucketAccessRoleArn is a required field
  15299. S3BucketAccessRoleArn *string `type:"string" required:"true"`
  15300. // The region associated with the source S3 bucket.
  15301. //
  15302. // S3BucketRegion is a required field
  15303. S3BucketRegion *string `type:"string" required:"true"`
  15304. // The URI for the source S3 bucket.
  15305. //
  15306. // S3LocationUri is a required field
  15307. S3LocationUri *string `type:"string" required:"true"`
  15308. }
  15309. // String returns the string representation.
  15310. //
  15311. // API parameter values that are decorated as "sensitive" in the API will not
  15312. // be included in the string output. The member name will be present, but the
  15313. // value will be replaced with "sensitive".
  15314. func (s S3ImportSource) String() string {
  15315. return awsutil.Prettify(s)
  15316. }
  15317. // GoString returns the string representation.
  15318. //
  15319. // API parameter values that are decorated as "sensitive" in the API will not
  15320. // be included in the string output. The member name will be present, but the
  15321. // value will be replaced with "sensitive".
  15322. func (s S3ImportSource) GoString() string {
  15323. return s.String()
  15324. }
  15325. // Validate inspects the fields of the type to determine if they are valid.
  15326. func (s *S3ImportSource) Validate() error {
  15327. invalidParams := request.ErrInvalidParams{Context: "S3ImportSource"}
  15328. if s.S3BucketAccessRoleArn == nil {
  15329. invalidParams.Add(request.NewErrParamRequired("S3BucketAccessRoleArn"))
  15330. }
  15331. if s.S3BucketRegion == nil {
  15332. invalidParams.Add(request.NewErrParamRequired("S3BucketRegion"))
  15333. }
  15334. if s.S3LocationUri == nil {
  15335. invalidParams.Add(request.NewErrParamRequired("S3LocationUri"))
  15336. }
  15337. if invalidParams.Len() > 0 {
  15338. return invalidParams
  15339. }
  15340. return nil
  15341. }
  15342. // SetS3BucketAccessRoleArn sets the S3BucketAccessRoleArn field's value.
  15343. func (s *S3ImportSource) SetS3BucketAccessRoleArn(v string) *S3ImportSource {
  15344. s.S3BucketAccessRoleArn = &v
  15345. return s
  15346. }
  15347. // SetS3BucketRegion sets the S3BucketRegion field's value.
  15348. func (s *S3ImportSource) SetS3BucketRegion(v string) *S3ImportSource {
  15349. s.S3BucketRegion = &v
  15350. return s
  15351. }
  15352. // SetS3LocationUri sets the S3LocationUri field's value.
  15353. func (s *S3ImportSource) SetS3LocationUri(v string) *S3ImportSource {
  15354. s.S3LocationUri = &v
  15355. return s
  15356. }
  15357. // Contains configuration information about the channel.
  15358. type SourceConfig struct {
  15359. _ struct{} `type:"structure"`
  15360. // The advanced event selectors that are configured for the channel.
  15361. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  15362. // Specifies whether the channel applies to a single region or to all regions.
  15363. ApplyToAllRegions *bool `type:"boolean"`
  15364. }
  15365. // String returns the string representation.
  15366. //
  15367. // API parameter values that are decorated as "sensitive" in the API will not
  15368. // be included in the string output. The member name will be present, but the
  15369. // value will be replaced with "sensitive".
  15370. func (s SourceConfig) String() string {
  15371. return awsutil.Prettify(s)
  15372. }
  15373. // GoString returns the string representation.
  15374. //
  15375. // API parameter values that are decorated as "sensitive" in the API will not
  15376. // be included in the string output. The member name will be present, but the
  15377. // value will be replaced with "sensitive".
  15378. func (s SourceConfig) GoString() string {
  15379. return s.String()
  15380. }
  15381. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  15382. func (s *SourceConfig) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *SourceConfig {
  15383. s.AdvancedEventSelectors = v
  15384. return s
  15385. }
  15386. // SetApplyToAllRegions sets the ApplyToAllRegions field's value.
  15387. func (s *SourceConfig) SetApplyToAllRegions(v bool) *SourceConfig {
  15388. s.ApplyToAllRegions = &v
  15389. return s
  15390. }
  15391. type StartImportInput struct {
  15392. _ struct{} `type:"structure"`
  15393. // The ARN of the destination event data store. Use this parameter for a new
  15394. // import.
  15395. Destinations []*string `min:"1" type:"list"`
  15396. // Use with StartEventTime to bound a StartImport request, and limit imported
  15397. // trail events to only those events logged within a specified time period.
  15398. // When you specify a time range, CloudTrail checks the prefix and log file
  15399. // names to verify the names contain a date between the specified StartEventTime
  15400. // and EndEventTime before attempting to import events.
  15401. EndEventTime *time.Time `type:"timestamp"`
  15402. // The ID of the import. Use this parameter when you are retrying an import.
  15403. ImportId *string `min:"36" type:"string"`
  15404. // The source S3 bucket for the import. Use this parameter for a new import.
  15405. ImportSource *ImportSource `type:"structure"`
  15406. // Use with EndEventTime to bound a StartImport request, and limit imported
  15407. // trail events to only those events logged within a specified time period.
  15408. // When you specify a time range, CloudTrail checks the prefix and log file
  15409. // names to verify the names contain a date between the specified StartEventTime
  15410. // and EndEventTime before attempting to import events.
  15411. StartEventTime *time.Time `type:"timestamp"`
  15412. }
  15413. // String returns the string representation.
  15414. //
  15415. // API parameter values that are decorated as "sensitive" in the API will not
  15416. // be included in the string output. The member name will be present, but the
  15417. // value will be replaced with "sensitive".
  15418. func (s StartImportInput) String() string {
  15419. return awsutil.Prettify(s)
  15420. }
  15421. // GoString returns the string representation.
  15422. //
  15423. // API parameter values that are decorated as "sensitive" in the API will not
  15424. // be included in the string output. The member name will be present, but the
  15425. // value will be replaced with "sensitive".
  15426. func (s StartImportInput) GoString() string {
  15427. return s.String()
  15428. }
  15429. // Validate inspects the fields of the type to determine if they are valid.
  15430. func (s *StartImportInput) Validate() error {
  15431. invalidParams := request.ErrInvalidParams{Context: "StartImportInput"}
  15432. if s.Destinations != nil && len(s.Destinations) < 1 {
  15433. invalidParams.Add(request.NewErrParamMinLen("Destinations", 1))
  15434. }
  15435. if s.ImportId != nil && len(*s.ImportId) < 36 {
  15436. invalidParams.Add(request.NewErrParamMinLen("ImportId", 36))
  15437. }
  15438. if s.ImportSource != nil {
  15439. if err := s.ImportSource.Validate(); err != nil {
  15440. invalidParams.AddNested("ImportSource", err.(request.ErrInvalidParams))
  15441. }
  15442. }
  15443. if invalidParams.Len() > 0 {
  15444. return invalidParams
  15445. }
  15446. return nil
  15447. }
  15448. // SetDestinations sets the Destinations field's value.
  15449. func (s *StartImportInput) SetDestinations(v []*string) *StartImportInput {
  15450. s.Destinations = v
  15451. return s
  15452. }
  15453. // SetEndEventTime sets the EndEventTime field's value.
  15454. func (s *StartImportInput) SetEndEventTime(v time.Time) *StartImportInput {
  15455. s.EndEventTime = &v
  15456. return s
  15457. }
  15458. // SetImportId sets the ImportId field's value.
  15459. func (s *StartImportInput) SetImportId(v string) *StartImportInput {
  15460. s.ImportId = &v
  15461. return s
  15462. }
  15463. // SetImportSource sets the ImportSource field's value.
  15464. func (s *StartImportInput) SetImportSource(v *ImportSource) *StartImportInput {
  15465. s.ImportSource = v
  15466. return s
  15467. }
  15468. // SetStartEventTime sets the StartEventTime field's value.
  15469. func (s *StartImportInput) SetStartEventTime(v time.Time) *StartImportInput {
  15470. s.StartEventTime = &v
  15471. return s
  15472. }
  15473. type StartImportOutput struct {
  15474. _ struct{} `type:"structure"`
  15475. // The timestamp for the import's creation.
  15476. CreatedTimestamp *time.Time `type:"timestamp"`
  15477. // The ARN of the destination event data store.
  15478. Destinations []*string `min:"1" type:"list"`
  15479. // Used with StartEventTime to bound a StartImport request, and limit imported
  15480. // trail events to only those events logged within a specified time period.
  15481. EndEventTime *time.Time `type:"timestamp"`
  15482. // The ID of the import.
  15483. ImportId *string `min:"36" type:"string"`
  15484. // The source S3 bucket for the import.
  15485. ImportSource *ImportSource `type:"structure"`
  15486. // Shows the status of the import after a StartImport request. An import finishes
  15487. // with a status of COMPLETED if there were no failures, or FAILED if there
  15488. // were failures.
  15489. ImportStatus *string `type:"string" enum:"ImportStatus"`
  15490. // Used with EndEventTime to bound a StartImport request, and limit imported
  15491. // trail events to only those events logged within a specified time period.
  15492. StartEventTime *time.Time `type:"timestamp"`
  15493. // The timestamp of the import's last update, if applicable.
  15494. UpdatedTimestamp *time.Time `type:"timestamp"`
  15495. }
  15496. // String returns the string representation.
  15497. //
  15498. // API parameter values that are decorated as "sensitive" in the API will not
  15499. // be included in the string output. The member name will be present, but the
  15500. // value will be replaced with "sensitive".
  15501. func (s StartImportOutput) String() string {
  15502. return awsutil.Prettify(s)
  15503. }
  15504. // GoString returns the string representation.
  15505. //
  15506. // API parameter values that are decorated as "sensitive" in the API will not
  15507. // be included in the string output. The member name will be present, but the
  15508. // value will be replaced with "sensitive".
  15509. func (s StartImportOutput) GoString() string {
  15510. return s.String()
  15511. }
  15512. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  15513. func (s *StartImportOutput) SetCreatedTimestamp(v time.Time) *StartImportOutput {
  15514. s.CreatedTimestamp = &v
  15515. return s
  15516. }
  15517. // SetDestinations sets the Destinations field's value.
  15518. func (s *StartImportOutput) SetDestinations(v []*string) *StartImportOutput {
  15519. s.Destinations = v
  15520. return s
  15521. }
  15522. // SetEndEventTime sets the EndEventTime field's value.
  15523. func (s *StartImportOutput) SetEndEventTime(v time.Time) *StartImportOutput {
  15524. s.EndEventTime = &v
  15525. return s
  15526. }
  15527. // SetImportId sets the ImportId field's value.
  15528. func (s *StartImportOutput) SetImportId(v string) *StartImportOutput {
  15529. s.ImportId = &v
  15530. return s
  15531. }
  15532. // SetImportSource sets the ImportSource field's value.
  15533. func (s *StartImportOutput) SetImportSource(v *ImportSource) *StartImportOutput {
  15534. s.ImportSource = v
  15535. return s
  15536. }
  15537. // SetImportStatus sets the ImportStatus field's value.
  15538. func (s *StartImportOutput) SetImportStatus(v string) *StartImportOutput {
  15539. s.ImportStatus = &v
  15540. return s
  15541. }
  15542. // SetStartEventTime sets the StartEventTime field's value.
  15543. func (s *StartImportOutput) SetStartEventTime(v time.Time) *StartImportOutput {
  15544. s.StartEventTime = &v
  15545. return s
  15546. }
  15547. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  15548. func (s *StartImportOutput) SetUpdatedTimestamp(v time.Time) *StartImportOutput {
  15549. s.UpdatedTimestamp = &v
  15550. return s
  15551. }
  15552. // The request to CloudTrail to start logging Amazon Web Services API calls
  15553. // for an account.
  15554. type StartLoggingInput struct {
  15555. _ struct{} `type:"structure"`
  15556. // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
  15557. // logs Amazon Web Services API calls. The following is the format of a trail
  15558. // ARN.
  15559. //
  15560. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  15561. //
  15562. // Name is a required field
  15563. Name *string `type:"string" required:"true"`
  15564. }
  15565. // String returns the string representation.
  15566. //
  15567. // API parameter values that are decorated as "sensitive" in the API will not
  15568. // be included in the string output. The member name will be present, but the
  15569. // value will be replaced with "sensitive".
  15570. func (s StartLoggingInput) String() string {
  15571. return awsutil.Prettify(s)
  15572. }
  15573. // GoString returns the string representation.
  15574. //
  15575. // API parameter values that are decorated as "sensitive" in the API will not
  15576. // be included in the string output. The member name will be present, but the
  15577. // value will be replaced with "sensitive".
  15578. func (s StartLoggingInput) GoString() string {
  15579. return s.String()
  15580. }
  15581. // Validate inspects the fields of the type to determine if they are valid.
  15582. func (s *StartLoggingInput) Validate() error {
  15583. invalidParams := request.ErrInvalidParams{Context: "StartLoggingInput"}
  15584. if s.Name == nil {
  15585. invalidParams.Add(request.NewErrParamRequired("Name"))
  15586. }
  15587. if invalidParams.Len() > 0 {
  15588. return invalidParams
  15589. }
  15590. return nil
  15591. }
  15592. // SetName sets the Name field's value.
  15593. func (s *StartLoggingInput) SetName(v string) *StartLoggingInput {
  15594. s.Name = &v
  15595. return s
  15596. }
  15597. // Returns the objects or data listed below if successful. Otherwise, returns
  15598. // an error.
  15599. type StartLoggingOutput struct {
  15600. _ struct{} `type:"structure"`
  15601. }
  15602. // String returns the string representation.
  15603. //
  15604. // API parameter values that are decorated as "sensitive" in the API will not
  15605. // be included in the string output. The member name will be present, but the
  15606. // value will be replaced with "sensitive".
  15607. func (s StartLoggingOutput) String() string {
  15608. return awsutil.Prettify(s)
  15609. }
  15610. // GoString returns the string representation.
  15611. //
  15612. // API parameter values that are decorated as "sensitive" in the API will not
  15613. // be included in the string output. The member name will be present, but the
  15614. // value will be replaced with "sensitive".
  15615. func (s StartLoggingOutput) GoString() string {
  15616. return s.String()
  15617. }
  15618. type StartQueryInput struct {
  15619. _ struct{} `type:"structure"`
  15620. // The URI for the S3 bucket where CloudTrail delivers the query results.
  15621. DeliveryS3Uri *string `type:"string"`
  15622. // The SQL code of your query.
  15623. //
  15624. // QueryStatement is a required field
  15625. QueryStatement *string `min:"1" type:"string" required:"true"`
  15626. }
  15627. // String returns the string representation.
  15628. //
  15629. // API parameter values that are decorated as "sensitive" in the API will not
  15630. // be included in the string output. The member name will be present, but the
  15631. // value will be replaced with "sensitive".
  15632. func (s StartQueryInput) String() string {
  15633. return awsutil.Prettify(s)
  15634. }
  15635. // GoString returns the string representation.
  15636. //
  15637. // API parameter values that are decorated as "sensitive" in the API will not
  15638. // be included in the string output. The member name will be present, but the
  15639. // value will be replaced with "sensitive".
  15640. func (s StartQueryInput) GoString() string {
  15641. return s.String()
  15642. }
  15643. // Validate inspects the fields of the type to determine if they are valid.
  15644. func (s *StartQueryInput) Validate() error {
  15645. invalidParams := request.ErrInvalidParams{Context: "StartQueryInput"}
  15646. if s.QueryStatement == nil {
  15647. invalidParams.Add(request.NewErrParamRequired("QueryStatement"))
  15648. }
  15649. if s.QueryStatement != nil && len(*s.QueryStatement) < 1 {
  15650. invalidParams.Add(request.NewErrParamMinLen("QueryStatement", 1))
  15651. }
  15652. if invalidParams.Len() > 0 {
  15653. return invalidParams
  15654. }
  15655. return nil
  15656. }
  15657. // SetDeliveryS3Uri sets the DeliveryS3Uri field's value.
  15658. func (s *StartQueryInput) SetDeliveryS3Uri(v string) *StartQueryInput {
  15659. s.DeliveryS3Uri = &v
  15660. return s
  15661. }
  15662. // SetQueryStatement sets the QueryStatement field's value.
  15663. func (s *StartQueryInput) SetQueryStatement(v string) *StartQueryInput {
  15664. s.QueryStatement = &v
  15665. return s
  15666. }
  15667. type StartQueryOutput struct {
  15668. _ struct{} `type:"structure"`
  15669. // The ID of the started query.
  15670. QueryId *string `min:"36" type:"string"`
  15671. }
  15672. // String 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 StartQueryOutput) String() string {
  15678. return awsutil.Prettify(s)
  15679. }
  15680. // GoString returns the string representation.
  15681. //
  15682. // API parameter values that are decorated as "sensitive" in the API will not
  15683. // be included in the string output. The member name will be present, but the
  15684. // value will be replaced with "sensitive".
  15685. func (s StartQueryOutput) GoString() string {
  15686. return s.String()
  15687. }
  15688. // SetQueryId sets the QueryId field's value.
  15689. func (s *StartQueryOutput) SetQueryId(v string) *StartQueryOutput {
  15690. s.QueryId = &v
  15691. return s
  15692. }
  15693. type StopImportInput struct {
  15694. _ struct{} `type:"structure"`
  15695. // The ID of the import.
  15696. //
  15697. // ImportId is a required field
  15698. ImportId *string `min:"36" type:"string" required:"true"`
  15699. }
  15700. // String returns the string representation.
  15701. //
  15702. // API parameter values that are decorated as "sensitive" in the API will not
  15703. // be included in the string output. The member name will be present, but the
  15704. // value will be replaced with "sensitive".
  15705. func (s StopImportInput) String() string {
  15706. return awsutil.Prettify(s)
  15707. }
  15708. // GoString returns the string representation.
  15709. //
  15710. // API parameter values that are decorated as "sensitive" in the API will not
  15711. // be included in the string output. The member name will be present, but the
  15712. // value will be replaced with "sensitive".
  15713. func (s StopImportInput) GoString() string {
  15714. return s.String()
  15715. }
  15716. // Validate inspects the fields of the type to determine if they are valid.
  15717. func (s *StopImportInput) Validate() error {
  15718. invalidParams := request.ErrInvalidParams{Context: "StopImportInput"}
  15719. if s.ImportId == nil {
  15720. invalidParams.Add(request.NewErrParamRequired("ImportId"))
  15721. }
  15722. if s.ImportId != nil && len(*s.ImportId) < 36 {
  15723. invalidParams.Add(request.NewErrParamMinLen("ImportId", 36))
  15724. }
  15725. if invalidParams.Len() > 0 {
  15726. return invalidParams
  15727. }
  15728. return nil
  15729. }
  15730. // SetImportId sets the ImportId field's value.
  15731. func (s *StopImportInput) SetImportId(v string) *StopImportInput {
  15732. s.ImportId = &v
  15733. return s
  15734. }
  15735. type StopImportOutput struct {
  15736. _ struct{} `type:"structure"`
  15737. // The timestamp of the import's creation.
  15738. CreatedTimestamp *time.Time `type:"timestamp"`
  15739. // The ARN of the destination event data store.
  15740. Destinations []*string `min:"1" type:"list"`
  15741. // Used with StartEventTime to bound a StartImport request, and limit imported
  15742. // trail events to only those events logged within a specified time period.
  15743. EndEventTime *time.Time `type:"timestamp"`
  15744. // The ID for the import.
  15745. ImportId *string `min:"36" type:"string"`
  15746. // The source S3 bucket for the import.
  15747. ImportSource *ImportSource `type:"structure"`
  15748. // Returns information on the stopped import.
  15749. ImportStatistics *ImportStatistics `type:"structure"`
  15750. // The status of the import.
  15751. ImportStatus *string `type:"string" enum:"ImportStatus"`
  15752. // Used with EndEventTime to bound a StartImport request, and limit imported
  15753. // trail events to only those events logged within a specified time period.
  15754. StartEventTime *time.Time `type:"timestamp"`
  15755. // The timestamp of the import's last update.
  15756. UpdatedTimestamp *time.Time `type:"timestamp"`
  15757. }
  15758. // String returns the string representation.
  15759. //
  15760. // API parameter values that are decorated as "sensitive" in the API will not
  15761. // be included in the string output. The member name will be present, but the
  15762. // value will be replaced with "sensitive".
  15763. func (s StopImportOutput) String() string {
  15764. return awsutil.Prettify(s)
  15765. }
  15766. // GoString returns the string representation.
  15767. //
  15768. // API parameter values that are decorated as "sensitive" in the API will not
  15769. // be included in the string output. The member name will be present, but the
  15770. // value will be replaced with "sensitive".
  15771. func (s StopImportOutput) GoString() string {
  15772. return s.String()
  15773. }
  15774. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  15775. func (s *StopImportOutput) SetCreatedTimestamp(v time.Time) *StopImportOutput {
  15776. s.CreatedTimestamp = &v
  15777. return s
  15778. }
  15779. // SetDestinations sets the Destinations field's value.
  15780. func (s *StopImportOutput) SetDestinations(v []*string) *StopImportOutput {
  15781. s.Destinations = v
  15782. return s
  15783. }
  15784. // SetEndEventTime sets the EndEventTime field's value.
  15785. func (s *StopImportOutput) SetEndEventTime(v time.Time) *StopImportOutput {
  15786. s.EndEventTime = &v
  15787. return s
  15788. }
  15789. // SetImportId sets the ImportId field's value.
  15790. func (s *StopImportOutput) SetImportId(v string) *StopImportOutput {
  15791. s.ImportId = &v
  15792. return s
  15793. }
  15794. // SetImportSource sets the ImportSource field's value.
  15795. func (s *StopImportOutput) SetImportSource(v *ImportSource) *StopImportOutput {
  15796. s.ImportSource = v
  15797. return s
  15798. }
  15799. // SetImportStatistics sets the ImportStatistics field's value.
  15800. func (s *StopImportOutput) SetImportStatistics(v *ImportStatistics) *StopImportOutput {
  15801. s.ImportStatistics = v
  15802. return s
  15803. }
  15804. // SetImportStatus sets the ImportStatus field's value.
  15805. func (s *StopImportOutput) SetImportStatus(v string) *StopImportOutput {
  15806. s.ImportStatus = &v
  15807. return s
  15808. }
  15809. // SetStartEventTime sets the StartEventTime field's value.
  15810. func (s *StopImportOutput) SetStartEventTime(v time.Time) *StopImportOutput {
  15811. s.StartEventTime = &v
  15812. return s
  15813. }
  15814. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  15815. func (s *StopImportOutput) SetUpdatedTimestamp(v time.Time) *StopImportOutput {
  15816. s.UpdatedTimestamp = &v
  15817. return s
  15818. }
  15819. // Passes the request to CloudTrail to stop logging Amazon Web Services API
  15820. // calls for the specified account.
  15821. type StopLoggingInput struct {
  15822. _ struct{} `type:"structure"`
  15823. // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
  15824. // will stop logging Amazon Web Services API calls. The following is the format
  15825. // of a trail ARN.
  15826. //
  15827. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  15828. //
  15829. // Name is a required field
  15830. Name *string `type:"string" required:"true"`
  15831. }
  15832. // String returns the string representation.
  15833. //
  15834. // API parameter values that are decorated as "sensitive" in the API will not
  15835. // be included in the string output. The member name will be present, but the
  15836. // value will be replaced with "sensitive".
  15837. func (s StopLoggingInput) String() string {
  15838. return awsutil.Prettify(s)
  15839. }
  15840. // GoString returns the string representation.
  15841. //
  15842. // API parameter values that are decorated as "sensitive" in the API will not
  15843. // be included in the string output. The member name will be present, but the
  15844. // value will be replaced with "sensitive".
  15845. func (s StopLoggingInput) GoString() string {
  15846. return s.String()
  15847. }
  15848. // Validate inspects the fields of the type to determine if they are valid.
  15849. func (s *StopLoggingInput) Validate() error {
  15850. invalidParams := request.ErrInvalidParams{Context: "StopLoggingInput"}
  15851. if s.Name == nil {
  15852. invalidParams.Add(request.NewErrParamRequired("Name"))
  15853. }
  15854. if invalidParams.Len() > 0 {
  15855. return invalidParams
  15856. }
  15857. return nil
  15858. }
  15859. // SetName sets the Name field's value.
  15860. func (s *StopLoggingInput) SetName(v string) *StopLoggingInput {
  15861. s.Name = &v
  15862. return s
  15863. }
  15864. // Returns the objects or data listed below if successful. Otherwise, returns
  15865. // an error.
  15866. type StopLoggingOutput struct {
  15867. _ struct{} `type:"structure"`
  15868. }
  15869. // String returns the string representation.
  15870. //
  15871. // API parameter values that are decorated as "sensitive" in the API will not
  15872. // be included in the string output. The member name will be present, but the
  15873. // value will be replaced with "sensitive".
  15874. func (s StopLoggingOutput) String() string {
  15875. return awsutil.Prettify(s)
  15876. }
  15877. // GoString returns the string representation.
  15878. //
  15879. // API parameter values that are decorated as "sensitive" in the API will not
  15880. // be included in the string output. The member name will be present, but the
  15881. // value will be replaced with "sensitive".
  15882. func (s StopLoggingOutput) GoString() string {
  15883. return s.String()
  15884. }
  15885. // A custom key-value pair associated with a resource such as a CloudTrail trail,
  15886. // event data store, or channel.
  15887. type Tag struct {
  15888. _ struct{} `type:"structure"`
  15889. // The key in a key-value pair. The key must be must be no longer than 128 Unicode
  15890. // characters. The key must be unique for the resource to which it applies.
  15891. //
  15892. // Key is a required field
  15893. Key *string `min:"1" type:"string" required:"true"`
  15894. // The value in a key-value pair of a tag. The value must be no longer than
  15895. // 256 Unicode characters.
  15896. Value *string `min:"1" type:"string"`
  15897. }
  15898. // String returns the string representation.
  15899. //
  15900. // API parameter values that are decorated as "sensitive" in the API will not
  15901. // be included in the string output. The member name will be present, but the
  15902. // value will be replaced with "sensitive".
  15903. func (s Tag) String() string {
  15904. return awsutil.Prettify(s)
  15905. }
  15906. // GoString returns the string representation.
  15907. //
  15908. // API parameter values that are decorated as "sensitive" in the API will not
  15909. // be included in the string output. The member name will be present, but the
  15910. // value will be replaced with "sensitive".
  15911. func (s Tag) GoString() string {
  15912. return s.String()
  15913. }
  15914. // Validate inspects the fields of the type to determine if they are valid.
  15915. func (s *Tag) Validate() error {
  15916. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  15917. if s.Key == nil {
  15918. invalidParams.Add(request.NewErrParamRequired("Key"))
  15919. }
  15920. if s.Key != nil && len(*s.Key) < 1 {
  15921. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15922. }
  15923. if s.Value != nil && len(*s.Value) < 1 {
  15924. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  15925. }
  15926. if invalidParams.Len() > 0 {
  15927. return invalidParams
  15928. }
  15929. return nil
  15930. }
  15931. // SetKey sets the Key field's value.
  15932. func (s *Tag) SetKey(v string) *Tag {
  15933. s.Key = &v
  15934. return s
  15935. }
  15936. // SetValue sets the Value field's value.
  15937. func (s *Tag) SetValue(v string) *Tag {
  15938. s.Value = &v
  15939. return s
  15940. }
  15941. // The number of tags per trail, event data store, or channel has exceeded the
  15942. // permitted amount. Currently, the limit is 50.
  15943. type TagsLimitExceededException struct {
  15944. _ struct{} `type:"structure"`
  15945. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  15946. Message_ *string `locationName:"message" type:"string"`
  15947. }
  15948. // String returns the string representation.
  15949. //
  15950. // API parameter values that are decorated as "sensitive" in the API will not
  15951. // be included in the string output. The member name will be present, but the
  15952. // value will be replaced with "sensitive".
  15953. func (s TagsLimitExceededException) String() string {
  15954. return awsutil.Prettify(s)
  15955. }
  15956. // GoString returns the string representation.
  15957. //
  15958. // API parameter values that are decorated as "sensitive" in the API will not
  15959. // be included in the string output. The member name will be present, but the
  15960. // value will be replaced with "sensitive".
  15961. func (s TagsLimitExceededException) GoString() string {
  15962. return s.String()
  15963. }
  15964. func newErrorTagsLimitExceededException(v protocol.ResponseMetadata) error {
  15965. return &TagsLimitExceededException{
  15966. RespMetadata: v,
  15967. }
  15968. }
  15969. // Code returns the exception type name.
  15970. func (s *TagsLimitExceededException) Code() string {
  15971. return "TagsLimitExceededException"
  15972. }
  15973. // Message returns the exception's message.
  15974. func (s *TagsLimitExceededException) Message() string {
  15975. if s.Message_ != nil {
  15976. return *s.Message_
  15977. }
  15978. return ""
  15979. }
  15980. // OrigErr always returns nil, satisfies awserr.Error interface.
  15981. func (s *TagsLimitExceededException) OrigErr() error {
  15982. return nil
  15983. }
  15984. func (s *TagsLimitExceededException) Error() string {
  15985. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  15986. }
  15987. // Status code returns the HTTP status code for the request's response error.
  15988. func (s *TagsLimitExceededException) StatusCode() int {
  15989. return s.RespMetadata.StatusCode
  15990. }
  15991. // RequestID returns the service's response RequestID for request.
  15992. func (s *TagsLimitExceededException) RequestID() string {
  15993. return s.RespMetadata.RequestID
  15994. }
  15995. // The settings for a trail.
  15996. type Trail struct {
  15997. _ struct{} `type:"structure"`
  15998. // Specifies an Amazon Resource Name (ARN), a unique identifier that represents
  15999. // the log group to which CloudTrail logs will be delivered.
  16000. CloudWatchLogsLogGroupArn *string `type:"string"`
  16001. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  16002. // a user's log group.
  16003. CloudWatchLogsRoleArn *string `type:"string"`
  16004. // Specifies if the trail has custom event selectors.
  16005. HasCustomEventSelectors *bool `type:"boolean"`
  16006. // Specifies whether a trail has insight types specified in an InsightSelector
  16007. // list.
  16008. HasInsightSelectors *bool `type:"boolean"`
  16009. // The region in which the trail was created.
  16010. HomeRegion *string `type:"string"`
  16011. // Set to True to include Amazon Web Services API calls from Amazon Web Services
  16012. // global services such as IAM. Otherwise, False.
  16013. IncludeGlobalServiceEvents *bool `type:"boolean"`
  16014. // Specifies whether the trail exists only in one region or exists in all regions.
  16015. IsMultiRegionTrail *bool `type:"boolean"`
  16016. // Specifies whether the trail is an organization trail.
  16017. IsOrganizationTrail *bool `type:"boolean"`
  16018. // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
  16019. // The value is a fully specified ARN to a KMS key in the following format.
  16020. //
  16021. // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  16022. KmsKeyId *string `type:"string"`
  16023. // Specifies whether log file validation is enabled.
  16024. LogFileValidationEnabled *bool `type:"boolean"`
  16025. // Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
  16026. Name *string `type:"string"`
  16027. // Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.
  16028. // See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  16029. S3BucketName *string `type:"string"`
  16030. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  16031. // you have designated for log file delivery. For more information, see Finding
  16032. // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  16033. // The maximum length is 200 characters.
  16034. S3KeyPrefix *string `type:"string"`
  16035. // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  16036. // when log files are delivered. The following is the format of a topic ARN.
  16037. //
  16038. // arn:aws:sns:us-east-2:123456789012:MyTopic
  16039. SnsTopicARN *string `type:"string"`
  16040. // This field is no longer in use. Use SnsTopicARN.
  16041. //
  16042. // Deprecated: SnsTopicName has been deprecated
  16043. SnsTopicName *string `deprecated:"true" type:"string"`
  16044. // Specifies the ARN of the trail. The following is the format of a trail ARN.
  16045. //
  16046. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  16047. TrailARN *string `type:"string"`
  16048. }
  16049. // String returns the string representation.
  16050. //
  16051. // API parameter values that are decorated as "sensitive" in the API will not
  16052. // be included in the string output. The member name will be present, but the
  16053. // value will be replaced with "sensitive".
  16054. func (s Trail) String() string {
  16055. return awsutil.Prettify(s)
  16056. }
  16057. // GoString returns the string representation.
  16058. //
  16059. // API parameter values that are decorated as "sensitive" in the API will not
  16060. // be included in the string output. The member name will be present, but the
  16061. // value will be replaced with "sensitive".
  16062. func (s Trail) GoString() string {
  16063. return s.String()
  16064. }
  16065. // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  16066. func (s *Trail) SetCloudWatchLogsLogGroupArn(v string) *Trail {
  16067. s.CloudWatchLogsLogGroupArn = &v
  16068. return s
  16069. }
  16070. // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  16071. func (s *Trail) SetCloudWatchLogsRoleArn(v string) *Trail {
  16072. s.CloudWatchLogsRoleArn = &v
  16073. return s
  16074. }
  16075. // SetHasCustomEventSelectors sets the HasCustomEventSelectors field's value.
  16076. func (s *Trail) SetHasCustomEventSelectors(v bool) *Trail {
  16077. s.HasCustomEventSelectors = &v
  16078. return s
  16079. }
  16080. // SetHasInsightSelectors sets the HasInsightSelectors field's value.
  16081. func (s *Trail) SetHasInsightSelectors(v bool) *Trail {
  16082. s.HasInsightSelectors = &v
  16083. return s
  16084. }
  16085. // SetHomeRegion sets the HomeRegion field's value.
  16086. func (s *Trail) SetHomeRegion(v string) *Trail {
  16087. s.HomeRegion = &v
  16088. return s
  16089. }
  16090. // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  16091. func (s *Trail) SetIncludeGlobalServiceEvents(v bool) *Trail {
  16092. s.IncludeGlobalServiceEvents = &v
  16093. return s
  16094. }
  16095. // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  16096. func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail {
  16097. s.IsMultiRegionTrail = &v
  16098. return s
  16099. }
  16100. // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  16101. func (s *Trail) SetIsOrganizationTrail(v bool) *Trail {
  16102. s.IsOrganizationTrail = &v
  16103. return s
  16104. }
  16105. // SetKmsKeyId sets the KmsKeyId field's value.
  16106. func (s *Trail) SetKmsKeyId(v string) *Trail {
  16107. s.KmsKeyId = &v
  16108. return s
  16109. }
  16110. // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
  16111. func (s *Trail) SetLogFileValidationEnabled(v bool) *Trail {
  16112. s.LogFileValidationEnabled = &v
  16113. return s
  16114. }
  16115. // SetName sets the Name field's value.
  16116. func (s *Trail) SetName(v string) *Trail {
  16117. s.Name = &v
  16118. return s
  16119. }
  16120. // SetS3BucketName sets the S3BucketName field's value.
  16121. func (s *Trail) SetS3BucketName(v string) *Trail {
  16122. s.S3BucketName = &v
  16123. return s
  16124. }
  16125. // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  16126. func (s *Trail) SetS3KeyPrefix(v string) *Trail {
  16127. s.S3KeyPrefix = &v
  16128. return s
  16129. }
  16130. // SetSnsTopicARN sets the SnsTopicARN field's value.
  16131. func (s *Trail) SetSnsTopicARN(v string) *Trail {
  16132. s.SnsTopicARN = &v
  16133. return s
  16134. }
  16135. // SetSnsTopicName sets the SnsTopicName field's value.
  16136. func (s *Trail) SetSnsTopicName(v string) *Trail {
  16137. s.SnsTopicName = &v
  16138. return s
  16139. }
  16140. // SetTrailARN sets the TrailARN field's value.
  16141. func (s *Trail) SetTrailARN(v string) *Trail {
  16142. s.TrailARN = &v
  16143. return s
  16144. }
  16145. // This exception is thrown when the specified trail already exists.
  16146. type TrailAlreadyExistsException struct {
  16147. _ struct{} `type:"structure"`
  16148. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16149. Message_ *string `locationName:"message" type:"string"`
  16150. }
  16151. // String returns the string representation.
  16152. //
  16153. // API parameter values that are decorated as "sensitive" in the API will not
  16154. // be included in the string output. The member name will be present, but the
  16155. // value will be replaced with "sensitive".
  16156. func (s TrailAlreadyExistsException) String() string {
  16157. return awsutil.Prettify(s)
  16158. }
  16159. // GoString returns the string representation.
  16160. //
  16161. // API parameter values that are decorated as "sensitive" in the API will not
  16162. // be included in the string output. The member name will be present, but the
  16163. // value will be replaced with "sensitive".
  16164. func (s TrailAlreadyExistsException) GoString() string {
  16165. return s.String()
  16166. }
  16167. func newErrorTrailAlreadyExistsException(v protocol.ResponseMetadata) error {
  16168. return &TrailAlreadyExistsException{
  16169. RespMetadata: v,
  16170. }
  16171. }
  16172. // Code returns the exception type name.
  16173. func (s *TrailAlreadyExistsException) Code() string {
  16174. return "TrailAlreadyExistsException"
  16175. }
  16176. // Message returns the exception's message.
  16177. func (s *TrailAlreadyExistsException) Message() string {
  16178. if s.Message_ != nil {
  16179. return *s.Message_
  16180. }
  16181. return ""
  16182. }
  16183. // OrigErr always returns nil, satisfies awserr.Error interface.
  16184. func (s *TrailAlreadyExistsException) OrigErr() error {
  16185. return nil
  16186. }
  16187. func (s *TrailAlreadyExistsException) Error() string {
  16188. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16189. }
  16190. // Status code returns the HTTP status code for the request's response error.
  16191. func (s *TrailAlreadyExistsException) StatusCode() int {
  16192. return s.RespMetadata.StatusCode
  16193. }
  16194. // RequestID returns the service's response RequestID for request.
  16195. func (s *TrailAlreadyExistsException) RequestID() string {
  16196. return s.RespMetadata.RequestID
  16197. }
  16198. // Information about a CloudTrail trail, including the trail's name, home region,
  16199. // and Amazon Resource Name (ARN).
  16200. type TrailInfo struct {
  16201. _ struct{} `type:"structure"`
  16202. // The Amazon Web Services Region in which a trail was created.
  16203. HomeRegion *string `type:"string"`
  16204. // The name of a trail.
  16205. Name *string `type:"string"`
  16206. // The ARN of a trail.
  16207. TrailARN *string `type:"string"`
  16208. }
  16209. // String returns the string representation.
  16210. //
  16211. // API parameter values that are decorated as "sensitive" in the API will not
  16212. // be included in the string output. The member name will be present, but the
  16213. // value will be replaced with "sensitive".
  16214. func (s TrailInfo) String() string {
  16215. return awsutil.Prettify(s)
  16216. }
  16217. // GoString returns the string representation.
  16218. //
  16219. // API parameter values that are decorated as "sensitive" in the API will not
  16220. // be included in the string output. The member name will be present, but the
  16221. // value will be replaced with "sensitive".
  16222. func (s TrailInfo) GoString() string {
  16223. return s.String()
  16224. }
  16225. // SetHomeRegion sets the HomeRegion field's value.
  16226. func (s *TrailInfo) SetHomeRegion(v string) *TrailInfo {
  16227. s.HomeRegion = &v
  16228. return s
  16229. }
  16230. // SetName sets the Name field's value.
  16231. func (s *TrailInfo) SetName(v string) *TrailInfo {
  16232. s.Name = &v
  16233. return s
  16234. }
  16235. // SetTrailARN sets the TrailARN field's value.
  16236. func (s *TrailInfo) SetTrailARN(v string) *TrailInfo {
  16237. s.TrailARN = &v
  16238. return s
  16239. }
  16240. // This exception is thrown when the trail with the given name is not found.
  16241. type TrailNotFoundException struct {
  16242. _ struct{} `type:"structure"`
  16243. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16244. Message_ *string `locationName:"message" type:"string"`
  16245. }
  16246. // String returns the string representation.
  16247. //
  16248. // API parameter values that are decorated as "sensitive" in the API will not
  16249. // be included in the string output. The member name will be present, but the
  16250. // value will be replaced with "sensitive".
  16251. func (s TrailNotFoundException) String() string {
  16252. return awsutil.Prettify(s)
  16253. }
  16254. // GoString returns the string representation.
  16255. //
  16256. // API parameter values that are decorated as "sensitive" in the API will not
  16257. // be included in the string output. The member name will be present, but the
  16258. // value will be replaced with "sensitive".
  16259. func (s TrailNotFoundException) GoString() string {
  16260. return s.String()
  16261. }
  16262. func newErrorTrailNotFoundException(v protocol.ResponseMetadata) error {
  16263. return &TrailNotFoundException{
  16264. RespMetadata: v,
  16265. }
  16266. }
  16267. // Code returns the exception type name.
  16268. func (s *TrailNotFoundException) Code() string {
  16269. return "TrailNotFoundException"
  16270. }
  16271. // Message returns the exception's message.
  16272. func (s *TrailNotFoundException) Message() string {
  16273. if s.Message_ != nil {
  16274. return *s.Message_
  16275. }
  16276. return ""
  16277. }
  16278. // OrigErr always returns nil, satisfies awserr.Error interface.
  16279. func (s *TrailNotFoundException) OrigErr() error {
  16280. return nil
  16281. }
  16282. func (s *TrailNotFoundException) Error() string {
  16283. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16284. }
  16285. // Status code returns the HTTP status code for the request's response error.
  16286. func (s *TrailNotFoundException) StatusCode() int {
  16287. return s.RespMetadata.StatusCode
  16288. }
  16289. // RequestID returns the service's response RequestID for request.
  16290. func (s *TrailNotFoundException) RequestID() string {
  16291. return s.RespMetadata.RequestID
  16292. }
  16293. // This exception is no longer in use.
  16294. type TrailNotProvidedException struct {
  16295. _ struct{} `type:"structure"`
  16296. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16297. Message_ *string `locationName:"message" type:"string"`
  16298. }
  16299. // String returns the string representation.
  16300. //
  16301. // API parameter values that are decorated as "sensitive" in the API will not
  16302. // be included in the string output. The member name will be present, but the
  16303. // value will be replaced with "sensitive".
  16304. func (s TrailNotProvidedException) String() string {
  16305. return awsutil.Prettify(s)
  16306. }
  16307. // GoString returns the string representation.
  16308. //
  16309. // API parameter values that are decorated as "sensitive" in the API will not
  16310. // be included in the string output. The member name will be present, but the
  16311. // value will be replaced with "sensitive".
  16312. func (s TrailNotProvidedException) GoString() string {
  16313. return s.String()
  16314. }
  16315. func newErrorTrailNotProvidedException(v protocol.ResponseMetadata) error {
  16316. return &TrailNotProvidedException{
  16317. RespMetadata: v,
  16318. }
  16319. }
  16320. // Code returns the exception type name.
  16321. func (s *TrailNotProvidedException) Code() string {
  16322. return "TrailNotProvidedException"
  16323. }
  16324. // Message returns the exception's message.
  16325. func (s *TrailNotProvidedException) Message() string {
  16326. if s.Message_ != nil {
  16327. return *s.Message_
  16328. }
  16329. return ""
  16330. }
  16331. // OrigErr always returns nil, satisfies awserr.Error interface.
  16332. func (s *TrailNotProvidedException) OrigErr() error {
  16333. return nil
  16334. }
  16335. func (s *TrailNotProvidedException) Error() string {
  16336. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16337. }
  16338. // Status code returns the HTTP status code for the request's response error.
  16339. func (s *TrailNotProvidedException) StatusCode() int {
  16340. return s.RespMetadata.StatusCode
  16341. }
  16342. // RequestID returns the service's response RequestID for request.
  16343. func (s *TrailNotProvidedException) RequestID() string {
  16344. return s.RespMetadata.RequestID
  16345. }
  16346. // This exception is thrown when the requested operation is not supported.
  16347. type UnsupportedOperationException struct {
  16348. _ struct{} `type:"structure"`
  16349. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16350. Message_ *string `locationName:"message" type:"string"`
  16351. }
  16352. // String returns the string representation.
  16353. //
  16354. // API parameter values that are decorated as "sensitive" in the API will not
  16355. // be included in the string output. The member name will be present, but the
  16356. // value will be replaced with "sensitive".
  16357. func (s UnsupportedOperationException) String() string {
  16358. return awsutil.Prettify(s)
  16359. }
  16360. // GoString returns the string representation.
  16361. //
  16362. // API parameter values that are decorated as "sensitive" in the API will not
  16363. // be included in the string output. The member name will be present, but the
  16364. // value will be replaced with "sensitive".
  16365. func (s UnsupportedOperationException) GoString() string {
  16366. return s.String()
  16367. }
  16368. func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error {
  16369. return &UnsupportedOperationException{
  16370. RespMetadata: v,
  16371. }
  16372. }
  16373. // Code returns the exception type name.
  16374. func (s *UnsupportedOperationException) Code() string {
  16375. return "UnsupportedOperationException"
  16376. }
  16377. // Message returns the exception's message.
  16378. func (s *UnsupportedOperationException) Message() string {
  16379. if s.Message_ != nil {
  16380. return *s.Message_
  16381. }
  16382. return ""
  16383. }
  16384. // OrigErr always returns nil, satisfies awserr.Error interface.
  16385. func (s *UnsupportedOperationException) OrigErr() error {
  16386. return nil
  16387. }
  16388. func (s *UnsupportedOperationException) Error() string {
  16389. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16390. }
  16391. // Status code returns the HTTP status code for the request's response error.
  16392. func (s *UnsupportedOperationException) StatusCode() int {
  16393. return s.RespMetadata.StatusCode
  16394. }
  16395. // RequestID returns the service's response RequestID for request.
  16396. func (s *UnsupportedOperationException) RequestID() string {
  16397. return s.RespMetadata.RequestID
  16398. }
  16399. type UpdateChannelInput struct {
  16400. _ struct{} `type:"structure"`
  16401. // The ARN or ID (the ARN suffix) of the channel that you want to update.
  16402. //
  16403. // Channel is a required field
  16404. Channel *string `min:"3" type:"string" required:"true"`
  16405. // The ARNs of event data stores that you want to log events arriving through
  16406. // the channel.
  16407. Destinations []*Destination `min:"1" type:"list"`
  16408. // Changes the name of the channel.
  16409. Name *string `min:"3" type:"string"`
  16410. }
  16411. // String returns the string representation.
  16412. //
  16413. // API parameter values that are decorated as "sensitive" in the API will not
  16414. // be included in the string output. The member name will be present, but the
  16415. // value will be replaced with "sensitive".
  16416. func (s UpdateChannelInput) String() string {
  16417. return awsutil.Prettify(s)
  16418. }
  16419. // GoString returns the string representation.
  16420. //
  16421. // API parameter values that are decorated as "sensitive" in the API will not
  16422. // be included in the string output. The member name will be present, but the
  16423. // value will be replaced with "sensitive".
  16424. func (s UpdateChannelInput) GoString() string {
  16425. return s.String()
  16426. }
  16427. // Validate inspects the fields of the type to determine if they are valid.
  16428. func (s *UpdateChannelInput) Validate() error {
  16429. invalidParams := request.ErrInvalidParams{Context: "UpdateChannelInput"}
  16430. if s.Channel == nil {
  16431. invalidParams.Add(request.NewErrParamRequired("Channel"))
  16432. }
  16433. if s.Channel != nil && len(*s.Channel) < 3 {
  16434. invalidParams.Add(request.NewErrParamMinLen("Channel", 3))
  16435. }
  16436. if s.Destinations != nil && len(s.Destinations) < 1 {
  16437. invalidParams.Add(request.NewErrParamMinLen("Destinations", 1))
  16438. }
  16439. if s.Name != nil && len(*s.Name) < 3 {
  16440. invalidParams.Add(request.NewErrParamMinLen("Name", 3))
  16441. }
  16442. if s.Destinations != nil {
  16443. for i, v := range s.Destinations {
  16444. if v == nil {
  16445. continue
  16446. }
  16447. if err := v.Validate(); err != nil {
  16448. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams))
  16449. }
  16450. }
  16451. }
  16452. if invalidParams.Len() > 0 {
  16453. return invalidParams
  16454. }
  16455. return nil
  16456. }
  16457. // SetChannel sets the Channel field's value.
  16458. func (s *UpdateChannelInput) SetChannel(v string) *UpdateChannelInput {
  16459. s.Channel = &v
  16460. return s
  16461. }
  16462. // SetDestinations sets the Destinations field's value.
  16463. func (s *UpdateChannelInput) SetDestinations(v []*Destination) *UpdateChannelInput {
  16464. s.Destinations = v
  16465. return s
  16466. }
  16467. // SetName sets the Name field's value.
  16468. func (s *UpdateChannelInput) SetName(v string) *UpdateChannelInput {
  16469. s.Name = &v
  16470. return s
  16471. }
  16472. type UpdateChannelOutput struct {
  16473. _ struct{} `type:"structure"`
  16474. // The ARN of the channel that was updated.
  16475. ChannelArn *string `min:"3" type:"string"`
  16476. // The event data stores that log events arriving through the channel.
  16477. Destinations []*Destination `min:"1" type:"list"`
  16478. // The name of the channel that was updated.
  16479. Name *string `min:"3" type:"string"`
  16480. // The event source of the channel that was updated.
  16481. Source *string `min:"1" type:"string"`
  16482. }
  16483. // String returns the string representation.
  16484. //
  16485. // API parameter values that are decorated as "sensitive" in the API will not
  16486. // be included in the string output. The member name will be present, but the
  16487. // value will be replaced with "sensitive".
  16488. func (s UpdateChannelOutput) String() string {
  16489. return awsutil.Prettify(s)
  16490. }
  16491. // GoString returns the string representation.
  16492. //
  16493. // API parameter values that are decorated as "sensitive" in the API will not
  16494. // be included in the string output. The member name will be present, but the
  16495. // value will be replaced with "sensitive".
  16496. func (s UpdateChannelOutput) GoString() string {
  16497. return s.String()
  16498. }
  16499. // SetChannelArn sets the ChannelArn field's value.
  16500. func (s *UpdateChannelOutput) SetChannelArn(v string) *UpdateChannelOutput {
  16501. s.ChannelArn = &v
  16502. return s
  16503. }
  16504. // SetDestinations sets the Destinations field's value.
  16505. func (s *UpdateChannelOutput) SetDestinations(v []*Destination) *UpdateChannelOutput {
  16506. s.Destinations = v
  16507. return s
  16508. }
  16509. // SetName sets the Name field's value.
  16510. func (s *UpdateChannelOutput) SetName(v string) *UpdateChannelOutput {
  16511. s.Name = &v
  16512. return s
  16513. }
  16514. // SetSource sets the Source field's value.
  16515. func (s *UpdateChannelOutput) SetSource(v string) *UpdateChannelOutput {
  16516. s.Source = &v
  16517. return s
  16518. }
  16519. type UpdateEventDataStoreInput struct {
  16520. _ struct{} `type:"structure"`
  16521. // The advanced event selectors used to select events for the event data store.
  16522. // You can configure up to five advanced event selectors for each event data
  16523. // store.
  16524. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  16525. // The ARN (or the ID suffix of the ARN) of the event data store that you want
  16526. // to update.
  16527. //
  16528. // EventDataStore is a required field
  16529. EventDataStore *string `min:"3" type:"string" required:"true"`
  16530. // Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail.
  16531. // The value can be an alias name prefixed by alias/, a fully specified ARN
  16532. // to an alias, a fully specified ARN to a key, or a globally unique identifier.
  16533. //
  16534. // Disabling or deleting the KMS key, or removing CloudTrail permissions on
  16535. // the key, prevents CloudTrail from logging events to the event data store,
  16536. // and prevents users from querying the data in the event data store that was
  16537. // encrypted with the key. After you associate an event data store with a KMS
  16538. // key, the KMS key cannot be removed or changed. Before you disable or delete
  16539. // a KMS key that you are using with an event data store, delete or back up
  16540. // your event data store.
  16541. //
  16542. // CloudTrail also supports KMS multi-Region keys. For more information about
  16543. // multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
  16544. // in the Key Management Service Developer Guide.
  16545. //
  16546. // Examples:
  16547. //
  16548. // * alias/MyAliasName
  16549. //
  16550. // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  16551. //
  16552. // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  16553. //
  16554. // * 12345678-1234-1234-1234-123456789012
  16555. KmsKeyId *string `min:"1" type:"string"`
  16556. // Specifies whether an event data store collects events from all regions, or
  16557. // only from the region in which it was created.
  16558. MultiRegionEnabled *bool `type:"boolean"`
  16559. // The event data store name.
  16560. Name *string `min:"3" type:"string"`
  16561. // Specifies whether an event data store collects events logged for an organization
  16562. // in Organizations.
  16563. OrganizationEnabled *bool `type:"boolean"`
  16564. // The retention period, in days.
  16565. RetentionPeriod *int64 `min:"7" type:"integer"`
  16566. // Indicates that termination protection is enabled and the event data store
  16567. // cannot be automatically deleted.
  16568. TerminationProtectionEnabled *bool `type:"boolean"`
  16569. }
  16570. // String returns the string representation.
  16571. //
  16572. // API parameter values that are decorated as "sensitive" in the API will not
  16573. // be included in the string output. The member name will be present, but the
  16574. // value will be replaced with "sensitive".
  16575. func (s UpdateEventDataStoreInput) String() string {
  16576. return awsutil.Prettify(s)
  16577. }
  16578. // GoString returns the string representation.
  16579. //
  16580. // API parameter values that are decorated as "sensitive" in the API will not
  16581. // be included in the string output. The member name will be present, but the
  16582. // value will be replaced with "sensitive".
  16583. func (s UpdateEventDataStoreInput) GoString() string {
  16584. return s.String()
  16585. }
  16586. // Validate inspects the fields of the type to determine if they are valid.
  16587. func (s *UpdateEventDataStoreInput) Validate() error {
  16588. invalidParams := request.ErrInvalidParams{Context: "UpdateEventDataStoreInput"}
  16589. if s.EventDataStore == nil {
  16590. invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
  16591. }
  16592. if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
  16593. invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
  16594. }
  16595. if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 {
  16596. invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1))
  16597. }
  16598. if s.Name != nil && len(*s.Name) < 3 {
  16599. invalidParams.Add(request.NewErrParamMinLen("Name", 3))
  16600. }
  16601. if s.RetentionPeriod != nil && *s.RetentionPeriod < 7 {
  16602. invalidParams.Add(request.NewErrParamMinValue("RetentionPeriod", 7))
  16603. }
  16604. if s.AdvancedEventSelectors != nil {
  16605. for i, v := range s.AdvancedEventSelectors {
  16606. if v == nil {
  16607. continue
  16608. }
  16609. if err := v.Validate(); err != nil {
  16610. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdvancedEventSelectors", i), err.(request.ErrInvalidParams))
  16611. }
  16612. }
  16613. }
  16614. if invalidParams.Len() > 0 {
  16615. return invalidParams
  16616. }
  16617. return nil
  16618. }
  16619. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  16620. func (s *UpdateEventDataStoreInput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *UpdateEventDataStoreInput {
  16621. s.AdvancedEventSelectors = v
  16622. return s
  16623. }
  16624. // SetEventDataStore sets the EventDataStore field's value.
  16625. func (s *UpdateEventDataStoreInput) SetEventDataStore(v string) *UpdateEventDataStoreInput {
  16626. s.EventDataStore = &v
  16627. return s
  16628. }
  16629. // SetKmsKeyId sets the KmsKeyId field's value.
  16630. func (s *UpdateEventDataStoreInput) SetKmsKeyId(v string) *UpdateEventDataStoreInput {
  16631. s.KmsKeyId = &v
  16632. return s
  16633. }
  16634. // SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
  16635. func (s *UpdateEventDataStoreInput) SetMultiRegionEnabled(v bool) *UpdateEventDataStoreInput {
  16636. s.MultiRegionEnabled = &v
  16637. return s
  16638. }
  16639. // SetName sets the Name field's value.
  16640. func (s *UpdateEventDataStoreInput) SetName(v string) *UpdateEventDataStoreInput {
  16641. s.Name = &v
  16642. return s
  16643. }
  16644. // SetOrganizationEnabled sets the OrganizationEnabled field's value.
  16645. func (s *UpdateEventDataStoreInput) SetOrganizationEnabled(v bool) *UpdateEventDataStoreInput {
  16646. s.OrganizationEnabled = &v
  16647. return s
  16648. }
  16649. // SetRetentionPeriod sets the RetentionPeriod field's value.
  16650. func (s *UpdateEventDataStoreInput) SetRetentionPeriod(v int64) *UpdateEventDataStoreInput {
  16651. s.RetentionPeriod = &v
  16652. return s
  16653. }
  16654. // SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
  16655. func (s *UpdateEventDataStoreInput) SetTerminationProtectionEnabled(v bool) *UpdateEventDataStoreInput {
  16656. s.TerminationProtectionEnabled = &v
  16657. return s
  16658. }
  16659. type UpdateEventDataStoreOutput struct {
  16660. _ struct{} `type:"structure"`
  16661. // The advanced event selectors that are applied to the event data store.
  16662. AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  16663. // The timestamp that shows when an event data store was first created.
  16664. CreatedTimestamp *time.Time `type:"timestamp"`
  16665. // The ARN of the event data store.
  16666. EventDataStoreArn *string `min:"3" type:"string"`
  16667. // Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
  16668. // The value is a fully specified ARN to a KMS key in the following format.
  16669. //
  16670. // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  16671. KmsKeyId *string `min:"1" type:"string"`
  16672. // Indicates whether the event data store includes events from all regions,
  16673. // or only from the region in which it was created.
  16674. MultiRegionEnabled *bool `type:"boolean"`
  16675. // The name of the event data store.
  16676. Name *string `min:"3" type:"string"`
  16677. // Indicates whether an event data store is collecting logged events for an
  16678. // organization in Organizations.
  16679. OrganizationEnabled *bool `type:"boolean"`
  16680. // The retention period, in days.
  16681. RetentionPeriod *int64 `min:"7" type:"integer"`
  16682. // The status of an event data store. Values can be ENABLED and PENDING_DELETION.
  16683. Status *string `type:"string" enum:"EventDataStoreStatus"`
  16684. // Indicates whether termination protection is enabled for the event data store.
  16685. TerminationProtectionEnabled *bool `type:"boolean"`
  16686. // The timestamp that shows when the event data store was last updated. UpdatedTimestamp
  16687. // is always either the same or newer than the time shown in CreatedTimestamp.
  16688. UpdatedTimestamp *time.Time `type:"timestamp"`
  16689. }
  16690. // String returns the string representation.
  16691. //
  16692. // API parameter values that are decorated as "sensitive" in the API will not
  16693. // be included in the string output. The member name will be present, but the
  16694. // value will be replaced with "sensitive".
  16695. func (s UpdateEventDataStoreOutput) String() string {
  16696. return awsutil.Prettify(s)
  16697. }
  16698. // GoString returns the string representation.
  16699. //
  16700. // API parameter values that are decorated as "sensitive" in the API will not
  16701. // be included in the string output. The member name will be present, but the
  16702. // value will be replaced with "sensitive".
  16703. func (s UpdateEventDataStoreOutput) GoString() string {
  16704. return s.String()
  16705. }
  16706. // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  16707. func (s *UpdateEventDataStoreOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *UpdateEventDataStoreOutput {
  16708. s.AdvancedEventSelectors = v
  16709. return s
  16710. }
  16711. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  16712. func (s *UpdateEventDataStoreOutput) SetCreatedTimestamp(v time.Time) *UpdateEventDataStoreOutput {
  16713. s.CreatedTimestamp = &v
  16714. return s
  16715. }
  16716. // SetEventDataStoreArn sets the EventDataStoreArn field's value.
  16717. func (s *UpdateEventDataStoreOutput) SetEventDataStoreArn(v string) *UpdateEventDataStoreOutput {
  16718. s.EventDataStoreArn = &v
  16719. return s
  16720. }
  16721. // SetKmsKeyId sets the KmsKeyId field's value.
  16722. func (s *UpdateEventDataStoreOutput) SetKmsKeyId(v string) *UpdateEventDataStoreOutput {
  16723. s.KmsKeyId = &v
  16724. return s
  16725. }
  16726. // SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
  16727. func (s *UpdateEventDataStoreOutput) SetMultiRegionEnabled(v bool) *UpdateEventDataStoreOutput {
  16728. s.MultiRegionEnabled = &v
  16729. return s
  16730. }
  16731. // SetName sets the Name field's value.
  16732. func (s *UpdateEventDataStoreOutput) SetName(v string) *UpdateEventDataStoreOutput {
  16733. s.Name = &v
  16734. return s
  16735. }
  16736. // SetOrganizationEnabled sets the OrganizationEnabled field's value.
  16737. func (s *UpdateEventDataStoreOutput) SetOrganizationEnabled(v bool) *UpdateEventDataStoreOutput {
  16738. s.OrganizationEnabled = &v
  16739. return s
  16740. }
  16741. // SetRetentionPeriod sets the RetentionPeriod field's value.
  16742. func (s *UpdateEventDataStoreOutput) SetRetentionPeriod(v int64) *UpdateEventDataStoreOutput {
  16743. s.RetentionPeriod = &v
  16744. return s
  16745. }
  16746. // SetStatus sets the Status field's value.
  16747. func (s *UpdateEventDataStoreOutput) SetStatus(v string) *UpdateEventDataStoreOutput {
  16748. s.Status = &v
  16749. return s
  16750. }
  16751. // SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
  16752. func (s *UpdateEventDataStoreOutput) SetTerminationProtectionEnabled(v bool) *UpdateEventDataStoreOutput {
  16753. s.TerminationProtectionEnabled = &v
  16754. return s
  16755. }
  16756. // SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
  16757. func (s *UpdateEventDataStoreOutput) SetUpdatedTimestamp(v time.Time) *UpdateEventDataStoreOutput {
  16758. s.UpdatedTimestamp = &v
  16759. return s
  16760. }
  16761. // Specifies settings to update for the trail.
  16762. type UpdateTrailInput struct {
  16763. _ struct{} `type:"structure"`
  16764. // Specifies a log group name using an Amazon Resource Name (ARN), a unique
  16765. // identifier that represents the log group to which CloudTrail logs are delivered.
  16766. // You must use a log group that exists in your account.
  16767. //
  16768. // Not required unless you specify CloudWatchLogsRoleArn.
  16769. CloudWatchLogsLogGroupArn *string `type:"string"`
  16770. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  16771. // a user's log group. You must use a role that exists in your account.
  16772. CloudWatchLogsRoleArn *string `type:"string"`
  16773. // Specifies whether log file validation is enabled. The default is false.
  16774. //
  16775. // When you disable log file integrity validation, the chain of digest files
  16776. // is broken after one hour. CloudTrail does not create digest files for log
  16777. // files that were delivered during a period in which log file integrity validation
  16778. // was disabled. For example, if you enable log file integrity validation at
  16779. // noon on January 1, disable it at noon on January 2, and re-enable it at noon
  16780. // on January 10, digest files will not be created for the log files delivered
  16781. // from noon on January 2 to noon on January 10. The same applies whenever you
  16782. // stop CloudTrail logging or delete a trail.
  16783. EnableLogFileValidation *bool `type:"boolean"`
  16784. // Specifies whether the trail is publishing events from global services such
  16785. // as IAM to the log files.
  16786. IncludeGlobalServiceEvents *bool `type:"boolean"`
  16787. // Specifies whether the trail applies only to the current region or to all
  16788. // regions. The default is false. If the trail exists only in the current region
  16789. // and this value is set to true, shadow trails (replications of the trail)
  16790. // will be created in the other regions. If the trail exists in all regions
  16791. // and this value is set to false, the trail will remain in the region where
  16792. // it was created, and its shadow trails in other regions will be deleted. As
  16793. // a best practice, consider using trails that log events in all regions.
  16794. IsMultiRegionTrail *bool `type:"boolean"`
  16795. // Specifies whether the trail is applied to all accounts in an organization
  16796. // in Organizations, or only for the current Amazon Web Services account. The
  16797. // default is false, and cannot be true unless the call is made on behalf of
  16798. // an Amazon Web Services account that is the management account or delegated
  16799. // administrator account for an organization in Organizations. If the trail
  16800. // is not an organization trail and this is set to true, the trail will be created
  16801. // in all Amazon Web Services accounts that belong to the organization. If the
  16802. // trail is an organization trail and this is set to false, the trail will remain
  16803. // in the current Amazon Web Services account but be deleted from all member
  16804. // accounts in the organization.
  16805. IsOrganizationTrail *bool `type:"boolean"`
  16806. // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
  16807. // The value can be an alias name prefixed by "alias/", a fully specified ARN
  16808. // to an alias, a fully specified ARN to a key, or a globally unique identifier.
  16809. //
  16810. // CloudTrail also supports KMS multi-Region keys. For more information about
  16811. // multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
  16812. // in the Key Management Service Developer Guide.
  16813. //
  16814. // Examples:
  16815. //
  16816. // * alias/MyAliasName
  16817. //
  16818. // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  16819. //
  16820. // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  16821. //
  16822. // * 12345678-1234-1234-1234-123456789012
  16823. KmsKeyId *string `type:"string"`
  16824. // Specifies the name of the trail or trail ARN. If Name is a trail name, the
  16825. // string must meet the following requirements:
  16826. //
  16827. // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  16828. // (_), or dashes (-)
  16829. //
  16830. // * Start with a letter or number, and end with a letter or number
  16831. //
  16832. // * Be between 3 and 128 characters
  16833. //
  16834. // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  16835. // and my--namespace are not valid.
  16836. //
  16837. // * Not be in IP address format (for example, 192.168.5.4)
  16838. //
  16839. // If Name is a trail ARN, it must be in the following format.
  16840. //
  16841. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  16842. //
  16843. // Name is a required field
  16844. Name *string `type:"string" required:"true"`
  16845. // Specifies the name of the Amazon S3 bucket designated for publishing log
  16846. // files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  16847. S3BucketName *string `type:"string"`
  16848. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  16849. // you have designated for log file delivery. For more information, see Finding
  16850. // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  16851. // The maximum length is 200 characters.
  16852. S3KeyPrefix *string `type:"string"`
  16853. // Specifies the name of the Amazon SNS topic defined for notification of log
  16854. // file delivery. The maximum length is 256 characters.
  16855. SnsTopicName *string `type:"string"`
  16856. }
  16857. // String returns the string representation.
  16858. //
  16859. // API parameter values that are decorated as "sensitive" in the API will not
  16860. // be included in the string output. The member name will be present, but the
  16861. // value will be replaced with "sensitive".
  16862. func (s UpdateTrailInput) String() string {
  16863. return awsutil.Prettify(s)
  16864. }
  16865. // GoString returns the string representation.
  16866. //
  16867. // API parameter values that are decorated as "sensitive" in the API will not
  16868. // be included in the string output. The member name will be present, but the
  16869. // value will be replaced with "sensitive".
  16870. func (s UpdateTrailInput) GoString() string {
  16871. return s.String()
  16872. }
  16873. // Validate inspects the fields of the type to determine if they are valid.
  16874. func (s *UpdateTrailInput) Validate() error {
  16875. invalidParams := request.ErrInvalidParams{Context: "UpdateTrailInput"}
  16876. if s.Name == nil {
  16877. invalidParams.Add(request.NewErrParamRequired("Name"))
  16878. }
  16879. if invalidParams.Len() > 0 {
  16880. return invalidParams
  16881. }
  16882. return nil
  16883. }
  16884. // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  16885. func (s *UpdateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailInput {
  16886. s.CloudWatchLogsLogGroupArn = &v
  16887. return s
  16888. }
  16889. // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  16890. func (s *UpdateTrailInput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailInput {
  16891. s.CloudWatchLogsRoleArn = &v
  16892. return s
  16893. }
  16894. // SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
  16895. func (s *UpdateTrailInput) SetEnableLogFileValidation(v bool) *UpdateTrailInput {
  16896. s.EnableLogFileValidation = &v
  16897. return s
  16898. }
  16899. // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  16900. func (s *UpdateTrailInput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailInput {
  16901. s.IncludeGlobalServiceEvents = &v
  16902. return s
  16903. }
  16904. // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  16905. func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput {
  16906. s.IsMultiRegionTrail = &v
  16907. return s
  16908. }
  16909. // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  16910. func (s *UpdateTrailInput) SetIsOrganizationTrail(v bool) *UpdateTrailInput {
  16911. s.IsOrganizationTrail = &v
  16912. return s
  16913. }
  16914. // SetKmsKeyId sets the KmsKeyId field's value.
  16915. func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput {
  16916. s.KmsKeyId = &v
  16917. return s
  16918. }
  16919. // SetName sets the Name field's value.
  16920. func (s *UpdateTrailInput) SetName(v string) *UpdateTrailInput {
  16921. s.Name = &v
  16922. return s
  16923. }
  16924. // SetS3BucketName sets the S3BucketName field's value.
  16925. func (s *UpdateTrailInput) SetS3BucketName(v string) *UpdateTrailInput {
  16926. s.S3BucketName = &v
  16927. return s
  16928. }
  16929. // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  16930. func (s *UpdateTrailInput) SetS3KeyPrefix(v string) *UpdateTrailInput {
  16931. s.S3KeyPrefix = &v
  16932. return s
  16933. }
  16934. // SetSnsTopicName sets the SnsTopicName field's value.
  16935. func (s *UpdateTrailInput) SetSnsTopicName(v string) *UpdateTrailInput {
  16936. s.SnsTopicName = &v
  16937. return s
  16938. }
  16939. // Returns the objects or data listed below if successful. Otherwise, returns
  16940. // an error.
  16941. type UpdateTrailOutput struct {
  16942. _ struct{} `type:"structure"`
  16943. // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
  16944. // logs are delivered.
  16945. CloudWatchLogsLogGroupArn *string `type:"string"`
  16946. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  16947. // a user's log group.
  16948. CloudWatchLogsRoleArn *string `type:"string"`
  16949. // Specifies whether the trail is publishing events from global services such
  16950. // as IAM to the log files.
  16951. IncludeGlobalServiceEvents *bool `type:"boolean"`
  16952. // Specifies whether the trail exists in one region or in all regions.
  16953. IsMultiRegionTrail *bool `type:"boolean"`
  16954. // Specifies whether the trail is an organization trail.
  16955. IsOrganizationTrail *bool `type:"boolean"`
  16956. // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
  16957. // The value is a fully specified ARN to a KMS key in the following format.
  16958. //
  16959. // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  16960. KmsKeyId *string `type:"string"`
  16961. // Specifies whether log file integrity validation is enabled.
  16962. LogFileValidationEnabled *bool `type:"boolean"`
  16963. // Specifies the name of the trail.
  16964. Name *string `type:"string"`
  16965. // Specifies the name of the Amazon S3 bucket designated for publishing log
  16966. // files.
  16967. S3BucketName *string `type:"string"`
  16968. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  16969. // you have designated for log file delivery. For more information, see Finding
  16970. // Your IAM Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  16971. S3KeyPrefix *string `type:"string"`
  16972. // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  16973. // when log files are delivered. The following is the format of a topic ARN.
  16974. //
  16975. // arn:aws:sns:us-east-2:123456789012:MyTopic
  16976. SnsTopicARN *string `type:"string"`
  16977. // This field is no longer in use. Use UpdateTrailResponse$SnsTopicARN.
  16978. //
  16979. // Deprecated: SnsTopicName has been deprecated
  16980. SnsTopicName *string `deprecated:"true" type:"string"`
  16981. // Specifies the ARN of the trail that was updated. The following is the format
  16982. // of a trail ARN.
  16983. //
  16984. // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  16985. TrailARN *string `type:"string"`
  16986. }
  16987. // String returns the string representation.
  16988. //
  16989. // API parameter values that are decorated as "sensitive" in the API will not
  16990. // be included in the string output. The member name will be present, but the
  16991. // value will be replaced with "sensitive".
  16992. func (s UpdateTrailOutput) String() string {
  16993. return awsutil.Prettify(s)
  16994. }
  16995. // GoString returns the string representation.
  16996. //
  16997. // API parameter values that are decorated as "sensitive" in the API will not
  16998. // be included in the string output. The member name will be present, but the
  16999. // value will be replaced with "sensitive".
  17000. func (s UpdateTrailOutput) GoString() string {
  17001. return s.String()
  17002. }
  17003. // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  17004. func (s *UpdateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailOutput {
  17005. s.CloudWatchLogsLogGroupArn = &v
  17006. return s
  17007. }
  17008. // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  17009. func (s *UpdateTrailOutput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailOutput {
  17010. s.CloudWatchLogsRoleArn = &v
  17011. return s
  17012. }
  17013. // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  17014. func (s *UpdateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailOutput {
  17015. s.IncludeGlobalServiceEvents = &v
  17016. return s
  17017. }
  17018. // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  17019. func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput {
  17020. s.IsMultiRegionTrail = &v
  17021. return s
  17022. }
  17023. // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  17024. func (s *UpdateTrailOutput) SetIsOrganizationTrail(v bool) *UpdateTrailOutput {
  17025. s.IsOrganizationTrail = &v
  17026. return s
  17027. }
  17028. // SetKmsKeyId sets the KmsKeyId field's value.
  17029. func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput {
  17030. s.KmsKeyId = &v
  17031. return s
  17032. }
  17033. // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
  17034. func (s *UpdateTrailOutput) SetLogFileValidationEnabled(v bool) *UpdateTrailOutput {
  17035. s.LogFileValidationEnabled = &v
  17036. return s
  17037. }
  17038. // SetName sets the Name field's value.
  17039. func (s *UpdateTrailOutput) SetName(v string) *UpdateTrailOutput {
  17040. s.Name = &v
  17041. return s
  17042. }
  17043. // SetS3BucketName sets the S3BucketName field's value.
  17044. func (s *UpdateTrailOutput) SetS3BucketName(v string) *UpdateTrailOutput {
  17045. s.S3BucketName = &v
  17046. return s
  17047. }
  17048. // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  17049. func (s *UpdateTrailOutput) SetS3KeyPrefix(v string) *UpdateTrailOutput {
  17050. s.S3KeyPrefix = &v
  17051. return s
  17052. }
  17053. // SetSnsTopicARN sets the SnsTopicARN field's value.
  17054. func (s *UpdateTrailOutput) SetSnsTopicARN(v string) *UpdateTrailOutput {
  17055. s.SnsTopicARN = &v
  17056. return s
  17057. }
  17058. // SetSnsTopicName sets the SnsTopicName field's value.
  17059. func (s *UpdateTrailOutput) SetSnsTopicName(v string) *UpdateTrailOutput {
  17060. s.SnsTopicName = &v
  17061. return s
  17062. }
  17063. // SetTrailARN sets the TrailARN field's value.
  17064. func (s *UpdateTrailOutput) SetTrailARN(v string) *UpdateTrailOutput {
  17065. s.TrailARN = &v
  17066. return s
  17067. }
  17068. const (
  17069. // DeliveryStatusSuccess is a DeliveryStatus enum value
  17070. DeliveryStatusSuccess = "SUCCESS"
  17071. // DeliveryStatusFailed is a DeliveryStatus enum value
  17072. DeliveryStatusFailed = "FAILED"
  17073. // DeliveryStatusFailedSigningFile is a DeliveryStatus enum value
  17074. DeliveryStatusFailedSigningFile = "FAILED_SIGNING_FILE"
  17075. // DeliveryStatusPending is a DeliveryStatus enum value
  17076. DeliveryStatusPending = "PENDING"
  17077. // DeliveryStatusResourceNotFound is a DeliveryStatus enum value
  17078. DeliveryStatusResourceNotFound = "RESOURCE_NOT_FOUND"
  17079. // DeliveryStatusAccessDenied is a DeliveryStatus enum value
  17080. DeliveryStatusAccessDenied = "ACCESS_DENIED"
  17081. // DeliveryStatusAccessDeniedSigningFile is a DeliveryStatus enum value
  17082. DeliveryStatusAccessDeniedSigningFile = "ACCESS_DENIED_SIGNING_FILE"
  17083. // DeliveryStatusCancelled is a DeliveryStatus enum value
  17084. DeliveryStatusCancelled = "CANCELLED"
  17085. // DeliveryStatusUnknown is a DeliveryStatus enum value
  17086. DeliveryStatusUnknown = "UNKNOWN"
  17087. )
  17088. // DeliveryStatus_Values returns all elements of the DeliveryStatus enum
  17089. func DeliveryStatus_Values() []string {
  17090. return []string{
  17091. DeliveryStatusSuccess,
  17092. DeliveryStatusFailed,
  17093. DeliveryStatusFailedSigningFile,
  17094. DeliveryStatusPending,
  17095. DeliveryStatusResourceNotFound,
  17096. DeliveryStatusAccessDenied,
  17097. DeliveryStatusAccessDeniedSigningFile,
  17098. DeliveryStatusCancelled,
  17099. DeliveryStatusUnknown,
  17100. }
  17101. }
  17102. const (
  17103. // DestinationTypeEventDataStore is a DestinationType enum value
  17104. DestinationTypeEventDataStore = "EVENT_DATA_STORE"
  17105. // DestinationTypeAwsService is a DestinationType enum value
  17106. DestinationTypeAwsService = "AWS_SERVICE"
  17107. )
  17108. // DestinationType_Values returns all elements of the DestinationType enum
  17109. func DestinationType_Values() []string {
  17110. return []string{
  17111. DestinationTypeEventDataStore,
  17112. DestinationTypeAwsService,
  17113. }
  17114. }
  17115. const (
  17116. // EventCategoryInsight is a EventCategory enum value
  17117. EventCategoryInsight = "insight"
  17118. )
  17119. // EventCategory_Values returns all elements of the EventCategory enum
  17120. func EventCategory_Values() []string {
  17121. return []string{
  17122. EventCategoryInsight,
  17123. }
  17124. }
  17125. const (
  17126. // EventDataStoreStatusCreated is a EventDataStoreStatus enum value
  17127. EventDataStoreStatusCreated = "CREATED"
  17128. // EventDataStoreStatusEnabled is a EventDataStoreStatus enum value
  17129. EventDataStoreStatusEnabled = "ENABLED"
  17130. // EventDataStoreStatusPendingDeletion is a EventDataStoreStatus enum value
  17131. EventDataStoreStatusPendingDeletion = "PENDING_DELETION"
  17132. )
  17133. // EventDataStoreStatus_Values returns all elements of the EventDataStoreStatus enum
  17134. func EventDataStoreStatus_Values() []string {
  17135. return []string{
  17136. EventDataStoreStatusCreated,
  17137. EventDataStoreStatusEnabled,
  17138. EventDataStoreStatusPendingDeletion,
  17139. }
  17140. }
  17141. const (
  17142. // ImportFailureStatusFailed is a ImportFailureStatus enum value
  17143. ImportFailureStatusFailed = "FAILED"
  17144. // ImportFailureStatusRetry is a ImportFailureStatus enum value
  17145. ImportFailureStatusRetry = "RETRY"
  17146. // ImportFailureStatusSucceeded is a ImportFailureStatus enum value
  17147. ImportFailureStatusSucceeded = "SUCCEEDED"
  17148. )
  17149. // ImportFailureStatus_Values returns all elements of the ImportFailureStatus enum
  17150. func ImportFailureStatus_Values() []string {
  17151. return []string{
  17152. ImportFailureStatusFailed,
  17153. ImportFailureStatusRetry,
  17154. ImportFailureStatusSucceeded,
  17155. }
  17156. }
  17157. const (
  17158. // ImportStatusInitializing is a ImportStatus enum value
  17159. ImportStatusInitializing = "INITIALIZING"
  17160. // ImportStatusInProgress is a ImportStatus enum value
  17161. ImportStatusInProgress = "IN_PROGRESS"
  17162. // ImportStatusFailed is a ImportStatus enum value
  17163. ImportStatusFailed = "FAILED"
  17164. // ImportStatusStopped is a ImportStatus enum value
  17165. ImportStatusStopped = "STOPPED"
  17166. // ImportStatusCompleted is a ImportStatus enum value
  17167. ImportStatusCompleted = "COMPLETED"
  17168. )
  17169. // ImportStatus_Values returns all elements of the ImportStatus enum
  17170. func ImportStatus_Values() []string {
  17171. return []string{
  17172. ImportStatusInitializing,
  17173. ImportStatusInProgress,
  17174. ImportStatusFailed,
  17175. ImportStatusStopped,
  17176. ImportStatusCompleted,
  17177. }
  17178. }
  17179. const (
  17180. // InsightTypeApiCallRateInsight is a InsightType enum value
  17181. InsightTypeApiCallRateInsight = "ApiCallRateInsight"
  17182. // InsightTypeApiErrorRateInsight is a InsightType enum value
  17183. InsightTypeApiErrorRateInsight = "ApiErrorRateInsight"
  17184. )
  17185. // InsightType_Values returns all elements of the InsightType enum
  17186. func InsightType_Values() []string {
  17187. return []string{
  17188. InsightTypeApiCallRateInsight,
  17189. InsightTypeApiErrorRateInsight,
  17190. }
  17191. }
  17192. const (
  17193. // LookupAttributeKeyEventId is a LookupAttributeKey enum value
  17194. LookupAttributeKeyEventId = "EventId"
  17195. // LookupAttributeKeyEventName is a LookupAttributeKey enum value
  17196. LookupAttributeKeyEventName = "EventName"
  17197. // LookupAttributeKeyReadOnly is a LookupAttributeKey enum value
  17198. LookupAttributeKeyReadOnly = "ReadOnly"
  17199. // LookupAttributeKeyUsername is a LookupAttributeKey enum value
  17200. LookupAttributeKeyUsername = "Username"
  17201. // LookupAttributeKeyResourceType is a LookupAttributeKey enum value
  17202. LookupAttributeKeyResourceType = "ResourceType"
  17203. // LookupAttributeKeyResourceName is a LookupAttributeKey enum value
  17204. LookupAttributeKeyResourceName = "ResourceName"
  17205. // LookupAttributeKeyEventSource is a LookupAttributeKey enum value
  17206. LookupAttributeKeyEventSource = "EventSource"
  17207. // LookupAttributeKeyAccessKeyId is a LookupAttributeKey enum value
  17208. LookupAttributeKeyAccessKeyId = "AccessKeyId"
  17209. )
  17210. // LookupAttributeKey_Values returns all elements of the LookupAttributeKey enum
  17211. func LookupAttributeKey_Values() []string {
  17212. return []string{
  17213. LookupAttributeKeyEventId,
  17214. LookupAttributeKeyEventName,
  17215. LookupAttributeKeyReadOnly,
  17216. LookupAttributeKeyUsername,
  17217. LookupAttributeKeyResourceType,
  17218. LookupAttributeKeyResourceName,
  17219. LookupAttributeKeyEventSource,
  17220. LookupAttributeKeyAccessKeyId,
  17221. }
  17222. }
  17223. const (
  17224. // QueryStatusQueued is a QueryStatus enum value
  17225. QueryStatusQueued = "QUEUED"
  17226. // QueryStatusRunning is a QueryStatus enum value
  17227. QueryStatusRunning = "RUNNING"
  17228. // QueryStatusFinished is a QueryStatus enum value
  17229. QueryStatusFinished = "FINISHED"
  17230. // QueryStatusFailed is a QueryStatus enum value
  17231. QueryStatusFailed = "FAILED"
  17232. // QueryStatusCancelled is a QueryStatus enum value
  17233. QueryStatusCancelled = "CANCELLED"
  17234. // QueryStatusTimedOut is a QueryStatus enum value
  17235. QueryStatusTimedOut = "TIMED_OUT"
  17236. )
  17237. // QueryStatus_Values returns all elements of the QueryStatus enum
  17238. func QueryStatus_Values() []string {
  17239. return []string{
  17240. QueryStatusQueued,
  17241. QueryStatusRunning,
  17242. QueryStatusFinished,
  17243. QueryStatusFailed,
  17244. QueryStatusCancelled,
  17245. QueryStatusTimedOut,
  17246. }
  17247. }
  17248. const (
  17249. // ReadWriteTypeReadOnly is a ReadWriteType enum value
  17250. ReadWriteTypeReadOnly = "ReadOnly"
  17251. // ReadWriteTypeWriteOnly is a ReadWriteType enum value
  17252. ReadWriteTypeWriteOnly = "WriteOnly"
  17253. // ReadWriteTypeAll is a ReadWriteType enum value
  17254. ReadWriteTypeAll = "All"
  17255. )
  17256. // ReadWriteType_Values returns all elements of the ReadWriteType enum
  17257. func ReadWriteType_Values() []string {
  17258. return []string{
  17259. ReadWriteTypeReadOnly,
  17260. ReadWriteTypeWriteOnly,
  17261. ReadWriteTypeAll,
  17262. }
  17263. }