api.go 298 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package cloudwatchlogs
  3. import (
  4. "fmt"
  5. "github.com/aws/aws-sdk-go/aws"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. const opAssociateKmsKey = "AssociateKmsKey"
  12. // AssociateKmsKeyRequest generates a "aws/request.Request" representing the
  13. // client's request for the AssociateKmsKey operation. The "output" return
  14. // value will be populated with the request's response once the request completes
  15. // successfully.
  16. //
  17. // Use "Send" method on the returned Request to send the API call to the service.
  18. // the "output" return value is not valid until after Send returns without error.
  19. //
  20. // See AssociateKmsKey for more information on using the AssociateKmsKey
  21. // API call, and error handling.
  22. //
  23. // This method is useful when you want to inject custom logic or configuration
  24. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  25. //
  26. //
  27. // // Example sending a request using the AssociateKmsKeyRequest method.
  28. // req, resp := client.AssociateKmsKeyRequest(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/logs-2014-03-28/AssociateKmsKey
  36. func (c *CloudWatchLogs) AssociateKmsKeyRequest(input *AssociateKmsKeyInput) (req *request.Request, output *AssociateKmsKeyOutput) {
  37. op := &request.Operation{
  38. Name: opAssociateKmsKey,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &AssociateKmsKeyInput{}
  44. }
  45. output = &AssociateKmsKeyOutput{}
  46. req = c.newRequest(op, input, output)
  47. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  48. return
  49. }
  50. // AssociateKmsKey API operation for Amazon CloudWatch Logs.
  51. //
  52. // Associates the specified AWS Key Management Service (AWS KMS) customer master
  53. // key (CMK) with the specified log group.
  54. //
  55. // Associating an AWS KMS CMK with a log group overrides any existing associations
  56. // between the log group and a CMK. After a CMK is associated with a log group,
  57. // all newly ingested data for the log group is encrypted using the CMK. This
  58. // association is stored as long as the data encrypted with the CMK is still
  59. // within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt
  60. // this data whenever it is requested.
  61. //
  62. // Note that it can take up to 5 minutes for this operation to take effect.
  63. //
  64. // If you attempt to associate a CMK with a log group but the CMK does not exist
  65. // or the CMK is disabled, you will receive an InvalidParameterException error.
  66. //
  67. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  68. // with awserr.Error's Code and Message methods to get detailed information about
  69. // the error.
  70. //
  71. // See the AWS API reference guide for Amazon CloudWatch Logs's
  72. // API operation AssociateKmsKey for usage and error information.
  73. //
  74. // Returned Error Codes:
  75. // * ErrCodeInvalidParameterException "InvalidParameterException"
  76. // A parameter is specified incorrectly.
  77. //
  78. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  79. // The specified resource does not exist.
  80. //
  81. // * ErrCodeOperationAbortedException "OperationAbortedException"
  82. // Multiple requests to update the same resource were in conflict.
  83. //
  84. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  85. // The service cannot complete the request.
  86. //
  87. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey
  88. func (c *CloudWatchLogs) AssociateKmsKey(input *AssociateKmsKeyInput) (*AssociateKmsKeyOutput, error) {
  89. req, out := c.AssociateKmsKeyRequest(input)
  90. return out, req.Send()
  91. }
  92. // AssociateKmsKeyWithContext is the same as AssociateKmsKey with the addition of
  93. // the ability to pass a context and additional request options.
  94. //
  95. // See AssociateKmsKey for details on how to use this API operation.
  96. //
  97. // The context must be non-nil and will be used for request cancellation. If
  98. // the context is nil a panic will occur. In the future the SDK may create
  99. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  100. // for more information on using Contexts.
  101. func (c *CloudWatchLogs) AssociateKmsKeyWithContext(ctx aws.Context, input *AssociateKmsKeyInput, opts ...request.Option) (*AssociateKmsKeyOutput, error) {
  102. req, out := c.AssociateKmsKeyRequest(input)
  103. req.SetContext(ctx)
  104. req.ApplyOptions(opts...)
  105. return out, req.Send()
  106. }
  107. const opCancelExportTask = "CancelExportTask"
  108. // CancelExportTaskRequest generates a "aws/request.Request" representing the
  109. // client's request for the CancelExportTask operation. The "output" return
  110. // value will be populated with the request's response once the request completes
  111. // successfully.
  112. //
  113. // Use "Send" method on the returned Request to send the API call to the service.
  114. // the "output" return value is not valid until after Send returns without error.
  115. //
  116. // See CancelExportTask for more information on using the CancelExportTask
  117. // API call, and error handling.
  118. //
  119. // This method is useful when you want to inject custom logic or configuration
  120. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  121. //
  122. //
  123. // // Example sending a request using the CancelExportTaskRequest method.
  124. // req, resp := client.CancelExportTaskRequest(params)
  125. //
  126. // err := req.Send()
  127. // if err == nil { // resp is now filled
  128. // fmt.Println(resp)
  129. // }
  130. //
  131. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask
  132. func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) {
  133. op := &request.Operation{
  134. Name: opCancelExportTask,
  135. HTTPMethod: "POST",
  136. HTTPPath: "/",
  137. }
  138. if input == nil {
  139. input = &CancelExportTaskInput{}
  140. }
  141. output = &CancelExportTaskOutput{}
  142. req = c.newRequest(op, input, output)
  143. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  144. return
  145. }
  146. // CancelExportTask API operation for Amazon CloudWatch Logs.
  147. //
  148. // Cancels the specified export task.
  149. //
  150. // The task must be in the PENDING or RUNNING state.
  151. //
  152. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  153. // with awserr.Error's Code and Message methods to get detailed information about
  154. // the error.
  155. //
  156. // See the AWS API reference guide for Amazon CloudWatch Logs's
  157. // API operation CancelExportTask for usage and error information.
  158. //
  159. // Returned Error Codes:
  160. // * ErrCodeInvalidParameterException "InvalidParameterException"
  161. // A parameter is specified incorrectly.
  162. //
  163. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  164. // The specified resource does not exist.
  165. //
  166. // * ErrCodeInvalidOperationException "InvalidOperationException"
  167. // The operation is not valid on the specified resource.
  168. //
  169. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  170. // The service cannot complete the request.
  171. //
  172. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask
  173. func (c *CloudWatchLogs) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) {
  174. req, out := c.CancelExportTaskRequest(input)
  175. return out, req.Send()
  176. }
  177. // CancelExportTaskWithContext is the same as CancelExportTask with the addition of
  178. // the ability to pass a context and additional request options.
  179. //
  180. // See CancelExportTask for details on how to use this API operation.
  181. //
  182. // The context must be non-nil and will be used for request cancellation. If
  183. // the context is nil a panic will occur. In the future the SDK may create
  184. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  185. // for more information on using Contexts.
  186. func (c *CloudWatchLogs) CancelExportTaskWithContext(ctx aws.Context, input *CancelExportTaskInput, opts ...request.Option) (*CancelExportTaskOutput, error) {
  187. req, out := c.CancelExportTaskRequest(input)
  188. req.SetContext(ctx)
  189. req.ApplyOptions(opts...)
  190. return out, req.Send()
  191. }
  192. const opCreateExportTask = "CreateExportTask"
  193. // CreateExportTaskRequest generates a "aws/request.Request" representing the
  194. // client's request for the CreateExportTask operation. The "output" return
  195. // value will be populated with the request's response once the request completes
  196. // successfully.
  197. //
  198. // Use "Send" method on the returned Request to send the API call to the service.
  199. // the "output" return value is not valid until after Send returns without error.
  200. //
  201. // See CreateExportTask for more information on using the CreateExportTask
  202. // API call, and error handling.
  203. //
  204. // This method is useful when you want to inject custom logic or configuration
  205. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  206. //
  207. //
  208. // // Example sending a request using the CreateExportTaskRequest method.
  209. // req, resp := client.CreateExportTaskRequest(params)
  210. //
  211. // err := req.Send()
  212. // if err == nil { // resp is now filled
  213. // fmt.Println(resp)
  214. // }
  215. //
  216. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask
  217. func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) (req *request.Request, output *CreateExportTaskOutput) {
  218. op := &request.Operation{
  219. Name: opCreateExportTask,
  220. HTTPMethod: "POST",
  221. HTTPPath: "/",
  222. }
  223. if input == nil {
  224. input = &CreateExportTaskInput{}
  225. }
  226. output = &CreateExportTaskOutput{}
  227. req = c.newRequest(op, input, output)
  228. return
  229. }
  230. // CreateExportTask API operation for Amazon CloudWatch Logs.
  231. //
  232. // Creates an export task, which allows you to efficiently export data from
  233. // a log group to an Amazon S3 bucket.
  234. //
  235. // This is an asynchronous call. If all the required information is provided,
  236. // this operation initiates an export task and responds with the ID of the task.
  237. // After the task has started, you can use DescribeExportTasks to get the status
  238. // of the export task. Each account can only have one active (RUNNING or PENDING)
  239. // export task at a time. To cancel an export task, use CancelExportTask.
  240. //
  241. // You can export logs from multiple log groups or multiple time ranges to the
  242. // same S3 bucket. To separate out log data for each export task, you can specify
  243. // a prefix to be used as the Amazon S3 key prefix for all exported objects.
  244. //
  245. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  246. // with awserr.Error's Code and Message methods to get detailed information about
  247. // the error.
  248. //
  249. // See the AWS API reference guide for Amazon CloudWatch Logs's
  250. // API operation CreateExportTask for usage and error information.
  251. //
  252. // Returned Error Codes:
  253. // * ErrCodeInvalidParameterException "InvalidParameterException"
  254. // A parameter is specified incorrectly.
  255. //
  256. // * ErrCodeLimitExceededException "LimitExceededException"
  257. // You have reached the maximum number of resources that can be created.
  258. //
  259. // * ErrCodeOperationAbortedException "OperationAbortedException"
  260. // Multiple requests to update the same resource were in conflict.
  261. //
  262. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  263. // The service cannot complete the request.
  264. //
  265. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  266. // The specified resource does not exist.
  267. //
  268. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  269. // The specified resource already exists.
  270. //
  271. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask
  272. func (c *CloudWatchLogs) CreateExportTask(input *CreateExportTaskInput) (*CreateExportTaskOutput, error) {
  273. req, out := c.CreateExportTaskRequest(input)
  274. return out, req.Send()
  275. }
  276. // CreateExportTaskWithContext is the same as CreateExportTask with the addition of
  277. // the ability to pass a context and additional request options.
  278. //
  279. // See CreateExportTask for details on how to use this API operation.
  280. //
  281. // The context must be non-nil and will be used for request cancellation. If
  282. // the context is nil a panic will occur. In the future the SDK may create
  283. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  284. // for more information on using Contexts.
  285. func (c *CloudWatchLogs) CreateExportTaskWithContext(ctx aws.Context, input *CreateExportTaskInput, opts ...request.Option) (*CreateExportTaskOutput, error) {
  286. req, out := c.CreateExportTaskRequest(input)
  287. req.SetContext(ctx)
  288. req.ApplyOptions(opts...)
  289. return out, req.Send()
  290. }
  291. const opCreateLogGroup = "CreateLogGroup"
  292. // CreateLogGroupRequest generates a "aws/request.Request" representing the
  293. // client's request for the CreateLogGroup operation. The "output" return
  294. // value will be populated with the request's response once the request completes
  295. // successfully.
  296. //
  297. // Use "Send" method on the returned Request to send the API call to the service.
  298. // the "output" return value is not valid until after Send returns without error.
  299. //
  300. // See CreateLogGroup for more information on using the CreateLogGroup
  301. // API call, and error handling.
  302. //
  303. // This method is useful when you want to inject custom logic or configuration
  304. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  305. //
  306. //
  307. // // Example sending a request using the CreateLogGroupRequest method.
  308. // req, resp := client.CreateLogGroupRequest(params)
  309. //
  310. // err := req.Send()
  311. // if err == nil { // resp is now filled
  312. // fmt.Println(resp)
  313. // }
  314. //
  315. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup
  316. func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput) {
  317. op := &request.Operation{
  318. Name: opCreateLogGroup,
  319. HTTPMethod: "POST",
  320. HTTPPath: "/",
  321. }
  322. if input == nil {
  323. input = &CreateLogGroupInput{}
  324. }
  325. output = &CreateLogGroupOutput{}
  326. req = c.newRequest(op, input, output)
  327. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  328. return
  329. }
  330. // CreateLogGroup API operation for Amazon CloudWatch Logs.
  331. //
  332. // Creates a log group with the specified name.
  333. //
  334. // You can create up to 5000 log groups per account.
  335. //
  336. // You must use the following guidelines when naming a log group:
  337. //
  338. // * Log group names must be unique within a region for an AWS account.
  339. //
  340. // * Log group names can be between 1 and 512 characters long.
  341. //
  342. // * Log group names consist of the following characters: a-z, A-Z, 0-9,
  343. // '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).
  344. //
  345. // If you associate a AWS Key Management Service (AWS KMS) customer master key
  346. // (CMK) with the log group, ingested data is encrypted using the CMK. This
  347. // association is stored as long as the data encrypted with the CMK is still
  348. // within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt
  349. // this data whenever it is requested.
  350. //
  351. // If you attempt to associate a CMK with the log group but the CMK does not
  352. // exist or the CMK is disabled, you will receive an InvalidParameterException
  353. // error.
  354. //
  355. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  356. // with awserr.Error's Code and Message methods to get detailed information about
  357. // the error.
  358. //
  359. // See the AWS API reference guide for Amazon CloudWatch Logs's
  360. // API operation CreateLogGroup for usage and error information.
  361. //
  362. // Returned Error Codes:
  363. // * ErrCodeInvalidParameterException "InvalidParameterException"
  364. // A parameter is specified incorrectly.
  365. //
  366. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  367. // The specified resource already exists.
  368. //
  369. // * ErrCodeLimitExceededException "LimitExceededException"
  370. // You have reached the maximum number of resources that can be created.
  371. //
  372. // * ErrCodeOperationAbortedException "OperationAbortedException"
  373. // Multiple requests to update the same resource were in conflict.
  374. //
  375. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  376. // The service cannot complete the request.
  377. //
  378. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup
  379. func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error) {
  380. req, out := c.CreateLogGroupRequest(input)
  381. return out, req.Send()
  382. }
  383. // CreateLogGroupWithContext is the same as CreateLogGroup with the addition of
  384. // the ability to pass a context and additional request options.
  385. //
  386. // See CreateLogGroup for details on how to use this API operation.
  387. //
  388. // The context must be non-nil and will be used for request cancellation. If
  389. // the context is nil a panic will occur. In the future the SDK may create
  390. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  391. // for more information on using Contexts.
  392. func (c *CloudWatchLogs) CreateLogGroupWithContext(ctx aws.Context, input *CreateLogGroupInput, opts ...request.Option) (*CreateLogGroupOutput, error) {
  393. req, out := c.CreateLogGroupRequest(input)
  394. req.SetContext(ctx)
  395. req.ApplyOptions(opts...)
  396. return out, req.Send()
  397. }
  398. const opCreateLogStream = "CreateLogStream"
  399. // CreateLogStreamRequest generates a "aws/request.Request" representing the
  400. // client's request for the CreateLogStream operation. The "output" return
  401. // value will be populated with the request's response once the request completes
  402. // successfully.
  403. //
  404. // Use "Send" method on the returned Request to send the API call to the service.
  405. // the "output" return value is not valid until after Send returns without error.
  406. //
  407. // See CreateLogStream for more information on using the CreateLogStream
  408. // API call, and error handling.
  409. //
  410. // This method is useful when you want to inject custom logic or configuration
  411. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  412. //
  413. //
  414. // // Example sending a request using the CreateLogStreamRequest method.
  415. // req, resp := client.CreateLogStreamRequest(params)
  416. //
  417. // err := req.Send()
  418. // if err == nil { // resp is now filled
  419. // fmt.Println(resp)
  420. // }
  421. //
  422. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream
  423. func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput) {
  424. op := &request.Operation{
  425. Name: opCreateLogStream,
  426. HTTPMethod: "POST",
  427. HTTPPath: "/",
  428. }
  429. if input == nil {
  430. input = &CreateLogStreamInput{}
  431. }
  432. output = &CreateLogStreamOutput{}
  433. req = c.newRequest(op, input, output)
  434. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  435. return
  436. }
  437. // CreateLogStream API operation for Amazon CloudWatch Logs.
  438. //
  439. // Creates a log stream for the specified log group.
  440. //
  441. // There is no limit on the number of log streams that you can create for a
  442. // log group.
  443. //
  444. // You must use the following guidelines when naming a log stream:
  445. //
  446. // * Log stream names must be unique within the log group.
  447. //
  448. // * Log stream names can be between 1 and 512 characters long.
  449. //
  450. // * The ':' (colon) and '*' (asterisk) characters are not allowed.
  451. //
  452. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  453. // with awserr.Error's Code and Message methods to get detailed information about
  454. // the error.
  455. //
  456. // See the AWS API reference guide for Amazon CloudWatch Logs's
  457. // API operation CreateLogStream for usage and error information.
  458. //
  459. // Returned Error Codes:
  460. // * ErrCodeInvalidParameterException "InvalidParameterException"
  461. // A parameter is specified incorrectly.
  462. //
  463. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  464. // The specified resource already exists.
  465. //
  466. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  467. // The specified resource does not exist.
  468. //
  469. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  470. // The service cannot complete the request.
  471. //
  472. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream
  473. func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error) {
  474. req, out := c.CreateLogStreamRequest(input)
  475. return out, req.Send()
  476. }
  477. // CreateLogStreamWithContext is the same as CreateLogStream with the addition of
  478. // the ability to pass a context and additional request options.
  479. //
  480. // See CreateLogStream for details on how to use this API operation.
  481. //
  482. // The context must be non-nil and will be used for request cancellation. If
  483. // the context is nil a panic will occur. In the future the SDK may create
  484. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  485. // for more information on using Contexts.
  486. func (c *CloudWatchLogs) CreateLogStreamWithContext(ctx aws.Context, input *CreateLogStreamInput, opts ...request.Option) (*CreateLogStreamOutput, error) {
  487. req, out := c.CreateLogStreamRequest(input)
  488. req.SetContext(ctx)
  489. req.ApplyOptions(opts...)
  490. return out, req.Send()
  491. }
  492. const opDeleteDestination = "DeleteDestination"
  493. // DeleteDestinationRequest generates a "aws/request.Request" representing the
  494. // client's request for the DeleteDestination operation. The "output" return
  495. // value will be populated with the request's response once the request completes
  496. // successfully.
  497. //
  498. // Use "Send" method on the returned Request to send the API call to the service.
  499. // the "output" return value is not valid until after Send returns without error.
  500. //
  501. // See DeleteDestination for more information on using the DeleteDestination
  502. // API call, and error handling.
  503. //
  504. // This method is useful when you want to inject custom logic or configuration
  505. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  506. //
  507. //
  508. // // Example sending a request using the DeleteDestinationRequest method.
  509. // req, resp := client.DeleteDestinationRequest(params)
  510. //
  511. // err := req.Send()
  512. // if err == nil { // resp is now filled
  513. // fmt.Println(resp)
  514. // }
  515. //
  516. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination
  517. func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) {
  518. op := &request.Operation{
  519. Name: opDeleteDestination,
  520. HTTPMethod: "POST",
  521. HTTPPath: "/",
  522. }
  523. if input == nil {
  524. input = &DeleteDestinationInput{}
  525. }
  526. output = &DeleteDestinationOutput{}
  527. req = c.newRequest(op, input, output)
  528. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  529. return
  530. }
  531. // DeleteDestination API operation for Amazon CloudWatch Logs.
  532. //
  533. // Deletes the specified destination, and eventually disables all the subscription
  534. // filters that publish to it. This operation does not delete the physical resource
  535. // encapsulated by the destination.
  536. //
  537. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  538. // with awserr.Error's Code and Message methods to get detailed information about
  539. // the error.
  540. //
  541. // See the AWS API reference guide for Amazon CloudWatch Logs's
  542. // API operation DeleteDestination for usage and error information.
  543. //
  544. // Returned Error Codes:
  545. // * ErrCodeInvalidParameterException "InvalidParameterException"
  546. // A parameter is specified incorrectly.
  547. //
  548. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  549. // The specified resource does not exist.
  550. //
  551. // * ErrCodeOperationAbortedException "OperationAbortedException"
  552. // Multiple requests to update the same resource were in conflict.
  553. //
  554. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  555. // The service cannot complete the request.
  556. //
  557. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination
  558. func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) {
  559. req, out := c.DeleteDestinationRequest(input)
  560. return out, req.Send()
  561. }
  562. // DeleteDestinationWithContext is the same as DeleteDestination with the addition of
  563. // the ability to pass a context and additional request options.
  564. //
  565. // See DeleteDestination for details on how to use this API operation.
  566. //
  567. // The context must be non-nil and will be used for request cancellation. If
  568. // the context is nil a panic will occur. In the future the SDK may create
  569. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  570. // for more information on using Contexts.
  571. func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error) {
  572. req, out := c.DeleteDestinationRequest(input)
  573. req.SetContext(ctx)
  574. req.ApplyOptions(opts...)
  575. return out, req.Send()
  576. }
  577. const opDeleteLogGroup = "DeleteLogGroup"
  578. // DeleteLogGroupRequest generates a "aws/request.Request" representing the
  579. // client's request for the DeleteLogGroup operation. The "output" return
  580. // value will be populated with the request's response once the request completes
  581. // successfully.
  582. //
  583. // Use "Send" method on the returned Request to send the API call to the service.
  584. // the "output" return value is not valid until after Send returns without error.
  585. //
  586. // See DeleteLogGroup for more information on using the DeleteLogGroup
  587. // API call, and error handling.
  588. //
  589. // This method is useful when you want to inject custom logic or configuration
  590. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  591. //
  592. //
  593. // // Example sending a request using the DeleteLogGroupRequest method.
  594. // req, resp := client.DeleteLogGroupRequest(params)
  595. //
  596. // err := req.Send()
  597. // if err == nil { // resp is now filled
  598. // fmt.Println(resp)
  599. // }
  600. //
  601. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup
  602. func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) {
  603. op := &request.Operation{
  604. Name: opDeleteLogGroup,
  605. HTTPMethod: "POST",
  606. HTTPPath: "/",
  607. }
  608. if input == nil {
  609. input = &DeleteLogGroupInput{}
  610. }
  611. output = &DeleteLogGroupOutput{}
  612. req = c.newRequest(op, input, output)
  613. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  614. return
  615. }
  616. // DeleteLogGroup API operation for Amazon CloudWatch Logs.
  617. //
  618. // Deletes the specified log group and permanently deletes all the archived
  619. // log events associated with the log group.
  620. //
  621. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  622. // with awserr.Error's Code and Message methods to get detailed information about
  623. // the error.
  624. //
  625. // See the AWS API reference guide for Amazon CloudWatch Logs's
  626. // API operation DeleteLogGroup for usage and error information.
  627. //
  628. // Returned Error Codes:
  629. // * ErrCodeInvalidParameterException "InvalidParameterException"
  630. // A parameter is specified incorrectly.
  631. //
  632. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  633. // The specified resource does not exist.
  634. //
  635. // * ErrCodeOperationAbortedException "OperationAbortedException"
  636. // Multiple requests to update the same resource were in conflict.
  637. //
  638. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  639. // The service cannot complete the request.
  640. //
  641. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup
  642. func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) {
  643. req, out := c.DeleteLogGroupRequest(input)
  644. return out, req.Send()
  645. }
  646. // DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of
  647. // the ability to pass a context and additional request options.
  648. //
  649. // See DeleteLogGroup for details on how to use this API operation.
  650. //
  651. // The context must be non-nil and will be used for request cancellation. If
  652. // the context is nil a panic will occur. In the future the SDK may create
  653. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  654. // for more information on using Contexts.
  655. func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error) {
  656. req, out := c.DeleteLogGroupRequest(input)
  657. req.SetContext(ctx)
  658. req.ApplyOptions(opts...)
  659. return out, req.Send()
  660. }
  661. const opDeleteLogStream = "DeleteLogStream"
  662. // DeleteLogStreamRequest generates a "aws/request.Request" representing the
  663. // client's request for the DeleteLogStream operation. The "output" return
  664. // value will be populated with the request's response once the request completes
  665. // successfully.
  666. //
  667. // Use "Send" method on the returned Request to send the API call to the service.
  668. // the "output" return value is not valid until after Send returns without error.
  669. //
  670. // See DeleteLogStream for more information on using the DeleteLogStream
  671. // API call, and error handling.
  672. //
  673. // This method is useful when you want to inject custom logic or configuration
  674. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  675. //
  676. //
  677. // // Example sending a request using the DeleteLogStreamRequest method.
  678. // req, resp := client.DeleteLogStreamRequest(params)
  679. //
  680. // err := req.Send()
  681. // if err == nil { // resp is now filled
  682. // fmt.Println(resp)
  683. // }
  684. //
  685. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream
  686. func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) {
  687. op := &request.Operation{
  688. Name: opDeleteLogStream,
  689. HTTPMethod: "POST",
  690. HTTPPath: "/",
  691. }
  692. if input == nil {
  693. input = &DeleteLogStreamInput{}
  694. }
  695. output = &DeleteLogStreamOutput{}
  696. req = c.newRequest(op, input, output)
  697. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  698. return
  699. }
  700. // DeleteLogStream API operation for Amazon CloudWatch Logs.
  701. //
  702. // Deletes the specified log stream and permanently deletes all the archived
  703. // log events associated with the log stream.
  704. //
  705. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  706. // with awserr.Error's Code and Message methods to get detailed information about
  707. // the error.
  708. //
  709. // See the AWS API reference guide for Amazon CloudWatch Logs's
  710. // API operation DeleteLogStream for usage and error information.
  711. //
  712. // Returned Error Codes:
  713. // * ErrCodeInvalidParameterException "InvalidParameterException"
  714. // A parameter is specified incorrectly.
  715. //
  716. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  717. // The specified resource does not exist.
  718. //
  719. // * ErrCodeOperationAbortedException "OperationAbortedException"
  720. // Multiple requests to update the same resource were in conflict.
  721. //
  722. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  723. // The service cannot complete the request.
  724. //
  725. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream
  726. func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) {
  727. req, out := c.DeleteLogStreamRequest(input)
  728. return out, req.Send()
  729. }
  730. // DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of
  731. // the ability to pass a context and additional request options.
  732. //
  733. // See DeleteLogStream for details on how to use this API operation.
  734. //
  735. // The context must be non-nil and will be used for request cancellation. If
  736. // the context is nil a panic will occur. In the future the SDK may create
  737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  738. // for more information on using Contexts.
  739. func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error) {
  740. req, out := c.DeleteLogStreamRequest(input)
  741. req.SetContext(ctx)
  742. req.ApplyOptions(opts...)
  743. return out, req.Send()
  744. }
  745. const opDeleteMetricFilter = "DeleteMetricFilter"
  746. // DeleteMetricFilterRequest generates a "aws/request.Request" representing the
  747. // client's request for the DeleteMetricFilter operation. The "output" return
  748. // value will be populated with the request's response once the request completes
  749. // successfully.
  750. //
  751. // Use "Send" method on the returned Request to send the API call to the service.
  752. // the "output" return value is not valid until after Send returns without error.
  753. //
  754. // See DeleteMetricFilter for more information on using the DeleteMetricFilter
  755. // API call, and error handling.
  756. //
  757. // This method is useful when you want to inject custom logic or configuration
  758. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  759. //
  760. //
  761. // // Example sending a request using the DeleteMetricFilterRequest method.
  762. // req, resp := client.DeleteMetricFilterRequest(params)
  763. //
  764. // err := req.Send()
  765. // if err == nil { // resp is now filled
  766. // fmt.Println(resp)
  767. // }
  768. //
  769. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter
  770. func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) {
  771. op := &request.Operation{
  772. Name: opDeleteMetricFilter,
  773. HTTPMethod: "POST",
  774. HTTPPath: "/",
  775. }
  776. if input == nil {
  777. input = &DeleteMetricFilterInput{}
  778. }
  779. output = &DeleteMetricFilterOutput{}
  780. req = c.newRequest(op, input, output)
  781. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  782. return
  783. }
  784. // DeleteMetricFilter API operation for Amazon CloudWatch Logs.
  785. //
  786. // Deletes the specified metric filter.
  787. //
  788. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  789. // with awserr.Error's Code and Message methods to get detailed information about
  790. // the error.
  791. //
  792. // See the AWS API reference guide for Amazon CloudWatch Logs's
  793. // API operation DeleteMetricFilter for usage and error information.
  794. //
  795. // Returned Error Codes:
  796. // * ErrCodeInvalidParameterException "InvalidParameterException"
  797. // A parameter is specified incorrectly.
  798. //
  799. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  800. // The specified resource does not exist.
  801. //
  802. // * ErrCodeOperationAbortedException "OperationAbortedException"
  803. // Multiple requests to update the same resource were in conflict.
  804. //
  805. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  806. // The service cannot complete the request.
  807. //
  808. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter
  809. func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) {
  810. req, out := c.DeleteMetricFilterRequest(input)
  811. return out, req.Send()
  812. }
  813. // DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of
  814. // the ability to pass a context and additional request options.
  815. //
  816. // See DeleteMetricFilter for details on how to use this API operation.
  817. //
  818. // The context must be non-nil and will be used for request cancellation. If
  819. // the context is nil a panic will occur. In the future the SDK may create
  820. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  821. // for more information on using Contexts.
  822. func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error) {
  823. req, out := c.DeleteMetricFilterRequest(input)
  824. req.SetContext(ctx)
  825. req.ApplyOptions(opts...)
  826. return out, req.Send()
  827. }
  828. const opDeleteResourcePolicy = "DeleteResourcePolicy"
  829. // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the
  830. // client's request for the DeleteResourcePolicy operation. The "output" return
  831. // value will be populated with the request's response once the request completes
  832. // successfully.
  833. //
  834. // Use "Send" method on the returned Request to send the API call to the service.
  835. // the "output" return value is not valid until after Send returns without error.
  836. //
  837. // See DeleteResourcePolicy for more information on using the DeleteResourcePolicy
  838. // API call, and error handling.
  839. //
  840. // This method is useful when you want to inject custom logic or configuration
  841. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  842. //
  843. //
  844. // // Example sending a request using the DeleteResourcePolicyRequest method.
  845. // req, resp := client.DeleteResourcePolicyRequest(params)
  846. //
  847. // err := req.Send()
  848. // if err == nil { // resp is now filled
  849. // fmt.Println(resp)
  850. // }
  851. //
  852. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy
  853. func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) {
  854. op := &request.Operation{
  855. Name: opDeleteResourcePolicy,
  856. HTTPMethod: "POST",
  857. HTTPPath: "/",
  858. }
  859. if input == nil {
  860. input = &DeleteResourcePolicyInput{}
  861. }
  862. output = &DeleteResourcePolicyOutput{}
  863. req = c.newRequest(op, input, output)
  864. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  865. return
  866. }
  867. // DeleteResourcePolicy API operation for Amazon CloudWatch Logs.
  868. //
  869. // Deletes a resource policy from this account. This revokes the access of the
  870. // identities in that policy to put log events to this account.
  871. //
  872. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  873. // with awserr.Error's Code and Message methods to get detailed information about
  874. // the error.
  875. //
  876. // See the AWS API reference guide for Amazon CloudWatch Logs's
  877. // API operation DeleteResourcePolicy for usage and error information.
  878. //
  879. // Returned Error Codes:
  880. // * ErrCodeInvalidParameterException "InvalidParameterException"
  881. // A parameter is specified incorrectly.
  882. //
  883. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  884. // The specified resource does not exist.
  885. //
  886. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  887. // The service cannot complete the request.
  888. //
  889. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy
  890. func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) {
  891. req, out := c.DeleteResourcePolicyRequest(input)
  892. return out, req.Send()
  893. }
  894. // DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of
  895. // the ability to pass a context and additional request options.
  896. //
  897. // See DeleteResourcePolicy for details on how to use this API operation.
  898. //
  899. // The context must be non-nil and will be used for request cancellation. If
  900. // the context is nil a panic will occur. In the future the SDK may create
  901. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  902. // for more information on using Contexts.
  903. func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) {
  904. req, out := c.DeleteResourcePolicyRequest(input)
  905. req.SetContext(ctx)
  906. req.ApplyOptions(opts...)
  907. return out, req.Send()
  908. }
  909. const opDeleteRetentionPolicy = "DeleteRetentionPolicy"
  910. // DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the
  911. // client's request for the DeleteRetentionPolicy operation. The "output" return
  912. // value will be populated with the request's response once the request completes
  913. // successfully.
  914. //
  915. // Use "Send" method on the returned Request to send the API call to the service.
  916. // the "output" return value is not valid until after Send returns without error.
  917. //
  918. // See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy
  919. // API call, and error handling.
  920. //
  921. // This method is useful when you want to inject custom logic or configuration
  922. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  923. //
  924. //
  925. // // Example sending a request using the DeleteRetentionPolicyRequest method.
  926. // req, resp := client.DeleteRetentionPolicyRequest(params)
  927. //
  928. // err := req.Send()
  929. // if err == nil { // resp is now filled
  930. // fmt.Println(resp)
  931. // }
  932. //
  933. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy
  934. func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) {
  935. op := &request.Operation{
  936. Name: opDeleteRetentionPolicy,
  937. HTTPMethod: "POST",
  938. HTTPPath: "/",
  939. }
  940. if input == nil {
  941. input = &DeleteRetentionPolicyInput{}
  942. }
  943. output = &DeleteRetentionPolicyOutput{}
  944. req = c.newRequest(op, input, output)
  945. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  946. return
  947. }
  948. // DeleteRetentionPolicy API operation for Amazon CloudWatch Logs.
  949. //
  950. // Deletes the specified retention policy.
  951. //
  952. // Log events do not expire if they belong to log groups without a retention
  953. // policy.
  954. //
  955. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  956. // with awserr.Error's Code and Message methods to get detailed information about
  957. // the error.
  958. //
  959. // See the AWS API reference guide for Amazon CloudWatch Logs's
  960. // API operation DeleteRetentionPolicy for usage and error information.
  961. //
  962. // Returned Error Codes:
  963. // * ErrCodeInvalidParameterException "InvalidParameterException"
  964. // A parameter is specified incorrectly.
  965. //
  966. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  967. // The specified resource does not exist.
  968. //
  969. // * ErrCodeOperationAbortedException "OperationAbortedException"
  970. // Multiple requests to update the same resource were in conflict.
  971. //
  972. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  973. // The service cannot complete the request.
  974. //
  975. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy
  976. func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) {
  977. req, out := c.DeleteRetentionPolicyRequest(input)
  978. return out, req.Send()
  979. }
  980. // DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of
  981. // the ability to pass a context and additional request options.
  982. //
  983. // See DeleteRetentionPolicy for details on how to use this API operation.
  984. //
  985. // The context must be non-nil and will be used for request cancellation. If
  986. // the context is nil a panic will occur. In the future the SDK may create
  987. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  988. // for more information on using Contexts.
  989. func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) {
  990. req, out := c.DeleteRetentionPolicyRequest(input)
  991. req.SetContext(ctx)
  992. req.ApplyOptions(opts...)
  993. return out, req.Send()
  994. }
  995. const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter"
  996. // DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the
  997. // client's request for the DeleteSubscriptionFilter operation. The "output" return
  998. // value will be populated with the request's response once the request completes
  999. // successfully.
  1000. //
  1001. // Use "Send" method on the returned Request to send the API call to the service.
  1002. // the "output" return value is not valid until after Send returns without error.
  1003. //
  1004. // See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter
  1005. // API call, and error handling.
  1006. //
  1007. // This method is useful when you want to inject custom logic or configuration
  1008. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1009. //
  1010. //
  1011. // // Example sending a request using the DeleteSubscriptionFilterRequest method.
  1012. // req, resp := client.DeleteSubscriptionFilterRequest(params)
  1013. //
  1014. // err := req.Send()
  1015. // if err == nil { // resp is now filled
  1016. // fmt.Println(resp)
  1017. // }
  1018. //
  1019. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter
  1020. func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) {
  1021. op := &request.Operation{
  1022. Name: opDeleteSubscriptionFilter,
  1023. HTTPMethod: "POST",
  1024. HTTPPath: "/",
  1025. }
  1026. if input == nil {
  1027. input = &DeleteSubscriptionFilterInput{}
  1028. }
  1029. output = &DeleteSubscriptionFilterOutput{}
  1030. req = c.newRequest(op, input, output)
  1031. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1032. return
  1033. }
  1034. // DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs.
  1035. //
  1036. // Deletes the specified subscription filter.
  1037. //
  1038. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1039. // with awserr.Error's Code and Message methods to get detailed information about
  1040. // the error.
  1041. //
  1042. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1043. // API operation DeleteSubscriptionFilter for usage and error information.
  1044. //
  1045. // Returned Error Codes:
  1046. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1047. // A parameter is specified incorrectly.
  1048. //
  1049. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1050. // The specified resource does not exist.
  1051. //
  1052. // * ErrCodeOperationAbortedException "OperationAbortedException"
  1053. // Multiple requests to update the same resource were in conflict.
  1054. //
  1055. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1056. // The service cannot complete the request.
  1057. //
  1058. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter
  1059. func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) {
  1060. req, out := c.DeleteSubscriptionFilterRequest(input)
  1061. return out, req.Send()
  1062. }
  1063. // DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of
  1064. // the ability to pass a context and additional request options.
  1065. //
  1066. // See DeleteSubscriptionFilter for details on how to use this API operation.
  1067. //
  1068. // The context must be non-nil and will be used for request cancellation. If
  1069. // the context is nil a panic will occur. In the future the SDK may create
  1070. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1071. // for more information on using Contexts.
  1072. func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error) {
  1073. req, out := c.DeleteSubscriptionFilterRequest(input)
  1074. req.SetContext(ctx)
  1075. req.ApplyOptions(opts...)
  1076. return out, req.Send()
  1077. }
  1078. const opDescribeDestinations = "DescribeDestinations"
  1079. // DescribeDestinationsRequest generates a "aws/request.Request" representing the
  1080. // client's request for the DescribeDestinations operation. The "output" return
  1081. // value will be populated with the request's response once the request completes
  1082. // successfully.
  1083. //
  1084. // Use "Send" method on the returned Request to send the API call to the service.
  1085. // the "output" return value is not valid until after Send returns without error.
  1086. //
  1087. // See DescribeDestinations for more information on using the DescribeDestinations
  1088. // API call, and error handling.
  1089. //
  1090. // This method is useful when you want to inject custom logic or configuration
  1091. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1092. //
  1093. //
  1094. // // Example sending a request using the DescribeDestinationsRequest method.
  1095. // req, resp := client.DescribeDestinationsRequest(params)
  1096. //
  1097. // err := req.Send()
  1098. // if err == nil { // resp is now filled
  1099. // fmt.Println(resp)
  1100. // }
  1101. //
  1102. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations
  1103. func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) {
  1104. op := &request.Operation{
  1105. Name: opDescribeDestinations,
  1106. HTTPMethod: "POST",
  1107. HTTPPath: "/",
  1108. Paginator: &request.Paginator{
  1109. InputTokens: []string{"nextToken"},
  1110. OutputTokens: []string{"nextToken"},
  1111. LimitToken: "limit",
  1112. TruncationToken: "",
  1113. },
  1114. }
  1115. if input == nil {
  1116. input = &DescribeDestinationsInput{}
  1117. }
  1118. output = &DescribeDestinationsOutput{}
  1119. req = c.newRequest(op, input, output)
  1120. return
  1121. }
  1122. // DescribeDestinations API operation for Amazon CloudWatch Logs.
  1123. //
  1124. // Lists all your destinations. The results are ASCII-sorted by destination
  1125. // name.
  1126. //
  1127. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1128. // with awserr.Error's Code and Message methods to get detailed information about
  1129. // the error.
  1130. //
  1131. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1132. // API operation DescribeDestinations for usage and error information.
  1133. //
  1134. // Returned Error Codes:
  1135. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1136. // A parameter is specified incorrectly.
  1137. //
  1138. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1139. // The service cannot complete the request.
  1140. //
  1141. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations
  1142. func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) {
  1143. req, out := c.DescribeDestinationsRequest(input)
  1144. return out, req.Send()
  1145. }
  1146. // DescribeDestinationsWithContext is the same as DescribeDestinations with the addition of
  1147. // the ability to pass a context and additional request options.
  1148. //
  1149. // See DescribeDestinations for details on how to use this API operation.
  1150. //
  1151. // The context must be non-nil and will be used for request cancellation. If
  1152. // the context is nil a panic will occur. In the future the SDK may create
  1153. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1154. // for more information on using Contexts.
  1155. func (c *CloudWatchLogs) DescribeDestinationsWithContext(ctx aws.Context, input *DescribeDestinationsInput, opts ...request.Option) (*DescribeDestinationsOutput, error) {
  1156. req, out := c.DescribeDestinationsRequest(input)
  1157. req.SetContext(ctx)
  1158. req.ApplyOptions(opts...)
  1159. return out, req.Send()
  1160. }
  1161. // DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation,
  1162. // calling the "fn" function with the response data for each page. To stop
  1163. // iterating, return false from the fn function.
  1164. //
  1165. // See DescribeDestinations method for more information on how to use this operation.
  1166. //
  1167. // Note: This operation can generate multiple requests to a service.
  1168. //
  1169. // // Example iterating over at most 3 pages of a DescribeDestinations operation.
  1170. // pageNum := 0
  1171. // err := client.DescribeDestinationsPages(params,
  1172. // func(page *DescribeDestinationsOutput, lastPage bool) bool {
  1173. // pageNum++
  1174. // fmt.Println(page)
  1175. // return pageNum <= 3
  1176. // })
  1177. //
  1178. func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool) error {
  1179. return c.DescribeDestinationsPagesWithContext(aws.BackgroundContext(), input, fn)
  1180. }
  1181. // DescribeDestinationsPagesWithContext same as DescribeDestinationsPages except
  1182. // it takes a Context and allows setting request options on the pages.
  1183. //
  1184. // The context must be non-nil and will be used for request cancellation. If
  1185. // the context is nil a panic will occur. In the future the SDK may create
  1186. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1187. // for more information on using Contexts.
  1188. func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error {
  1189. p := request.Pagination{
  1190. EndPageOnSameToken: true,
  1191. NewRequest: func() (*request.Request, error) {
  1192. var inCpy *DescribeDestinationsInput
  1193. if input != nil {
  1194. tmp := *input
  1195. inCpy = &tmp
  1196. }
  1197. req, _ := c.DescribeDestinationsRequest(inCpy)
  1198. req.SetContext(ctx)
  1199. req.ApplyOptions(opts...)
  1200. return req, nil
  1201. },
  1202. }
  1203. cont := true
  1204. for p.Next() && cont {
  1205. cont = fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage())
  1206. }
  1207. return p.Err()
  1208. }
  1209. const opDescribeExportTasks = "DescribeExportTasks"
  1210. // DescribeExportTasksRequest generates a "aws/request.Request" representing the
  1211. // client's request for the DescribeExportTasks operation. The "output" return
  1212. // value will be populated with the request's response once the request completes
  1213. // successfully.
  1214. //
  1215. // Use "Send" method on the returned Request to send the API call to the service.
  1216. // the "output" return value is not valid until after Send returns without error.
  1217. //
  1218. // See DescribeExportTasks for more information on using the DescribeExportTasks
  1219. // API call, and error handling.
  1220. //
  1221. // This method is useful when you want to inject custom logic or configuration
  1222. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1223. //
  1224. //
  1225. // // Example sending a request using the DescribeExportTasksRequest method.
  1226. // req, resp := client.DescribeExportTasksRequest(params)
  1227. //
  1228. // err := req.Send()
  1229. // if err == nil { // resp is now filled
  1230. // fmt.Println(resp)
  1231. // }
  1232. //
  1233. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks
  1234. func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) {
  1235. op := &request.Operation{
  1236. Name: opDescribeExportTasks,
  1237. HTTPMethod: "POST",
  1238. HTTPPath: "/",
  1239. }
  1240. if input == nil {
  1241. input = &DescribeExportTasksInput{}
  1242. }
  1243. output = &DescribeExportTasksOutput{}
  1244. req = c.newRequest(op, input, output)
  1245. return
  1246. }
  1247. // DescribeExportTasks API operation for Amazon CloudWatch Logs.
  1248. //
  1249. // Lists the specified export tasks. You can list all your export tasks or filter
  1250. // the results based on task ID or task status.
  1251. //
  1252. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1253. // with awserr.Error's Code and Message methods to get detailed information about
  1254. // the error.
  1255. //
  1256. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1257. // API operation DescribeExportTasks for usage and error information.
  1258. //
  1259. // Returned Error Codes:
  1260. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1261. // A parameter is specified incorrectly.
  1262. //
  1263. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1264. // The service cannot complete the request.
  1265. //
  1266. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks
  1267. func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) {
  1268. req, out := c.DescribeExportTasksRequest(input)
  1269. return out, req.Send()
  1270. }
  1271. // DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of
  1272. // the ability to pass a context and additional request options.
  1273. //
  1274. // See DescribeExportTasks for details on how to use this API operation.
  1275. //
  1276. // The context must be non-nil and will be used for request cancellation. If
  1277. // the context is nil a panic will occur. In the future the SDK may create
  1278. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1279. // for more information on using Contexts.
  1280. func (c *CloudWatchLogs) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) {
  1281. req, out := c.DescribeExportTasksRequest(input)
  1282. req.SetContext(ctx)
  1283. req.ApplyOptions(opts...)
  1284. return out, req.Send()
  1285. }
  1286. const opDescribeLogGroups = "DescribeLogGroups"
  1287. // DescribeLogGroupsRequest generates a "aws/request.Request" representing the
  1288. // client's request for the DescribeLogGroups operation. The "output" return
  1289. // value will be populated with the request's response once the request completes
  1290. // successfully.
  1291. //
  1292. // Use "Send" method on the returned Request to send the API call to the service.
  1293. // the "output" return value is not valid until after Send returns without error.
  1294. //
  1295. // See DescribeLogGroups for more information on using the DescribeLogGroups
  1296. // API call, and error handling.
  1297. //
  1298. // This method is useful when you want to inject custom logic or configuration
  1299. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1300. //
  1301. //
  1302. // // Example sending a request using the DescribeLogGroupsRequest method.
  1303. // req, resp := client.DescribeLogGroupsRequest(params)
  1304. //
  1305. // err := req.Send()
  1306. // if err == nil { // resp is now filled
  1307. // fmt.Println(resp)
  1308. // }
  1309. //
  1310. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups
  1311. func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) {
  1312. op := &request.Operation{
  1313. Name: opDescribeLogGroups,
  1314. HTTPMethod: "POST",
  1315. HTTPPath: "/",
  1316. Paginator: &request.Paginator{
  1317. InputTokens: []string{"nextToken"},
  1318. OutputTokens: []string{"nextToken"},
  1319. LimitToken: "limit",
  1320. TruncationToken: "",
  1321. },
  1322. }
  1323. if input == nil {
  1324. input = &DescribeLogGroupsInput{}
  1325. }
  1326. output = &DescribeLogGroupsOutput{}
  1327. req = c.newRequest(op, input, output)
  1328. return
  1329. }
  1330. // DescribeLogGroups API operation for Amazon CloudWatch Logs.
  1331. //
  1332. // Lists the specified log groups. You can list all your log groups or filter
  1333. // the results by prefix. The results are ASCII-sorted by log group name.
  1334. //
  1335. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1336. // with awserr.Error's Code and Message methods to get detailed information about
  1337. // the error.
  1338. //
  1339. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1340. // API operation DescribeLogGroups for usage and error information.
  1341. //
  1342. // Returned Error Codes:
  1343. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1344. // A parameter is specified incorrectly.
  1345. //
  1346. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1347. // The service cannot complete the request.
  1348. //
  1349. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups
  1350. func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) {
  1351. req, out := c.DescribeLogGroupsRequest(input)
  1352. return out, req.Send()
  1353. }
  1354. // DescribeLogGroupsWithContext is the same as DescribeLogGroups with the addition of
  1355. // the ability to pass a context and additional request options.
  1356. //
  1357. // See DescribeLogGroups for details on how to use this API operation.
  1358. //
  1359. // The context must be non-nil and will be used for request cancellation. If
  1360. // the context is nil a panic will occur. In the future the SDK may create
  1361. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1362. // for more information on using Contexts.
  1363. func (c *CloudWatchLogs) DescribeLogGroupsWithContext(ctx aws.Context, input *DescribeLogGroupsInput, opts ...request.Option) (*DescribeLogGroupsOutput, error) {
  1364. req, out := c.DescribeLogGroupsRequest(input)
  1365. req.SetContext(ctx)
  1366. req.ApplyOptions(opts...)
  1367. return out, req.Send()
  1368. }
  1369. // DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation,
  1370. // calling the "fn" function with the response data for each page. To stop
  1371. // iterating, return false from the fn function.
  1372. //
  1373. // See DescribeLogGroups method for more information on how to use this operation.
  1374. //
  1375. // Note: This operation can generate multiple requests to a service.
  1376. //
  1377. // // Example iterating over at most 3 pages of a DescribeLogGroups operation.
  1378. // pageNum := 0
  1379. // err := client.DescribeLogGroupsPages(params,
  1380. // func(page *DescribeLogGroupsOutput, lastPage bool) bool {
  1381. // pageNum++
  1382. // fmt.Println(page)
  1383. // return pageNum <= 3
  1384. // })
  1385. //
  1386. func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool) error {
  1387. return c.DescribeLogGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
  1388. }
  1389. // DescribeLogGroupsPagesWithContext same as DescribeLogGroupsPages except
  1390. // it takes a Context and allows setting request options on the pages.
  1391. //
  1392. // The context must be non-nil and will be used for request cancellation. If
  1393. // the context is nil a panic will occur. In the future the SDK may create
  1394. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1395. // for more information on using Contexts.
  1396. func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error {
  1397. p := request.Pagination{
  1398. EndPageOnSameToken: true,
  1399. NewRequest: func() (*request.Request, error) {
  1400. var inCpy *DescribeLogGroupsInput
  1401. if input != nil {
  1402. tmp := *input
  1403. inCpy = &tmp
  1404. }
  1405. req, _ := c.DescribeLogGroupsRequest(inCpy)
  1406. req.SetContext(ctx)
  1407. req.ApplyOptions(opts...)
  1408. return req, nil
  1409. },
  1410. }
  1411. cont := true
  1412. for p.Next() && cont {
  1413. cont = fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage())
  1414. }
  1415. return p.Err()
  1416. }
  1417. const opDescribeLogStreams = "DescribeLogStreams"
  1418. // DescribeLogStreamsRequest generates a "aws/request.Request" representing the
  1419. // client's request for the DescribeLogStreams operation. The "output" return
  1420. // value will be populated with the request's response once the request completes
  1421. // successfully.
  1422. //
  1423. // Use "Send" method on the returned Request to send the API call to the service.
  1424. // the "output" return value is not valid until after Send returns without error.
  1425. //
  1426. // See DescribeLogStreams for more information on using the DescribeLogStreams
  1427. // API call, and error handling.
  1428. //
  1429. // This method is useful when you want to inject custom logic or configuration
  1430. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1431. //
  1432. //
  1433. // // Example sending a request using the DescribeLogStreamsRequest method.
  1434. // req, resp := client.DescribeLogStreamsRequest(params)
  1435. //
  1436. // err := req.Send()
  1437. // if err == nil { // resp is now filled
  1438. // fmt.Println(resp)
  1439. // }
  1440. //
  1441. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams
  1442. func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) {
  1443. op := &request.Operation{
  1444. Name: opDescribeLogStreams,
  1445. HTTPMethod: "POST",
  1446. HTTPPath: "/",
  1447. Paginator: &request.Paginator{
  1448. InputTokens: []string{"nextToken"},
  1449. OutputTokens: []string{"nextToken"},
  1450. LimitToken: "limit",
  1451. TruncationToken: "",
  1452. },
  1453. }
  1454. if input == nil {
  1455. input = &DescribeLogStreamsInput{}
  1456. }
  1457. output = &DescribeLogStreamsOutput{}
  1458. req = c.newRequest(op, input, output)
  1459. return
  1460. }
  1461. // DescribeLogStreams API operation for Amazon CloudWatch Logs.
  1462. //
  1463. // Lists the log streams for the specified log group. You can list all the log
  1464. // streams or filter the results by prefix. You can also control how the results
  1465. // are ordered.
  1466. //
  1467. // This operation has a limit of five transactions per second, after which transactions
  1468. // are throttled.
  1469. //
  1470. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1471. // with awserr.Error's Code and Message methods to get detailed information about
  1472. // the error.
  1473. //
  1474. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1475. // API operation DescribeLogStreams for usage and error information.
  1476. //
  1477. // Returned Error Codes:
  1478. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1479. // A parameter is specified incorrectly.
  1480. //
  1481. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1482. // The specified resource does not exist.
  1483. //
  1484. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1485. // The service cannot complete the request.
  1486. //
  1487. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams
  1488. func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) {
  1489. req, out := c.DescribeLogStreamsRequest(input)
  1490. return out, req.Send()
  1491. }
  1492. // DescribeLogStreamsWithContext is the same as DescribeLogStreams with the addition of
  1493. // the ability to pass a context and additional request options.
  1494. //
  1495. // See DescribeLogStreams for details on how to use this API operation.
  1496. //
  1497. // The context must be non-nil and will be used for request cancellation. If
  1498. // the context is nil a panic will occur. In the future the SDK may create
  1499. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1500. // for more information on using Contexts.
  1501. func (c *CloudWatchLogs) DescribeLogStreamsWithContext(ctx aws.Context, input *DescribeLogStreamsInput, opts ...request.Option) (*DescribeLogStreamsOutput, error) {
  1502. req, out := c.DescribeLogStreamsRequest(input)
  1503. req.SetContext(ctx)
  1504. req.ApplyOptions(opts...)
  1505. return out, req.Send()
  1506. }
  1507. // DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation,
  1508. // calling the "fn" function with the response data for each page. To stop
  1509. // iterating, return false from the fn function.
  1510. //
  1511. // See DescribeLogStreams method for more information on how to use this operation.
  1512. //
  1513. // Note: This operation can generate multiple requests to a service.
  1514. //
  1515. // // Example iterating over at most 3 pages of a DescribeLogStreams operation.
  1516. // pageNum := 0
  1517. // err := client.DescribeLogStreamsPages(params,
  1518. // func(page *DescribeLogStreamsOutput, lastPage bool) bool {
  1519. // pageNum++
  1520. // fmt.Println(page)
  1521. // return pageNum <= 3
  1522. // })
  1523. //
  1524. func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool) error {
  1525. return c.DescribeLogStreamsPagesWithContext(aws.BackgroundContext(), input, fn)
  1526. }
  1527. // DescribeLogStreamsPagesWithContext same as DescribeLogStreamsPages except
  1528. // it takes a Context and allows setting request options on the pages.
  1529. //
  1530. // The context must be non-nil and will be used for request cancellation. If
  1531. // the context is nil a panic will occur. In the future the SDK may create
  1532. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1533. // for more information on using Contexts.
  1534. func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error {
  1535. p := request.Pagination{
  1536. EndPageOnSameToken: true,
  1537. NewRequest: func() (*request.Request, error) {
  1538. var inCpy *DescribeLogStreamsInput
  1539. if input != nil {
  1540. tmp := *input
  1541. inCpy = &tmp
  1542. }
  1543. req, _ := c.DescribeLogStreamsRequest(inCpy)
  1544. req.SetContext(ctx)
  1545. req.ApplyOptions(opts...)
  1546. return req, nil
  1547. },
  1548. }
  1549. cont := true
  1550. for p.Next() && cont {
  1551. cont = fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage())
  1552. }
  1553. return p.Err()
  1554. }
  1555. const opDescribeMetricFilters = "DescribeMetricFilters"
  1556. // DescribeMetricFiltersRequest generates a "aws/request.Request" representing the
  1557. // client's request for the DescribeMetricFilters operation. The "output" return
  1558. // value will be populated with the request's response once the request completes
  1559. // successfully.
  1560. //
  1561. // Use "Send" method on the returned Request to send the API call to the service.
  1562. // the "output" return value is not valid until after Send returns without error.
  1563. //
  1564. // See DescribeMetricFilters for more information on using the DescribeMetricFilters
  1565. // API call, and error handling.
  1566. //
  1567. // This method is useful when you want to inject custom logic or configuration
  1568. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1569. //
  1570. //
  1571. // // Example sending a request using the DescribeMetricFiltersRequest method.
  1572. // req, resp := client.DescribeMetricFiltersRequest(params)
  1573. //
  1574. // err := req.Send()
  1575. // if err == nil { // resp is now filled
  1576. // fmt.Println(resp)
  1577. // }
  1578. //
  1579. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters
  1580. func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) {
  1581. op := &request.Operation{
  1582. Name: opDescribeMetricFilters,
  1583. HTTPMethod: "POST",
  1584. HTTPPath: "/",
  1585. Paginator: &request.Paginator{
  1586. InputTokens: []string{"nextToken"},
  1587. OutputTokens: []string{"nextToken"},
  1588. LimitToken: "limit",
  1589. TruncationToken: "",
  1590. },
  1591. }
  1592. if input == nil {
  1593. input = &DescribeMetricFiltersInput{}
  1594. }
  1595. output = &DescribeMetricFiltersOutput{}
  1596. req = c.newRequest(op, input, output)
  1597. return
  1598. }
  1599. // DescribeMetricFilters API operation for Amazon CloudWatch Logs.
  1600. //
  1601. // Lists the specified metric filters. You can list all the metric filters or
  1602. // filter the results by log name, prefix, metric name, or metric namespace.
  1603. // The results are ASCII-sorted by filter name.
  1604. //
  1605. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1606. // with awserr.Error's Code and Message methods to get detailed information about
  1607. // the error.
  1608. //
  1609. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1610. // API operation DescribeMetricFilters for usage and error information.
  1611. //
  1612. // Returned Error Codes:
  1613. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1614. // A parameter is specified incorrectly.
  1615. //
  1616. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1617. // The specified resource does not exist.
  1618. //
  1619. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1620. // The service cannot complete the request.
  1621. //
  1622. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters
  1623. func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) {
  1624. req, out := c.DescribeMetricFiltersRequest(input)
  1625. return out, req.Send()
  1626. }
  1627. // DescribeMetricFiltersWithContext is the same as DescribeMetricFilters with the addition of
  1628. // the ability to pass a context and additional request options.
  1629. //
  1630. // See DescribeMetricFilters for details on how to use this API operation.
  1631. //
  1632. // The context must be non-nil and will be used for request cancellation. If
  1633. // the context is nil a panic will occur. In the future the SDK may create
  1634. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1635. // for more information on using Contexts.
  1636. func (c *CloudWatchLogs) DescribeMetricFiltersWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, opts ...request.Option) (*DescribeMetricFiltersOutput, error) {
  1637. req, out := c.DescribeMetricFiltersRequest(input)
  1638. req.SetContext(ctx)
  1639. req.ApplyOptions(opts...)
  1640. return out, req.Send()
  1641. }
  1642. // DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation,
  1643. // calling the "fn" function with the response data for each page. To stop
  1644. // iterating, return false from the fn function.
  1645. //
  1646. // See DescribeMetricFilters method for more information on how to use this operation.
  1647. //
  1648. // Note: This operation can generate multiple requests to a service.
  1649. //
  1650. // // Example iterating over at most 3 pages of a DescribeMetricFilters operation.
  1651. // pageNum := 0
  1652. // err := client.DescribeMetricFiltersPages(params,
  1653. // func(page *DescribeMetricFiltersOutput, lastPage bool) bool {
  1654. // pageNum++
  1655. // fmt.Println(page)
  1656. // return pageNum <= 3
  1657. // })
  1658. //
  1659. func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool) error {
  1660. return c.DescribeMetricFiltersPagesWithContext(aws.BackgroundContext(), input, fn)
  1661. }
  1662. // DescribeMetricFiltersPagesWithContext same as DescribeMetricFiltersPages except
  1663. // it takes a Context and allows setting request options on the pages.
  1664. //
  1665. // The context must be non-nil and will be used for request cancellation. If
  1666. // the context is nil a panic will occur. In the future the SDK may create
  1667. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1668. // for more information on using Contexts.
  1669. func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error {
  1670. p := request.Pagination{
  1671. EndPageOnSameToken: true,
  1672. NewRequest: func() (*request.Request, error) {
  1673. var inCpy *DescribeMetricFiltersInput
  1674. if input != nil {
  1675. tmp := *input
  1676. inCpy = &tmp
  1677. }
  1678. req, _ := c.DescribeMetricFiltersRequest(inCpy)
  1679. req.SetContext(ctx)
  1680. req.ApplyOptions(opts...)
  1681. return req, nil
  1682. },
  1683. }
  1684. cont := true
  1685. for p.Next() && cont {
  1686. cont = fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage())
  1687. }
  1688. return p.Err()
  1689. }
  1690. const opDescribeQueries = "DescribeQueries"
  1691. // DescribeQueriesRequest generates a "aws/request.Request" representing the
  1692. // client's request for the DescribeQueries operation. The "output" return
  1693. // value will be populated with the request's response once the request completes
  1694. // successfully.
  1695. //
  1696. // Use "Send" method on the returned Request to send the API call to the service.
  1697. // the "output" return value is not valid until after Send returns without error.
  1698. //
  1699. // See DescribeQueries for more information on using the DescribeQueries
  1700. // API call, and error handling.
  1701. //
  1702. // This method is useful when you want to inject custom logic or configuration
  1703. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1704. //
  1705. //
  1706. // // Example sending a request using the DescribeQueriesRequest method.
  1707. // req, resp := client.DescribeQueriesRequest(params)
  1708. //
  1709. // err := req.Send()
  1710. // if err == nil { // resp is now filled
  1711. // fmt.Println(resp)
  1712. // }
  1713. //
  1714. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries
  1715. func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) {
  1716. op := &request.Operation{
  1717. Name: opDescribeQueries,
  1718. HTTPMethod: "POST",
  1719. HTTPPath: "/",
  1720. }
  1721. if input == nil {
  1722. input = &DescribeQueriesInput{}
  1723. }
  1724. output = &DescribeQueriesOutput{}
  1725. req = c.newRequest(op, input, output)
  1726. return
  1727. }
  1728. // DescribeQueries API operation for Amazon CloudWatch Logs.
  1729. //
  1730. // Returns a list of CloudWatch Logs Insights queries that are scheduled, executing,
  1731. // or have been executed recently in this account. You can request all queries,
  1732. // or limit it to queries of a specific log group or queries with a certain
  1733. // status.
  1734. //
  1735. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1736. // with awserr.Error's Code and Message methods to get detailed information about
  1737. // the error.
  1738. //
  1739. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1740. // API operation DescribeQueries for usage and error information.
  1741. //
  1742. // Returned Error Codes:
  1743. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1744. // A parameter is specified incorrectly.
  1745. //
  1746. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1747. // The specified resource does not exist.
  1748. //
  1749. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1750. // The service cannot complete the request.
  1751. //
  1752. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries
  1753. func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) {
  1754. req, out := c.DescribeQueriesRequest(input)
  1755. return out, req.Send()
  1756. }
  1757. // DescribeQueriesWithContext is the same as DescribeQueries with the addition of
  1758. // the ability to pass a context and additional request options.
  1759. //
  1760. // See DescribeQueries for details on how to use this API operation.
  1761. //
  1762. // The context must be non-nil and will be used for request cancellation. If
  1763. // the context is nil a panic will occur. In the future the SDK may create
  1764. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1765. // for more information on using Contexts.
  1766. func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) {
  1767. req, out := c.DescribeQueriesRequest(input)
  1768. req.SetContext(ctx)
  1769. req.ApplyOptions(opts...)
  1770. return out, req.Send()
  1771. }
  1772. const opDescribeResourcePolicies = "DescribeResourcePolicies"
  1773. // DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the
  1774. // client's request for the DescribeResourcePolicies operation. The "output" return
  1775. // value will be populated with the request's response once the request completes
  1776. // successfully.
  1777. //
  1778. // Use "Send" method on the returned Request to send the API call to the service.
  1779. // the "output" return value is not valid until after Send returns without error.
  1780. //
  1781. // See DescribeResourcePolicies for more information on using the DescribeResourcePolicies
  1782. // API call, and error handling.
  1783. //
  1784. // This method is useful when you want to inject custom logic or configuration
  1785. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1786. //
  1787. //
  1788. // // Example sending a request using the DescribeResourcePoliciesRequest method.
  1789. // req, resp := client.DescribeResourcePoliciesRequest(params)
  1790. //
  1791. // err := req.Send()
  1792. // if err == nil { // resp is now filled
  1793. // fmt.Println(resp)
  1794. // }
  1795. //
  1796. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies
  1797. func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) {
  1798. op := &request.Operation{
  1799. Name: opDescribeResourcePolicies,
  1800. HTTPMethod: "POST",
  1801. HTTPPath: "/",
  1802. }
  1803. if input == nil {
  1804. input = &DescribeResourcePoliciesInput{}
  1805. }
  1806. output = &DescribeResourcePoliciesOutput{}
  1807. req = c.newRequest(op, input, output)
  1808. return
  1809. }
  1810. // DescribeResourcePolicies API operation for Amazon CloudWatch Logs.
  1811. //
  1812. // Lists the resource policies in this account.
  1813. //
  1814. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1815. // with awserr.Error's Code and Message methods to get detailed information about
  1816. // the error.
  1817. //
  1818. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1819. // API operation DescribeResourcePolicies for usage and error information.
  1820. //
  1821. // Returned Error Codes:
  1822. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1823. // A parameter is specified incorrectly.
  1824. //
  1825. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1826. // The service cannot complete the request.
  1827. //
  1828. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies
  1829. func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) {
  1830. req, out := c.DescribeResourcePoliciesRequest(input)
  1831. return out, req.Send()
  1832. }
  1833. // DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of
  1834. // the ability to pass a context and additional request options.
  1835. //
  1836. // See DescribeResourcePolicies for details on how to use this API operation.
  1837. //
  1838. // The context must be non-nil and will be used for request cancellation. If
  1839. // the context is nil a panic will occur. In the future the SDK may create
  1840. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1841. // for more information on using Contexts.
  1842. func (c *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) {
  1843. req, out := c.DescribeResourcePoliciesRequest(input)
  1844. req.SetContext(ctx)
  1845. req.ApplyOptions(opts...)
  1846. return out, req.Send()
  1847. }
  1848. const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters"
  1849. // DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the
  1850. // client's request for the DescribeSubscriptionFilters operation. The "output" return
  1851. // value will be populated with the request's response once the request completes
  1852. // successfully.
  1853. //
  1854. // Use "Send" method on the returned Request to send the API call to the service.
  1855. // the "output" return value is not valid until after Send returns without error.
  1856. //
  1857. // See DescribeSubscriptionFilters for more information on using the DescribeSubscriptionFilters
  1858. // API call, and error handling.
  1859. //
  1860. // This method is useful when you want to inject custom logic or configuration
  1861. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1862. //
  1863. //
  1864. // // Example sending a request using the DescribeSubscriptionFiltersRequest method.
  1865. // req, resp := client.DescribeSubscriptionFiltersRequest(params)
  1866. //
  1867. // err := req.Send()
  1868. // if err == nil { // resp is now filled
  1869. // fmt.Println(resp)
  1870. // }
  1871. //
  1872. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters
  1873. func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) {
  1874. op := &request.Operation{
  1875. Name: opDescribeSubscriptionFilters,
  1876. HTTPMethod: "POST",
  1877. HTTPPath: "/",
  1878. Paginator: &request.Paginator{
  1879. InputTokens: []string{"nextToken"},
  1880. OutputTokens: []string{"nextToken"},
  1881. LimitToken: "limit",
  1882. TruncationToken: "",
  1883. },
  1884. }
  1885. if input == nil {
  1886. input = &DescribeSubscriptionFiltersInput{}
  1887. }
  1888. output = &DescribeSubscriptionFiltersOutput{}
  1889. req = c.newRequest(op, input, output)
  1890. return
  1891. }
  1892. // DescribeSubscriptionFilters API operation for Amazon CloudWatch Logs.
  1893. //
  1894. // Lists the subscription filters for the specified log group. You can list
  1895. // all the subscription filters or filter the results by prefix. The results
  1896. // are ASCII-sorted by filter name.
  1897. //
  1898. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1899. // with awserr.Error's Code and Message methods to get detailed information about
  1900. // the error.
  1901. //
  1902. // See the AWS API reference guide for Amazon CloudWatch Logs's
  1903. // API operation DescribeSubscriptionFilters for usage and error information.
  1904. //
  1905. // Returned Error Codes:
  1906. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1907. // A parameter is specified incorrectly.
  1908. //
  1909. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1910. // The specified resource does not exist.
  1911. //
  1912. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1913. // The service cannot complete the request.
  1914. //
  1915. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters
  1916. func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) {
  1917. req, out := c.DescribeSubscriptionFiltersRequest(input)
  1918. return out, req.Send()
  1919. }
  1920. // DescribeSubscriptionFiltersWithContext is the same as DescribeSubscriptionFilters with the addition of
  1921. // the ability to pass a context and additional request options.
  1922. //
  1923. // See DescribeSubscriptionFilters for details on how to use this API operation.
  1924. //
  1925. // The context must be non-nil and will be used for request cancellation. If
  1926. // the context is nil a panic will occur. In the future the SDK may create
  1927. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1928. // for more information on using Contexts.
  1929. func (c *CloudWatchLogs) DescribeSubscriptionFiltersWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, opts ...request.Option) (*DescribeSubscriptionFiltersOutput, error) {
  1930. req, out := c.DescribeSubscriptionFiltersRequest(input)
  1931. req.SetContext(ctx)
  1932. req.ApplyOptions(opts...)
  1933. return out, req.Send()
  1934. }
  1935. // DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation,
  1936. // calling the "fn" function with the response data for each page. To stop
  1937. // iterating, return false from the fn function.
  1938. //
  1939. // See DescribeSubscriptionFilters method for more information on how to use this operation.
  1940. //
  1941. // Note: This operation can generate multiple requests to a service.
  1942. //
  1943. // // Example iterating over at most 3 pages of a DescribeSubscriptionFilters operation.
  1944. // pageNum := 0
  1945. // err := client.DescribeSubscriptionFiltersPages(params,
  1946. // func(page *DescribeSubscriptionFiltersOutput, lastPage bool) bool {
  1947. // pageNum++
  1948. // fmt.Println(page)
  1949. // return pageNum <= 3
  1950. // })
  1951. //
  1952. func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool) error {
  1953. return c.DescribeSubscriptionFiltersPagesWithContext(aws.BackgroundContext(), input, fn)
  1954. }
  1955. // DescribeSubscriptionFiltersPagesWithContext same as DescribeSubscriptionFiltersPages except
  1956. // it takes a Context and allows setting request options on the pages.
  1957. //
  1958. // The context must be non-nil and will be used for request cancellation. If
  1959. // the context is nil a panic will occur. In the future the SDK may create
  1960. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1961. // for more information on using Contexts.
  1962. func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error {
  1963. p := request.Pagination{
  1964. EndPageOnSameToken: true,
  1965. NewRequest: func() (*request.Request, error) {
  1966. var inCpy *DescribeSubscriptionFiltersInput
  1967. if input != nil {
  1968. tmp := *input
  1969. inCpy = &tmp
  1970. }
  1971. req, _ := c.DescribeSubscriptionFiltersRequest(inCpy)
  1972. req.SetContext(ctx)
  1973. req.ApplyOptions(opts...)
  1974. return req, nil
  1975. },
  1976. }
  1977. cont := true
  1978. for p.Next() && cont {
  1979. cont = fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage())
  1980. }
  1981. return p.Err()
  1982. }
  1983. const opDisassociateKmsKey = "DisassociateKmsKey"
  1984. // DisassociateKmsKeyRequest generates a "aws/request.Request" representing the
  1985. // client's request for the DisassociateKmsKey operation. The "output" return
  1986. // value will be populated with the request's response once the request completes
  1987. // successfully.
  1988. //
  1989. // Use "Send" method on the returned Request to send the API call to the service.
  1990. // the "output" return value is not valid until after Send returns without error.
  1991. //
  1992. // See DisassociateKmsKey for more information on using the DisassociateKmsKey
  1993. // API call, and error handling.
  1994. //
  1995. // This method is useful when you want to inject custom logic or configuration
  1996. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1997. //
  1998. //
  1999. // // Example sending a request using the DisassociateKmsKeyRequest method.
  2000. // req, resp := client.DisassociateKmsKeyRequest(params)
  2001. //
  2002. // err := req.Send()
  2003. // if err == nil { // resp is now filled
  2004. // fmt.Println(resp)
  2005. // }
  2006. //
  2007. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey
  2008. func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) {
  2009. op := &request.Operation{
  2010. Name: opDisassociateKmsKey,
  2011. HTTPMethod: "POST",
  2012. HTTPPath: "/",
  2013. }
  2014. if input == nil {
  2015. input = &DisassociateKmsKeyInput{}
  2016. }
  2017. output = &DisassociateKmsKeyOutput{}
  2018. req = c.newRequest(op, input, output)
  2019. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2020. return
  2021. }
  2022. // DisassociateKmsKey API operation for Amazon CloudWatch Logs.
  2023. //
  2024. // Disassociates the associated AWS Key Management Service (AWS KMS) customer
  2025. // master key (CMK) from the specified log group.
  2026. //
  2027. // After the AWS KMS CMK is disassociated from the log group, AWS CloudWatch
  2028. // Logs stops encrypting newly ingested data for the log group. All previously
  2029. // ingested data remains encrypted, and AWS CloudWatch Logs requires permissions
  2030. // for the CMK whenever the encrypted data is requested.
  2031. //
  2032. // Note that it can take up to 5 minutes for this operation to take effect.
  2033. //
  2034. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2035. // with awserr.Error's Code and Message methods to get detailed information about
  2036. // the error.
  2037. //
  2038. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2039. // API operation DisassociateKmsKey for usage and error information.
  2040. //
  2041. // Returned Error Codes:
  2042. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2043. // A parameter is specified incorrectly.
  2044. //
  2045. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2046. // The specified resource does not exist.
  2047. //
  2048. // * ErrCodeOperationAbortedException "OperationAbortedException"
  2049. // Multiple requests to update the same resource were in conflict.
  2050. //
  2051. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2052. // The service cannot complete the request.
  2053. //
  2054. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey
  2055. func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) {
  2056. req, out := c.DisassociateKmsKeyRequest(input)
  2057. return out, req.Send()
  2058. }
  2059. // DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of
  2060. // the ability to pass a context and additional request options.
  2061. //
  2062. // See DisassociateKmsKey for details on how to use this API operation.
  2063. //
  2064. // The context must be non-nil and will be used for request cancellation. If
  2065. // the context is nil a panic will occur. In the future the SDK may create
  2066. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2067. // for more information on using Contexts.
  2068. func (c *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) {
  2069. req, out := c.DisassociateKmsKeyRequest(input)
  2070. req.SetContext(ctx)
  2071. req.ApplyOptions(opts...)
  2072. return out, req.Send()
  2073. }
  2074. const opFilterLogEvents = "FilterLogEvents"
  2075. // FilterLogEventsRequest generates a "aws/request.Request" representing the
  2076. // client's request for the FilterLogEvents operation. The "output" return
  2077. // value will be populated with the request's response once the request completes
  2078. // successfully.
  2079. //
  2080. // Use "Send" method on the returned Request to send the API call to the service.
  2081. // the "output" return value is not valid until after Send returns without error.
  2082. //
  2083. // See FilterLogEvents for more information on using the FilterLogEvents
  2084. // API call, and error handling.
  2085. //
  2086. // This method is useful when you want to inject custom logic or configuration
  2087. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2088. //
  2089. //
  2090. // // Example sending a request using the FilterLogEventsRequest method.
  2091. // req, resp := client.FilterLogEventsRequest(params)
  2092. //
  2093. // err := req.Send()
  2094. // if err == nil { // resp is now filled
  2095. // fmt.Println(resp)
  2096. // }
  2097. //
  2098. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents
  2099. func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) {
  2100. op := &request.Operation{
  2101. Name: opFilterLogEvents,
  2102. HTTPMethod: "POST",
  2103. HTTPPath: "/",
  2104. Paginator: &request.Paginator{
  2105. InputTokens: []string{"nextToken"},
  2106. OutputTokens: []string{"nextToken"},
  2107. LimitToken: "limit",
  2108. TruncationToken: "",
  2109. },
  2110. }
  2111. if input == nil {
  2112. input = &FilterLogEventsInput{}
  2113. }
  2114. output = &FilterLogEventsOutput{}
  2115. req = c.newRequest(op, input, output)
  2116. return
  2117. }
  2118. // FilterLogEvents API operation for Amazon CloudWatch Logs.
  2119. //
  2120. // Lists log events from the specified log group. You can list all the log events
  2121. // or filter the results using a filter pattern, a time range, and the name
  2122. // of the log stream.
  2123. //
  2124. // By default, this operation returns as many log events as can fit in 1 MB
  2125. // (up to 10,000 log events), or all the events found within the time range
  2126. // that you specify. If the results include a token, then there are more log
  2127. // events available, and you can get additional results by specifying the token
  2128. // in a subsequent call.
  2129. //
  2130. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2131. // with awserr.Error's Code and Message methods to get detailed information about
  2132. // the error.
  2133. //
  2134. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2135. // API operation FilterLogEvents for usage and error information.
  2136. //
  2137. // Returned Error Codes:
  2138. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2139. // A parameter is specified incorrectly.
  2140. //
  2141. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2142. // The specified resource does not exist.
  2143. //
  2144. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2145. // The service cannot complete the request.
  2146. //
  2147. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents
  2148. func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) {
  2149. req, out := c.FilterLogEventsRequest(input)
  2150. return out, req.Send()
  2151. }
  2152. // FilterLogEventsWithContext is the same as FilterLogEvents with the addition of
  2153. // the ability to pass a context and additional request options.
  2154. //
  2155. // See FilterLogEvents for details on how to use this API operation.
  2156. //
  2157. // The context must be non-nil and will be used for request cancellation. If
  2158. // the context is nil a panic will occur. In the future the SDK may create
  2159. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2160. // for more information on using Contexts.
  2161. func (c *CloudWatchLogs) FilterLogEventsWithContext(ctx aws.Context, input *FilterLogEventsInput, opts ...request.Option) (*FilterLogEventsOutput, error) {
  2162. req, out := c.FilterLogEventsRequest(input)
  2163. req.SetContext(ctx)
  2164. req.ApplyOptions(opts...)
  2165. return out, req.Send()
  2166. }
  2167. // FilterLogEventsPages iterates over the pages of a FilterLogEvents operation,
  2168. // calling the "fn" function with the response data for each page. To stop
  2169. // iterating, return false from the fn function.
  2170. //
  2171. // See FilterLogEvents method for more information on how to use this operation.
  2172. //
  2173. // Note: This operation can generate multiple requests to a service.
  2174. //
  2175. // // Example iterating over at most 3 pages of a FilterLogEvents operation.
  2176. // pageNum := 0
  2177. // err := client.FilterLogEventsPages(params,
  2178. // func(page *FilterLogEventsOutput, lastPage bool) bool {
  2179. // pageNum++
  2180. // fmt.Println(page)
  2181. // return pageNum <= 3
  2182. // })
  2183. //
  2184. func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool) error {
  2185. return c.FilterLogEventsPagesWithContext(aws.BackgroundContext(), input, fn)
  2186. }
  2187. // FilterLogEventsPagesWithContext same as FilterLogEventsPages except
  2188. // it takes a Context and allows setting request options on the pages.
  2189. //
  2190. // The context must be non-nil and will be used for request cancellation. If
  2191. // the context is nil a panic will occur. In the future the SDK may create
  2192. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2193. // for more information on using Contexts.
  2194. func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error {
  2195. p := request.Pagination{
  2196. EndPageOnSameToken: true,
  2197. NewRequest: func() (*request.Request, error) {
  2198. var inCpy *FilterLogEventsInput
  2199. if input != nil {
  2200. tmp := *input
  2201. inCpy = &tmp
  2202. }
  2203. req, _ := c.FilterLogEventsRequest(inCpy)
  2204. req.SetContext(ctx)
  2205. req.ApplyOptions(opts...)
  2206. return req, nil
  2207. },
  2208. }
  2209. cont := true
  2210. for p.Next() && cont {
  2211. cont = fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage())
  2212. }
  2213. return p.Err()
  2214. }
  2215. const opGetLogEvents = "GetLogEvents"
  2216. // GetLogEventsRequest generates a "aws/request.Request" representing the
  2217. // client's request for the GetLogEvents operation. The "output" return
  2218. // value will be populated with the request's response once the request completes
  2219. // successfully.
  2220. //
  2221. // Use "Send" method on the returned Request to send the API call to the service.
  2222. // the "output" return value is not valid until after Send returns without error.
  2223. //
  2224. // See GetLogEvents for more information on using the GetLogEvents
  2225. // API call, and error handling.
  2226. //
  2227. // This method is useful when you want to inject custom logic or configuration
  2228. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2229. //
  2230. //
  2231. // // Example sending a request using the GetLogEventsRequest method.
  2232. // req, resp := client.GetLogEventsRequest(params)
  2233. //
  2234. // err := req.Send()
  2235. // if err == nil { // resp is now filled
  2236. // fmt.Println(resp)
  2237. // }
  2238. //
  2239. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents
  2240. func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) {
  2241. op := &request.Operation{
  2242. Name: opGetLogEvents,
  2243. HTTPMethod: "POST",
  2244. HTTPPath: "/",
  2245. Paginator: &request.Paginator{
  2246. InputTokens: []string{"nextToken"},
  2247. OutputTokens: []string{"nextForwardToken"},
  2248. LimitToken: "limit",
  2249. TruncationToken: "",
  2250. },
  2251. }
  2252. if input == nil {
  2253. input = &GetLogEventsInput{}
  2254. }
  2255. output = &GetLogEventsOutput{}
  2256. req = c.newRequest(op, input, output)
  2257. return
  2258. }
  2259. // GetLogEvents API operation for Amazon CloudWatch Logs.
  2260. //
  2261. // Lists log events from the specified log stream. You can list all the log
  2262. // events or filter using a time range.
  2263. //
  2264. // By default, this operation returns as many log events as can fit in a response
  2265. // size of 1MB (up to 10,000 log events). You can get additional log events
  2266. // by specifying one of the tokens in a subsequent call.
  2267. //
  2268. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2269. // with awserr.Error's Code and Message methods to get detailed information about
  2270. // the error.
  2271. //
  2272. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2273. // API operation GetLogEvents for usage and error information.
  2274. //
  2275. // Returned Error Codes:
  2276. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2277. // A parameter is specified incorrectly.
  2278. //
  2279. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2280. // The specified resource does not exist.
  2281. //
  2282. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2283. // The service cannot complete the request.
  2284. //
  2285. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents
  2286. func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) {
  2287. req, out := c.GetLogEventsRequest(input)
  2288. return out, req.Send()
  2289. }
  2290. // GetLogEventsWithContext is the same as GetLogEvents with the addition of
  2291. // the ability to pass a context and additional request options.
  2292. //
  2293. // See GetLogEvents for details on how to use this API operation.
  2294. //
  2295. // The context must be non-nil and will be used for request cancellation. If
  2296. // the context is nil a panic will occur. In the future the SDK may create
  2297. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2298. // for more information on using Contexts.
  2299. func (c *CloudWatchLogs) GetLogEventsWithContext(ctx aws.Context, input *GetLogEventsInput, opts ...request.Option) (*GetLogEventsOutput, error) {
  2300. req, out := c.GetLogEventsRequest(input)
  2301. req.SetContext(ctx)
  2302. req.ApplyOptions(opts...)
  2303. return out, req.Send()
  2304. }
  2305. // GetLogEventsPages iterates over the pages of a GetLogEvents operation,
  2306. // calling the "fn" function with the response data for each page. To stop
  2307. // iterating, return false from the fn function.
  2308. //
  2309. // See GetLogEvents method for more information on how to use this operation.
  2310. //
  2311. // Note: This operation can generate multiple requests to a service.
  2312. //
  2313. // // Example iterating over at most 3 pages of a GetLogEvents operation.
  2314. // pageNum := 0
  2315. // err := client.GetLogEventsPages(params,
  2316. // func(page *GetLogEventsOutput, lastPage bool) bool {
  2317. // pageNum++
  2318. // fmt.Println(page)
  2319. // return pageNum <= 3
  2320. // })
  2321. //
  2322. func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool) error {
  2323. return c.GetLogEventsPagesWithContext(aws.BackgroundContext(), input, fn)
  2324. }
  2325. // GetLogEventsPagesWithContext same as GetLogEventsPages except
  2326. // it takes a Context and allows setting request options on the pages.
  2327. //
  2328. // The context must be non-nil and will be used for request cancellation. If
  2329. // the context is nil a panic will occur. In the future the SDK may create
  2330. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2331. // for more information on using Contexts.
  2332. func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error {
  2333. p := request.Pagination{
  2334. EndPageOnSameToken: true,
  2335. NewRequest: func() (*request.Request, error) {
  2336. var inCpy *GetLogEventsInput
  2337. if input != nil {
  2338. tmp := *input
  2339. inCpy = &tmp
  2340. }
  2341. req, _ := c.GetLogEventsRequest(inCpy)
  2342. req.SetContext(ctx)
  2343. req.ApplyOptions(opts...)
  2344. return req, nil
  2345. },
  2346. }
  2347. cont := true
  2348. for p.Next() && cont {
  2349. cont = fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage())
  2350. }
  2351. return p.Err()
  2352. }
  2353. const opGetLogGroupFields = "GetLogGroupFields"
  2354. // GetLogGroupFieldsRequest generates a "aws/request.Request" representing the
  2355. // client's request for the GetLogGroupFields operation. The "output" return
  2356. // value will be populated with the request's response once the request completes
  2357. // successfully.
  2358. //
  2359. // Use "Send" method on the returned Request to send the API call to the service.
  2360. // the "output" return value is not valid until after Send returns without error.
  2361. //
  2362. // See GetLogGroupFields for more information on using the GetLogGroupFields
  2363. // API call, and error handling.
  2364. //
  2365. // This method is useful when you want to inject custom logic or configuration
  2366. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2367. //
  2368. //
  2369. // // Example sending a request using the GetLogGroupFieldsRequest method.
  2370. // req, resp := client.GetLogGroupFieldsRequest(params)
  2371. //
  2372. // err := req.Send()
  2373. // if err == nil { // resp is now filled
  2374. // fmt.Println(resp)
  2375. // }
  2376. //
  2377. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields
  2378. func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) {
  2379. op := &request.Operation{
  2380. Name: opGetLogGroupFields,
  2381. HTTPMethod: "POST",
  2382. HTTPPath: "/",
  2383. }
  2384. if input == nil {
  2385. input = &GetLogGroupFieldsInput{}
  2386. }
  2387. output = &GetLogGroupFieldsOutput{}
  2388. req = c.newRequest(op, input, output)
  2389. return
  2390. }
  2391. // GetLogGroupFields API operation for Amazon CloudWatch Logs.
  2392. //
  2393. // Returns a list of the fields that are included in log events in the specified
  2394. // log group, along with the percentage of log events that contain each field.
  2395. // The search is limited to a time period that you specify.
  2396. //
  2397. // In the results, fields that start with @ are fields generated by CloudWatch
  2398. // Logs. For example, @timestamp is the timestamp of each log event.
  2399. //
  2400. // The response results are sorted by the frequency percentage, starting with
  2401. // the highest percentage.
  2402. //
  2403. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2404. // with awserr.Error's Code and Message methods to get detailed information about
  2405. // the error.
  2406. //
  2407. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2408. // API operation GetLogGroupFields for usage and error information.
  2409. //
  2410. // Returned Error Codes:
  2411. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2412. // A parameter is specified incorrectly.
  2413. //
  2414. // * ErrCodeLimitExceededException "LimitExceededException"
  2415. // You have reached the maximum number of resources that can be created.
  2416. //
  2417. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2418. // The specified resource does not exist.
  2419. //
  2420. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2421. // The service cannot complete the request.
  2422. //
  2423. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields
  2424. func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) {
  2425. req, out := c.GetLogGroupFieldsRequest(input)
  2426. return out, req.Send()
  2427. }
  2428. // GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of
  2429. // the ability to pass a context and additional request options.
  2430. //
  2431. // See GetLogGroupFields for details on how to use this API operation.
  2432. //
  2433. // The context must be non-nil and will be used for request cancellation. If
  2434. // the context is nil a panic will occur. In the future the SDK may create
  2435. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2436. // for more information on using Contexts.
  2437. func (c *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) {
  2438. req, out := c.GetLogGroupFieldsRequest(input)
  2439. req.SetContext(ctx)
  2440. req.ApplyOptions(opts...)
  2441. return out, req.Send()
  2442. }
  2443. const opGetLogRecord = "GetLogRecord"
  2444. // GetLogRecordRequest generates a "aws/request.Request" representing the
  2445. // client's request for the GetLogRecord operation. The "output" return
  2446. // value will be populated with the request's response once the request completes
  2447. // successfully.
  2448. //
  2449. // Use "Send" method on the returned Request to send the API call to the service.
  2450. // the "output" return value is not valid until after Send returns without error.
  2451. //
  2452. // See GetLogRecord for more information on using the GetLogRecord
  2453. // API call, and error handling.
  2454. //
  2455. // This method is useful when you want to inject custom logic or configuration
  2456. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2457. //
  2458. //
  2459. // // Example sending a request using the GetLogRecordRequest method.
  2460. // req, resp := client.GetLogRecordRequest(params)
  2461. //
  2462. // err := req.Send()
  2463. // if err == nil { // resp is now filled
  2464. // fmt.Println(resp)
  2465. // }
  2466. //
  2467. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord
  2468. func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) {
  2469. op := &request.Operation{
  2470. Name: opGetLogRecord,
  2471. HTTPMethod: "POST",
  2472. HTTPPath: "/",
  2473. }
  2474. if input == nil {
  2475. input = &GetLogRecordInput{}
  2476. }
  2477. output = &GetLogRecordOutput{}
  2478. req = c.newRequest(op, input, output)
  2479. return
  2480. }
  2481. // GetLogRecord API operation for Amazon CloudWatch Logs.
  2482. //
  2483. // Retrieves all the fields and values of a single log event. All fields are
  2484. // retrieved, even if the original query that produced the logRecordPointer
  2485. // retrieved only a subset of fields. Fields are returned as field name/field
  2486. // value pairs.
  2487. //
  2488. // Additionally, the entire unparsed log event is returned within @message.
  2489. //
  2490. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2491. // with awserr.Error's Code and Message methods to get detailed information about
  2492. // the error.
  2493. //
  2494. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2495. // API operation GetLogRecord for usage and error information.
  2496. //
  2497. // Returned Error Codes:
  2498. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2499. // A parameter is specified incorrectly.
  2500. //
  2501. // * ErrCodeLimitExceededException "LimitExceededException"
  2502. // You have reached the maximum number of resources that can be created.
  2503. //
  2504. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2505. // The specified resource does not exist.
  2506. //
  2507. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2508. // The service cannot complete the request.
  2509. //
  2510. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord
  2511. func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) {
  2512. req, out := c.GetLogRecordRequest(input)
  2513. return out, req.Send()
  2514. }
  2515. // GetLogRecordWithContext is the same as GetLogRecord with the addition of
  2516. // the ability to pass a context and additional request options.
  2517. //
  2518. // See GetLogRecord for details on how to use this API operation.
  2519. //
  2520. // The context must be non-nil and will be used for request cancellation. If
  2521. // the context is nil a panic will occur. In the future the SDK may create
  2522. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2523. // for more information on using Contexts.
  2524. func (c *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) {
  2525. req, out := c.GetLogRecordRequest(input)
  2526. req.SetContext(ctx)
  2527. req.ApplyOptions(opts...)
  2528. return out, req.Send()
  2529. }
  2530. const opGetQueryResults = "GetQueryResults"
  2531. // GetQueryResultsRequest generates a "aws/request.Request" representing the
  2532. // client's request for the GetQueryResults operation. The "output" return
  2533. // value will be populated with the request's response once the request completes
  2534. // successfully.
  2535. //
  2536. // Use "Send" method on the returned Request to send the API call to the service.
  2537. // the "output" return value is not valid until after Send returns without error.
  2538. //
  2539. // See GetQueryResults for more information on using the GetQueryResults
  2540. // API call, and error handling.
  2541. //
  2542. // This method is useful when you want to inject custom logic or configuration
  2543. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2544. //
  2545. //
  2546. // // Example sending a request using the GetQueryResultsRequest method.
  2547. // req, resp := client.GetQueryResultsRequest(params)
  2548. //
  2549. // err := req.Send()
  2550. // if err == nil { // resp is now filled
  2551. // fmt.Println(resp)
  2552. // }
  2553. //
  2554. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults
  2555. func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) {
  2556. op := &request.Operation{
  2557. Name: opGetQueryResults,
  2558. HTTPMethod: "POST",
  2559. HTTPPath: "/",
  2560. }
  2561. if input == nil {
  2562. input = &GetQueryResultsInput{}
  2563. }
  2564. output = &GetQueryResultsOutput{}
  2565. req = c.newRequest(op, input, output)
  2566. return
  2567. }
  2568. // GetQueryResults API operation for Amazon CloudWatch Logs.
  2569. //
  2570. // Returns the results from the specified query. If the query is in progress,
  2571. // partial results of that current execution are returned. Only the fields requested
  2572. // in the query are returned.
  2573. //
  2574. // GetQueryResults does not start a query execution. To run a query, use .
  2575. //
  2576. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2577. // with awserr.Error's Code and Message methods to get detailed information about
  2578. // the error.
  2579. //
  2580. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2581. // API operation GetQueryResults for usage and error information.
  2582. //
  2583. // Returned Error Codes:
  2584. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2585. // A parameter is specified incorrectly.
  2586. //
  2587. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2588. // The specified resource does not exist.
  2589. //
  2590. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2591. // The service cannot complete the request.
  2592. //
  2593. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults
  2594. func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) {
  2595. req, out := c.GetQueryResultsRequest(input)
  2596. return out, req.Send()
  2597. }
  2598. // GetQueryResultsWithContext is the same as GetQueryResults with the addition of
  2599. // the ability to pass a context and additional request options.
  2600. //
  2601. // See GetQueryResults for details on how to use this API operation.
  2602. //
  2603. // The context must be non-nil and will be used for request cancellation. If
  2604. // the context is nil a panic will occur. In the future the SDK may create
  2605. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2606. // for more information on using Contexts.
  2607. func (c *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) {
  2608. req, out := c.GetQueryResultsRequest(input)
  2609. req.SetContext(ctx)
  2610. req.ApplyOptions(opts...)
  2611. return out, req.Send()
  2612. }
  2613. const opListTagsLogGroup = "ListTagsLogGroup"
  2614. // ListTagsLogGroupRequest generates a "aws/request.Request" representing the
  2615. // client's request for the ListTagsLogGroup operation. The "output" return
  2616. // value will be populated with the request's response once the request completes
  2617. // successfully.
  2618. //
  2619. // Use "Send" method on the returned Request to send the API call to the service.
  2620. // the "output" return value is not valid until after Send returns without error.
  2621. //
  2622. // See ListTagsLogGroup for more information on using the ListTagsLogGroup
  2623. // API call, and error handling.
  2624. //
  2625. // This method is useful when you want to inject custom logic or configuration
  2626. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2627. //
  2628. //
  2629. // // Example sending a request using the ListTagsLogGroupRequest method.
  2630. // req, resp := client.ListTagsLogGroupRequest(params)
  2631. //
  2632. // err := req.Send()
  2633. // if err == nil { // resp is now filled
  2634. // fmt.Println(resp)
  2635. // }
  2636. //
  2637. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup
  2638. func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) (req *request.Request, output *ListTagsLogGroupOutput) {
  2639. op := &request.Operation{
  2640. Name: opListTagsLogGroup,
  2641. HTTPMethod: "POST",
  2642. HTTPPath: "/",
  2643. }
  2644. if input == nil {
  2645. input = &ListTagsLogGroupInput{}
  2646. }
  2647. output = &ListTagsLogGroupOutput{}
  2648. req = c.newRequest(op, input, output)
  2649. return
  2650. }
  2651. // ListTagsLogGroup API operation for Amazon CloudWatch Logs.
  2652. //
  2653. // Lists the tags for the specified log group.
  2654. //
  2655. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2656. // with awserr.Error's Code and Message methods to get detailed information about
  2657. // the error.
  2658. //
  2659. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2660. // API operation ListTagsLogGroup for usage and error information.
  2661. //
  2662. // Returned Error Codes:
  2663. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2664. // The specified resource does not exist.
  2665. //
  2666. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2667. // The service cannot complete the request.
  2668. //
  2669. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup
  2670. func (c *CloudWatchLogs) ListTagsLogGroup(input *ListTagsLogGroupInput) (*ListTagsLogGroupOutput, error) {
  2671. req, out := c.ListTagsLogGroupRequest(input)
  2672. return out, req.Send()
  2673. }
  2674. // ListTagsLogGroupWithContext is the same as ListTagsLogGroup with the addition of
  2675. // the ability to pass a context and additional request options.
  2676. //
  2677. // See ListTagsLogGroup for details on how to use this API operation.
  2678. //
  2679. // The context must be non-nil and will be used for request cancellation. If
  2680. // the context is nil a panic will occur. In the future the SDK may create
  2681. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2682. // for more information on using Contexts.
  2683. func (c *CloudWatchLogs) ListTagsLogGroupWithContext(ctx aws.Context, input *ListTagsLogGroupInput, opts ...request.Option) (*ListTagsLogGroupOutput, error) {
  2684. req, out := c.ListTagsLogGroupRequest(input)
  2685. req.SetContext(ctx)
  2686. req.ApplyOptions(opts...)
  2687. return out, req.Send()
  2688. }
  2689. const opPutDestination = "PutDestination"
  2690. // PutDestinationRequest generates a "aws/request.Request" representing the
  2691. // client's request for the PutDestination operation. The "output" return
  2692. // value will be populated with the request's response once the request completes
  2693. // successfully.
  2694. //
  2695. // Use "Send" method on the returned Request to send the API call to the service.
  2696. // the "output" return value is not valid until after Send returns without error.
  2697. //
  2698. // See PutDestination for more information on using the PutDestination
  2699. // API call, and error handling.
  2700. //
  2701. // This method is useful when you want to inject custom logic or configuration
  2702. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2703. //
  2704. //
  2705. // // Example sending a request using the PutDestinationRequest method.
  2706. // req, resp := client.PutDestinationRequest(params)
  2707. //
  2708. // err := req.Send()
  2709. // if err == nil { // resp is now filled
  2710. // fmt.Println(resp)
  2711. // }
  2712. //
  2713. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination
  2714. func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) {
  2715. op := &request.Operation{
  2716. Name: opPutDestination,
  2717. HTTPMethod: "POST",
  2718. HTTPPath: "/",
  2719. }
  2720. if input == nil {
  2721. input = &PutDestinationInput{}
  2722. }
  2723. output = &PutDestinationOutput{}
  2724. req = c.newRequest(op, input, output)
  2725. return
  2726. }
  2727. // PutDestination API operation for Amazon CloudWatch Logs.
  2728. //
  2729. // Creates or updates a destination. A destination encapsulates a physical resource
  2730. // (such as an Amazon Kinesis stream) and enables you to subscribe to a real-time
  2731. // stream of log events for a different account, ingested using PutLogEvents.
  2732. // Currently, the only supported physical resource is a Kinesis stream belonging
  2733. // to the same account as the destination.
  2734. //
  2735. // Through an access policy, a destination controls what is written to its Kinesis
  2736. // stream. By default, PutDestination does not set any access policy with the
  2737. // destination, which means a cross-account user cannot call PutSubscriptionFilter
  2738. // against this destination. To enable this, the destination owner must call
  2739. // PutDestinationPolicy after PutDestination.
  2740. //
  2741. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2742. // with awserr.Error's Code and Message methods to get detailed information about
  2743. // the error.
  2744. //
  2745. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2746. // API operation PutDestination for usage and error information.
  2747. //
  2748. // Returned Error Codes:
  2749. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2750. // A parameter is specified incorrectly.
  2751. //
  2752. // * ErrCodeOperationAbortedException "OperationAbortedException"
  2753. // Multiple requests to update the same resource were in conflict.
  2754. //
  2755. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2756. // The service cannot complete the request.
  2757. //
  2758. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination
  2759. func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) {
  2760. req, out := c.PutDestinationRequest(input)
  2761. return out, req.Send()
  2762. }
  2763. // PutDestinationWithContext is the same as PutDestination with the addition of
  2764. // the ability to pass a context and additional request options.
  2765. //
  2766. // See PutDestination for details on how to use this API operation.
  2767. //
  2768. // The context must be non-nil and will be used for request cancellation. If
  2769. // the context is nil a panic will occur. In the future the SDK may create
  2770. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2771. // for more information on using Contexts.
  2772. func (c *CloudWatchLogs) PutDestinationWithContext(ctx aws.Context, input *PutDestinationInput, opts ...request.Option) (*PutDestinationOutput, error) {
  2773. req, out := c.PutDestinationRequest(input)
  2774. req.SetContext(ctx)
  2775. req.ApplyOptions(opts...)
  2776. return out, req.Send()
  2777. }
  2778. const opPutDestinationPolicy = "PutDestinationPolicy"
  2779. // PutDestinationPolicyRequest generates a "aws/request.Request" representing the
  2780. // client's request for the PutDestinationPolicy operation. The "output" return
  2781. // value will be populated with the request's response once the request completes
  2782. // successfully.
  2783. //
  2784. // Use "Send" method on the returned Request to send the API call to the service.
  2785. // the "output" return value is not valid until after Send returns without error.
  2786. //
  2787. // See PutDestinationPolicy for more information on using the PutDestinationPolicy
  2788. // API call, and error handling.
  2789. //
  2790. // This method is useful when you want to inject custom logic or configuration
  2791. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2792. //
  2793. //
  2794. // // Example sending a request using the PutDestinationPolicyRequest method.
  2795. // req, resp := client.PutDestinationPolicyRequest(params)
  2796. //
  2797. // err := req.Send()
  2798. // if err == nil { // resp is now filled
  2799. // fmt.Println(resp)
  2800. // }
  2801. //
  2802. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy
  2803. func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) {
  2804. op := &request.Operation{
  2805. Name: opPutDestinationPolicy,
  2806. HTTPMethod: "POST",
  2807. HTTPPath: "/",
  2808. }
  2809. if input == nil {
  2810. input = &PutDestinationPolicyInput{}
  2811. }
  2812. output = &PutDestinationPolicyOutput{}
  2813. req = c.newRequest(op, input, output)
  2814. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2815. return
  2816. }
  2817. // PutDestinationPolicy API operation for Amazon CloudWatch Logs.
  2818. //
  2819. // Creates or updates an access policy associated with an existing destination.
  2820. // An access policy is an IAM policy document (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html)
  2821. // that is used to authorize claims to register a subscription filter against
  2822. // a given destination.
  2823. //
  2824. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2825. // with awserr.Error's Code and Message methods to get detailed information about
  2826. // the error.
  2827. //
  2828. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2829. // API operation PutDestinationPolicy for usage and error information.
  2830. //
  2831. // Returned Error Codes:
  2832. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2833. // A parameter is specified incorrectly.
  2834. //
  2835. // * ErrCodeOperationAbortedException "OperationAbortedException"
  2836. // Multiple requests to update the same resource were in conflict.
  2837. //
  2838. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2839. // The service cannot complete the request.
  2840. //
  2841. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy
  2842. func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) {
  2843. req, out := c.PutDestinationPolicyRequest(input)
  2844. return out, req.Send()
  2845. }
  2846. // PutDestinationPolicyWithContext is the same as PutDestinationPolicy with the addition of
  2847. // the ability to pass a context and additional request options.
  2848. //
  2849. // See PutDestinationPolicy for details on how to use this API operation.
  2850. //
  2851. // The context must be non-nil and will be used for request cancellation. If
  2852. // the context is nil a panic will occur. In the future the SDK may create
  2853. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2854. // for more information on using Contexts.
  2855. func (c *CloudWatchLogs) PutDestinationPolicyWithContext(ctx aws.Context, input *PutDestinationPolicyInput, opts ...request.Option) (*PutDestinationPolicyOutput, error) {
  2856. req, out := c.PutDestinationPolicyRequest(input)
  2857. req.SetContext(ctx)
  2858. req.ApplyOptions(opts...)
  2859. return out, req.Send()
  2860. }
  2861. const opPutLogEvents = "PutLogEvents"
  2862. // PutLogEventsRequest generates a "aws/request.Request" representing the
  2863. // client's request for the PutLogEvents operation. The "output" return
  2864. // value will be populated with the request's response once the request completes
  2865. // successfully.
  2866. //
  2867. // Use "Send" method on the returned Request to send the API call to the service.
  2868. // the "output" return value is not valid until after Send returns without error.
  2869. //
  2870. // See PutLogEvents for more information on using the PutLogEvents
  2871. // API call, and error handling.
  2872. //
  2873. // This method is useful when you want to inject custom logic or configuration
  2874. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2875. //
  2876. //
  2877. // // Example sending a request using the PutLogEventsRequest method.
  2878. // req, resp := client.PutLogEventsRequest(params)
  2879. //
  2880. // err := req.Send()
  2881. // if err == nil { // resp is now filled
  2882. // fmt.Println(resp)
  2883. // }
  2884. //
  2885. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents
  2886. func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) {
  2887. op := &request.Operation{
  2888. Name: opPutLogEvents,
  2889. HTTPMethod: "POST",
  2890. HTTPPath: "/",
  2891. }
  2892. if input == nil {
  2893. input = &PutLogEventsInput{}
  2894. }
  2895. output = &PutLogEventsOutput{}
  2896. req = c.newRequest(op, input, output)
  2897. return
  2898. }
  2899. // PutLogEvents API operation for Amazon CloudWatch Logs.
  2900. //
  2901. // Uploads a batch of log events to the specified log stream.
  2902. //
  2903. // You must include the sequence token obtained from the response of the previous
  2904. // call. An upload in a newly created log stream does not require a sequence
  2905. // token. You can also get the sequence token using DescribeLogStreams. If you
  2906. // call PutLogEvents twice within a narrow time period using the same value
  2907. // for sequenceToken, both calls may be successful, or one may be rejected.
  2908. //
  2909. // The batch of events must satisfy the following constraints:
  2910. //
  2911. // * The maximum batch size is 1,048,576 bytes, and this size is calculated
  2912. // as the sum of all event messages in UTF-8, plus 26 bytes for each log
  2913. // event.
  2914. //
  2915. // * None of the log events in the batch can be more than 2 hours in the
  2916. // future.
  2917. //
  2918. // * None of the log events in the batch can be older than 14 days or the
  2919. // retention period of the log group.
  2920. //
  2921. // * The log events in the batch must be in chronological ordered by their
  2922. // timestamp. The timestamp is the time the event occurred, expressed as
  2923. // the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In AWS Tools
  2924. // for PowerShell and the AWS SDK for .NET, the timestamp is specified in
  2925. // .NET format: yyyy-mm-ddThh:mm:ss. For example, 2017-09-15T13:45:30.)
  2926. //
  2927. // * The maximum number of log events in a batch is 10,000.
  2928. //
  2929. // * A batch of log events in a single request cannot span more than 24 hours.
  2930. // Otherwise, the operation fails.
  2931. //
  2932. // If a call to PutLogEvents returns "UnrecognizedClientException" the most
  2933. // likely cause is an invalid AWS access key ID or secret key.
  2934. //
  2935. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2936. // with awserr.Error's Code and Message methods to get detailed information about
  2937. // the error.
  2938. //
  2939. // See the AWS API reference guide for Amazon CloudWatch Logs's
  2940. // API operation PutLogEvents for usage and error information.
  2941. //
  2942. // Returned Error Codes:
  2943. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2944. // A parameter is specified incorrectly.
  2945. //
  2946. // * ErrCodeInvalidSequenceTokenException "InvalidSequenceTokenException"
  2947. // The sequence token is not valid.
  2948. //
  2949. // * ErrCodeDataAlreadyAcceptedException "DataAlreadyAcceptedException"
  2950. // The event was already logged.
  2951. //
  2952. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2953. // The specified resource does not exist.
  2954. //
  2955. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2956. // The service cannot complete the request.
  2957. //
  2958. // * ErrCodeUnrecognizedClientException "UnrecognizedClientException"
  2959. // The most likely cause is an invalid AWS access key ID or secret key.
  2960. //
  2961. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents
  2962. func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) {
  2963. req, out := c.PutLogEventsRequest(input)
  2964. return out, req.Send()
  2965. }
  2966. // PutLogEventsWithContext is the same as PutLogEvents with the addition of
  2967. // the ability to pass a context and additional request options.
  2968. //
  2969. // See PutLogEvents for details on how to use this API operation.
  2970. //
  2971. // The context must be non-nil and will be used for request cancellation. If
  2972. // the context is nil a panic will occur. In the future the SDK may create
  2973. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2974. // for more information on using Contexts.
  2975. func (c *CloudWatchLogs) PutLogEventsWithContext(ctx aws.Context, input *PutLogEventsInput, opts ...request.Option) (*PutLogEventsOutput, error) {
  2976. req, out := c.PutLogEventsRequest(input)
  2977. req.SetContext(ctx)
  2978. req.ApplyOptions(opts...)
  2979. return out, req.Send()
  2980. }
  2981. const opPutMetricFilter = "PutMetricFilter"
  2982. // PutMetricFilterRequest generates a "aws/request.Request" representing the
  2983. // client's request for the PutMetricFilter operation. The "output" return
  2984. // value will be populated with the request's response once the request completes
  2985. // successfully.
  2986. //
  2987. // Use "Send" method on the returned Request to send the API call to the service.
  2988. // the "output" return value is not valid until after Send returns without error.
  2989. //
  2990. // See PutMetricFilter for more information on using the PutMetricFilter
  2991. // API call, and error handling.
  2992. //
  2993. // This method is useful when you want to inject custom logic or configuration
  2994. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2995. //
  2996. //
  2997. // // Example sending a request using the PutMetricFilterRequest method.
  2998. // req, resp := client.PutMetricFilterRequest(params)
  2999. //
  3000. // err := req.Send()
  3001. // if err == nil { // resp is now filled
  3002. // fmt.Println(resp)
  3003. // }
  3004. //
  3005. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter
  3006. func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) {
  3007. op := &request.Operation{
  3008. Name: opPutMetricFilter,
  3009. HTTPMethod: "POST",
  3010. HTTPPath: "/",
  3011. }
  3012. if input == nil {
  3013. input = &PutMetricFilterInput{}
  3014. }
  3015. output = &PutMetricFilterOutput{}
  3016. req = c.newRequest(op, input, output)
  3017. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3018. return
  3019. }
  3020. // PutMetricFilter API operation for Amazon CloudWatch Logs.
  3021. //
  3022. // Creates or updates a metric filter and associates it with the specified log
  3023. // group. Metric filters allow you to configure rules to extract metric data
  3024. // from log events ingested through PutLogEvents.
  3025. //
  3026. // The maximum number of metric filters that can be associated with a log group
  3027. // is 100.
  3028. //
  3029. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3030. // with awserr.Error's Code and Message methods to get detailed information about
  3031. // the error.
  3032. //
  3033. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3034. // API operation PutMetricFilter for usage and error information.
  3035. //
  3036. // Returned Error Codes:
  3037. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3038. // A parameter is specified incorrectly.
  3039. //
  3040. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3041. // The specified resource does not exist.
  3042. //
  3043. // * ErrCodeOperationAbortedException "OperationAbortedException"
  3044. // Multiple requests to update the same resource were in conflict.
  3045. //
  3046. // * ErrCodeLimitExceededException "LimitExceededException"
  3047. // You have reached the maximum number of resources that can be created.
  3048. //
  3049. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3050. // The service cannot complete the request.
  3051. //
  3052. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter
  3053. func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) {
  3054. req, out := c.PutMetricFilterRequest(input)
  3055. return out, req.Send()
  3056. }
  3057. // PutMetricFilterWithContext is the same as PutMetricFilter with the addition of
  3058. // the ability to pass a context and additional request options.
  3059. //
  3060. // See PutMetricFilter for details on how to use this API operation.
  3061. //
  3062. // The context must be non-nil and will be used for request cancellation. If
  3063. // the context is nil a panic will occur. In the future the SDK may create
  3064. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3065. // for more information on using Contexts.
  3066. func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutMetricFilterInput, opts ...request.Option) (*PutMetricFilterOutput, error) {
  3067. req, out := c.PutMetricFilterRequest(input)
  3068. req.SetContext(ctx)
  3069. req.ApplyOptions(opts...)
  3070. return out, req.Send()
  3071. }
  3072. const opPutResourcePolicy = "PutResourcePolicy"
  3073. // PutResourcePolicyRequest generates a "aws/request.Request" representing the
  3074. // client's request for the PutResourcePolicy operation. The "output" return
  3075. // value will be populated with the request's response once the request completes
  3076. // successfully.
  3077. //
  3078. // Use "Send" method on the returned Request to send the API call to the service.
  3079. // the "output" return value is not valid until after Send returns without error.
  3080. //
  3081. // See PutResourcePolicy for more information on using the PutResourcePolicy
  3082. // API call, and error handling.
  3083. //
  3084. // This method is useful when you want to inject custom logic or configuration
  3085. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3086. //
  3087. //
  3088. // // Example sending a request using the PutResourcePolicyRequest method.
  3089. // req, resp := client.PutResourcePolicyRequest(params)
  3090. //
  3091. // err := req.Send()
  3092. // if err == nil { // resp is now filled
  3093. // fmt.Println(resp)
  3094. // }
  3095. //
  3096. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy
  3097. func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) {
  3098. op := &request.Operation{
  3099. Name: opPutResourcePolicy,
  3100. HTTPMethod: "POST",
  3101. HTTPPath: "/",
  3102. }
  3103. if input == nil {
  3104. input = &PutResourcePolicyInput{}
  3105. }
  3106. output = &PutResourcePolicyOutput{}
  3107. req = c.newRequest(op, input, output)
  3108. return
  3109. }
  3110. // PutResourcePolicy API operation for Amazon CloudWatch Logs.
  3111. //
  3112. // Creates or updates a resource policy allowing other AWS services to put log
  3113. // events to this account, such as Amazon Route 53. An account can have up to
  3114. // 10 resource policies per region.
  3115. //
  3116. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3117. // with awserr.Error's Code and Message methods to get detailed information about
  3118. // the error.
  3119. //
  3120. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3121. // API operation PutResourcePolicy for usage and error information.
  3122. //
  3123. // Returned Error Codes:
  3124. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3125. // A parameter is specified incorrectly.
  3126. //
  3127. // * ErrCodeLimitExceededException "LimitExceededException"
  3128. // You have reached the maximum number of resources that can be created.
  3129. //
  3130. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3131. // The service cannot complete the request.
  3132. //
  3133. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy
  3134. func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) {
  3135. req, out := c.PutResourcePolicyRequest(input)
  3136. return out, req.Send()
  3137. }
  3138. // PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of
  3139. // the ability to pass a context and additional request options.
  3140. //
  3141. // See PutResourcePolicy for details on how to use this API operation.
  3142. //
  3143. // The context must be non-nil and will be used for request cancellation. If
  3144. // the context is nil a panic will occur. In the future the SDK may create
  3145. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3146. // for more information on using Contexts.
  3147. func (c *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) {
  3148. req, out := c.PutResourcePolicyRequest(input)
  3149. req.SetContext(ctx)
  3150. req.ApplyOptions(opts...)
  3151. return out, req.Send()
  3152. }
  3153. const opPutRetentionPolicy = "PutRetentionPolicy"
  3154. // PutRetentionPolicyRequest generates a "aws/request.Request" representing the
  3155. // client's request for the PutRetentionPolicy operation. The "output" return
  3156. // value will be populated with the request's response once the request completes
  3157. // successfully.
  3158. //
  3159. // Use "Send" method on the returned Request to send the API call to the service.
  3160. // the "output" return value is not valid until after Send returns without error.
  3161. //
  3162. // See PutRetentionPolicy for more information on using the PutRetentionPolicy
  3163. // API call, and error handling.
  3164. //
  3165. // This method is useful when you want to inject custom logic or configuration
  3166. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3167. //
  3168. //
  3169. // // Example sending a request using the PutRetentionPolicyRequest method.
  3170. // req, resp := client.PutRetentionPolicyRequest(params)
  3171. //
  3172. // err := req.Send()
  3173. // if err == nil { // resp is now filled
  3174. // fmt.Println(resp)
  3175. // }
  3176. //
  3177. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy
  3178. func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) {
  3179. op := &request.Operation{
  3180. Name: opPutRetentionPolicy,
  3181. HTTPMethod: "POST",
  3182. HTTPPath: "/",
  3183. }
  3184. if input == nil {
  3185. input = &PutRetentionPolicyInput{}
  3186. }
  3187. output = &PutRetentionPolicyOutput{}
  3188. req = c.newRequest(op, input, output)
  3189. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3190. return
  3191. }
  3192. // PutRetentionPolicy API operation for Amazon CloudWatch Logs.
  3193. //
  3194. // Sets the retention of the specified log group. A retention policy allows
  3195. // you to configure the number of days for which to retain log events in the
  3196. // specified log group.
  3197. //
  3198. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3199. // with awserr.Error's Code and Message methods to get detailed information about
  3200. // the error.
  3201. //
  3202. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3203. // API operation PutRetentionPolicy for usage and error information.
  3204. //
  3205. // Returned Error Codes:
  3206. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3207. // A parameter is specified incorrectly.
  3208. //
  3209. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3210. // The specified resource does not exist.
  3211. //
  3212. // * ErrCodeOperationAbortedException "OperationAbortedException"
  3213. // Multiple requests to update the same resource were in conflict.
  3214. //
  3215. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3216. // The service cannot complete the request.
  3217. //
  3218. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy
  3219. func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) {
  3220. req, out := c.PutRetentionPolicyRequest(input)
  3221. return out, req.Send()
  3222. }
  3223. // PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of
  3224. // the ability to pass a context and additional request options.
  3225. //
  3226. // See PutRetentionPolicy for details on how to use this API operation.
  3227. //
  3228. // The context must be non-nil and will be used for request cancellation. If
  3229. // the context is nil a panic will occur. In the future the SDK may create
  3230. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3231. // for more information on using Contexts.
  3232. func (c *CloudWatchLogs) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) {
  3233. req, out := c.PutRetentionPolicyRequest(input)
  3234. req.SetContext(ctx)
  3235. req.ApplyOptions(opts...)
  3236. return out, req.Send()
  3237. }
  3238. const opPutSubscriptionFilter = "PutSubscriptionFilter"
  3239. // PutSubscriptionFilterRequest generates a "aws/request.Request" representing the
  3240. // client's request for the PutSubscriptionFilter operation. The "output" return
  3241. // value will be populated with the request's response once the request completes
  3242. // successfully.
  3243. //
  3244. // Use "Send" method on the returned Request to send the API call to the service.
  3245. // the "output" return value is not valid until after Send returns without error.
  3246. //
  3247. // See PutSubscriptionFilter for more information on using the PutSubscriptionFilter
  3248. // API call, and error handling.
  3249. //
  3250. // This method is useful when you want to inject custom logic or configuration
  3251. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3252. //
  3253. //
  3254. // // Example sending a request using the PutSubscriptionFilterRequest method.
  3255. // req, resp := client.PutSubscriptionFilterRequest(params)
  3256. //
  3257. // err := req.Send()
  3258. // if err == nil { // resp is now filled
  3259. // fmt.Println(resp)
  3260. // }
  3261. //
  3262. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter
  3263. func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) {
  3264. op := &request.Operation{
  3265. Name: opPutSubscriptionFilter,
  3266. HTTPMethod: "POST",
  3267. HTTPPath: "/",
  3268. }
  3269. if input == nil {
  3270. input = &PutSubscriptionFilterInput{}
  3271. }
  3272. output = &PutSubscriptionFilterOutput{}
  3273. req = c.newRequest(op, input, output)
  3274. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3275. return
  3276. }
  3277. // PutSubscriptionFilter API operation for Amazon CloudWatch Logs.
  3278. //
  3279. // Creates or updates a subscription filter and associates it with the specified
  3280. // log group. Subscription filters allow you to subscribe to a real-time stream
  3281. // of log events ingested through PutLogEvents and have them delivered to a
  3282. // specific destination. Currently, the supported destinations are:
  3283. //
  3284. // * An Amazon Kinesis stream belonging to the same account as the subscription
  3285. // filter, for same-account delivery.
  3286. //
  3287. // * A logical destination that belongs to a different account, for cross-account
  3288. // delivery.
  3289. //
  3290. // * An Amazon Kinesis Firehose delivery stream that belongs to the same
  3291. // account as the subscription filter, for same-account delivery.
  3292. //
  3293. // * An AWS Lambda function that belongs to the same account as the subscription
  3294. // filter, for same-account delivery.
  3295. //
  3296. // There can only be one subscription filter associated with a log group. If
  3297. // you are updating an existing filter, you must specify the correct name in
  3298. // filterName. Otherwise, the call fails because you cannot associate a second
  3299. // filter with a log group.
  3300. //
  3301. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3302. // with awserr.Error's Code and Message methods to get detailed information about
  3303. // the error.
  3304. //
  3305. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3306. // API operation PutSubscriptionFilter for usage and error information.
  3307. //
  3308. // Returned Error Codes:
  3309. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3310. // A parameter is specified incorrectly.
  3311. //
  3312. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3313. // The specified resource does not exist.
  3314. //
  3315. // * ErrCodeOperationAbortedException "OperationAbortedException"
  3316. // Multiple requests to update the same resource were in conflict.
  3317. //
  3318. // * ErrCodeLimitExceededException "LimitExceededException"
  3319. // You have reached the maximum number of resources that can be created.
  3320. //
  3321. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3322. // The service cannot complete the request.
  3323. //
  3324. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter
  3325. func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) {
  3326. req, out := c.PutSubscriptionFilterRequest(input)
  3327. return out, req.Send()
  3328. }
  3329. // PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of
  3330. // the ability to pass a context and additional request options.
  3331. //
  3332. // See PutSubscriptionFilter for details on how to use this API operation.
  3333. //
  3334. // The context must be non-nil and will be used for request cancellation. If
  3335. // the context is nil a panic will occur. In the future the SDK may create
  3336. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3337. // for more information on using Contexts.
  3338. func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) {
  3339. req, out := c.PutSubscriptionFilterRequest(input)
  3340. req.SetContext(ctx)
  3341. req.ApplyOptions(opts...)
  3342. return out, req.Send()
  3343. }
  3344. const opStartQuery = "StartQuery"
  3345. // StartQueryRequest generates a "aws/request.Request" representing the
  3346. // client's request for the StartQuery operation. The "output" return
  3347. // value will be populated with the request's response once the request completes
  3348. // successfully.
  3349. //
  3350. // Use "Send" method on the returned Request to send the API call to the service.
  3351. // the "output" return value is not valid until after Send returns without error.
  3352. //
  3353. // See StartQuery for more information on using the StartQuery
  3354. // API call, and error handling.
  3355. //
  3356. // This method is useful when you want to inject custom logic or configuration
  3357. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3358. //
  3359. //
  3360. // // Example sending a request using the StartQueryRequest method.
  3361. // req, resp := client.StartQueryRequest(params)
  3362. //
  3363. // err := req.Send()
  3364. // if err == nil { // resp is now filled
  3365. // fmt.Println(resp)
  3366. // }
  3367. //
  3368. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery
  3369. func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) {
  3370. op := &request.Operation{
  3371. Name: opStartQuery,
  3372. HTTPMethod: "POST",
  3373. HTTPPath: "/",
  3374. }
  3375. if input == nil {
  3376. input = &StartQueryInput{}
  3377. }
  3378. output = &StartQueryOutput{}
  3379. req = c.newRequest(op, input, output)
  3380. return
  3381. }
  3382. // StartQuery API operation for Amazon CloudWatch Logs.
  3383. //
  3384. // Schedules a query of a log group using CloudWatch Logs Insights. You specify
  3385. // the log group to query, the query string to use, and the time to query.
  3386. //
  3387. // For more information, see CloudWatch Logs Insights Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
  3388. //
  3389. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3390. // with awserr.Error's Code and Message methods to get detailed information about
  3391. // the error.
  3392. //
  3393. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3394. // API operation StartQuery for usage and error information.
  3395. //
  3396. // Returned Error Codes:
  3397. // * ErrCodeMalformedQueryException "MalformedQueryException"
  3398. // The query string is not valid. Details about this error are displayed in
  3399. // a QueryCompileError object. For more information, see .
  3400. //
  3401. // For more information about valid query syntax, see CloudWatch Logs Insights
  3402. // Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
  3403. //
  3404. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3405. // A parameter is specified incorrectly.
  3406. //
  3407. // * ErrCodeLimitExceededException "LimitExceededException"
  3408. // You have reached the maximum number of resources that can be created.
  3409. //
  3410. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3411. // The specified resource does not exist.
  3412. //
  3413. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3414. // The service cannot complete the request.
  3415. //
  3416. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery
  3417. func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) {
  3418. req, out := c.StartQueryRequest(input)
  3419. return out, req.Send()
  3420. }
  3421. // StartQueryWithContext is the same as StartQuery with the addition of
  3422. // the ability to pass a context and additional request options.
  3423. //
  3424. // See StartQuery for details on how to use this API operation.
  3425. //
  3426. // The context must be non-nil and will be used for request cancellation. If
  3427. // the context is nil a panic will occur. In the future the SDK may create
  3428. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3429. // for more information on using Contexts.
  3430. func (c *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) {
  3431. req, out := c.StartQueryRequest(input)
  3432. req.SetContext(ctx)
  3433. req.ApplyOptions(opts...)
  3434. return out, req.Send()
  3435. }
  3436. const opStopQuery = "StopQuery"
  3437. // StopQueryRequest generates a "aws/request.Request" representing the
  3438. // client's request for the StopQuery operation. The "output" return
  3439. // value will be populated with the request's response once the request completes
  3440. // successfully.
  3441. //
  3442. // Use "Send" method on the returned Request to send the API call to the service.
  3443. // the "output" return value is not valid until after Send returns without error.
  3444. //
  3445. // See StopQuery for more information on using the StopQuery
  3446. // API call, and error handling.
  3447. //
  3448. // This method is useful when you want to inject custom logic or configuration
  3449. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3450. //
  3451. //
  3452. // // Example sending a request using the StopQueryRequest method.
  3453. // req, resp := client.StopQueryRequest(params)
  3454. //
  3455. // err := req.Send()
  3456. // if err == nil { // resp is now filled
  3457. // fmt.Println(resp)
  3458. // }
  3459. //
  3460. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery
  3461. func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) {
  3462. op := &request.Operation{
  3463. Name: opStopQuery,
  3464. HTTPMethod: "POST",
  3465. HTTPPath: "/",
  3466. }
  3467. if input == nil {
  3468. input = &StopQueryInput{}
  3469. }
  3470. output = &StopQueryOutput{}
  3471. req = c.newRequest(op, input, output)
  3472. return
  3473. }
  3474. // StopQuery API operation for Amazon CloudWatch Logs.
  3475. //
  3476. // Stops a CloudWatch Logs Insights query that is in progress. If the query
  3477. // has already ended, the operation returns an error indicating that the specified
  3478. // query is not running.
  3479. //
  3480. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3481. // with awserr.Error's Code and Message methods to get detailed information about
  3482. // the error.
  3483. //
  3484. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3485. // API operation StopQuery for usage and error information.
  3486. //
  3487. // Returned Error Codes:
  3488. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3489. // A parameter is specified incorrectly.
  3490. //
  3491. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3492. // The specified resource does not exist.
  3493. //
  3494. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3495. // The service cannot complete the request.
  3496. //
  3497. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery
  3498. func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) {
  3499. req, out := c.StopQueryRequest(input)
  3500. return out, req.Send()
  3501. }
  3502. // StopQueryWithContext is the same as StopQuery with the addition of
  3503. // the ability to pass a context and additional request options.
  3504. //
  3505. // See StopQuery for details on how to use this API operation.
  3506. //
  3507. // The context must be non-nil and will be used for request cancellation. If
  3508. // the context is nil a panic will occur. In the future the SDK may create
  3509. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3510. // for more information on using Contexts.
  3511. func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) {
  3512. req, out := c.StopQueryRequest(input)
  3513. req.SetContext(ctx)
  3514. req.ApplyOptions(opts...)
  3515. return out, req.Send()
  3516. }
  3517. const opTagLogGroup = "TagLogGroup"
  3518. // TagLogGroupRequest generates a "aws/request.Request" representing the
  3519. // client's request for the TagLogGroup operation. The "output" return
  3520. // value will be populated with the request's response once the request completes
  3521. // successfully.
  3522. //
  3523. // Use "Send" method on the returned Request to send the API call to the service.
  3524. // the "output" return value is not valid until after Send returns without error.
  3525. //
  3526. // See TagLogGroup for more information on using the TagLogGroup
  3527. // API call, and error handling.
  3528. //
  3529. // This method is useful when you want to inject custom logic or configuration
  3530. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3531. //
  3532. //
  3533. // // Example sending a request using the TagLogGroupRequest method.
  3534. // req, resp := client.TagLogGroupRequest(params)
  3535. //
  3536. // err := req.Send()
  3537. // if err == nil { // resp is now filled
  3538. // fmt.Println(resp)
  3539. // }
  3540. //
  3541. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup
  3542. func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *request.Request, output *TagLogGroupOutput) {
  3543. op := &request.Operation{
  3544. Name: opTagLogGroup,
  3545. HTTPMethod: "POST",
  3546. HTTPPath: "/",
  3547. }
  3548. if input == nil {
  3549. input = &TagLogGroupInput{}
  3550. }
  3551. output = &TagLogGroupOutput{}
  3552. req = c.newRequest(op, input, output)
  3553. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3554. return
  3555. }
  3556. // TagLogGroup API operation for Amazon CloudWatch Logs.
  3557. //
  3558. // Adds or updates the specified tags for the specified log group.
  3559. //
  3560. // To list the tags for a log group, use ListTagsLogGroup. To remove tags, use
  3561. // UntagLogGroup.
  3562. //
  3563. // For more information about tags, see Tag Log Groups in Amazon CloudWatch
  3564. // Logs (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/log-group-tagging.html)
  3565. // in the Amazon CloudWatch Logs User Guide.
  3566. //
  3567. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3568. // with awserr.Error's Code and Message methods to get detailed information about
  3569. // the error.
  3570. //
  3571. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3572. // API operation TagLogGroup for usage and error information.
  3573. //
  3574. // Returned Error Codes:
  3575. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3576. // The specified resource does not exist.
  3577. //
  3578. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3579. // A parameter is specified incorrectly.
  3580. //
  3581. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup
  3582. func (c *CloudWatchLogs) TagLogGroup(input *TagLogGroupInput) (*TagLogGroupOutput, error) {
  3583. req, out := c.TagLogGroupRequest(input)
  3584. return out, req.Send()
  3585. }
  3586. // TagLogGroupWithContext is the same as TagLogGroup with the addition of
  3587. // the ability to pass a context and additional request options.
  3588. //
  3589. // See TagLogGroup for details on how to use this API operation.
  3590. //
  3591. // The context must be non-nil and will be used for request cancellation. If
  3592. // the context is nil a panic will occur. In the future the SDK may create
  3593. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3594. // for more information on using Contexts.
  3595. func (c *CloudWatchLogs) TagLogGroupWithContext(ctx aws.Context, input *TagLogGroupInput, opts ...request.Option) (*TagLogGroupOutput, error) {
  3596. req, out := c.TagLogGroupRequest(input)
  3597. req.SetContext(ctx)
  3598. req.ApplyOptions(opts...)
  3599. return out, req.Send()
  3600. }
  3601. const opTestMetricFilter = "TestMetricFilter"
  3602. // TestMetricFilterRequest generates a "aws/request.Request" representing the
  3603. // client's request for the TestMetricFilter operation. The "output" return
  3604. // value will be populated with the request's response once the request completes
  3605. // successfully.
  3606. //
  3607. // Use "Send" method on the returned Request to send the API call to the service.
  3608. // the "output" return value is not valid until after Send returns without error.
  3609. //
  3610. // See TestMetricFilter for more information on using the TestMetricFilter
  3611. // API call, and error handling.
  3612. //
  3613. // This method is useful when you want to inject custom logic or configuration
  3614. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3615. //
  3616. //
  3617. // // Example sending a request using the TestMetricFilterRequest method.
  3618. // req, resp := client.TestMetricFilterRequest(params)
  3619. //
  3620. // err := req.Send()
  3621. // if err == nil { // resp is now filled
  3622. // fmt.Println(resp)
  3623. // }
  3624. //
  3625. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter
  3626. func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) {
  3627. op := &request.Operation{
  3628. Name: opTestMetricFilter,
  3629. HTTPMethod: "POST",
  3630. HTTPPath: "/",
  3631. }
  3632. if input == nil {
  3633. input = &TestMetricFilterInput{}
  3634. }
  3635. output = &TestMetricFilterOutput{}
  3636. req = c.newRequest(op, input, output)
  3637. return
  3638. }
  3639. // TestMetricFilter API operation for Amazon CloudWatch Logs.
  3640. //
  3641. // Tests the filter pattern of a metric filter against a sample of log event
  3642. // messages. You can use this operation to validate the correctness of a metric
  3643. // filter pattern.
  3644. //
  3645. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3646. // with awserr.Error's Code and Message methods to get detailed information about
  3647. // the error.
  3648. //
  3649. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3650. // API operation TestMetricFilter for usage and error information.
  3651. //
  3652. // Returned Error Codes:
  3653. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3654. // A parameter is specified incorrectly.
  3655. //
  3656. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3657. // The service cannot complete the request.
  3658. //
  3659. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter
  3660. func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) {
  3661. req, out := c.TestMetricFilterRequest(input)
  3662. return out, req.Send()
  3663. }
  3664. // TestMetricFilterWithContext is the same as TestMetricFilter with the addition of
  3665. // the ability to pass a context and additional request options.
  3666. //
  3667. // See TestMetricFilter for details on how to use this API operation.
  3668. //
  3669. // The context must be non-nil and will be used for request cancellation. If
  3670. // the context is nil a panic will occur. In the future the SDK may create
  3671. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3672. // for more information on using Contexts.
  3673. func (c *CloudWatchLogs) TestMetricFilterWithContext(ctx aws.Context, input *TestMetricFilterInput, opts ...request.Option) (*TestMetricFilterOutput, error) {
  3674. req, out := c.TestMetricFilterRequest(input)
  3675. req.SetContext(ctx)
  3676. req.ApplyOptions(opts...)
  3677. return out, req.Send()
  3678. }
  3679. const opUntagLogGroup = "UntagLogGroup"
  3680. // UntagLogGroupRequest generates a "aws/request.Request" representing the
  3681. // client's request for the UntagLogGroup operation. The "output" return
  3682. // value will be populated with the request's response once the request completes
  3683. // successfully.
  3684. //
  3685. // Use "Send" method on the returned Request to send the API call to the service.
  3686. // the "output" return value is not valid until after Send returns without error.
  3687. //
  3688. // See UntagLogGroup for more information on using the UntagLogGroup
  3689. // API call, and error handling.
  3690. //
  3691. // This method is useful when you want to inject custom logic or configuration
  3692. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3693. //
  3694. //
  3695. // // Example sending a request using the UntagLogGroupRequest method.
  3696. // req, resp := client.UntagLogGroupRequest(params)
  3697. //
  3698. // err := req.Send()
  3699. // if err == nil { // resp is now filled
  3700. // fmt.Println(resp)
  3701. // }
  3702. //
  3703. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup
  3704. func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *request.Request, output *UntagLogGroupOutput) {
  3705. op := &request.Operation{
  3706. Name: opUntagLogGroup,
  3707. HTTPMethod: "POST",
  3708. HTTPPath: "/",
  3709. }
  3710. if input == nil {
  3711. input = &UntagLogGroupInput{}
  3712. }
  3713. output = &UntagLogGroupOutput{}
  3714. req = c.newRequest(op, input, output)
  3715. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3716. return
  3717. }
  3718. // UntagLogGroup API operation for Amazon CloudWatch Logs.
  3719. //
  3720. // Removes the specified tags from the specified log group.
  3721. //
  3722. // To list the tags for a log group, use ListTagsLogGroup. To add tags, use
  3723. // UntagLogGroup.
  3724. //
  3725. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3726. // with awserr.Error's Code and Message methods to get detailed information about
  3727. // the error.
  3728. //
  3729. // See the AWS API reference guide for Amazon CloudWatch Logs's
  3730. // API operation UntagLogGroup for usage and error information.
  3731. //
  3732. // Returned Error Codes:
  3733. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3734. // The specified resource does not exist.
  3735. //
  3736. // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup
  3737. func (c *CloudWatchLogs) UntagLogGroup(input *UntagLogGroupInput) (*UntagLogGroupOutput, error) {
  3738. req, out := c.UntagLogGroupRequest(input)
  3739. return out, req.Send()
  3740. }
  3741. // UntagLogGroupWithContext is the same as UntagLogGroup with the addition of
  3742. // the ability to pass a context and additional request options.
  3743. //
  3744. // See UntagLogGroup for details on how to use this API operation.
  3745. //
  3746. // The context must be non-nil and will be used for request cancellation. If
  3747. // the context is nil a panic will occur. In the future the SDK may create
  3748. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3749. // for more information on using Contexts.
  3750. func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagLogGroupInput, opts ...request.Option) (*UntagLogGroupOutput, error) {
  3751. req, out := c.UntagLogGroupRequest(input)
  3752. req.SetContext(ctx)
  3753. req.ApplyOptions(opts...)
  3754. return out, req.Send()
  3755. }
  3756. type AssociateKmsKeyInput struct {
  3757. _ struct{} `type:"structure"`
  3758. // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
  3759. // For more information, see Amazon Resource Names - AWS Key Management Service
  3760. // (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms).
  3761. //
  3762. // KmsKeyId is a required field
  3763. KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"`
  3764. // The name of the log group.
  3765. //
  3766. // LogGroupName is a required field
  3767. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  3768. }
  3769. // String returns the string representation
  3770. func (s AssociateKmsKeyInput) String() string {
  3771. return awsutil.Prettify(s)
  3772. }
  3773. // GoString returns the string representation
  3774. func (s AssociateKmsKeyInput) GoString() string {
  3775. return s.String()
  3776. }
  3777. // Validate inspects the fields of the type to determine if they are valid.
  3778. func (s *AssociateKmsKeyInput) Validate() error {
  3779. invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"}
  3780. if s.KmsKeyId == nil {
  3781. invalidParams.Add(request.NewErrParamRequired("KmsKeyId"))
  3782. }
  3783. if s.LogGroupName == nil {
  3784. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  3785. }
  3786. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  3787. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  3788. }
  3789. if invalidParams.Len() > 0 {
  3790. return invalidParams
  3791. }
  3792. return nil
  3793. }
  3794. // SetKmsKeyId sets the KmsKeyId field's value.
  3795. func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput {
  3796. s.KmsKeyId = &v
  3797. return s
  3798. }
  3799. // SetLogGroupName sets the LogGroupName field's value.
  3800. func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput {
  3801. s.LogGroupName = &v
  3802. return s
  3803. }
  3804. type AssociateKmsKeyOutput struct {
  3805. _ struct{} `type:"structure"`
  3806. }
  3807. // String returns the string representation
  3808. func (s AssociateKmsKeyOutput) String() string {
  3809. return awsutil.Prettify(s)
  3810. }
  3811. // GoString returns the string representation
  3812. func (s AssociateKmsKeyOutput) GoString() string {
  3813. return s.String()
  3814. }
  3815. type CancelExportTaskInput struct {
  3816. _ struct{} `type:"structure"`
  3817. // The ID of the export task.
  3818. //
  3819. // TaskId is a required field
  3820. TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"`
  3821. }
  3822. // String returns the string representation
  3823. func (s CancelExportTaskInput) String() string {
  3824. return awsutil.Prettify(s)
  3825. }
  3826. // GoString returns the string representation
  3827. func (s CancelExportTaskInput) GoString() string {
  3828. return s.String()
  3829. }
  3830. // Validate inspects the fields of the type to determine if they are valid.
  3831. func (s *CancelExportTaskInput) Validate() error {
  3832. invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"}
  3833. if s.TaskId == nil {
  3834. invalidParams.Add(request.NewErrParamRequired("TaskId"))
  3835. }
  3836. if s.TaskId != nil && len(*s.TaskId) < 1 {
  3837. invalidParams.Add(request.NewErrParamMinLen("TaskId", 1))
  3838. }
  3839. if invalidParams.Len() > 0 {
  3840. return invalidParams
  3841. }
  3842. return nil
  3843. }
  3844. // SetTaskId sets the TaskId field's value.
  3845. func (s *CancelExportTaskInput) SetTaskId(v string) *CancelExportTaskInput {
  3846. s.TaskId = &v
  3847. return s
  3848. }
  3849. type CancelExportTaskOutput struct {
  3850. _ struct{} `type:"structure"`
  3851. }
  3852. // String returns the string representation
  3853. func (s CancelExportTaskOutput) String() string {
  3854. return awsutil.Prettify(s)
  3855. }
  3856. // GoString returns the string representation
  3857. func (s CancelExportTaskOutput) GoString() string {
  3858. return s.String()
  3859. }
  3860. type CreateExportTaskInput struct {
  3861. _ struct{} `type:"structure"`
  3862. // The name of S3 bucket for the exported log data. The bucket must be in the
  3863. // same AWS region.
  3864. //
  3865. // Destination is a required field
  3866. Destination *string `locationName:"destination" min:"1" type:"string" required:"true"`
  3867. // The prefix used as the start of the key for every object exported. If you
  3868. // don't specify a value, the default is exportedlogs.
  3869. DestinationPrefix *string `locationName:"destinationPrefix" type:"string"`
  3870. // The start time of the range for the request, expressed as the number of milliseconds
  3871. // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this
  3872. // time are not exported.
  3873. //
  3874. // From is a required field
  3875. From *int64 `locationName:"from" type:"long" required:"true"`
  3876. // The name of the log group.
  3877. //
  3878. // LogGroupName is a required field
  3879. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  3880. // Export only log streams that match the provided prefix. If you don't specify
  3881. // a value, no prefix filter is applied.
  3882. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"`
  3883. // The name of the export task.
  3884. TaskName *string `locationName:"taskName" min:"1" type:"string"`
  3885. // The end time of the range for the request, expressed as the number of milliseconds
  3886. // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time
  3887. // are not exported.
  3888. //
  3889. // To is a required field
  3890. To *int64 `locationName:"to" type:"long" required:"true"`
  3891. }
  3892. // String returns the string representation
  3893. func (s CreateExportTaskInput) String() string {
  3894. return awsutil.Prettify(s)
  3895. }
  3896. // GoString returns the string representation
  3897. func (s CreateExportTaskInput) GoString() string {
  3898. return s.String()
  3899. }
  3900. // Validate inspects the fields of the type to determine if they are valid.
  3901. func (s *CreateExportTaskInput) Validate() error {
  3902. invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"}
  3903. if s.Destination == nil {
  3904. invalidParams.Add(request.NewErrParamRequired("Destination"))
  3905. }
  3906. if s.Destination != nil && len(*s.Destination) < 1 {
  3907. invalidParams.Add(request.NewErrParamMinLen("Destination", 1))
  3908. }
  3909. if s.From == nil {
  3910. invalidParams.Add(request.NewErrParamRequired("From"))
  3911. }
  3912. if s.LogGroupName == nil {
  3913. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  3914. }
  3915. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  3916. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  3917. }
  3918. if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 {
  3919. invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1))
  3920. }
  3921. if s.TaskName != nil && len(*s.TaskName) < 1 {
  3922. invalidParams.Add(request.NewErrParamMinLen("TaskName", 1))
  3923. }
  3924. if s.To == nil {
  3925. invalidParams.Add(request.NewErrParamRequired("To"))
  3926. }
  3927. if invalidParams.Len() > 0 {
  3928. return invalidParams
  3929. }
  3930. return nil
  3931. }
  3932. // SetDestination sets the Destination field's value.
  3933. func (s *CreateExportTaskInput) SetDestination(v string) *CreateExportTaskInput {
  3934. s.Destination = &v
  3935. return s
  3936. }
  3937. // SetDestinationPrefix sets the DestinationPrefix field's value.
  3938. func (s *CreateExportTaskInput) SetDestinationPrefix(v string) *CreateExportTaskInput {
  3939. s.DestinationPrefix = &v
  3940. return s
  3941. }
  3942. // SetFrom sets the From field's value.
  3943. func (s *CreateExportTaskInput) SetFrom(v int64) *CreateExportTaskInput {
  3944. s.From = &v
  3945. return s
  3946. }
  3947. // SetLogGroupName sets the LogGroupName field's value.
  3948. func (s *CreateExportTaskInput) SetLogGroupName(v string) *CreateExportTaskInput {
  3949. s.LogGroupName = &v
  3950. return s
  3951. }
  3952. // SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value.
  3953. func (s *CreateExportTaskInput) SetLogStreamNamePrefix(v string) *CreateExportTaskInput {
  3954. s.LogStreamNamePrefix = &v
  3955. return s
  3956. }
  3957. // SetTaskName sets the TaskName field's value.
  3958. func (s *CreateExportTaskInput) SetTaskName(v string) *CreateExportTaskInput {
  3959. s.TaskName = &v
  3960. return s
  3961. }
  3962. // SetTo sets the To field's value.
  3963. func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput {
  3964. s.To = &v
  3965. return s
  3966. }
  3967. type CreateExportTaskOutput struct {
  3968. _ struct{} `type:"structure"`
  3969. // The ID of the export task.
  3970. TaskId *string `locationName:"taskId" min:"1" type:"string"`
  3971. }
  3972. // String returns the string representation
  3973. func (s CreateExportTaskOutput) String() string {
  3974. return awsutil.Prettify(s)
  3975. }
  3976. // GoString returns the string representation
  3977. func (s CreateExportTaskOutput) GoString() string {
  3978. return s.String()
  3979. }
  3980. // SetTaskId sets the TaskId field's value.
  3981. func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput {
  3982. s.TaskId = &v
  3983. return s
  3984. }
  3985. type CreateLogGroupInput struct {
  3986. _ struct{} `type:"structure"`
  3987. // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
  3988. // For more information, see Amazon Resource Names - AWS Key Management Service
  3989. // (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms).
  3990. KmsKeyId *string `locationName:"kmsKeyId" type:"string"`
  3991. // The name of the log group.
  3992. //
  3993. // LogGroupName is a required field
  3994. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  3995. // The key-value pairs to use for the tags.
  3996. Tags map[string]*string `locationName:"tags" min:"1" type:"map"`
  3997. }
  3998. // String returns the string representation
  3999. func (s CreateLogGroupInput) String() string {
  4000. return awsutil.Prettify(s)
  4001. }
  4002. // GoString returns the string representation
  4003. func (s CreateLogGroupInput) GoString() string {
  4004. return s.String()
  4005. }
  4006. // Validate inspects the fields of the type to determine if they are valid.
  4007. func (s *CreateLogGroupInput) Validate() error {
  4008. invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"}
  4009. if s.LogGroupName == nil {
  4010. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  4011. }
  4012. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4013. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4014. }
  4015. if s.Tags != nil && len(s.Tags) < 1 {
  4016. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  4017. }
  4018. if invalidParams.Len() > 0 {
  4019. return invalidParams
  4020. }
  4021. return nil
  4022. }
  4023. // SetKmsKeyId sets the KmsKeyId field's value.
  4024. func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput {
  4025. s.KmsKeyId = &v
  4026. return s
  4027. }
  4028. // SetLogGroupName sets the LogGroupName field's value.
  4029. func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput {
  4030. s.LogGroupName = &v
  4031. return s
  4032. }
  4033. // SetTags sets the Tags field's value.
  4034. func (s *CreateLogGroupInput) SetTags(v map[string]*string) *CreateLogGroupInput {
  4035. s.Tags = v
  4036. return s
  4037. }
  4038. type CreateLogGroupOutput struct {
  4039. _ struct{} `type:"structure"`
  4040. }
  4041. // String returns the string representation
  4042. func (s CreateLogGroupOutput) String() string {
  4043. return awsutil.Prettify(s)
  4044. }
  4045. // GoString returns the string representation
  4046. func (s CreateLogGroupOutput) GoString() string {
  4047. return s.String()
  4048. }
  4049. type CreateLogStreamInput struct {
  4050. _ struct{} `type:"structure"`
  4051. // The name of the log group.
  4052. //
  4053. // LogGroupName is a required field
  4054. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  4055. // The name of the log stream.
  4056. //
  4057. // LogStreamName is a required field
  4058. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
  4059. }
  4060. // String returns the string representation
  4061. func (s CreateLogStreamInput) String() string {
  4062. return awsutil.Prettify(s)
  4063. }
  4064. // GoString returns the string representation
  4065. func (s CreateLogStreamInput) GoString() string {
  4066. return s.String()
  4067. }
  4068. // Validate inspects the fields of the type to determine if they are valid.
  4069. func (s *CreateLogStreamInput) Validate() error {
  4070. invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"}
  4071. if s.LogGroupName == nil {
  4072. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  4073. }
  4074. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4075. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4076. }
  4077. if s.LogStreamName == nil {
  4078. invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
  4079. }
  4080. if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
  4081. invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
  4082. }
  4083. if invalidParams.Len() > 0 {
  4084. return invalidParams
  4085. }
  4086. return nil
  4087. }
  4088. // SetLogGroupName sets the LogGroupName field's value.
  4089. func (s *CreateLogStreamInput) SetLogGroupName(v string) *CreateLogStreamInput {
  4090. s.LogGroupName = &v
  4091. return s
  4092. }
  4093. // SetLogStreamName sets the LogStreamName field's value.
  4094. func (s *CreateLogStreamInput) SetLogStreamName(v string) *CreateLogStreamInput {
  4095. s.LogStreamName = &v
  4096. return s
  4097. }
  4098. type CreateLogStreamOutput struct {
  4099. _ struct{} `type:"structure"`
  4100. }
  4101. // String returns the string representation
  4102. func (s CreateLogStreamOutput) String() string {
  4103. return awsutil.Prettify(s)
  4104. }
  4105. // GoString returns the string representation
  4106. func (s CreateLogStreamOutput) GoString() string {
  4107. return s.String()
  4108. }
  4109. type DeleteDestinationInput struct {
  4110. _ struct{} `type:"structure"`
  4111. // The name of the destination.
  4112. //
  4113. // DestinationName is a required field
  4114. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
  4115. }
  4116. // String returns the string representation
  4117. func (s DeleteDestinationInput) String() string {
  4118. return awsutil.Prettify(s)
  4119. }
  4120. // GoString returns the string representation
  4121. func (s DeleteDestinationInput) GoString() string {
  4122. return s.String()
  4123. }
  4124. // Validate inspects the fields of the type to determine if they are valid.
  4125. func (s *DeleteDestinationInput) Validate() error {
  4126. invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"}
  4127. if s.DestinationName == nil {
  4128. invalidParams.Add(request.NewErrParamRequired("DestinationName"))
  4129. }
  4130. if s.DestinationName != nil && len(*s.DestinationName) < 1 {
  4131. invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
  4132. }
  4133. if invalidParams.Len() > 0 {
  4134. return invalidParams
  4135. }
  4136. return nil
  4137. }
  4138. // SetDestinationName sets the DestinationName field's value.
  4139. func (s *DeleteDestinationInput) SetDestinationName(v string) *DeleteDestinationInput {
  4140. s.DestinationName = &v
  4141. return s
  4142. }
  4143. type DeleteDestinationOutput struct {
  4144. _ struct{} `type:"structure"`
  4145. }
  4146. // String returns the string representation
  4147. func (s DeleteDestinationOutput) String() string {
  4148. return awsutil.Prettify(s)
  4149. }
  4150. // GoString returns the string representation
  4151. func (s DeleteDestinationOutput) GoString() string {
  4152. return s.String()
  4153. }
  4154. type DeleteLogGroupInput struct {
  4155. _ struct{} `type:"structure"`
  4156. // The name of the log group.
  4157. //
  4158. // LogGroupName is a required field
  4159. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  4160. }
  4161. // String returns the string representation
  4162. func (s DeleteLogGroupInput) String() string {
  4163. return awsutil.Prettify(s)
  4164. }
  4165. // GoString returns the string representation
  4166. func (s DeleteLogGroupInput) GoString() string {
  4167. return s.String()
  4168. }
  4169. // Validate inspects the fields of the type to determine if they are valid.
  4170. func (s *DeleteLogGroupInput) Validate() error {
  4171. invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"}
  4172. if s.LogGroupName == nil {
  4173. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  4174. }
  4175. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4176. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4177. }
  4178. if invalidParams.Len() > 0 {
  4179. return invalidParams
  4180. }
  4181. return nil
  4182. }
  4183. // SetLogGroupName sets the LogGroupName field's value.
  4184. func (s *DeleteLogGroupInput) SetLogGroupName(v string) *DeleteLogGroupInput {
  4185. s.LogGroupName = &v
  4186. return s
  4187. }
  4188. type DeleteLogGroupOutput struct {
  4189. _ struct{} `type:"structure"`
  4190. }
  4191. // String returns the string representation
  4192. func (s DeleteLogGroupOutput) String() string {
  4193. return awsutil.Prettify(s)
  4194. }
  4195. // GoString returns the string representation
  4196. func (s DeleteLogGroupOutput) GoString() string {
  4197. return s.String()
  4198. }
  4199. type DeleteLogStreamInput struct {
  4200. _ struct{} `type:"structure"`
  4201. // The name of the log group.
  4202. //
  4203. // LogGroupName is a required field
  4204. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  4205. // The name of the log stream.
  4206. //
  4207. // LogStreamName is a required field
  4208. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
  4209. }
  4210. // String returns the string representation
  4211. func (s DeleteLogStreamInput) String() string {
  4212. return awsutil.Prettify(s)
  4213. }
  4214. // GoString returns the string representation
  4215. func (s DeleteLogStreamInput) GoString() string {
  4216. return s.String()
  4217. }
  4218. // Validate inspects the fields of the type to determine if they are valid.
  4219. func (s *DeleteLogStreamInput) Validate() error {
  4220. invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"}
  4221. if s.LogGroupName == nil {
  4222. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  4223. }
  4224. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4225. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4226. }
  4227. if s.LogStreamName == nil {
  4228. invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
  4229. }
  4230. if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
  4231. invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
  4232. }
  4233. if invalidParams.Len() > 0 {
  4234. return invalidParams
  4235. }
  4236. return nil
  4237. }
  4238. // SetLogGroupName sets the LogGroupName field's value.
  4239. func (s *DeleteLogStreamInput) SetLogGroupName(v string) *DeleteLogStreamInput {
  4240. s.LogGroupName = &v
  4241. return s
  4242. }
  4243. // SetLogStreamName sets the LogStreamName field's value.
  4244. func (s *DeleteLogStreamInput) SetLogStreamName(v string) *DeleteLogStreamInput {
  4245. s.LogStreamName = &v
  4246. return s
  4247. }
  4248. type DeleteLogStreamOutput struct {
  4249. _ struct{} `type:"structure"`
  4250. }
  4251. // String returns the string representation
  4252. func (s DeleteLogStreamOutput) String() string {
  4253. return awsutil.Prettify(s)
  4254. }
  4255. // GoString returns the string representation
  4256. func (s DeleteLogStreamOutput) GoString() string {
  4257. return s.String()
  4258. }
  4259. type DeleteMetricFilterInput struct {
  4260. _ struct{} `type:"structure"`
  4261. // The name of the metric filter.
  4262. //
  4263. // FilterName is a required field
  4264. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
  4265. // The name of the log group.
  4266. //
  4267. // LogGroupName is a required field
  4268. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  4269. }
  4270. // String returns the string representation
  4271. func (s DeleteMetricFilterInput) String() string {
  4272. return awsutil.Prettify(s)
  4273. }
  4274. // GoString returns the string representation
  4275. func (s DeleteMetricFilterInput) GoString() string {
  4276. return s.String()
  4277. }
  4278. // Validate inspects the fields of the type to determine if they are valid.
  4279. func (s *DeleteMetricFilterInput) Validate() error {
  4280. invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"}
  4281. if s.FilterName == nil {
  4282. invalidParams.Add(request.NewErrParamRequired("FilterName"))
  4283. }
  4284. if s.FilterName != nil && len(*s.FilterName) < 1 {
  4285. invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
  4286. }
  4287. if s.LogGroupName == nil {
  4288. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  4289. }
  4290. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4291. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4292. }
  4293. if invalidParams.Len() > 0 {
  4294. return invalidParams
  4295. }
  4296. return nil
  4297. }
  4298. // SetFilterName sets the FilterName field's value.
  4299. func (s *DeleteMetricFilterInput) SetFilterName(v string) *DeleteMetricFilterInput {
  4300. s.FilterName = &v
  4301. return s
  4302. }
  4303. // SetLogGroupName sets the LogGroupName field's value.
  4304. func (s *DeleteMetricFilterInput) SetLogGroupName(v string) *DeleteMetricFilterInput {
  4305. s.LogGroupName = &v
  4306. return s
  4307. }
  4308. type DeleteMetricFilterOutput struct {
  4309. _ struct{} `type:"structure"`
  4310. }
  4311. // String returns the string representation
  4312. func (s DeleteMetricFilterOutput) String() string {
  4313. return awsutil.Prettify(s)
  4314. }
  4315. // GoString returns the string representation
  4316. func (s DeleteMetricFilterOutput) GoString() string {
  4317. return s.String()
  4318. }
  4319. type DeleteResourcePolicyInput struct {
  4320. _ struct{} `type:"structure"`
  4321. // The name of the policy to be revoked. This parameter is required.
  4322. PolicyName *string `locationName:"policyName" type:"string"`
  4323. }
  4324. // String returns the string representation
  4325. func (s DeleteResourcePolicyInput) String() string {
  4326. return awsutil.Prettify(s)
  4327. }
  4328. // GoString returns the string representation
  4329. func (s DeleteResourcePolicyInput) GoString() string {
  4330. return s.String()
  4331. }
  4332. // SetPolicyName sets the PolicyName field's value.
  4333. func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput {
  4334. s.PolicyName = &v
  4335. return s
  4336. }
  4337. type DeleteResourcePolicyOutput struct {
  4338. _ struct{} `type:"structure"`
  4339. }
  4340. // String returns the string representation
  4341. func (s DeleteResourcePolicyOutput) String() string {
  4342. return awsutil.Prettify(s)
  4343. }
  4344. // GoString returns the string representation
  4345. func (s DeleteResourcePolicyOutput) GoString() string {
  4346. return s.String()
  4347. }
  4348. type DeleteRetentionPolicyInput struct {
  4349. _ struct{} `type:"structure"`
  4350. // The name of the log group.
  4351. //
  4352. // LogGroupName is a required field
  4353. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  4354. }
  4355. // String returns the string representation
  4356. func (s DeleteRetentionPolicyInput) String() string {
  4357. return awsutil.Prettify(s)
  4358. }
  4359. // GoString returns the string representation
  4360. func (s DeleteRetentionPolicyInput) GoString() string {
  4361. return s.String()
  4362. }
  4363. // Validate inspects the fields of the type to determine if they are valid.
  4364. func (s *DeleteRetentionPolicyInput) Validate() error {
  4365. invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"}
  4366. if s.LogGroupName == nil {
  4367. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  4368. }
  4369. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4370. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4371. }
  4372. if invalidParams.Len() > 0 {
  4373. return invalidParams
  4374. }
  4375. return nil
  4376. }
  4377. // SetLogGroupName sets the LogGroupName field's value.
  4378. func (s *DeleteRetentionPolicyInput) SetLogGroupName(v string) *DeleteRetentionPolicyInput {
  4379. s.LogGroupName = &v
  4380. return s
  4381. }
  4382. type DeleteRetentionPolicyOutput struct {
  4383. _ struct{} `type:"structure"`
  4384. }
  4385. // String returns the string representation
  4386. func (s DeleteRetentionPolicyOutput) String() string {
  4387. return awsutil.Prettify(s)
  4388. }
  4389. // GoString returns the string representation
  4390. func (s DeleteRetentionPolicyOutput) GoString() string {
  4391. return s.String()
  4392. }
  4393. type DeleteSubscriptionFilterInput struct {
  4394. _ struct{} `type:"structure"`
  4395. // The name of the subscription filter.
  4396. //
  4397. // FilterName is a required field
  4398. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
  4399. // The name of the log group.
  4400. //
  4401. // LogGroupName is a required field
  4402. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  4403. }
  4404. // String returns the string representation
  4405. func (s DeleteSubscriptionFilterInput) String() string {
  4406. return awsutil.Prettify(s)
  4407. }
  4408. // GoString returns the string representation
  4409. func (s DeleteSubscriptionFilterInput) GoString() string {
  4410. return s.String()
  4411. }
  4412. // Validate inspects the fields of the type to determine if they are valid.
  4413. func (s *DeleteSubscriptionFilterInput) Validate() error {
  4414. invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"}
  4415. if s.FilterName == nil {
  4416. invalidParams.Add(request.NewErrParamRequired("FilterName"))
  4417. }
  4418. if s.FilterName != nil && len(*s.FilterName) < 1 {
  4419. invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
  4420. }
  4421. if s.LogGroupName == nil {
  4422. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  4423. }
  4424. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4425. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4426. }
  4427. if invalidParams.Len() > 0 {
  4428. return invalidParams
  4429. }
  4430. return nil
  4431. }
  4432. // SetFilterName sets the FilterName field's value.
  4433. func (s *DeleteSubscriptionFilterInput) SetFilterName(v string) *DeleteSubscriptionFilterInput {
  4434. s.FilterName = &v
  4435. return s
  4436. }
  4437. // SetLogGroupName sets the LogGroupName field's value.
  4438. func (s *DeleteSubscriptionFilterInput) SetLogGroupName(v string) *DeleteSubscriptionFilterInput {
  4439. s.LogGroupName = &v
  4440. return s
  4441. }
  4442. type DeleteSubscriptionFilterOutput struct {
  4443. _ struct{} `type:"structure"`
  4444. }
  4445. // String returns the string representation
  4446. func (s DeleteSubscriptionFilterOutput) String() string {
  4447. return awsutil.Prettify(s)
  4448. }
  4449. // GoString returns the string representation
  4450. func (s DeleteSubscriptionFilterOutput) GoString() string {
  4451. return s.String()
  4452. }
  4453. type DescribeDestinationsInput struct {
  4454. _ struct{} `type:"structure"`
  4455. // The prefix to match. If you don't specify a value, no prefix filter is applied.
  4456. DestinationNamePrefix *string `min:"1" type:"string"`
  4457. // The maximum number of items returned. If you don't specify a value, the default
  4458. // is up to 50 items.
  4459. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  4460. // The token for the next set of items to return. (You received this token from
  4461. // a previous call.)
  4462. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4463. }
  4464. // String returns the string representation
  4465. func (s DescribeDestinationsInput) String() string {
  4466. return awsutil.Prettify(s)
  4467. }
  4468. // GoString returns the string representation
  4469. func (s DescribeDestinationsInput) GoString() string {
  4470. return s.String()
  4471. }
  4472. // Validate inspects the fields of the type to determine if they are valid.
  4473. func (s *DescribeDestinationsInput) Validate() error {
  4474. invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"}
  4475. if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 {
  4476. invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1))
  4477. }
  4478. if s.Limit != nil && *s.Limit < 1 {
  4479. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4480. }
  4481. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4482. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4483. }
  4484. if invalidParams.Len() > 0 {
  4485. return invalidParams
  4486. }
  4487. return nil
  4488. }
  4489. // SetDestinationNamePrefix sets the DestinationNamePrefix field's value.
  4490. func (s *DescribeDestinationsInput) SetDestinationNamePrefix(v string) *DescribeDestinationsInput {
  4491. s.DestinationNamePrefix = &v
  4492. return s
  4493. }
  4494. // SetLimit sets the Limit field's value.
  4495. func (s *DescribeDestinationsInput) SetLimit(v int64) *DescribeDestinationsInput {
  4496. s.Limit = &v
  4497. return s
  4498. }
  4499. // SetNextToken sets the NextToken field's value.
  4500. func (s *DescribeDestinationsInput) SetNextToken(v string) *DescribeDestinationsInput {
  4501. s.NextToken = &v
  4502. return s
  4503. }
  4504. type DescribeDestinationsOutput struct {
  4505. _ struct{} `type:"structure"`
  4506. // The destinations.
  4507. Destinations []*Destination `locationName:"destinations" type:"list"`
  4508. // The token for the next set of items to return. The token expires after 24
  4509. // hours.
  4510. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4511. }
  4512. // String returns the string representation
  4513. func (s DescribeDestinationsOutput) String() string {
  4514. return awsutil.Prettify(s)
  4515. }
  4516. // GoString returns the string representation
  4517. func (s DescribeDestinationsOutput) GoString() string {
  4518. return s.String()
  4519. }
  4520. // SetDestinations sets the Destinations field's value.
  4521. func (s *DescribeDestinationsOutput) SetDestinations(v []*Destination) *DescribeDestinationsOutput {
  4522. s.Destinations = v
  4523. return s
  4524. }
  4525. // SetNextToken sets the NextToken field's value.
  4526. func (s *DescribeDestinationsOutput) SetNextToken(v string) *DescribeDestinationsOutput {
  4527. s.NextToken = &v
  4528. return s
  4529. }
  4530. type DescribeExportTasksInput struct {
  4531. _ struct{} `type:"structure"`
  4532. // The maximum number of items returned. If you don't specify a value, the default
  4533. // is up to 50 items.
  4534. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  4535. // The token for the next set of items to return. (You received this token from
  4536. // a previous call.)
  4537. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4538. // The status code of the export task. Specifying a status code filters the
  4539. // results to zero or more export tasks.
  4540. StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"`
  4541. // The ID of the export task. Specifying a task ID filters the results to zero
  4542. // or one export tasks.
  4543. TaskId *string `locationName:"taskId" min:"1" type:"string"`
  4544. }
  4545. // String returns the string representation
  4546. func (s DescribeExportTasksInput) String() string {
  4547. return awsutil.Prettify(s)
  4548. }
  4549. // GoString returns the string representation
  4550. func (s DescribeExportTasksInput) GoString() string {
  4551. return s.String()
  4552. }
  4553. // Validate inspects the fields of the type to determine if they are valid.
  4554. func (s *DescribeExportTasksInput) Validate() error {
  4555. invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"}
  4556. if s.Limit != nil && *s.Limit < 1 {
  4557. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4558. }
  4559. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4560. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4561. }
  4562. if s.TaskId != nil && len(*s.TaskId) < 1 {
  4563. invalidParams.Add(request.NewErrParamMinLen("TaskId", 1))
  4564. }
  4565. if invalidParams.Len() > 0 {
  4566. return invalidParams
  4567. }
  4568. return nil
  4569. }
  4570. // SetLimit sets the Limit field's value.
  4571. func (s *DescribeExportTasksInput) SetLimit(v int64) *DescribeExportTasksInput {
  4572. s.Limit = &v
  4573. return s
  4574. }
  4575. // SetNextToken sets the NextToken field's value.
  4576. func (s *DescribeExportTasksInput) SetNextToken(v string) *DescribeExportTasksInput {
  4577. s.NextToken = &v
  4578. return s
  4579. }
  4580. // SetStatusCode sets the StatusCode field's value.
  4581. func (s *DescribeExportTasksInput) SetStatusCode(v string) *DescribeExportTasksInput {
  4582. s.StatusCode = &v
  4583. return s
  4584. }
  4585. // SetTaskId sets the TaskId field's value.
  4586. func (s *DescribeExportTasksInput) SetTaskId(v string) *DescribeExportTasksInput {
  4587. s.TaskId = &v
  4588. return s
  4589. }
  4590. type DescribeExportTasksOutput struct {
  4591. _ struct{} `type:"structure"`
  4592. // The export tasks.
  4593. ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"`
  4594. // The token for the next set of items to return. The token expires after 24
  4595. // hours.
  4596. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4597. }
  4598. // String returns the string representation
  4599. func (s DescribeExportTasksOutput) String() string {
  4600. return awsutil.Prettify(s)
  4601. }
  4602. // GoString returns the string representation
  4603. func (s DescribeExportTasksOutput) GoString() string {
  4604. return s.String()
  4605. }
  4606. // SetExportTasks sets the ExportTasks field's value.
  4607. func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput {
  4608. s.ExportTasks = v
  4609. return s
  4610. }
  4611. // SetNextToken sets the NextToken field's value.
  4612. func (s *DescribeExportTasksOutput) SetNextToken(v string) *DescribeExportTasksOutput {
  4613. s.NextToken = &v
  4614. return s
  4615. }
  4616. type DescribeLogGroupsInput struct {
  4617. _ struct{} `type:"structure"`
  4618. // The maximum number of items returned. If you don't specify a value, the default
  4619. // is up to 50 items.
  4620. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  4621. // The prefix to match.
  4622. LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"`
  4623. // The token for the next set of items to return. (You received this token from
  4624. // a previous call.)
  4625. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4626. }
  4627. // String returns the string representation
  4628. func (s DescribeLogGroupsInput) String() string {
  4629. return awsutil.Prettify(s)
  4630. }
  4631. // GoString returns the string representation
  4632. func (s DescribeLogGroupsInput) GoString() string {
  4633. return s.String()
  4634. }
  4635. // Validate inspects the fields of the type to determine if they are valid.
  4636. func (s *DescribeLogGroupsInput) Validate() error {
  4637. invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"}
  4638. if s.Limit != nil && *s.Limit < 1 {
  4639. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4640. }
  4641. if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 {
  4642. invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1))
  4643. }
  4644. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4645. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4646. }
  4647. if invalidParams.Len() > 0 {
  4648. return invalidParams
  4649. }
  4650. return nil
  4651. }
  4652. // SetLimit sets the Limit field's value.
  4653. func (s *DescribeLogGroupsInput) SetLimit(v int64) *DescribeLogGroupsInput {
  4654. s.Limit = &v
  4655. return s
  4656. }
  4657. // SetLogGroupNamePrefix sets the LogGroupNamePrefix field's value.
  4658. func (s *DescribeLogGroupsInput) SetLogGroupNamePrefix(v string) *DescribeLogGroupsInput {
  4659. s.LogGroupNamePrefix = &v
  4660. return s
  4661. }
  4662. // SetNextToken sets the NextToken field's value.
  4663. func (s *DescribeLogGroupsInput) SetNextToken(v string) *DescribeLogGroupsInput {
  4664. s.NextToken = &v
  4665. return s
  4666. }
  4667. type DescribeLogGroupsOutput struct {
  4668. _ struct{} `type:"structure"`
  4669. // The log groups.
  4670. LogGroups []*LogGroup `locationName:"logGroups" type:"list"`
  4671. // The token for the next set of items to return. The token expires after 24
  4672. // hours.
  4673. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4674. }
  4675. // String returns the string representation
  4676. func (s DescribeLogGroupsOutput) String() string {
  4677. return awsutil.Prettify(s)
  4678. }
  4679. // GoString returns the string representation
  4680. func (s DescribeLogGroupsOutput) GoString() string {
  4681. return s.String()
  4682. }
  4683. // SetLogGroups sets the LogGroups field's value.
  4684. func (s *DescribeLogGroupsOutput) SetLogGroups(v []*LogGroup) *DescribeLogGroupsOutput {
  4685. s.LogGroups = v
  4686. return s
  4687. }
  4688. // SetNextToken sets the NextToken field's value.
  4689. func (s *DescribeLogGroupsOutput) SetNextToken(v string) *DescribeLogGroupsOutput {
  4690. s.NextToken = &v
  4691. return s
  4692. }
  4693. type DescribeLogStreamsInput struct {
  4694. _ struct{} `type:"structure"`
  4695. // If the value is true, results are returned in descending order. If the value
  4696. // is to false, results are returned in ascending order. The default value is
  4697. // false.
  4698. Descending *bool `locationName:"descending" type:"boolean"`
  4699. // The maximum number of items returned. If you don't specify a value, the default
  4700. // is up to 50 items.
  4701. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  4702. // The name of the log group.
  4703. //
  4704. // LogGroupName is a required field
  4705. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  4706. // The prefix to match.
  4707. //
  4708. // If orderBy is LastEventTime,you cannot specify this parameter.
  4709. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"`
  4710. // The token for the next set of items to return. (You received this token from
  4711. // a previous call.)
  4712. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4713. // If the value is LogStreamName, the results are ordered by log stream name.
  4714. // If the value is LastEventTime, the results are ordered by the event time.
  4715. // The default value is LogStreamName.
  4716. //
  4717. // If you order the results by event time, you cannot specify the logStreamNamePrefix
  4718. // parameter.
  4719. //
  4720. // lastEventTimestamp represents the time of the most recent log event in the
  4721. // log stream in CloudWatch Logs. This number is expressed as the number of
  4722. // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimeStamp updates on
  4723. // an eventual consistency basis. It typically updates in less than an hour
  4724. // from ingestion, but may take longer in some rare situations.
  4725. OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"`
  4726. }
  4727. // String returns the string representation
  4728. func (s DescribeLogStreamsInput) String() string {
  4729. return awsutil.Prettify(s)
  4730. }
  4731. // GoString returns the string representation
  4732. func (s DescribeLogStreamsInput) GoString() string {
  4733. return s.String()
  4734. }
  4735. // Validate inspects the fields of the type to determine if they are valid.
  4736. func (s *DescribeLogStreamsInput) Validate() error {
  4737. invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"}
  4738. if s.Limit != nil && *s.Limit < 1 {
  4739. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4740. }
  4741. if s.LogGroupName == nil {
  4742. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  4743. }
  4744. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4745. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4746. }
  4747. if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 {
  4748. invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1))
  4749. }
  4750. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4751. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4752. }
  4753. if invalidParams.Len() > 0 {
  4754. return invalidParams
  4755. }
  4756. return nil
  4757. }
  4758. // SetDescending sets the Descending field's value.
  4759. func (s *DescribeLogStreamsInput) SetDescending(v bool) *DescribeLogStreamsInput {
  4760. s.Descending = &v
  4761. return s
  4762. }
  4763. // SetLimit sets the Limit field's value.
  4764. func (s *DescribeLogStreamsInput) SetLimit(v int64) *DescribeLogStreamsInput {
  4765. s.Limit = &v
  4766. return s
  4767. }
  4768. // SetLogGroupName sets the LogGroupName field's value.
  4769. func (s *DescribeLogStreamsInput) SetLogGroupName(v string) *DescribeLogStreamsInput {
  4770. s.LogGroupName = &v
  4771. return s
  4772. }
  4773. // SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value.
  4774. func (s *DescribeLogStreamsInput) SetLogStreamNamePrefix(v string) *DescribeLogStreamsInput {
  4775. s.LogStreamNamePrefix = &v
  4776. return s
  4777. }
  4778. // SetNextToken sets the NextToken field's value.
  4779. func (s *DescribeLogStreamsInput) SetNextToken(v string) *DescribeLogStreamsInput {
  4780. s.NextToken = &v
  4781. return s
  4782. }
  4783. // SetOrderBy sets the OrderBy field's value.
  4784. func (s *DescribeLogStreamsInput) SetOrderBy(v string) *DescribeLogStreamsInput {
  4785. s.OrderBy = &v
  4786. return s
  4787. }
  4788. type DescribeLogStreamsOutput struct {
  4789. _ struct{} `type:"structure"`
  4790. // The log streams.
  4791. LogStreams []*LogStream `locationName:"logStreams" type:"list"`
  4792. // The token for the next set of items to return. The token expires after 24
  4793. // hours.
  4794. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4795. }
  4796. // String returns the string representation
  4797. func (s DescribeLogStreamsOutput) String() string {
  4798. return awsutil.Prettify(s)
  4799. }
  4800. // GoString returns the string representation
  4801. func (s DescribeLogStreamsOutput) GoString() string {
  4802. return s.String()
  4803. }
  4804. // SetLogStreams sets the LogStreams field's value.
  4805. func (s *DescribeLogStreamsOutput) SetLogStreams(v []*LogStream) *DescribeLogStreamsOutput {
  4806. s.LogStreams = v
  4807. return s
  4808. }
  4809. // SetNextToken sets the NextToken field's value.
  4810. func (s *DescribeLogStreamsOutput) SetNextToken(v string) *DescribeLogStreamsOutput {
  4811. s.NextToken = &v
  4812. return s
  4813. }
  4814. type DescribeMetricFiltersInput struct {
  4815. _ struct{} `type:"structure"`
  4816. // The prefix to match.
  4817. FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"`
  4818. // The maximum number of items returned. If you don't specify a value, the default
  4819. // is up to 50 items.
  4820. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  4821. // The name of the log group.
  4822. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  4823. // Filters results to include only those with the specified metric name. If
  4824. // you include this parameter in your request, you must also include the metricNamespace
  4825. // parameter.
  4826. MetricName *string `locationName:"metricName" type:"string"`
  4827. // Filters results to include only those in the specified namespace. If you
  4828. // include this parameter in your request, you must also include the metricName
  4829. // parameter.
  4830. MetricNamespace *string `locationName:"metricNamespace" type:"string"`
  4831. // The token for the next set of items to return. (You received this token from
  4832. // a previous call.)
  4833. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4834. }
  4835. // String returns the string representation
  4836. func (s DescribeMetricFiltersInput) String() string {
  4837. return awsutil.Prettify(s)
  4838. }
  4839. // GoString returns the string representation
  4840. func (s DescribeMetricFiltersInput) GoString() string {
  4841. return s.String()
  4842. }
  4843. // Validate inspects the fields of the type to determine if they are valid.
  4844. func (s *DescribeMetricFiltersInput) Validate() error {
  4845. invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"}
  4846. if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 {
  4847. invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1))
  4848. }
  4849. if s.Limit != nil && *s.Limit < 1 {
  4850. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4851. }
  4852. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4853. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4854. }
  4855. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4856. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4857. }
  4858. if invalidParams.Len() > 0 {
  4859. return invalidParams
  4860. }
  4861. return nil
  4862. }
  4863. // SetFilterNamePrefix sets the FilterNamePrefix field's value.
  4864. func (s *DescribeMetricFiltersInput) SetFilterNamePrefix(v string) *DescribeMetricFiltersInput {
  4865. s.FilterNamePrefix = &v
  4866. return s
  4867. }
  4868. // SetLimit sets the Limit field's value.
  4869. func (s *DescribeMetricFiltersInput) SetLimit(v int64) *DescribeMetricFiltersInput {
  4870. s.Limit = &v
  4871. return s
  4872. }
  4873. // SetLogGroupName sets the LogGroupName field's value.
  4874. func (s *DescribeMetricFiltersInput) SetLogGroupName(v string) *DescribeMetricFiltersInput {
  4875. s.LogGroupName = &v
  4876. return s
  4877. }
  4878. // SetMetricName sets the MetricName field's value.
  4879. func (s *DescribeMetricFiltersInput) SetMetricName(v string) *DescribeMetricFiltersInput {
  4880. s.MetricName = &v
  4881. return s
  4882. }
  4883. // SetMetricNamespace sets the MetricNamespace field's value.
  4884. func (s *DescribeMetricFiltersInput) SetMetricNamespace(v string) *DescribeMetricFiltersInput {
  4885. s.MetricNamespace = &v
  4886. return s
  4887. }
  4888. // SetNextToken sets the NextToken field's value.
  4889. func (s *DescribeMetricFiltersInput) SetNextToken(v string) *DescribeMetricFiltersInput {
  4890. s.NextToken = &v
  4891. return s
  4892. }
  4893. type DescribeMetricFiltersOutput struct {
  4894. _ struct{} `type:"structure"`
  4895. // The metric filters.
  4896. MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"`
  4897. // The token for the next set of items to return. The token expires after 24
  4898. // hours.
  4899. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4900. }
  4901. // String returns the string representation
  4902. func (s DescribeMetricFiltersOutput) String() string {
  4903. return awsutil.Prettify(s)
  4904. }
  4905. // GoString returns the string representation
  4906. func (s DescribeMetricFiltersOutput) GoString() string {
  4907. return s.String()
  4908. }
  4909. // SetMetricFilters sets the MetricFilters field's value.
  4910. func (s *DescribeMetricFiltersOutput) SetMetricFilters(v []*MetricFilter) *DescribeMetricFiltersOutput {
  4911. s.MetricFilters = v
  4912. return s
  4913. }
  4914. // SetNextToken sets the NextToken field's value.
  4915. func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFiltersOutput {
  4916. s.NextToken = &v
  4917. return s
  4918. }
  4919. type DescribeQueriesInput struct {
  4920. _ struct{} `type:"structure"`
  4921. // Limits the returned queries to only those for the specified log group.
  4922. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  4923. // Limits the number of returned queries to the specified number.
  4924. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  4925. // The token for the next set of items to return. The token expires after 24
  4926. // hours.
  4927. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4928. // Limits the returned queries to only those that have the specified status.
  4929. // Valid values are Cancelled, Complete, Failed, Running, and Scheduled.
  4930. Status *string `locationName:"status" type:"string" enum:"QueryStatus"`
  4931. }
  4932. // String returns the string representation
  4933. func (s DescribeQueriesInput) String() string {
  4934. return awsutil.Prettify(s)
  4935. }
  4936. // GoString returns the string representation
  4937. func (s DescribeQueriesInput) GoString() string {
  4938. return s.String()
  4939. }
  4940. // Validate inspects the fields of the type to determine if they are valid.
  4941. func (s *DescribeQueriesInput) Validate() error {
  4942. invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"}
  4943. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  4944. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  4945. }
  4946. if s.MaxResults != nil && *s.MaxResults < 1 {
  4947. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  4948. }
  4949. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4950. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4951. }
  4952. if invalidParams.Len() > 0 {
  4953. return invalidParams
  4954. }
  4955. return nil
  4956. }
  4957. // SetLogGroupName sets the LogGroupName field's value.
  4958. func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput {
  4959. s.LogGroupName = &v
  4960. return s
  4961. }
  4962. // SetMaxResults sets the MaxResults field's value.
  4963. func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput {
  4964. s.MaxResults = &v
  4965. return s
  4966. }
  4967. // SetNextToken sets the NextToken field's value.
  4968. func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput {
  4969. s.NextToken = &v
  4970. return s
  4971. }
  4972. // SetStatus sets the Status field's value.
  4973. func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput {
  4974. s.Status = &v
  4975. return s
  4976. }
  4977. type DescribeQueriesOutput struct {
  4978. _ struct{} `type:"structure"`
  4979. // The token for the next set of items to return. The token expires after 24
  4980. // hours.
  4981. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4982. // The list of queries that match the request.
  4983. Queries []*QueryInfo `locationName:"queries" type:"list"`
  4984. }
  4985. // String returns the string representation
  4986. func (s DescribeQueriesOutput) String() string {
  4987. return awsutil.Prettify(s)
  4988. }
  4989. // GoString returns the string representation
  4990. func (s DescribeQueriesOutput) GoString() string {
  4991. return s.String()
  4992. }
  4993. // SetNextToken sets the NextToken field's value.
  4994. func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput {
  4995. s.NextToken = &v
  4996. return s
  4997. }
  4998. // SetQueries sets the Queries field's value.
  4999. func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput {
  5000. s.Queries = v
  5001. return s
  5002. }
  5003. type DescribeResourcePoliciesInput struct {
  5004. _ struct{} `type:"structure"`
  5005. // The maximum number of resource policies to be displayed with one call of
  5006. // this API.
  5007. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  5008. // The token for the next set of items to return. The token expires after 24
  5009. // hours.
  5010. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  5011. }
  5012. // String returns the string representation
  5013. func (s DescribeResourcePoliciesInput) String() string {
  5014. return awsutil.Prettify(s)
  5015. }
  5016. // GoString returns the string representation
  5017. func (s DescribeResourcePoliciesInput) GoString() string {
  5018. return s.String()
  5019. }
  5020. // Validate inspects the fields of the type to determine if they are valid.
  5021. func (s *DescribeResourcePoliciesInput) Validate() error {
  5022. invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"}
  5023. if s.Limit != nil && *s.Limit < 1 {
  5024. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5025. }
  5026. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5027. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5028. }
  5029. if invalidParams.Len() > 0 {
  5030. return invalidParams
  5031. }
  5032. return nil
  5033. }
  5034. // SetLimit sets the Limit field's value.
  5035. func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput {
  5036. s.Limit = &v
  5037. return s
  5038. }
  5039. // SetNextToken sets the NextToken field's value.
  5040. func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput {
  5041. s.NextToken = &v
  5042. return s
  5043. }
  5044. type DescribeResourcePoliciesOutput struct {
  5045. _ struct{} `type:"structure"`
  5046. // The token for the next set of items to return. The token expires after 24
  5047. // hours.
  5048. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  5049. // The resource policies that exist in this account.
  5050. ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"`
  5051. }
  5052. // String returns the string representation
  5053. func (s DescribeResourcePoliciesOutput) String() string {
  5054. return awsutil.Prettify(s)
  5055. }
  5056. // GoString returns the string representation
  5057. func (s DescribeResourcePoliciesOutput) GoString() string {
  5058. return s.String()
  5059. }
  5060. // SetNextToken sets the NextToken field's value.
  5061. func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput {
  5062. s.NextToken = &v
  5063. return s
  5064. }
  5065. // SetResourcePolicies sets the ResourcePolicies field's value.
  5066. func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput {
  5067. s.ResourcePolicies = v
  5068. return s
  5069. }
  5070. type DescribeSubscriptionFiltersInput struct {
  5071. _ struct{} `type:"structure"`
  5072. // The prefix to match. If you don't specify a value, no prefix filter is applied.
  5073. FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"`
  5074. // The maximum number of items returned. If you don't specify a value, the default
  5075. // is up to 50 items.
  5076. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  5077. // The name of the log group.
  5078. //
  5079. // LogGroupName is a required field
  5080. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  5081. // The token for the next set of items to return. (You received this token from
  5082. // a previous call.)
  5083. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  5084. }
  5085. // String returns the string representation
  5086. func (s DescribeSubscriptionFiltersInput) String() string {
  5087. return awsutil.Prettify(s)
  5088. }
  5089. // GoString returns the string representation
  5090. func (s DescribeSubscriptionFiltersInput) GoString() string {
  5091. return s.String()
  5092. }
  5093. // Validate inspects the fields of the type to determine if they are valid.
  5094. func (s *DescribeSubscriptionFiltersInput) Validate() error {
  5095. invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"}
  5096. if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 {
  5097. invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1))
  5098. }
  5099. if s.Limit != nil && *s.Limit < 1 {
  5100. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5101. }
  5102. if s.LogGroupName == nil {
  5103. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  5104. }
  5105. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  5106. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  5107. }
  5108. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5109. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5110. }
  5111. if invalidParams.Len() > 0 {
  5112. return invalidParams
  5113. }
  5114. return nil
  5115. }
  5116. // SetFilterNamePrefix sets the FilterNamePrefix field's value.
  5117. func (s *DescribeSubscriptionFiltersInput) SetFilterNamePrefix(v string) *DescribeSubscriptionFiltersInput {
  5118. s.FilterNamePrefix = &v
  5119. return s
  5120. }
  5121. // SetLimit sets the Limit field's value.
  5122. func (s *DescribeSubscriptionFiltersInput) SetLimit(v int64) *DescribeSubscriptionFiltersInput {
  5123. s.Limit = &v
  5124. return s
  5125. }
  5126. // SetLogGroupName sets the LogGroupName field's value.
  5127. func (s *DescribeSubscriptionFiltersInput) SetLogGroupName(v string) *DescribeSubscriptionFiltersInput {
  5128. s.LogGroupName = &v
  5129. return s
  5130. }
  5131. // SetNextToken sets the NextToken field's value.
  5132. func (s *DescribeSubscriptionFiltersInput) SetNextToken(v string) *DescribeSubscriptionFiltersInput {
  5133. s.NextToken = &v
  5134. return s
  5135. }
  5136. type DescribeSubscriptionFiltersOutput struct {
  5137. _ struct{} `type:"structure"`
  5138. // The token for the next set of items to return. The token expires after 24
  5139. // hours.
  5140. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  5141. // The subscription filters.
  5142. SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"`
  5143. }
  5144. // String returns the string representation
  5145. func (s DescribeSubscriptionFiltersOutput) String() string {
  5146. return awsutil.Prettify(s)
  5147. }
  5148. // GoString returns the string representation
  5149. func (s DescribeSubscriptionFiltersOutput) GoString() string {
  5150. return s.String()
  5151. }
  5152. // SetNextToken sets the NextToken field's value.
  5153. func (s *DescribeSubscriptionFiltersOutput) SetNextToken(v string) *DescribeSubscriptionFiltersOutput {
  5154. s.NextToken = &v
  5155. return s
  5156. }
  5157. // SetSubscriptionFilters sets the SubscriptionFilters field's value.
  5158. func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput {
  5159. s.SubscriptionFilters = v
  5160. return s
  5161. }
  5162. // Represents a cross-account destination that receives subscription log events.
  5163. type Destination struct {
  5164. _ struct{} `type:"structure"`
  5165. // An IAM policy document that governs which AWS accounts can create subscription
  5166. // filters against this destination.
  5167. AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"`
  5168. // The ARN of this destination.
  5169. Arn *string `locationName:"arn" type:"string"`
  5170. // The creation time of the destination, expressed as the number of milliseconds
  5171. // after Jan 1, 1970 00:00:00 UTC.
  5172. CreationTime *int64 `locationName:"creationTime" type:"long"`
  5173. // The name of the destination.
  5174. DestinationName *string `locationName:"destinationName" min:"1" type:"string"`
  5175. // A role for impersonation, used when delivering log events to the target.
  5176. RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
  5177. // The Amazon Resource Name (ARN) of the physical target to where the log events
  5178. // are delivered (for example, a Kinesis stream).
  5179. TargetArn *string `locationName:"targetArn" min:"1" type:"string"`
  5180. }
  5181. // String returns the string representation
  5182. func (s Destination) String() string {
  5183. return awsutil.Prettify(s)
  5184. }
  5185. // GoString returns the string representation
  5186. func (s Destination) GoString() string {
  5187. return s.String()
  5188. }
  5189. // SetAccessPolicy sets the AccessPolicy field's value.
  5190. func (s *Destination) SetAccessPolicy(v string) *Destination {
  5191. s.AccessPolicy = &v
  5192. return s
  5193. }
  5194. // SetArn sets the Arn field's value.
  5195. func (s *Destination) SetArn(v string) *Destination {
  5196. s.Arn = &v
  5197. return s
  5198. }
  5199. // SetCreationTime sets the CreationTime field's value.
  5200. func (s *Destination) SetCreationTime(v int64) *Destination {
  5201. s.CreationTime = &v
  5202. return s
  5203. }
  5204. // SetDestinationName sets the DestinationName field's value.
  5205. func (s *Destination) SetDestinationName(v string) *Destination {
  5206. s.DestinationName = &v
  5207. return s
  5208. }
  5209. // SetRoleArn sets the RoleArn field's value.
  5210. func (s *Destination) SetRoleArn(v string) *Destination {
  5211. s.RoleArn = &v
  5212. return s
  5213. }
  5214. // SetTargetArn sets the TargetArn field's value.
  5215. func (s *Destination) SetTargetArn(v string) *Destination {
  5216. s.TargetArn = &v
  5217. return s
  5218. }
  5219. type DisassociateKmsKeyInput struct {
  5220. _ struct{} `type:"structure"`
  5221. // The name of the log group.
  5222. //
  5223. // LogGroupName is a required field
  5224. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  5225. }
  5226. // String returns the string representation
  5227. func (s DisassociateKmsKeyInput) String() string {
  5228. return awsutil.Prettify(s)
  5229. }
  5230. // GoString returns the string representation
  5231. func (s DisassociateKmsKeyInput) GoString() string {
  5232. return s.String()
  5233. }
  5234. // Validate inspects the fields of the type to determine if they are valid.
  5235. func (s *DisassociateKmsKeyInput) Validate() error {
  5236. invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"}
  5237. if s.LogGroupName == nil {
  5238. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  5239. }
  5240. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  5241. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  5242. }
  5243. if invalidParams.Len() > 0 {
  5244. return invalidParams
  5245. }
  5246. return nil
  5247. }
  5248. // SetLogGroupName sets the LogGroupName field's value.
  5249. func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput {
  5250. s.LogGroupName = &v
  5251. return s
  5252. }
  5253. type DisassociateKmsKeyOutput struct {
  5254. _ struct{} `type:"structure"`
  5255. }
  5256. // String returns the string representation
  5257. func (s DisassociateKmsKeyOutput) String() string {
  5258. return awsutil.Prettify(s)
  5259. }
  5260. // GoString returns the string representation
  5261. func (s DisassociateKmsKeyOutput) GoString() string {
  5262. return s.String()
  5263. }
  5264. // Represents an export task.
  5265. type ExportTask struct {
  5266. _ struct{} `type:"structure"`
  5267. // The name of Amazon S3 bucket to which the log data was exported.
  5268. Destination *string `locationName:"destination" min:"1" type:"string"`
  5269. // The prefix that was used as the start of Amazon S3 key for every object exported.
  5270. DestinationPrefix *string `locationName:"destinationPrefix" type:"string"`
  5271. // Execution info about the export task.
  5272. ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"`
  5273. // The start time, expressed as the number of milliseconds after Jan 1, 1970
  5274. // 00:00:00 UTC. Events with a timestamp before this time are not exported.
  5275. From *int64 `locationName:"from" type:"long"`
  5276. // The name of the log group from which logs data was exported.
  5277. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  5278. // The status of the export task.
  5279. Status *ExportTaskStatus `locationName:"status" type:"structure"`
  5280. // The ID of the export task.
  5281. TaskId *string `locationName:"taskId" min:"1" type:"string"`
  5282. // The name of the export task.
  5283. TaskName *string `locationName:"taskName" min:"1" type:"string"`
  5284. // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00
  5285. // UTC. Events with a timestamp later than this time are not exported.
  5286. To *int64 `locationName:"to" type:"long"`
  5287. }
  5288. // String returns the string representation
  5289. func (s ExportTask) String() string {
  5290. return awsutil.Prettify(s)
  5291. }
  5292. // GoString returns the string representation
  5293. func (s ExportTask) GoString() string {
  5294. return s.String()
  5295. }
  5296. // SetDestination sets the Destination field's value.
  5297. func (s *ExportTask) SetDestination(v string) *ExportTask {
  5298. s.Destination = &v
  5299. return s
  5300. }
  5301. // SetDestinationPrefix sets the DestinationPrefix field's value.
  5302. func (s *ExportTask) SetDestinationPrefix(v string) *ExportTask {
  5303. s.DestinationPrefix = &v
  5304. return s
  5305. }
  5306. // SetExecutionInfo sets the ExecutionInfo field's value.
  5307. func (s *ExportTask) SetExecutionInfo(v *ExportTaskExecutionInfo) *ExportTask {
  5308. s.ExecutionInfo = v
  5309. return s
  5310. }
  5311. // SetFrom sets the From field's value.
  5312. func (s *ExportTask) SetFrom(v int64) *ExportTask {
  5313. s.From = &v
  5314. return s
  5315. }
  5316. // SetLogGroupName sets the LogGroupName field's value.
  5317. func (s *ExportTask) SetLogGroupName(v string) *ExportTask {
  5318. s.LogGroupName = &v
  5319. return s
  5320. }
  5321. // SetStatus sets the Status field's value.
  5322. func (s *ExportTask) SetStatus(v *ExportTaskStatus) *ExportTask {
  5323. s.Status = v
  5324. return s
  5325. }
  5326. // SetTaskId sets the TaskId field's value.
  5327. func (s *ExportTask) SetTaskId(v string) *ExportTask {
  5328. s.TaskId = &v
  5329. return s
  5330. }
  5331. // SetTaskName sets the TaskName field's value.
  5332. func (s *ExportTask) SetTaskName(v string) *ExportTask {
  5333. s.TaskName = &v
  5334. return s
  5335. }
  5336. // SetTo sets the To field's value.
  5337. func (s *ExportTask) SetTo(v int64) *ExportTask {
  5338. s.To = &v
  5339. return s
  5340. }
  5341. // Represents the status of an export task.
  5342. type ExportTaskExecutionInfo struct {
  5343. _ struct{} `type:"structure"`
  5344. // The completion time of the export task, expressed as the number of milliseconds
  5345. // after Jan 1, 1970 00:00:00 UTC.
  5346. CompletionTime *int64 `locationName:"completionTime" type:"long"`
  5347. // The creation time of the export task, expressed as the number of milliseconds
  5348. // after Jan 1, 1970 00:00:00 UTC.
  5349. CreationTime *int64 `locationName:"creationTime" type:"long"`
  5350. }
  5351. // String returns the string representation
  5352. func (s ExportTaskExecutionInfo) String() string {
  5353. return awsutil.Prettify(s)
  5354. }
  5355. // GoString returns the string representation
  5356. func (s ExportTaskExecutionInfo) GoString() string {
  5357. return s.String()
  5358. }
  5359. // SetCompletionTime sets the CompletionTime field's value.
  5360. func (s *ExportTaskExecutionInfo) SetCompletionTime(v int64) *ExportTaskExecutionInfo {
  5361. s.CompletionTime = &v
  5362. return s
  5363. }
  5364. // SetCreationTime sets the CreationTime field's value.
  5365. func (s *ExportTaskExecutionInfo) SetCreationTime(v int64) *ExportTaskExecutionInfo {
  5366. s.CreationTime = &v
  5367. return s
  5368. }
  5369. // Represents the status of an export task.
  5370. type ExportTaskStatus struct {
  5371. _ struct{} `type:"structure"`
  5372. // The status code of the export task.
  5373. Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"`
  5374. // The status message related to the status code.
  5375. Message *string `locationName:"message" type:"string"`
  5376. }
  5377. // String returns the string representation
  5378. func (s ExportTaskStatus) String() string {
  5379. return awsutil.Prettify(s)
  5380. }
  5381. // GoString returns the string representation
  5382. func (s ExportTaskStatus) GoString() string {
  5383. return s.String()
  5384. }
  5385. // SetCode sets the Code field's value.
  5386. func (s *ExportTaskStatus) SetCode(v string) *ExportTaskStatus {
  5387. s.Code = &v
  5388. return s
  5389. }
  5390. // SetMessage sets the Message field's value.
  5391. func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus {
  5392. s.Message = &v
  5393. return s
  5394. }
  5395. type FilterLogEventsInput struct {
  5396. _ struct{} `type:"structure"`
  5397. // The end of the time range, expressed as the number of milliseconds after
  5398. // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are
  5399. // not returned.
  5400. EndTime *int64 `locationName:"endTime" type:"long"`
  5401. // The filter pattern to use. For more information, see Filter and Pattern Syntax
  5402. // (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html).
  5403. //
  5404. // If not provided, all the events are matched.
  5405. FilterPattern *string `locationName:"filterPattern" type:"string"`
  5406. // If the value is true, the operation makes a best effort to provide responses
  5407. // that contain events from multiple log streams within the log group, interleaved
  5408. // in a single response. If the value is false, all the matched log events in
  5409. // the first log stream are searched first, then those in the next log stream,
  5410. // and so on. The default is false.
  5411. Interleaved *bool `locationName:"interleaved" type:"boolean"`
  5412. // The maximum number of events to return. The default is 10,000 events.
  5413. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  5414. // The name of the log group to search.
  5415. //
  5416. // LogGroupName is a required field
  5417. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  5418. // Filters the results to include only events from log streams that have names
  5419. // starting with this prefix.
  5420. //
  5421. // If you specify a value for both logStreamNamePrefix and logStreamNames, but
  5422. // the value for logStreamNamePrefix does not match any log stream names specified
  5423. // in logStreamNames, the action returns an InvalidParameterException error.
  5424. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"`
  5425. // Filters the results to only logs from the log streams in this list.
  5426. //
  5427. // If you specify a value for both logStreamNamePrefix and logStreamNames, the
  5428. // action returns an InvalidParameterException error.
  5429. LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"`
  5430. // The token for the next set of events to return. (You received this token
  5431. // from a previous call.)
  5432. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  5433. // The start of the time range, expressed as the number of milliseconds after
  5434. // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not
  5435. // returned.
  5436. StartTime *int64 `locationName:"startTime" type:"long"`
  5437. }
  5438. // String returns the string representation
  5439. func (s FilterLogEventsInput) String() string {
  5440. return awsutil.Prettify(s)
  5441. }
  5442. // GoString returns the string representation
  5443. func (s FilterLogEventsInput) GoString() string {
  5444. return s.String()
  5445. }
  5446. // Validate inspects the fields of the type to determine if they are valid.
  5447. func (s *FilterLogEventsInput) Validate() error {
  5448. invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"}
  5449. if s.Limit != nil && *s.Limit < 1 {
  5450. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5451. }
  5452. if s.LogGroupName == nil {
  5453. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  5454. }
  5455. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  5456. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  5457. }
  5458. if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 {
  5459. invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1))
  5460. }
  5461. if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 {
  5462. invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1))
  5463. }
  5464. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5465. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5466. }
  5467. if invalidParams.Len() > 0 {
  5468. return invalidParams
  5469. }
  5470. return nil
  5471. }
  5472. // SetEndTime sets the EndTime field's value.
  5473. func (s *FilterLogEventsInput) SetEndTime(v int64) *FilterLogEventsInput {
  5474. s.EndTime = &v
  5475. return s
  5476. }
  5477. // SetFilterPattern sets the FilterPattern field's value.
  5478. func (s *FilterLogEventsInput) SetFilterPattern(v string) *FilterLogEventsInput {
  5479. s.FilterPattern = &v
  5480. return s
  5481. }
  5482. // SetInterleaved sets the Interleaved field's value.
  5483. func (s *FilterLogEventsInput) SetInterleaved(v bool) *FilterLogEventsInput {
  5484. s.Interleaved = &v
  5485. return s
  5486. }
  5487. // SetLimit sets the Limit field's value.
  5488. func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput {
  5489. s.Limit = &v
  5490. return s
  5491. }
  5492. // SetLogGroupName sets the LogGroupName field's value.
  5493. func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput {
  5494. s.LogGroupName = &v
  5495. return s
  5496. }
  5497. // SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value.
  5498. func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput {
  5499. s.LogStreamNamePrefix = &v
  5500. return s
  5501. }
  5502. // SetLogStreamNames sets the LogStreamNames field's value.
  5503. func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput {
  5504. s.LogStreamNames = v
  5505. return s
  5506. }
  5507. // SetNextToken sets the NextToken field's value.
  5508. func (s *FilterLogEventsInput) SetNextToken(v string) *FilterLogEventsInput {
  5509. s.NextToken = &v
  5510. return s
  5511. }
  5512. // SetStartTime sets the StartTime field's value.
  5513. func (s *FilterLogEventsInput) SetStartTime(v int64) *FilterLogEventsInput {
  5514. s.StartTime = &v
  5515. return s
  5516. }
  5517. type FilterLogEventsOutput struct {
  5518. _ struct{} `type:"structure"`
  5519. // The matched events.
  5520. Events []*FilteredLogEvent `locationName:"events" type:"list"`
  5521. // The token to use when requesting the next set of items. The token expires
  5522. // after 24 hours.
  5523. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  5524. // Indicates which log streams have been searched and whether each has been
  5525. // searched completely.
  5526. SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"`
  5527. }
  5528. // String returns the string representation
  5529. func (s FilterLogEventsOutput) String() string {
  5530. return awsutil.Prettify(s)
  5531. }
  5532. // GoString returns the string representation
  5533. func (s FilterLogEventsOutput) GoString() string {
  5534. return s.String()
  5535. }
  5536. // SetEvents sets the Events field's value.
  5537. func (s *FilterLogEventsOutput) SetEvents(v []*FilteredLogEvent) *FilterLogEventsOutput {
  5538. s.Events = v
  5539. return s
  5540. }
  5541. // SetNextToken sets the NextToken field's value.
  5542. func (s *FilterLogEventsOutput) SetNextToken(v string) *FilterLogEventsOutput {
  5543. s.NextToken = &v
  5544. return s
  5545. }
  5546. // SetSearchedLogStreams sets the SearchedLogStreams field's value.
  5547. func (s *FilterLogEventsOutput) SetSearchedLogStreams(v []*SearchedLogStream) *FilterLogEventsOutput {
  5548. s.SearchedLogStreams = v
  5549. return s
  5550. }
  5551. // Represents a matched event.
  5552. type FilteredLogEvent struct {
  5553. _ struct{} `type:"structure"`
  5554. // The ID of the event.
  5555. EventId *string `locationName:"eventId" type:"string"`
  5556. // The time the event was ingested, expressed as the number of milliseconds
  5557. // after Jan 1, 1970 00:00:00 UTC.
  5558. IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
  5559. // The name of the log stream to which this event belongs.
  5560. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
  5561. // The data contained in the log event.
  5562. Message *string `locationName:"message" min:"1" type:"string"`
  5563. // The time the event occurred, expressed as the number of milliseconds after
  5564. // Jan 1, 1970 00:00:00 UTC.
  5565. Timestamp *int64 `locationName:"timestamp" type:"long"`
  5566. }
  5567. // String returns the string representation
  5568. func (s FilteredLogEvent) String() string {
  5569. return awsutil.Prettify(s)
  5570. }
  5571. // GoString returns the string representation
  5572. func (s FilteredLogEvent) GoString() string {
  5573. return s.String()
  5574. }
  5575. // SetEventId sets the EventId field's value.
  5576. func (s *FilteredLogEvent) SetEventId(v string) *FilteredLogEvent {
  5577. s.EventId = &v
  5578. return s
  5579. }
  5580. // SetIngestionTime sets the IngestionTime field's value.
  5581. func (s *FilteredLogEvent) SetIngestionTime(v int64) *FilteredLogEvent {
  5582. s.IngestionTime = &v
  5583. return s
  5584. }
  5585. // SetLogStreamName sets the LogStreamName field's value.
  5586. func (s *FilteredLogEvent) SetLogStreamName(v string) *FilteredLogEvent {
  5587. s.LogStreamName = &v
  5588. return s
  5589. }
  5590. // SetMessage sets the Message field's value.
  5591. func (s *FilteredLogEvent) SetMessage(v string) *FilteredLogEvent {
  5592. s.Message = &v
  5593. return s
  5594. }
  5595. // SetTimestamp sets the Timestamp field's value.
  5596. func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent {
  5597. s.Timestamp = &v
  5598. return s
  5599. }
  5600. type GetLogEventsInput struct {
  5601. _ struct{} `type:"structure"`
  5602. // The end of the time range, expressed as the number of milliseconds after
  5603. // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later than
  5604. // this time are not included.
  5605. EndTime *int64 `locationName:"endTime" type:"long"`
  5606. // The maximum number of log events returned. If you don't specify a value,
  5607. // the maximum is as many log events as can fit in a response size of 1 MB,
  5608. // up to 10,000 log events.
  5609. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  5610. // The name of the log group.
  5611. //
  5612. // LogGroupName is a required field
  5613. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  5614. // The name of the log stream.
  5615. //
  5616. // LogStreamName is a required field
  5617. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
  5618. // The token for the next set of items to return. (You received this token from
  5619. // a previous call.)
  5620. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  5621. // If the value is true, the earliest log events are returned first. If the
  5622. // value is false, the latest log events are returned first. The default value
  5623. // is false.
  5624. StartFromHead *bool `locationName:"startFromHead" type:"boolean"`
  5625. // The start of the time range, expressed as the number of milliseconds after
  5626. // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this time or later
  5627. // than this time are included. Events with a timestamp earlier than this time
  5628. // are not included.
  5629. StartTime *int64 `locationName:"startTime" type:"long"`
  5630. }
  5631. // String returns the string representation
  5632. func (s GetLogEventsInput) String() string {
  5633. return awsutil.Prettify(s)
  5634. }
  5635. // GoString returns the string representation
  5636. func (s GetLogEventsInput) GoString() string {
  5637. return s.String()
  5638. }
  5639. // Validate inspects the fields of the type to determine if they are valid.
  5640. func (s *GetLogEventsInput) Validate() error {
  5641. invalidParams := request.ErrInvalidParams{Context: "GetLogEventsInput"}
  5642. if s.Limit != nil && *s.Limit < 1 {
  5643. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5644. }
  5645. if s.LogGroupName == nil {
  5646. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  5647. }
  5648. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  5649. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  5650. }
  5651. if s.LogStreamName == nil {
  5652. invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
  5653. }
  5654. if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
  5655. invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
  5656. }
  5657. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5658. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5659. }
  5660. if invalidParams.Len() > 0 {
  5661. return invalidParams
  5662. }
  5663. return nil
  5664. }
  5665. // SetEndTime sets the EndTime field's value.
  5666. func (s *GetLogEventsInput) SetEndTime(v int64) *GetLogEventsInput {
  5667. s.EndTime = &v
  5668. return s
  5669. }
  5670. // SetLimit sets the Limit field's value.
  5671. func (s *GetLogEventsInput) SetLimit(v int64) *GetLogEventsInput {
  5672. s.Limit = &v
  5673. return s
  5674. }
  5675. // SetLogGroupName sets the LogGroupName field's value.
  5676. func (s *GetLogEventsInput) SetLogGroupName(v string) *GetLogEventsInput {
  5677. s.LogGroupName = &v
  5678. return s
  5679. }
  5680. // SetLogStreamName sets the LogStreamName field's value.
  5681. func (s *GetLogEventsInput) SetLogStreamName(v string) *GetLogEventsInput {
  5682. s.LogStreamName = &v
  5683. return s
  5684. }
  5685. // SetNextToken sets the NextToken field's value.
  5686. func (s *GetLogEventsInput) SetNextToken(v string) *GetLogEventsInput {
  5687. s.NextToken = &v
  5688. return s
  5689. }
  5690. // SetStartFromHead sets the StartFromHead field's value.
  5691. func (s *GetLogEventsInput) SetStartFromHead(v bool) *GetLogEventsInput {
  5692. s.StartFromHead = &v
  5693. return s
  5694. }
  5695. // SetStartTime sets the StartTime field's value.
  5696. func (s *GetLogEventsInput) SetStartTime(v int64) *GetLogEventsInput {
  5697. s.StartTime = &v
  5698. return s
  5699. }
  5700. type GetLogEventsOutput struct {
  5701. _ struct{} `type:"structure"`
  5702. // The events.
  5703. Events []*OutputLogEvent `locationName:"events" type:"list"`
  5704. // The token for the next set of items in the backward direction. The token
  5705. // expires after 24 hours. This token will never be null. If you have reached
  5706. // the end of the stream, it will return the same token you passed in.
  5707. NextBackwardToken *string `locationName:"nextBackwardToken" min:"1" type:"string"`
  5708. // The token for the next set of items in the forward direction. The token expires
  5709. // after 24 hours. If you have reached the end of the stream, it will return
  5710. // the same token you passed in.
  5711. NextForwardToken *string `locationName:"nextForwardToken" min:"1" type:"string"`
  5712. }
  5713. // String returns the string representation
  5714. func (s GetLogEventsOutput) String() string {
  5715. return awsutil.Prettify(s)
  5716. }
  5717. // GoString returns the string representation
  5718. func (s GetLogEventsOutput) GoString() string {
  5719. return s.String()
  5720. }
  5721. // SetEvents sets the Events field's value.
  5722. func (s *GetLogEventsOutput) SetEvents(v []*OutputLogEvent) *GetLogEventsOutput {
  5723. s.Events = v
  5724. return s
  5725. }
  5726. // SetNextBackwardToken sets the NextBackwardToken field's value.
  5727. func (s *GetLogEventsOutput) SetNextBackwardToken(v string) *GetLogEventsOutput {
  5728. s.NextBackwardToken = &v
  5729. return s
  5730. }
  5731. // SetNextForwardToken sets the NextForwardToken field's value.
  5732. func (s *GetLogEventsOutput) SetNextForwardToken(v string) *GetLogEventsOutput {
  5733. s.NextForwardToken = &v
  5734. return s
  5735. }
  5736. type GetLogGroupFieldsInput struct {
  5737. _ struct{} `type:"structure"`
  5738. // The name of the log group to search.
  5739. //
  5740. // LogGroupName is a required field
  5741. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  5742. // The time to set as the center of the query. If you specify time, the 8 minutes
  5743. // before and 8 minutes after this time are searched. If you omit time, the
  5744. // past 15 minutes are queried.
  5745. //
  5746. // The time value is specified as epoch time, the number of seconds since January
  5747. // 1, 1970, 00:00:00 UTC.
  5748. Time *int64 `locationName:"time" type:"long"`
  5749. }
  5750. // String returns the string representation
  5751. func (s GetLogGroupFieldsInput) String() string {
  5752. return awsutil.Prettify(s)
  5753. }
  5754. // GoString returns the string representation
  5755. func (s GetLogGroupFieldsInput) GoString() string {
  5756. return s.String()
  5757. }
  5758. // Validate inspects the fields of the type to determine if they are valid.
  5759. func (s *GetLogGroupFieldsInput) Validate() error {
  5760. invalidParams := request.ErrInvalidParams{Context: "GetLogGroupFieldsInput"}
  5761. if s.LogGroupName == nil {
  5762. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  5763. }
  5764. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  5765. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  5766. }
  5767. if invalidParams.Len() > 0 {
  5768. return invalidParams
  5769. }
  5770. return nil
  5771. }
  5772. // SetLogGroupName sets the LogGroupName field's value.
  5773. func (s *GetLogGroupFieldsInput) SetLogGroupName(v string) *GetLogGroupFieldsInput {
  5774. s.LogGroupName = &v
  5775. return s
  5776. }
  5777. // SetTime sets the Time field's value.
  5778. func (s *GetLogGroupFieldsInput) SetTime(v int64) *GetLogGroupFieldsInput {
  5779. s.Time = &v
  5780. return s
  5781. }
  5782. type GetLogGroupFieldsOutput struct {
  5783. _ struct{} `type:"structure"`
  5784. // The array of fields found in the query. Each object in the array contains
  5785. // the name of the field, along with the percentage of time it appeared in the
  5786. // log events that were queried.
  5787. LogGroupFields []*LogGroupField `locationName:"logGroupFields" type:"list"`
  5788. }
  5789. // String returns the string representation
  5790. func (s GetLogGroupFieldsOutput) String() string {
  5791. return awsutil.Prettify(s)
  5792. }
  5793. // GoString returns the string representation
  5794. func (s GetLogGroupFieldsOutput) GoString() string {
  5795. return s.String()
  5796. }
  5797. // SetLogGroupFields sets the LogGroupFields field's value.
  5798. func (s *GetLogGroupFieldsOutput) SetLogGroupFields(v []*LogGroupField) *GetLogGroupFieldsOutput {
  5799. s.LogGroupFields = v
  5800. return s
  5801. }
  5802. type GetLogRecordInput struct {
  5803. _ struct{} `type:"structure"`
  5804. // The pointer corresponding to the log event record you want to retrieve. You
  5805. // get this from the response of a GetQueryResults operation. In that response,
  5806. // the value of the @ptr field for a log event is the value to use as logRecordPointer
  5807. // to retrieve that complete log event record.
  5808. //
  5809. // LogRecordPointer is a required field
  5810. LogRecordPointer *string `locationName:"logRecordPointer" type:"string" required:"true"`
  5811. }
  5812. // String returns the string representation
  5813. func (s GetLogRecordInput) String() string {
  5814. return awsutil.Prettify(s)
  5815. }
  5816. // GoString returns the string representation
  5817. func (s GetLogRecordInput) GoString() string {
  5818. return s.String()
  5819. }
  5820. // Validate inspects the fields of the type to determine if they are valid.
  5821. func (s *GetLogRecordInput) Validate() error {
  5822. invalidParams := request.ErrInvalidParams{Context: "GetLogRecordInput"}
  5823. if s.LogRecordPointer == nil {
  5824. invalidParams.Add(request.NewErrParamRequired("LogRecordPointer"))
  5825. }
  5826. if invalidParams.Len() > 0 {
  5827. return invalidParams
  5828. }
  5829. return nil
  5830. }
  5831. // SetLogRecordPointer sets the LogRecordPointer field's value.
  5832. func (s *GetLogRecordInput) SetLogRecordPointer(v string) *GetLogRecordInput {
  5833. s.LogRecordPointer = &v
  5834. return s
  5835. }
  5836. type GetLogRecordOutput struct {
  5837. _ struct{} `type:"structure"`
  5838. // The requested log event, as a JSON string.
  5839. LogRecord map[string]*string `locationName:"logRecord" type:"map"`
  5840. }
  5841. // String returns the string representation
  5842. func (s GetLogRecordOutput) String() string {
  5843. return awsutil.Prettify(s)
  5844. }
  5845. // GoString returns the string representation
  5846. func (s GetLogRecordOutput) GoString() string {
  5847. return s.String()
  5848. }
  5849. // SetLogRecord sets the LogRecord field's value.
  5850. func (s *GetLogRecordOutput) SetLogRecord(v map[string]*string) *GetLogRecordOutput {
  5851. s.LogRecord = v
  5852. return s
  5853. }
  5854. type GetQueryResultsInput struct {
  5855. _ struct{} `type:"structure"`
  5856. // The ID number of the query.
  5857. //
  5858. // QueryId is a required field
  5859. QueryId *string `locationName:"queryId" type:"string" required:"true"`
  5860. }
  5861. // String returns the string representation
  5862. func (s GetQueryResultsInput) String() string {
  5863. return awsutil.Prettify(s)
  5864. }
  5865. // GoString returns the string representation
  5866. func (s GetQueryResultsInput) GoString() string {
  5867. return s.String()
  5868. }
  5869. // Validate inspects the fields of the type to determine if they are valid.
  5870. func (s *GetQueryResultsInput) Validate() error {
  5871. invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"}
  5872. if s.QueryId == nil {
  5873. invalidParams.Add(request.NewErrParamRequired("QueryId"))
  5874. }
  5875. if invalidParams.Len() > 0 {
  5876. return invalidParams
  5877. }
  5878. return nil
  5879. }
  5880. // SetQueryId sets the QueryId field's value.
  5881. func (s *GetQueryResultsInput) SetQueryId(v string) *GetQueryResultsInput {
  5882. s.QueryId = &v
  5883. return s
  5884. }
  5885. type GetQueryResultsOutput struct {
  5886. _ struct{} `type:"structure"`
  5887. // The log events that matched the query criteria during the most recent time
  5888. // it ran.
  5889. //
  5890. // The results value is an array of arrays. Each log event is one object in
  5891. // the top-level array. Each of these log event objects is an array of field/value
  5892. // pairs.
  5893. Results [][]*ResultField `locationName:"results" type:"list"`
  5894. // Includes the number of log events scanned by the query, the number of log
  5895. // events that matched the query criteria, and the total number of bytes in
  5896. // the log events that were scanned.
  5897. Statistics *QueryStatistics `locationName:"statistics" type:"structure"`
  5898. // The status of the most recent running of the query. Possible values are Cancelled,
  5899. // Complete, Failed, Running, Scheduled, and Unknown.
  5900. Status *string `locationName:"status" type:"string" enum:"QueryStatus"`
  5901. }
  5902. // String returns the string representation
  5903. func (s GetQueryResultsOutput) String() string {
  5904. return awsutil.Prettify(s)
  5905. }
  5906. // GoString returns the string representation
  5907. func (s GetQueryResultsOutput) GoString() string {
  5908. return s.String()
  5909. }
  5910. // SetResults sets the Results field's value.
  5911. func (s *GetQueryResultsOutput) SetResults(v [][]*ResultField) *GetQueryResultsOutput {
  5912. s.Results = v
  5913. return s
  5914. }
  5915. // SetStatistics sets the Statistics field's value.
  5916. func (s *GetQueryResultsOutput) SetStatistics(v *QueryStatistics) *GetQueryResultsOutput {
  5917. s.Statistics = v
  5918. return s
  5919. }
  5920. // SetStatus sets the Status field's value.
  5921. func (s *GetQueryResultsOutput) SetStatus(v string) *GetQueryResultsOutput {
  5922. s.Status = &v
  5923. return s
  5924. }
  5925. // Represents a log event, which is a record of activity that was recorded by
  5926. // the application or resource being monitored.
  5927. type InputLogEvent struct {
  5928. _ struct{} `type:"structure"`
  5929. // The raw event message.
  5930. //
  5931. // Message is a required field
  5932. Message *string `locationName:"message" min:"1" type:"string" required:"true"`
  5933. // The time the event occurred, expressed as the number of milliseconds after
  5934. // Jan 1, 1970 00:00:00 UTC.
  5935. //
  5936. // Timestamp is a required field
  5937. Timestamp *int64 `locationName:"timestamp" type:"long" required:"true"`
  5938. }
  5939. // String returns the string representation
  5940. func (s InputLogEvent) String() string {
  5941. return awsutil.Prettify(s)
  5942. }
  5943. // GoString returns the string representation
  5944. func (s InputLogEvent) GoString() string {
  5945. return s.String()
  5946. }
  5947. // Validate inspects the fields of the type to determine if they are valid.
  5948. func (s *InputLogEvent) Validate() error {
  5949. invalidParams := request.ErrInvalidParams{Context: "InputLogEvent"}
  5950. if s.Message == nil {
  5951. invalidParams.Add(request.NewErrParamRequired("Message"))
  5952. }
  5953. if s.Message != nil && len(*s.Message) < 1 {
  5954. invalidParams.Add(request.NewErrParamMinLen("Message", 1))
  5955. }
  5956. if s.Timestamp == nil {
  5957. invalidParams.Add(request.NewErrParamRequired("Timestamp"))
  5958. }
  5959. if invalidParams.Len() > 0 {
  5960. return invalidParams
  5961. }
  5962. return nil
  5963. }
  5964. // SetMessage sets the Message field's value.
  5965. func (s *InputLogEvent) SetMessage(v string) *InputLogEvent {
  5966. s.Message = &v
  5967. return s
  5968. }
  5969. // SetTimestamp sets the Timestamp field's value.
  5970. func (s *InputLogEvent) SetTimestamp(v int64) *InputLogEvent {
  5971. s.Timestamp = &v
  5972. return s
  5973. }
  5974. type ListTagsLogGroupInput struct {
  5975. _ struct{} `type:"structure"`
  5976. // The name of the log group.
  5977. //
  5978. // LogGroupName is a required field
  5979. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  5980. }
  5981. // String returns the string representation
  5982. func (s ListTagsLogGroupInput) String() string {
  5983. return awsutil.Prettify(s)
  5984. }
  5985. // GoString returns the string representation
  5986. func (s ListTagsLogGroupInput) GoString() string {
  5987. return s.String()
  5988. }
  5989. // Validate inspects the fields of the type to determine if they are valid.
  5990. func (s *ListTagsLogGroupInput) Validate() error {
  5991. invalidParams := request.ErrInvalidParams{Context: "ListTagsLogGroupInput"}
  5992. if s.LogGroupName == nil {
  5993. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  5994. }
  5995. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  5996. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  5997. }
  5998. if invalidParams.Len() > 0 {
  5999. return invalidParams
  6000. }
  6001. return nil
  6002. }
  6003. // SetLogGroupName sets the LogGroupName field's value.
  6004. func (s *ListTagsLogGroupInput) SetLogGroupName(v string) *ListTagsLogGroupInput {
  6005. s.LogGroupName = &v
  6006. return s
  6007. }
  6008. type ListTagsLogGroupOutput struct {
  6009. _ struct{} `type:"structure"`
  6010. // The tags for the log group.
  6011. Tags map[string]*string `locationName:"tags" min:"1" type:"map"`
  6012. }
  6013. // String returns the string representation
  6014. func (s ListTagsLogGroupOutput) String() string {
  6015. return awsutil.Prettify(s)
  6016. }
  6017. // GoString returns the string representation
  6018. func (s ListTagsLogGroupOutput) GoString() string {
  6019. return s.String()
  6020. }
  6021. // SetTags sets the Tags field's value.
  6022. func (s *ListTagsLogGroupOutput) SetTags(v map[string]*string) *ListTagsLogGroupOutput {
  6023. s.Tags = v
  6024. return s
  6025. }
  6026. // Represents a log group.
  6027. type LogGroup struct {
  6028. _ struct{} `type:"structure"`
  6029. // The Amazon Resource Name (ARN) of the log group.
  6030. Arn *string `locationName:"arn" type:"string"`
  6031. // The creation time of the log group, expressed as the number of milliseconds
  6032. // after Jan 1, 1970 00:00:00 UTC.
  6033. CreationTime *int64 `locationName:"creationTime" type:"long"`
  6034. // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
  6035. KmsKeyId *string `locationName:"kmsKeyId" type:"string"`
  6036. // The name of the log group.
  6037. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  6038. // The number of metric filters.
  6039. MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"`
  6040. // The number of days to retain the log events in the specified log group. Possible
  6041. // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731,
  6042. // 1827, and 3653.
  6043. RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"`
  6044. // The number of bytes stored.
  6045. StoredBytes *int64 `locationName:"storedBytes" type:"long"`
  6046. }
  6047. // String returns the string representation
  6048. func (s LogGroup) String() string {
  6049. return awsutil.Prettify(s)
  6050. }
  6051. // GoString returns the string representation
  6052. func (s LogGroup) GoString() string {
  6053. return s.String()
  6054. }
  6055. // SetArn sets the Arn field's value.
  6056. func (s *LogGroup) SetArn(v string) *LogGroup {
  6057. s.Arn = &v
  6058. return s
  6059. }
  6060. // SetCreationTime sets the CreationTime field's value.
  6061. func (s *LogGroup) SetCreationTime(v int64) *LogGroup {
  6062. s.CreationTime = &v
  6063. return s
  6064. }
  6065. // SetKmsKeyId sets the KmsKeyId field's value.
  6066. func (s *LogGroup) SetKmsKeyId(v string) *LogGroup {
  6067. s.KmsKeyId = &v
  6068. return s
  6069. }
  6070. // SetLogGroupName sets the LogGroupName field's value.
  6071. func (s *LogGroup) SetLogGroupName(v string) *LogGroup {
  6072. s.LogGroupName = &v
  6073. return s
  6074. }
  6075. // SetMetricFilterCount sets the MetricFilterCount field's value.
  6076. func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup {
  6077. s.MetricFilterCount = &v
  6078. return s
  6079. }
  6080. // SetRetentionInDays sets the RetentionInDays field's value.
  6081. func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup {
  6082. s.RetentionInDays = &v
  6083. return s
  6084. }
  6085. // SetStoredBytes sets the StoredBytes field's value.
  6086. func (s *LogGroup) SetStoredBytes(v int64) *LogGroup {
  6087. s.StoredBytes = &v
  6088. return s
  6089. }
  6090. // The fields contained in log events found by a GetLogGroupFields operation,
  6091. // along with the percentage of queried log events in which each field appears.
  6092. type LogGroupField struct {
  6093. _ struct{} `type:"structure"`
  6094. // The name of a log field.
  6095. Name *string `locationName:"name" type:"string"`
  6096. // The percentage of log events queried that contained the field.
  6097. Percent *int64 `locationName:"percent" type:"integer"`
  6098. }
  6099. // String returns the string representation
  6100. func (s LogGroupField) String() string {
  6101. return awsutil.Prettify(s)
  6102. }
  6103. // GoString returns the string representation
  6104. func (s LogGroupField) GoString() string {
  6105. return s.String()
  6106. }
  6107. // SetName sets the Name field's value.
  6108. func (s *LogGroupField) SetName(v string) *LogGroupField {
  6109. s.Name = &v
  6110. return s
  6111. }
  6112. // SetPercent sets the Percent field's value.
  6113. func (s *LogGroupField) SetPercent(v int64) *LogGroupField {
  6114. s.Percent = &v
  6115. return s
  6116. }
  6117. // Represents a log stream, which is a sequence of log events from a single
  6118. // emitter of logs.
  6119. type LogStream struct {
  6120. _ struct{} `type:"structure"`
  6121. // The Amazon Resource Name (ARN) of the log stream.
  6122. Arn *string `locationName:"arn" type:"string"`
  6123. // The creation time of the stream, expressed as the number of milliseconds
  6124. // after Jan 1, 1970 00:00:00 UTC.
  6125. CreationTime *int64 `locationName:"creationTime" type:"long"`
  6126. // The time of the first event, expressed as the number of milliseconds after
  6127. // Jan 1, 1970 00:00:00 UTC.
  6128. FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"`
  6129. // The time of the most recent log event in the log stream in CloudWatch Logs.
  6130. // This number is expressed as the number of milliseconds after Jan 1, 1970
  6131. // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency
  6132. // basis. It typically updates in less than an hour from ingestion, but may
  6133. // take longer in some rare situations.
  6134. LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"`
  6135. // The ingestion time, expressed as the number of milliseconds after Jan 1,
  6136. // 1970 00:00:00 UTC.
  6137. LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"`
  6138. // The name of the log stream.
  6139. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
  6140. // The number of bytes stored.
  6141. StoredBytes *int64 `locationName:"storedBytes" type:"long"`
  6142. // The sequence token.
  6143. UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"`
  6144. }
  6145. // String returns the string representation
  6146. func (s LogStream) String() string {
  6147. return awsutil.Prettify(s)
  6148. }
  6149. // GoString returns the string representation
  6150. func (s LogStream) GoString() string {
  6151. return s.String()
  6152. }
  6153. // SetArn sets the Arn field's value.
  6154. func (s *LogStream) SetArn(v string) *LogStream {
  6155. s.Arn = &v
  6156. return s
  6157. }
  6158. // SetCreationTime sets the CreationTime field's value.
  6159. func (s *LogStream) SetCreationTime(v int64) *LogStream {
  6160. s.CreationTime = &v
  6161. return s
  6162. }
  6163. // SetFirstEventTimestamp sets the FirstEventTimestamp field's value.
  6164. func (s *LogStream) SetFirstEventTimestamp(v int64) *LogStream {
  6165. s.FirstEventTimestamp = &v
  6166. return s
  6167. }
  6168. // SetLastEventTimestamp sets the LastEventTimestamp field's value.
  6169. func (s *LogStream) SetLastEventTimestamp(v int64) *LogStream {
  6170. s.LastEventTimestamp = &v
  6171. return s
  6172. }
  6173. // SetLastIngestionTime sets the LastIngestionTime field's value.
  6174. func (s *LogStream) SetLastIngestionTime(v int64) *LogStream {
  6175. s.LastIngestionTime = &v
  6176. return s
  6177. }
  6178. // SetLogStreamName sets the LogStreamName field's value.
  6179. func (s *LogStream) SetLogStreamName(v string) *LogStream {
  6180. s.LogStreamName = &v
  6181. return s
  6182. }
  6183. // SetStoredBytes sets the StoredBytes field's value.
  6184. func (s *LogStream) SetStoredBytes(v int64) *LogStream {
  6185. s.StoredBytes = &v
  6186. return s
  6187. }
  6188. // SetUploadSequenceToken sets the UploadSequenceToken field's value.
  6189. func (s *LogStream) SetUploadSequenceToken(v string) *LogStream {
  6190. s.UploadSequenceToken = &v
  6191. return s
  6192. }
  6193. // Metric filters express how CloudWatch Logs would extract metric observations
  6194. // from ingested log events and transform them into metric data in a CloudWatch
  6195. // metric.
  6196. type MetricFilter struct {
  6197. _ struct{} `type:"structure"`
  6198. // The creation time of the metric filter, expressed as the number of milliseconds
  6199. // after Jan 1, 1970 00:00:00 UTC.
  6200. CreationTime *int64 `locationName:"creationTime" type:"long"`
  6201. // The name of the metric filter.
  6202. FilterName *string `locationName:"filterName" min:"1" type:"string"`
  6203. // A symbolic description of how CloudWatch Logs should interpret the data in
  6204. // each log event. For example, a log event may contain timestamps, IP addresses,
  6205. // strings, and so on. You use the filter pattern to specify what to look for
  6206. // in the log event message.
  6207. FilterPattern *string `locationName:"filterPattern" type:"string"`
  6208. // The name of the log group.
  6209. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  6210. // The metric transformations.
  6211. MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"`
  6212. }
  6213. // String returns the string representation
  6214. func (s MetricFilter) String() string {
  6215. return awsutil.Prettify(s)
  6216. }
  6217. // GoString returns the string representation
  6218. func (s MetricFilter) GoString() string {
  6219. return s.String()
  6220. }
  6221. // SetCreationTime sets the CreationTime field's value.
  6222. func (s *MetricFilter) SetCreationTime(v int64) *MetricFilter {
  6223. s.CreationTime = &v
  6224. return s
  6225. }
  6226. // SetFilterName sets the FilterName field's value.
  6227. func (s *MetricFilter) SetFilterName(v string) *MetricFilter {
  6228. s.FilterName = &v
  6229. return s
  6230. }
  6231. // SetFilterPattern sets the FilterPattern field's value.
  6232. func (s *MetricFilter) SetFilterPattern(v string) *MetricFilter {
  6233. s.FilterPattern = &v
  6234. return s
  6235. }
  6236. // SetLogGroupName sets the LogGroupName field's value.
  6237. func (s *MetricFilter) SetLogGroupName(v string) *MetricFilter {
  6238. s.LogGroupName = &v
  6239. return s
  6240. }
  6241. // SetMetricTransformations sets the MetricTransformations field's value.
  6242. func (s *MetricFilter) SetMetricTransformations(v []*MetricTransformation) *MetricFilter {
  6243. s.MetricTransformations = v
  6244. return s
  6245. }
  6246. // Represents a matched event.
  6247. type MetricFilterMatchRecord struct {
  6248. _ struct{} `type:"structure"`
  6249. // The raw event data.
  6250. EventMessage *string `locationName:"eventMessage" min:"1" type:"string"`
  6251. // The event number.
  6252. EventNumber *int64 `locationName:"eventNumber" type:"long"`
  6253. // The values extracted from the event data by the filter.
  6254. ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"`
  6255. }
  6256. // String returns the string representation
  6257. func (s MetricFilterMatchRecord) String() string {
  6258. return awsutil.Prettify(s)
  6259. }
  6260. // GoString returns the string representation
  6261. func (s MetricFilterMatchRecord) GoString() string {
  6262. return s.String()
  6263. }
  6264. // SetEventMessage sets the EventMessage field's value.
  6265. func (s *MetricFilterMatchRecord) SetEventMessage(v string) *MetricFilterMatchRecord {
  6266. s.EventMessage = &v
  6267. return s
  6268. }
  6269. // SetEventNumber sets the EventNumber field's value.
  6270. func (s *MetricFilterMatchRecord) SetEventNumber(v int64) *MetricFilterMatchRecord {
  6271. s.EventNumber = &v
  6272. return s
  6273. }
  6274. // SetExtractedValues sets the ExtractedValues field's value.
  6275. func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *MetricFilterMatchRecord {
  6276. s.ExtractedValues = v
  6277. return s
  6278. }
  6279. // Indicates how to transform ingested log eventsto metric data in a CloudWatch
  6280. // metric.
  6281. type MetricTransformation struct {
  6282. _ struct{} `type:"structure"`
  6283. // (Optional) The value to emit when a filter pattern does not match a log event.
  6284. // This value can be null.
  6285. DefaultValue *float64 `locationName:"defaultValue" type:"double"`
  6286. // The name of the CloudWatch metric.
  6287. //
  6288. // MetricName is a required field
  6289. MetricName *string `locationName:"metricName" type:"string" required:"true"`
  6290. // The namespace of the CloudWatch metric.
  6291. //
  6292. // MetricNamespace is a required field
  6293. MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"`
  6294. // The value to publish to the CloudWatch metric when a filter pattern matches
  6295. // a log event.
  6296. //
  6297. // MetricValue is a required field
  6298. MetricValue *string `locationName:"metricValue" type:"string" required:"true"`
  6299. }
  6300. // String returns the string representation
  6301. func (s MetricTransformation) String() string {
  6302. return awsutil.Prettify(s)
  6303. }
  6304. // GoString returns the string representation
  6305. func (s MetricTransformation) GoString() string {
  6306. return s.String()
  6307. }
  6308. // Validate inspects the fields of the type to determine if they are valid.
  6309. func (s *MetricTransformation) Validate() error {
  6310. invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"}
  6311. if s.MetricName == nil {
  6312. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  6313. }
  6314. if s.MetricNamespace == nil {
  6315. invalidParams.Add(request.NewErrParamRequired("MetricNamespace"))
  6316. }
  6317. if s.MetricValue == nil {
  6318. invalidParams.Add(request.NewErrParamRequired("MetricValue"))
  6319. }
  6320. if invalidParams.Len() > 0 {
  6321. return invalidParams
  6322. }
  6323. return nil
  6324. }
  6325. // SetDefaultValue sets the DefaultValue field's value.
  6326. func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation {
  6327. s.DefaultValue = &v
  6328. return s
  6329. }
  6330. // SetMetricName sets the MetricName field's value.
  6331. func (s *MetricTransformation) SetMetricName(v string) *MetricTransformation {
  6332. s.MetricName = &v
  6333. return s
  6334. }
  6335. // SetMetricNamespace sets the MetricNamespace field's value.
  6336. func (s *MetricTransformation) SetMetricNamespace(v string) *MetricTransformation {
  6337. s.MetricNamespace = &v
  6338. return s
  6339. }
  6340. // SetMetricValue sets the MetricValue field's value.
  6341. func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation {
  6342. s.MetricValue = &v
  6343. return s
  6344. }
  6345. // Represents a log event.
  6346. type OutputLogEvent struct {
  6347. _ struct{} `type:"structure"`
  6348. // The time the event was ingested, expressed as the number of milliseconds
  6349. // after Jan 1, 1970 00:00:00 UTC.
  6350. IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
  6351. // The data contained in the log event.
  6352. Message *string `locationName:"message" min:"1" type:"string"`
  6353. // The time the event occurred, expressed as the number of milliseconds after
  6354. // Jan 1, 1970 00:00:00 UTC.
  6355. Timestamp *int64 `locationName:"timestamp" type:"long"`
  6356. }
  6357. // String returns the string representation
  6358. func (s OutputLogEvent) String() string {
  6359. return awsutil.Prettify(s)
  6360. }
  6361. // GoString returns the string representation
  6362. func (s OutputLogEvent) GoString() string {
  6363. return s.String()
  6364. }
  6365. // SetIngestionTime sets the IngestionTime field's value.
  6366. func (s *OutputLogEvent) SetIngestionTime(v int64) *OutputLogEvent {
  6367. s.IngestionTime = &v
  6368. return s
  6369. }
  6370. // SetMessage sets the Message field's value.
  6371. func (s *OutputLogEvent) SetMessage(v string) *OutputLogEvent {
  6372. s.Message = &v
  6373. return s
  6374. }
  6375. // SetTimestamp sets the Timestamp field's value.
  6376. func (s *OutputLogEvent) SetTimestamp(v int64) *OutputLogEvent {
  6377. s.Timestamp = &v
  6378. return s
  6379. }
  6380. type PutDestinationInput struct {
  6381. _ struct{} `type:"structure"`
  6382. // A name for the destination.
  6383. //
  6384. // DestinationName is a required field
  6385. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
  6386. // The ARN of an IAM role that grants CloudWatch Logs permissions to call the
  6387. // Amazon Kinesis PutRecord operation on the destination stream.
  6388. //
  6389. // RoleArn is a required field
  6390. RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"`
  6391. // The ARN of an Amazon Kinesis stream to which to deliver matching log events.
  6392. //
  6393. // TargetArn is a required field
  6394. TargetArn *string `locationName:"targetArn" min:"1" type:"string" required:"true"`
  6395. }
  6396. // String returns the string representation
  6397. func (s PutDestinationInput) String() string {
  6398. return awsutil.Prettify(s)
  6399. }
  6400. // GoString returns the string representation
  6401. func (s PutDestinationInput) GoString() string {
  6402. return s.String()
  6403. }
  6404. // Validate inspects the fields of the type to determine if they are valid.
  6405. func (s *PutDestinationInput) Validate() error {
  6406. invalidParams := request.ErrInvalidParams{Context: "PutDestinationInput"}
  6407. if s.DestinationName == nil {
  6408. invalidParams.Add(request.NewErrParamRequired("DestinationName"))
  6409. }
  6410. if s.DestinationName != nil && len(*s.DestinationName) < 1 {
  6411. invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
  6412. }
  6413. if s.RoleArn == nil {
  6414. invalidParams.Add(request.NewErrParamRequired("RoleArn"))
  6415. }
  6416. if s.RoleArn != nil && len(*s.RoleArn) < 1 {
  6417. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
  6418. }
  6419. if s.TargetArn == nil {
  6420. invalidParams.Add(request.NewErrParamRequired("TargetArn"))
  6421. }
  6422. if s.TargetArn != nil && len(*s.TargetArn) < 1 {
  6423. invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1))
  6424. }
  6425. if invalidParams.Len() > 0 {
  6426. return invalidParams
  6427. }
  6428. return nil
  6429. }
  6430. // SetDestinationName sets the DestinationName field's value.
  6431. func (s *PutDestinationInput) SetDestinationName(v string) *PutDestinationInput {
  6432. s.DestinationName = &v
  6433. return s
  6434. }
  6435. // SetRoleArn sets the RoleArn field's value.
  6436. func (s *PutDestinationInput) SetRoleArn(v string) *PutDestinationInput {
  6437. s.RoleArn = &v
  6438. return s
  6439. }
  6440. // SetTargetArn sets the TargetArn field's value.
  6441. func (s *PutDestinationInput) SetTargetArn(v string) *PutDestinationInput {
  6442. s.TargetArn = &v
  6443. return s
  6444. }
  6445. type PutDestinationOutput struct {
  6446. _ struct{} `type:"structure"`
  6447. // The destination.
  6448. Destination *Destination `locationName:"destination" type:"structure"`
  6449. }
  6450. // String returns the string representation
  6451. func (s PutDestinationOutput) String() string {
  6452. return awsutil.Prettify(s)
  6453. }
  6454. // GoString returns the string representation
  6455. func (s PutDestinationOutput) GoString() string {
  6456. return s.String()
  6457. }
  6458. // SetDestination sets the Destination field's value.
  6459. func (s *PutDestinationOutput) SetDestination(v *Destination) *PutDestinationOutput {
  6460. s.Destination = v
  6461. return s
  6462. }
  6463. type PutDestinationPolicyInput struct {
  6464. _ struct{} `type:"structure"`
  6465. // An IAM policy document that authorizes cross-account users to deliver their
  6466. // log events to the associated destination.
  6467. //
  6468. // AccessPolicy is a required field
  6469. AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string" required:"true"`
  6470. // A name for an existing destination.
  6471. //
  6472. // DestinationName is a required field
  6473. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
  6474. }
  6475. // String returns the string representation
  6476. func (s PutDestinationPolicyInput) String() string {
  6477. return awsutil.Prettify(s)
  6478. }
  6479. // GoString returns the string representation
  6480. func (s PutDestinationPolicyInput) GoString() string {
  6481. return s.String()
  6482. }
  6483. // Validate inspects the fields of the type to determine if they are valid.
  6484. func (s *PutDestinationPolicyInput) Validate() error {
  6485. invalidParams := request.ErrInvalidParams{Context: "PutDestinationPolicyInput"}
  6486. if s.AccessPolicy == nil {
  6487. invalidParams.Add(request.NewErrParamRequired("AccessPolicy"))
  6488. }
  6489. if s.AccessPolicy != nil && len(*s.AccessPolicy) < 1 {
  6490. invalidParams.Add(request.NewErrParamMinLen("AccessPolicy", 1))
  6491. }
  6492. if s.DestinationName == nil {
  6493. invalidParams.Add(request.NewErrParamRequired("DestinationName"))
  6494. }
  6495. if s.DestinationName != nil && len(*s.DestinationName) < 1 {
  6496. invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
  6497. }
  6498. if invalidParams.Len() > 0 {
  6499. return invalidParams
  6500. }
  6501. return nil
  6502. }
  6503. // SetAccessPolicy sets the AccessPolicy field's value.
  6504. func (s *PutDestinationPolicyInput) SetAccessPolicy(v string) *PutDestinationPolicyInput {
  6505. s.AccessPolicy = &v
  6506. return s
  6507. }
  6508. // SetDestinationName sets the DestinationName field's value.
  6509. func (s *PutDestinationPolicyInput) SetDestinationName(v string) *PutDestinationPolicyInput {
  6510. s.DestinationName = &v
  6511. return s
  6512. }
  6513. type PutDestinationPolicyOutput struct {
  6514. _ struct{} `type:"structure"`
  6515. }
  6516. // String returns the string representation
  6517. func (s PutDestinationPolicyOutput) String() string {
  6518. return awsutil.Prettify(s)
  6519. }
  6520. // GoString returns the string representation
  6521. func (s PutDestinationPolicyOutput) GoString() string {
  6522. return s.String()
  6523. }
  6524. type PutLogEventsInput struct {
  6525. _ struct{} `type:"structure"`
  6526. // The log events.
  6527. //
  6528. // LogEvents is a required field
  6529. LogEvents []*InputLogEvent `locationName:"logEvents" min:"1" type:"list" required:"true"`
  6530. // The name of the log group.
  6531. //
  6532. // LogGroupName is a required field
  6533. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  6534. // The name of the log stream.
  6535. //
  6536. // LogStreamName is a required field
  6537. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
  6538. // The sequence token obtained from the response of the previous PutLogEvents
  6539. // call. An upload in a newly created log stream does not require a sequence
  6540. // token. You can also get the sequence token using DescribeLogStreams. If you
  6541. // call PutLogEvents twice within a narrow time period using the same value
  6542. // for sequenceToken, both calls may be successful, or one may be rejected.
  6543. SequenceToken *string `locationName:"sequenceToken" min:"1" type:"string"`
  6544. }
  6545. // String returns the string representation
  6546. func (s PutLogEventsInput) String() string {
  6547. return awsutil.Prettify(s)
  6548. }
  6549. // GoString returns the string representation
  6550. func (s PutLogEventsInput) GoString() string {
  6551. return s.String()
  6552. }
  6553. // Validate inspects the fields of the type to determine if they are valid.
  6554. func (s *PutLogEventsInput) Validate() error {
  6555. invalidParams := request.ErrInvalidParams{Context: "PutLogEventsInput"}
  6556. if s.LogEvents == nil {
  6557. invalidParams.Add(request.NewErrParamRequired("LogEvents"))
  6558. }
  6559. if s.LogEvents != nil && len(s.LogEvents) < 1 {
  6560. invalidParams.Add(request.NewErrParamMinLen("LogEvents", 1))
  6561. }
  6562. if s.LogGroupName == nil {
  6563. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  6564. }
  6565. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  6566. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  6567. }
  6568. if s.LogStreamName == nil {
  6569. invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
  6570. }
  6571. if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
  6572. invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
  6573. }
  6574. if s.SequenceToken != nil && len(*s.SequenceToken) < 1 {
  6575. invalidParams.Add(request.NewErrParamMinLen("SequenceToken", 1))
  6576. }
  6577. if s.LogEvents != nil {
  6578. for i, v := range s.LogEvents {
  6579. if v == nil {
  6580. continue
  6581. }
  6582. if err := v.Validate(); err != nil {
  6583. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LogEvents", i), err.(request.ErrInvalidParams))
  6584. }
  6585. }
  6586. }
  6587. if invalidParams.Len() > 0 {
  6588. return invalidParams
  6589. }
  6590. return nil
  6591. }
  6592. // SetLogEvents sets the LogEvents field's value.
  6593. func (s *PutLogEventsInput) SetLogEvents(v []*InputLogEvent) *PutLogEventsInput {
  6594. s.LogEvents = v
  6595. return s
  6596. }
  6597. // SetLogGroupName sets the LogGroupName field's value.
  6598. func (s *PutLogEventsInput) SetLogGroupName(v string) *PutLogEventsInput {
  6599. s.LogGroupName = &v
  6600. return s
  6601. }
  6602. // SetLogStreamName sets the LogStreamName field's value.
  6603. func (s *PutLogEventsInput) SetLogStreamName(v string) *PutLogEventsInput {
  6604. s.LogStreamName = &v
  6605. return s
  6606. }
  6607. // SetSequenceToken sets the SequenceToken field's value.
  6608. func (s *PutLogEventsInput) SetSequenceToken(v string) *PutLogEventsInput {
  6609. s.SequenceToken = &v
  6610. return s
  6611. }
  6612. type PutLogEventsOutput struct {
  6613. _ struct{} `type:"structure"`
  6614. // The next sequence token.
  6615. NextSequenceToken *string `locationName:"nextSequenceToken" min:"1" type:"string"`
  6616. // The rejected events.
  6617. RejectedLogEventsInfo *RejectedLogEventsInfo `locationName:"rejectedLogEventsInfo" type:"structure"`
  6618. }
  6619. // String returns the string representation
  6620. func (s PutLogEventsOutput) String() string {
  6621. return awsutil.Prettify(s)
  6622. }
  6623. // GoString returns the string representation
  6624. func (s PutLogEventsOutput) GoString() string {
  6625. return s.String()
  6626. }
  6627. // SetNextSequenceToken sets the NextSequenceToken field's value.
  6628. func (s *PutLogEventsOutput) SetNextSequenceToken(v string) *PutLogEventsOutput {
  6629. s.NextSequenceToken = &v
  6630. return s
  6631. }
  6632. // SetRejectedLogEventsInfo sets the RejectedLogEventsInfo field's value.
  6633. func (s *PutLogEventsOutput) SetRejectedLogEventsInfo(v *RejectedLogEventsInfo) *PutLogEventsOutput {
  6634. s.RejectedLogEventsInfo = v
  6635. return s
  6636. }
  6637. type PutMetricFilterInput struct {
  6638. _ struct{} `type:"structure"`
  6639. // A name for the metric filter.
  6640. //
  6641. // FilterName is a required field
  6642. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
  6643. // A filter pattern for extracting metric data out of ingested log events.
  6644. //
  6645. // FilterPattern is a required field
  6646. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  6647. // The name of the log group.
  6648. //
  6649. // LogGroupName is a required field
  6650. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  6651. // A collection of information that defines how metric data gets emitted.
  6652. //
  6653. // MetricTransformations is a required field
  6654. MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list" required:"true"`
  6655. }
  6656. // String returns the string representation
  6657. func (s PutMetricFilterInput) String() string {
  6658. return awsutil.Prettify(s)
  6659. }
  6660. // GoString returns the string representation
  6661. func (s PutMetricFilterInput) GoString() string {
  6662. return s.String()
  6663. }
  6664. // Validate inspects the fields of the type to determine if they are valid.
  6665. func (s *PutMetricFilterInput) Validate() error {
  6666. invalidParams := request.ErrInvalidParams{Context: "PutMetricFilterInput"}
  6667. if s.FilterName == nil {
  6668. invalidParams.Add(request.NewErrParamRequired("FilterName"))
  6669. }
  6670. if s.FilterName != nil && len(*s.FilterName) < 1 {
  6671. invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
  6672. }
  6673. if s.FilterPattern == nil {
  6674. invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
  6675. }
  6676. if s.LogGroupName == nil {
  6677. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  6678. }
  6679. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  6680. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  6681. }
  6682. if s.MetricTransformations == nil {
  6683. invalidParams.Add(request.NewErrParamRequired("MetricTransformations"))
  6684. }
  6685. if s.MetricTransformations != nil && len(s.MetricTransformations) < 1 {
  6686. invalidParams.Add(request.NewErrParamMinLen("MetricTransformations", 1))
  6687. }
  6688. if s.MetricTransformations != nil {
  6689. for i, v := range s.MetricTransformations {
  6690. if v == nil {
  6691. continue
  6692. }
  6693. if err := v.Validate(); err != nil {
  6694. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricTransformations", i), err.(request.ErrInvalidParams))
  6695. }
  6696. }
  6697. }
  6698. if invalidParams.Len() > 0 {
  6699. return invalidParams
  6700. }
  6701. return nil
  6702. }
  6703. // SetFilterName sets the FilterName field's value.
  6704. func (s *PutMetricFilterInput) SetFilterName(v string) *PutMetricFilterInput {
  6705. s.FilterName = &v
  6706. return s
  6707. }
  6708. // SetFilterPattern sets the FilterPattern field's value.
  6709. func (s *PutMetricFilterInput) SetFilterPattern(v string) *PutMetricFilterInput {
  6710. s.FilterPattern = &v
  6711. return s
  6712. }
  6713. // SetLogGroupName sets the LogGroupName field's value.
  6714. func (s *PutMetricFilterInput) SetLogGroupName(v string) *PutMetricFilterInput {
  6715. s.LogGroupName = &v
  6716. return s
  6717. }
  6718. // SetMetricTransformations sets the MetricTransformations field's value.
  6719. func (s *PutMetricFilterInput) SetMetricTransformations(v []*MetricTransformation) *PutMetricFilterInput {
  6720. s.MetricTransformations = v
  6721. return s
  6722. }
  6723. type PutMetricFilterOutput struct {
  6724. _ struct{} `type:"structure"`
  6725. }
  6726. // String returns the string representation
  6727. func (s PutMetricFilterOutput) String() string {
  6728. return awsutil.Prettify(s)
  6729. }
  6730. // GoString returns the string representation
  6731. func (s PutMetricFilterOutput) GoString() string {
  6732. return s.String()
  6733. }
  6734. type PutResourcePolicyInput struct {
  6735. _ struct{} `type:"structure"`
  6736. // Details of the new policy, including the identity of the principal that is
  6737. // enabled to put logs to this account. This is formatted as a JSON string.
  6738. //
  6739. // The following example creates a resource policy enabling the Route 53 service
  6740. // to put DNS query logs in to the specified log group. Replace "logArn" with
  6741. // the ARN of your CloudWatch Logs resource, such as a log group or log stream.
  6742. //
  6743. // { "Version": "2012-10-17", "Statement": [ { "Sid": "Route53LogsToCloudWatchLogs",
  6744. // "Effect": "Allow", "Principal": { "Service": [ "route53.amazonaws.com" ]
  6745. // }, "Action":"logs:PutLogEvents", "Resource": "logArn" } ] }
  6746. PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"`
  6747. // Name of the new policy. This parameter is required.
  6748. PolicyName *string `locationName:"policyName" type:"string"`
  6749. }
  6750. // String returns the string representation
  6751. func (s PutResourcePolicyInput) String() string {
  6752. return awsutil.Prettify(s)
  6753. }
  6754. // GoString returns the string representation
  6755. func (s PutResourcePolicyInput) GoString() string {
  6756. return s.String()
  6757. }
  6758. // Validate inspects the fields of the type to determine if they are valid.
  6759. func (s *PutResourcePolicyInput) Validate() error {
  6760. invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"}
  6761. if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 {
  6762. invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1))
  6763. }
  6764. if invalidParams.Len() > 0 {
  6765. return invalidParams
  6766. }
  6767. return nil
  6768. }
  6769. // SetPolicyDocument sets the PolicyDocument field's value.
  6770. func (s *PutResourcePolicyInput) SetPolicyDocument(v string) *PutResourcePolicyInput {
  6771. s.PolicyDocument = &v
  6772. return s
  6773. }
  6774. // SetPolicyName sets the PolicyName field's value.
  6775. func (s *PutResourcePolicyInput) SetPolicyName(v string) *PutResourcePolicyInput {
  6776. s.PolicyName = &v
  6777. return s
  6778. }
  6779. type PutResourcePolicyOutput struct {
  6780. _ struct{} `type:"structure"`
  6781. // The new policy.
  6782. ResourcePolicy *ResourcePolicy `locationName:"resourcePolicy" type:"structure"`
  6783. }
  6784. // String returns the string representation
  6785. func (s PutResourcePolicyOutput) String() string {
  6786. return awsutil.Prettify(s)
  6787. }
  6788. // GoString returns the string representation
  6789. func (s PutResourcePolicyOutput) GoString() string {
  6790. return s.String()
  6791. }
  6792. // SetResourcePolicy sets the ResourcePolicy field's value.
  6793. func (s *PutResourcePolicyOutput) SetResourcePolicy(v *ResourcePolicy) *PutResourcePolicyOutput {
  6794. s.ResourcePolicy = v
  6795. return s
  6796. }
  6797. type PutRetentionPolicyInput struct {
  6798. _ struct{} `type:"structure"`
  6799. // The name of the log group.
  6800. //
  6801. // LogGroupName is a required field
  6802. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  6803. // The number of days to retain the log events in the specified log group. Possible
  6804. // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731,
  6805. // 1827, and 3653.
  6806. //
  6807. // RetentionInDays is a required field
  6808. RetentionInDays *int64 `locationName:"retentionInDays" type:"integer" required:"true"`
  6809. }
  6810. // String returns the string representation
  6811. func (s PutRetentionPolicyInput) String() string {
  6812. return awsutil.Prettify(s)
  6813. }
  6814. // GoString returns the string representation
  6815. func (s PutRetentionPolicyInput) GoString() string {
  6816. return s.String()
  6817. }
  6818. // Validate inspects the fields of the type to determine if they are valid.
  6819. func (s *PutRetentionPolicyInput) Validate() error {
  6820. invalidParams := request.ErrInvalidParams{Context: "PutRetentionPolicyInput"}
  6821. if s.LogGroupName == nil {
  6822. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  6823. }
  6824. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  6825. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  6826. }
  6827. if s.RetentionInDays == nil {
  6828. invalidParams.Add(request.NewErrParamRequired("RetentionInDays"))
  6829. }
  6830. if invalidParams.Len() > 0 {
  6831. return invalidParams
  6832. }
  6833. return nil
  6834. }
  6835. // SetLogGroupName sets the LogGroupName field's value.
  6836. func (s *PutRetentionPolicyInput) SetLogGroupName(v string) *PutRetentionPolicyInput {
  6837. s.LogGroupName = &v
  6838. return s
  6839. }
  6840. // SetRetentionInDays sets the RetentionInDays field's value.
  6841. func (s *PutRetentionPolicyInput) SetRetentionInDays(v int64) *PutRetentionPolicyInput {
  6842. s.RetentionInDays = &v
  6843. return s
  6844. }
  6845. type PutRetentionPolicyOutput struct {
  6846. _ struct{} `type:"structure"`
  6847. }
  6848. // String returns the string representation
  6849. func (s PutRetentionPolicyOutput) String() string {
  6850. return awsutil.Prettify(s)
  6851. }
  6852. // GoString returns the string representation
  6853. func (s PutRetentionPolicyOutput) GoString() string {
  6854. return s.String()
  6855. }
  6856. type PutSubscriptionFilterInput struct {
  6857. _ struct{} `type:"structure"`
  6858. // The ARN of the destination to deliver matching log events to. Currently,
  6859. // the supported destinations are:
  6860. //
  6861. // * An Amazon Kinesis stream belonging to the same account as the subscription
  6862. // filter, for same-account delivery.
  6863. //
  6864. // * A logical destination (specified using an ARN) belonging to a different
  6865. // account, for cross-account delivery.
  6866. //
  6867. // * An Amazon Kinesis Firehose delivery stream belonging to the same account
  6868. // as the subscription filter, for same-account delivery.
  6869. //
  6870. // * An AWS Lambda function belonging to the same account as the subscription
  6871. // filter, for same-account delivery.
  6872. //
  6873. // DestinationArn is a required field
  6874. DestinationArn *string `locationName:"destinationArn" min:"1" type:"string" required:"true"`
  6875. // The method used to distribute log data to the destination. By default log
  6876. // data is grouped by log stream, but the grouping can be set to random for
  6877. // a more even distribution. This property is only applicable when the destination
  6878. // is an Amazon Kinesis stream.
  6879. Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"`
  6880. // A name for the subscription filter. If you are updating an existing filter,
  6881. // you must specify the correct name in filterName. Otherwise, the call fails
  6882. // because you cannot associate a second filter with a log group. To find the
  6883. // name of the filter currently associated with a log group, use DescribeSubscriptionFilters.
  6884. //
  6885. // FilterName is a required field
  6886. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
  6887. // A filter pattern for subscribing to a filtered stream of log events.
  6888. //
  6889. // FilterPattern is a required field
  6890. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  6891. // The name of the log group.
  6892. //
  6893. // LogGroupName is a required field
  6894. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  6895. // The ARN of an IAM role that grants CloudWatch Logs permissions to deliver
  6896. // ingested log events to the destination stream. You don't need to provide
  6897. // the ARN when you are working with a logical destination for cross-account
  6898. // delivery.
  6899. RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
  6900. }
  6901. // String returns the string representation
  6902. func (s PutSubscriptionFilterInput) String() string {
  6903. return awsutil.Prettify(s)
  6904. }
  6905. // GoString returns the string representation
  6906. func (s PutSubscriptionFilterInput) GoString() string {
  6907. return s.String()
  6908. }
  6909. // Validate inspects the fields of the type to determine if they are valid.
  6910. func (s *PutSubscriptionFilterInput) Validate() error {
  6911. invalidParams := request.ErrInvalidParams{Context: "PutSubscriptionFilterInput"}
  6912. if s.DestinationArn == nil {
  6913. invalidParams.Add(request.NewErrParamRequired("DestinationArn"))
  6914. }
  6915. if s.DestinationArn != nil && len(*s.DestinationArn) < 1 {
  6916. invalidParams.Add(request.NewErrParamMinLen("DestinationArn", 1))
  6917. }
  6918. if s.FilterName == nil {
  6919. invalidParams.Add(request.NewErrParamRequired("FilterName"))
  6920. }
  6921. if s.FilterName != nil && len(*s.FilterName) < 1 {
  6922. invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
  6923. }
  6924. if s.FilterPattern == nil {
  6925. invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
  6926. }
  6927. if s.LogGroupName == nil {
  6928. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  6929. }
  6930. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  6931. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  6932. }
  6933. if s.RoleArn != nil && len(*s.RoleArn) < 1 {
  6934. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
  6935. }
  6936. if invalidParams.Len() > 0 {
  6937. return invalidParams
  6938. }
  6939. return nil
  6940. }
  6941. // SetDestinationArn sets the DestinationArn field's value.
  6942. func (s *PutSubscriptionFilterInput) SetDestinationArn(v string) *PutSubscriptionFilterInput {
  6943. s.DestinationArn = &v
  6944. return s
  6945. }
  6946. // SetDistribution sets the Distribution field's value.
  6947. func (s *PutSubscriptionFilterInput) SetDistribution(v string) *PutSubscriptionFilterInput {
  6948. s.Distribution = &v
  6949. return s
  6950. }
  6951. // SetFilterName sets the FilterName field's value.
  6952. func (s *PutSubscriptionFilterInput) SetFilterName(v string) *PutSubscriptionFilterInput {
  6953. s.FilterName = &v
  6954. return s
  6955. }
  6956. // SetFilterPattern sets the FilterPattern field's value.
  6957. func (s *PutSubscriptionFilterInput) SetFilterPattern(v string) *PutSubscriptionFilterInput {
  6958. s.FilterPattern = &v
  6959. return s
  6960. }
  6961. // SetLogGroupName sets the LogGroupName field's value.
  6962. func (s *PutSubscriptionFilterInput) SetLogGroupName(v string) *PutSubscriptionFilterInput {
  6963. s.LogGroupName = &v
  6964. return s
  6965. }
  6966. // SetRoleArn sets the RoleArn field's value.
  6967. func (s *PutSubscriptionFilterInput) SetRoleArn(v string) *PutSubscriptionFilterInput {
  6968. s.RoleArn = &v
  6969. return s
  6970. }
  6971. type PutSubscriptionFilterOutput struct {
  6972. _ struct{} `type:"structure"`
  6973. }
  6974. // String returns the string representation
  6975. func (s PutSubscriptionFilterOutput) String() string {
  6976. return awsutil.Prettify(s)
  6977. }
  6978. // GoString returns the string representation
  6979. func (s PutSubscriptionFilterOutput) GoString() string {
  6980. return s.String()
  6981. }
  6982. // Reserved.
  6983. type QueryCompileError struct {
  6984. _ struct{} `type:"structure"`
  6985. // Reserved.
  6986. Location *QueryCompileErrorLocation `locationName:"location" type:"structure"`
  6987. // Reserved.
  6988. Message *string `locationName:"message" type:"string"`
  6989. }
  6990. // String returns the string representation
  6991. func (s QueryCompileError) String() string {
  6992. return awsutil.Prettify(s)
  6993. }
  6994. // GoString returns the string representation
  6995. func (s QueryCompileError) GoString() string {
  6996. return s.String()
  6997. }
  6998. // SetLocation sets the Location field's value.
  6999. func (s *QueryCompileError) SetLocation(v *QueryCompileErrorLocation) *QueryCompileError {
  7000. s.Location = v
  7001. return s
  7002. }
  7003. // SetMessage sets the Message field's value.
  7004. func (s *QueryCompileError) SetMessage(v string) *QueryCompileError {
  7005. s.Message = &v
  7006. return s
  7007. }
  7008. // Reserved.
  7009. type QueryCompileErrorLocation struct {
  7010. _ struct{} `type:"structure"`
  7011. // Reserved.
  7012. EndCharOffset *int64 `locationName:"endCharOffset" type:"integer"`
  7013. // Reserved.
  7014. StartCharOffset *int64 `locationName:"startCharOffset" type:"integer"`
  7015. }
  7016. // String returns the string representation
  7017. func (s QueryCompileErrorLocation) String() string {
  7018. return awsutil.Prettify(s)
  7019. }
  7020. // GoString returns the string representation
  7021. func (s QueryCompileErrorLocation) GoString() string {
  7022. return s.String()
  7023. }
  7024. // SetEndCharOffset sets the EndCharOffset field's value.
  7025. func (s *QueryCompileErrorLocation) SetEndCharOffset(v int64) *QueryCompileErrorLocation {
  7026. s.EndCharOffset = &v
  7027. return s
  7028. }
  7029. // SetStartCharOffset sets the StartCharOffset field's value.
  7030. func (s *QueryCompileErrorLocation) SetStartCharOffset(v int64) *QueryCompileErrorLocation {
  7031. s.StartCharOffset = &v
  7032. return s
  7033. }
  7034. // Information about one CloudWatch Logs Insights query that matches the request
  7035. // in a DescribeQueries operation.
  7036. type QueryInfo struct {
  7037. _ struct{} `type:"structure"`
  7038. // The date and time that this query was created.
  7039. CreateTime *int64 `locationName:"createTime" type:"long"`
  7040. // The name of the log group scanned by this query.
  7041. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  7042. // The unique ID number of this query.
  7043. QueryId *string `locationName:"queryId" type:"string"`
  7044. // The query string used in this query.
  7045. QueryString *string `locationName:"queryString" type:"string"`
  7046. // The status of this query. Possible values are Cancelled, Complete, Failed,
  7047. // Running, Scheduled, and Unknown.
  7048. Status *string `locationName:"status" type:"string" enum:"QueryStatus"`
  7049. }
  7050. // String returns the string representation
  7051. func (s QueryInfo) String() string {
  7052. return awsutil.Prettify(s)
  7053. }
  7054. // GoString returns the string representation
  7055. func (s QueryInfo) GoString() string {
  7056. return s.String()
  7057. }
  7058. // SetCreateTime sets the CreateTime field's value.
  7059. func (s *QueryInfo) SetCreateTime(v int64) *QueryInfo {
  7060. s.CreateTime = &v
  7061. return s
  7062. }
  7063. // SetLogGroupName sets the LogGroupName field's value.
  7064. func (s *QueryInfo) SetLogGroupName(v string) *QueryInfo {
  7065. s.LogGroupName = &v
  7066. return s
  7067. }
  7068. // SetQueryId sets the QueryId field's value.
  7069. func (s *QueryInfo) SetQueryId(v string) *QueryInfo {
  7070. s.QueryId = &v
  7071. return s
  7072. }
  7073. // SetQueryString sets the QueryString field's value.
  7074. func (s *QueryInfo) SetQueryString(v string) *QueryInfo {
  7075. s.QueryString = &v
  7076. return s
  7077. }
  7078. // SetStatus sets the Status field's value.
  7079. func (s *QueryInfo) SetStatus(v string) *QueryInfo {
  7080. s.Status = &v
  7081. return s
  7082. }
  7083. // Contains the number of log events scanned by the query, the number of log
  7084. // events that matched the query criteria, and the total number of bytes in
  7085. // the log events that were scanned.
  7086. type QueryStatistics struct {
  7087. _ struct{} `type:"structure"`
  7088. // The total number of bytes in the log events scanned during the query.
  7089. BytesScanned *float64 `locationName:"bytesScanned" type:"double"`
  7090. // The number of log events that matched the query string.
  7091. RecordsMatched *float64 `locationName:"recordsMatched" type:"double"`
  7092. // The total number of log events scanned during the query.
  7093. RecordsScanned *float64 `locationName:"recordsScanned" type:"double"`
  7094. }
  7095. // String returns the string representation
  7096. func (s QueryStatistics) String() string {
  7097. return awsutil.Prettify(s)
  7098. }
  7099. // GoString returns the string representation
  7100. func (s QueryStatistics) GoString() string {
  7101. return s.String()
  7102. }
  7103. // SetBytesScanned sets the BytesScanned field's value.
  7104. func (s *QueryStatistics) SetBytesScanned(v float64) *QueryStatistics {
  7105. s.BytesScanned = &v
  7106. return s
  7107. }
  7108. // SetRecordsMatched sets the RecordsMatched field's value.
  7109. func (s *QueryStatistics) SetRecordsMatched(v float64) *QueryStatistics {
  7110. s.RecordsMatched = &v
  7111. return s
  7112. }
  7113. // SetRecordsScanned sets the RecordsScanned field's value.
  7114. func (s *QueryStatistics) SetRecordsScanned(v float64) *QueryStatistics {
  7115. s.RecordsScanned = &v
  7116. return s
  7117. }
  7118. // Represents the rejected events.
  7119. type RejectedLogEventsInfo struct {
  7120. _ struct{} `type:"structure"`
  7121. // The expired log events.
  7122. ExpiredLogEventEndIndex *int64 `locationName:"expiredLogEventEndIndex" type:"integer"`
  7123. // The log events that are too new.
  7124. TooNewLogEventStartIndex *int64 `locationName:"tooNewLogEventStartIndex" type:"integer"`
  7125. // The log events that are too old.
  7126. TooOldLogEventEndIndex *int64 `locationName:"tooOldLogEventEndIndex" type:"integer"`
  7127. }
  7128. // String returns the string representation
  7129. func (s RejectedLogEventsInfo) String() string {
  7130. return awsutil.Prettify(s)
  7131. }
  7132. // GoString returns the string representation
  7133. func (s RejectedLogEventsInfo) GoString() string {
  7134. return s.String()
  7135. }
  7136. // SetExpiredLogEventEndIndex sets the ExpiredLogEventEndIndex field's value.
  7137. func (s *RejectedLogEventsInfo) SetExpiredLogEventEndIndex(v int64) *RejectedLogEventsInfo {
  7138. s.ExpiredLogEventEndIndex = &v
  7139. return s
  7140. }
  7141. // SetTooNewLogEventStartIndex sets the TooNewLogEventStartIndex field's value.
  7142. func (s *RejectedLogEventsInfo) SetTooNewLogEventStartIndex(v int64) *RejectedLogEventsInfo {
  7143. s.TooNewLogEventStartIndex = &v
  7144. return s
  7145. }
  7146. // SetTooOldLogEventEndIndex sets the TooOldLogEventEndIndex field's value.
  7147. func (s *RejectedLogEventsInfo) SetTooOldLogEventEndIndex(v int64) *RejectedLogEventsInfo {
  7148. s.TooOldLogEventEndIndex = &v
  7149. return s
  7150. }
  7151. // A policy enabling one or more entities to put logs to a log group in this
  7152. // account.
  7153. type ResourcePolicy struct {
  7154. _ struct{} `type:"structure"`
  7155. // Timestamp showing when this policy was last updated, expressed as the number
  7156. // of milliseconds after Jan 1, 1970 00:00:00 UTC.
  7157. LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"`
  7158. // The details of the policy.
  7159. PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"`
  7160. // The name of the resource policy.
  7161. PolicyName *string `locationName:"policyName" type:"string"`
  7162. }
  7163. // String returns the string representation
  7164. func (s ResourcePolicy) String() string {
  7165. return awsutil.Prettify(s)
  7166. }
  7167. // GoString returns the string representation
  7168. func (s ResourcePolicy) GoString() string {
  7169. return s.String()
  7170. }
  7171. // SetLastUpdatedTime sets the LastUpdatedTime field's value.
  7172. func (s *ResourcePolicy) SetLastUpdatedTime(v int64) *ResourcePolicy {
  7173. s.LastUpdatedTime = &v
  7174. return s
  7175. }
  7176. // SetPolicyDocument sets the PolicyDocument field's value.
  7177. func (s *ResourcePolicy) SetPolicyDocument(v string) *ResourcePolicy {
  7178. s.PolicyDocument = &v
  7179. return s
  7180. }
  7181. // SetPolicyName sets the PolicyName field's value.
  7182. func (s *ResourcePolicy) SetPolicyName(v string) *ResourcePolicy {
  7183. s.PolicyName = &v
  7184. return s
  7185. }
  7186. // Contains one field from one log event returned by a CloudWatch Logs Insights
  7187. // query, along with the value of that field.
  7188. type ResultField struct {
  7189. _ struct{} `type:"structure"`
  7190. // The log event field.
  7191. Field *string `locationName:"field" type:"string"`
  7192. // The value of this field.
  7193. Value *string `locationName:"value" type:"string"`
  7194. }
  7195. // String returns the string representation
  7196. func (s ResultField) String() string {
  7197. return awsutil.Prettify(s)
  7198. }
  7199. // GoString returns the string representation
  7200. func (s ResultField) GoString() string {
  7201. return s.String()
  7202. }
  7203. // SetField sets the Field field's value.
  7204. func (s *ResultField) SetField(v string) *ResultField {
  7205. s.Field = &v
  7206. return s
  7207. }
  7208. // SetValue sets the Value field's value.
  7209. func (s *ResultField) SetValue(v string) *ResultField {
  7210. s.Value = &v
  7211. return s
  7212. }
  7213. // Represents the search status of a log stream.
  7214. type SearchedLogStream struct {
  7215. _ struct{} `type:"structure"`
  7216. // The name of the log stream.
  7217. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
  7218. // Indicates whether all the events in this log stream were searched.
  7219. SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"`
  7220. }
  7221. // String returns the string representation
  7222. func (s SearchedLogStream) String() string {
  7223. return awsutil.Prettify(s)
  7224. }
  7225. // GoString returns the string representation
  7226. func (s SearchedLogStream) GoString() string {
  7227. return s.String()
  7228. }
  7229. // SetLogStreamName sets the LogStreamName field's value.
  7230. func (s *SearchedLogStream) SetLogStreamName(v string) *SearchedLogStream {
  7231. s.LogStreamName = &v
  7232. return s
  7233. }
  7234. // SetSearchedCompletely sets the SearchedCompletely field's value.
  7235. func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream {
  7236. s.SearchedCompletely = &v
  7237. return s
  7238. }
  7239. type StartQueryInput struct {
  7240. _ struct{} `type:"structure"`
  7241. // The time to end this query, if it is still running. Specified as epoch time,
  7242. // the number of seconds since January 1, 1970, 00:00:00 UTC.
  7243. //
  7244. // EndTime is a required field
  7245. EndTime *int64 `locationName:"endTime" type:"long" required:"true"`
  7246. // The maximum number of log events to return in the query. If the query string
  7247. // uses the fields command, only the specified fields and their values are returned.
  7248. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  7249. // The log group on which to perform the query.
  7250. //
  7251. // LogGroupName is a required field
  7252. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  7253. // The query string to use. For more information, see CloudWatch Logs Insights
  7254. // Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
  7255. //
  7256. // QueryString is a required field
  7257. QueryString *string `locationName:"queryString" type:"string" required:"true"`
  7258. // The time to start the query. Specified as epoch time, the number of seconds
  7259. // since January 1, 1970, 00:00:00 UTC.
  7260. //
  7261. // StartTime is a required field
  7262. StartTime *int64 `locationName:"startTime" type:"long" required:"true"`
  7263. }
  7264. // String returns the string representation
  7265. func (s StartQueryInput) String() string {
  7266. return awsutil.Prettify(s)
  7267. }
  7268. // GoString returns the string representation
  7269. func (s StartQueryInput) GoString() string {
  7270. return s.String()
  7271. }
  7272. // Validate inspects the fields of the type to determine if they are valid.
  7273. func (s *StartQueryInput) Validate() error {
  7274. invalidParams := request.ErrInvalidParams{Context: "StartQueryInput"}
  7275. if s.EndTime == nil {
  7276. invalidParams.Add(request.NewErrParamRequired("EndTime"))
  7277. }
  7278. if s.Limit != nil && *s.Limit < 1 {
  7279. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  7280. }
  7281. if s.LogGroupName == nil {
  7282. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  7283. }
  7284. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  7285. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  7286. }
  7287. if s.QueryString == nil {
  7288. invalidParams.Add(request.NewErrParamRequired("QueryString"))
  7289. }
  7290. if s.StartTime == nil {
  7291. invalidParams.Add(request.NewErrParamRequired("StartTime"))
  7292. }
  7293. if invalidParams.Len() > 0 {
  7294. return invalidParams
  7295. }
  7296. return nil
  7297. }
  7298. // SetEndTime sets the EndTime field's value.
  7299. func (s *StartQueryInput) SetEndTime(v int64) *StartQueryInput {
  7300. s.EndTime = &v
  7301. return s
  7302. }
  7303. // SetLimit sets the Limit field's value.
  7304. func (s *StartQueryInput) SetLimit(v int64) *StartQueryInput {
  7305. s.Limit = &v
  7306. return s
  7307. }
  7308. // SetLogGroupName sets the LogGroupName field's value.
  7309. func (s *StartQueryInput) SetLogGroupName(v string) *StartQueryInput {
  7310. s.LogGroupName = &v
  7311. return s
  7312. }
  7313. // SetQueryString sets the QueryString field's value.
  7314. func (s *StartQueryInput) SetQueryString(v string) *StartQueryInput {
  7315. s.QueryString = &v
  7316. return s
  7317. }
  7318. // SetStartTime sets the StartTime field's value.
  7319. func (s *StartQueryInput) SetStartTime(v int64) *StartQueryInput {
  7320. s.StartTime = &v
  7321. return s
  7322. }
  7323. type StartQueryOutput struct {
  7324. _ struct{} `type:"structure"`
  7325. // The unique ID of the query.
  7326. QueryId *string `locationName:"queryId" type:"string"`
  7327. }
  7328. // String returns the string representation
  7329. func (s StartQueryOutput) String() string {
  7330. return awsutil.Prettify(s)
  7331. }
  7332. // GoString returns the string representation
  7333. func (s StartQueryOutput) GoString() string {
  7334. return s.String()
  7335. }
  7336. // SetQueryId sets the QueryId field's value.
  7337. func (s *StartQueryOutput) SetQueryId(v string) *StartQueryOutput {
  7338. s.QueryId = &v
  7339. return s
  7340. }
  7341. type StopQueryInput struct {
  7342. _ struct{} `type:"structure"`
  7343. // The ID number of the query to stop. If necessary, you can use DescribeQueries
  7344. // to find this ID number.
  7345. //
  7346. // QueryId is a required field
  7347. QueryId *string `locationName:"queryId" type:"string" required:"true"`
  7348. }
  7349. // String returns the string representation
  7350. func (s StopQueryInput) String() string {
  7351. return awsutil.Prettify(s)
  7352. }
  7353. // GoString returns the string representation
  7354. func (s StopQueryInput) GoString() string {
  7355. return s.String()
  7356. }
  7357. // Validate inspects the fields of the type to determine if they are valid.
  7358. func (s *StopQueryInput) Validate() error {
  7359. invalidParams := request.ErrInvalidParams{Context: "StopQueryInput"}
  7360. if s.QueryId == nil {
  7361. invalidParams.Add(request.NewErrParamRequired("QueryId"))
  7362. }
  7363. if invalidParams.Len() > 0 {
  7364. return invalidParams
  7365. }
  7366. return nil
  7367. }
  7368. // SetQueryId sets the QueryId field's value.
  7369. func (s *StopQueryInput) SetQueryId(v string) *StopQueryInput {
  7370. s.QueryId = &v
  7371. return s
  7372. }
  7373. type StopQueryOutput struct {
  7374. _ struct{} `type:"structure"`
  7375. // This is true if the query was stopped by the StopQuery operation.
  7376. Success *bool `locationName:"success" type:"boolean"`
  7377. }
  7378. // String returns the string representation
  7379. func (s StopQueryOutput) String() string {
  7380. return awsutil.Prettify(s)
  7381. }
  7382. // GoString returns the string representation
  7383. func (s StopQueryOutput) GoString() string {
  7384. return s.String()
  7385. }
  7386. // SetSuccess sets the Success field's value.
  7387. func (s *StopQueryOutput) SetSuccess(v bool) *StopQueryOutput {
  7388. s.Success = &v
  7389. return s
  7390. }
  7391. // Represents a subscription filter.
  7392. type SubscriptionFilter struct {
  7393. _ struct{} `type:"structure"`
  7394. // The creation time of the subscription filter, expressed as the number of
  7395. // milliseconds after Jan 1, 1970 00:00:00 UTC.
  7396. CreationTime *int64 `locationName:"creationTime" type:"long"`
  7397. // The Amazon Resource Name (ARN) of the destination.
  7398. DestinationArn *string `locationName:"destinationArn" min:"1" type:"string"`
  7399. // The method used to distribute log data to the destination, which can be either
  7400. // random or grouped by log stream.
  7401. Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"`
  7402. // The name of the subscription filter.
  7403. FilterName *string `locationName:"filterName" min:"1" type:"string"`
  7404. // A symbolic description of how CloudWatch Logs should interpret the data in
  7405. // each log event. For example, a log event may contain timestamps, IP addresses,
  7406. // strings, and so on. You use the filter pattern to specify what to look for
  7407. // in the log event message.
  7408. FilterPattern *string `locationName:"filterPattern" type:"string"`
  7409. // The name of the log group.
  7410. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  7411. RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
  7412. }
  7413. // String returns the string representation
  7414. func (s SubscriptionFilter) String() string {
  7415. return awsutil.Prettify(s)
  7416. }
  7417. // GoString returns the string representation
  7418. func (s SubscriptionFilter) GoString() string {
  7419. return s.String()
  7420. }
  7421. // SetCreationTime sets the CreationTime field's value.
  7422. func (s *SubscriptionFilter) SetCreationTime(v int64) *SubscriptionFilter {
  7423. s.CreationTime = &v
  7424. return s
  7425. }
  7426. // SetDestinationArn sets the DestinationArn field's value.
  7427. func (s *SubscriptionFilter) SetDestinationArn(v string) *SubscriptionFilter {
  7428. s.DestinationArn = &v
  7429. return s
  7430. }
  7431. // SetDistribution sets the Distribution field's value.
  7432. func (s *SubscriptionFilter) SetDistribution(v string) *SubscriptionFilter {
  7433. s.Distribution = &v
  7434. return s
  7435. }
  7436. // SetFilterName sets the FilterName field's value.
  7437. func (s *SubscriptionFilter) SetFilterName(v string) *SubscriptionFilter {
  7438. s.FilterName = &v
  7439. return s
  7440. }
  7441. // SetFilterPattern sets the FilterPattern field's value.
  7442. func (s *SubscriptionFilter) SetFilterPattern(v string) *SubscriptionFilter {
  7443. s.FilterPattern = &v
  7444. return s
  7445. }
  7446. // SetLogGroupName sets the LogGroupName field's value.
  7447. func (s *SubscriptionFilter) SetLogGroupName(v string) *SubscriptionFilter {
  7448. s.LogGroupName = &v
  7449. return s
  7450. }
  7451. // SetRoleArn sets the RoleArn field's value.
  7452. func (s *SubscriptionFilter) SetRoleArn(v string) *SubscriptionFilter {
  7453. s.RoleArn = &v
  7454. return s
  7455. }
  7456. type TagLogGroupInput struct {
  7457. _ struct{} `type:"structure"`
  7458. // The name of the log group.
  7459. //
  7460. // LogGroupName is a required field
  7461. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  7462. // The key-value pairs to use for the tags.
  7463. //
  7464. // Tags is a required field
  7465. Tags map[string]*string `locationName:"tags" min:"1" type:"map" required:"true"`
  7466. }
  7467. // String returns the string representation
  7468. func (s TagLogGroupInput) String() string {
  7469. return awsutil.Prettify(s)
  7470. }
  7471. // GoString returns the string representation
  7472. func (s TagLogGroupInput) GoString() string {
  7473. return s.String()
  7474. }
  7475. // Validate inspects the fields of the type to determine if they are valid.
  7476. func (s *TagLogGroupInput) Validate() error {
  7477. invalidParams := request.ErrInvalidParams{Context: "TagLogGroupInput"}
  7478. if s.LogGroupName == nil {
  7479. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  7480. }
  7481. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  7482. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  7483. }
  7484. if s.Tags == nil {
  7485. invalidParams.Add(request.NewErrParamRequired("Tags"))
  7486. }
  7487. if s.Tags != nil && len(s.Tags) < 1 {
  7488. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  7489. }
  7490. if invalidParams.Len() > 0 {
  7491. return invalidParams
  7492. }
  7493. return nil
  7494. }
  7495. // SetLogGroupName sets the LogGroupName field's value.
  7496. func (s *TagLogGroupInput) SetLogGroupName(v string) *TagLogGroupInput {
  7497. s.LogGroupName = &v
  7498. return s
  7499. }
  7500. // SetTags sets the Tags field's value.
  7501. func (s *TagLogGroupInput) SetTags(v map[string]*string) *TagLogGroupInput {
  7502. s.Tags = v
  7503. return s
  7504. }
  7505. type TagLogGroupOutput struct {
  7506. _ struct{} `type:"structure"`
  7507. }
  7508. // String returns the string representation
  7509. func (s TagLogGroupOutput) String() string {
  7510. return awsutil.Prettify(s)
  7511. }
  7512. // GoString returns the string representation
  7513. func (s TagLogGroupOutput) GoString() string {
  7514. return s.String()
  7515. }
  7516. type TestMetricFilterInput struct {
  7517. _ struct{} `type:"structure"`
  7518. // A symbolic description of how CloudWatch Logs should interpret the data in
  7519. // each log event. For example, a log event may contain timestamps, IP addresses,
  7520. // strings, and so on. You use the filter pattern to specify what to look for
  7521. // in the log event message.
  7522. //
  7523. // FilterPattern is a required field
  7524. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  7525. // The log event messages to test.
  7526. //
  7527. // LogEventMessages is a required field
  7528. LogEventMessages []*string `locationName:"logEventMessages" min:"1" type:"list" required:"true"`
  7529. }
  7530. // String returns the string representation
  7531. func (s TestMetricFilterInput) String() string {
  7532. return awsutil.Prettify(s)
  7533. }
  7534. // GoString returns the string representation
  7535. func (s TestMetricFilterInput) GoString() string {
  7536. return s.String()
  7537. }
  7538. // Validate inspects the fields of the type to determine if they are valid.
  7539. func (s *TestMetricFilterInput) Validate() error {
  7540. invalidParams := request.ErrInvalidParams{Context: "TestMetricFilterInput"}
  7541. if s.FilterPattern == nil {
  7542. invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
  7543. }
  7544. if s.LogEventMessages == nil {
  7545. invalidParams.Add(request.NewErrParamRequired("LogEventMessages"))
  7546. }
  7547. if s.LogEventMessages != nil && len(s.LogEventMessages) < 1 {
  7548. invalidParams.Add(request.NewErrParamMinLen("LogEventMessages", 1))
  7549. }
  7550. if invalidParams.Len() > 0 {
  7551. return invalidParams
  7552. }
  7553. return nil
  7554. }
  7555. // SetFilterPattern sets the FilterPattern field's value.
  7556. func (s *TestMetricFilterInput) SetFilterPattern(v string) *TestMetricFilterInput {
  7557. s.FilterPattern = &v
  7558. return s
  7559. }
  7560. // SetLogEventMessages sets the LogEventMessages field's value.
  7561. func (s *TestMetricFilterInput) SetLogEventMessages(v []*string) *TestMetricFilterInput {
  7562. s.LogEventMessages = v
  7563. return s
  7564. }
  7565. type TestMetricFilterOutput struct {
  7566. _ struct{} `type:"structure"`
  7567. // The matched events.
  7568. Matches []*MetricFilterMatchRecord `locationName:"matches" type:"list"`
  7569. }
  7570. // String returns the string representation
  7571. func (s TestMetricFilterOutput) String() string {
  7572. return awsutil.Prettify(s)
  7573. }
  7574. // GoString returns the string representation
  7575. func (s TestMetricFilterOutput) GoString() string {
  7576. return s.String()
  7577. }
  7578. // SetMatches sets the Matches field's value.
  7579. func (s *TestMetricFilterOutput) SetMatches(v []*MetricFilterMatchRecord) *TestMetricFilterOutput {
  7580. s.Matches = v
  7581. return s
  7582. }
  7583. type UntagLogGroupInput struct {
  7584. _ struct{} `type:"structure"`
  7585. // The name of the log group.
  7586. //
  7587. // LogGroupName is a required field
  7588. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  7589. // The tag keys. The corresponding tags are removed from the log group.
  7590. //
  7591. // Tags is a required field
  7592. Tags []*string `locationName:"tags" min:"1" type:"list" required:"true"`
  7593. }
  7594. // String returns the string representation
  7595. func (s UntagLogGroupInput) String() string {
  7596. return awsutil.Prettify(s)
  7597. }
  7598. // GoString returns the string representation
  7599. func (s UntagLogGroupInput) GoString() string {
  7600. return s.String()
  7601. }
  7602. // Validate inspects the fields of the type to determine if they are valid.
  7603. func (s *UntagLogGroupInput) Validate() error {
  7604. invalidParams := request.ErrInvalidParams{Context: "UntagLogGroupInput"}
  7605. if s.LogGroupName == nil {
  7606. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  7607. }
  7608. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  7609. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  7610. }
  7611. if s.Tags == nil {
  7612. invalidParams.Add(request.NewErrParamRequired("Tags"))
  7613. }
  7614. if s.Tags != nil && len(s.Tags) < 1 {
  7615. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  7616. }
  7617. if invalidParams.Len() > 0 {
  7618. return invalidParams
  7619. }
  7620. return nil
  7621. }
  7622. // SetLogGroupName sets the LogGroupName field's value.
  7623. func (s *UntagLogGroupInput) SetLogGroupName(v string) *UntagLogGroupInput {
  7624. s.LogGroupName = &v
  7625. return s
  7626. }
  7627. // SetTags sets the Tags field's value.
  7628. func (s *UntagLogGroupInput) SetTags(v []*string) *UntagLogGroupInput {
  7629. s.Tags = v
  7630. return s
  7631. }
  7632. type UntagLogGroupOutput struct {
  7633. _ struct{} `type:"structure"`
  7634. }
  7635. // String returns the string representation
  7636. func (s UntagLogGroupOutput) String() string {
  7637. return awsutil.Prettify(s)
  7638. }
  7639. // GoString returns the string representation
  7640. func (s UntagLogGroupOutput) GoString() string {
  7641. return s.String()
  7642. }
  7643. // The method used to distribute log data to the destination, which can be either
  7644. // random or grouped by log stream.
  7645. const (
  7646. // DistributionRandom is a Distribution enum value
  7647. DistributionRandom = "Random"
  7648. // DistributionByLogStream is a Distribution enum value
  7649. DistributionByLogStream = "ByLogStream"
  7650. )
  7651. const (
  7652. // ExportTaskStatusCodeCancelled is a ExportTaskStatusCode enum value
  7653. ExportTaskStatusCodeCancelled = "CANCELLED"
  7654. // ExportTaskStatusCodeCompleted is a ExportTaskStatusCode enum value
  7655. ExportTaskStatusCodeCompleted = "COMPLETED"
  7656. // ExportTaskStatusCodeFailed is a ExportTaskStatusCode enum value
  7657. ExportTaskStatusCodeFailed = "FAILED"
  7658. // ExportTaskStatusCodePending is a ExportTaskStatusCode enum value
  7659. ExportTaskStatusCodePending = "PENDING"
  7660. // ExportTaskStatusCodePendingCancel is a ExportTaskStatusCode enum value
  7661. ExportTaskStatusCodePendingCancel = "PENDING_CANCEL"
  7662. // ExportTaskStatusCodeRunning is a ExportTaskStatusCode enum value
  7663. ExportTaskStatusCodeRunning = "RUNNING"
  7664. )
  7665. const (
  7666. // OrderByLogStreamName is a OrderBy enum value
  7667. OrderByLogStreamName = "LogStreamName"
  7668. // OrderByLastEventTime is a OrderBy enum value
  7669. OrderByLastEventTime = "LastEventTime"
  7670. )
  7671. const (
  7672. // QueryStatusScheduled is a QueryStatus enum value
  7673. QueryStatusScheduled = "Scheduled"
  7674. // QueryStatusRunning is a QueryStatus enum value
  7675. QueryStatusRunning = "Running"
  7676. // QueryStatusComplete is a QueryStatus enum value
  7677. QueryStatusComplete = "Complete"
  7678. // QueryStatusFailed is a QueryStatus enum value
  7679. QueryStatusFailed = "Failed"
  7680. // QueryStatusCancelled is a QueryStatus enum value
  7681. QueryStatusCancelled = "Cancelled"
  7682. )