1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809 |
- // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
- package cloudwatchlogs
- import (
- "fmt"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- )
- const opAssociateKmsKey = "AssociateKmsKey"
- // AssociateKmsKeyRequest generates a "aws/request.Request" representing the
- // client's request for the AssociateKmsKey operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See AssociateKmsKey for more information on using the AssociateKmsKey
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the AssociateKmsKeyRequest method.
- // req, resp := client.AssociateKmsKeyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey
- func (c *CloudWatchLogs) AssociateKmsKeyRequest(input *AssociateKmsKeyInput) (req *request.Request, output *AssociateKmsKeyOutput) {
- op := &request.Operation{
- Name: opAssociateKmsKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &AssociateKmsKeyInput{}
- }
- output = &AssociateKmsKeyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // AssociateKmsKey API operation for Amazon CloudWatch Logs.
- //
- // Associates the specified AWS Key Management Service (AWS KMS) customer master
- // key (CMK) with the specified log group.
- //
- // Associating an AWS KMS CMK with a log group overrides any existing associations
- // between the log group and a CMK. After a CMK is associated with a log group,
- // all newly ingested data for the log group is encrypted using the CMK. This
- // association is stored as long as the data encrypted with the CMK is still
- // within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt
- // this data whenever it is requested.
- //
- // Note that it can take up to 5 minutes for this operation to take effect.
- //
- // If you attempt to associate a CMK with a log group but the CMK does not exist
- // or the CMK is disabled, you will receive an InvalidParameterException error.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation AssociateKmsKey for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey
- func (c *CloudWatchLogs) AssociateKmsKey(input *AssociateKmsKeyInput) (*AssociateKmsKeyOutput, error) {
- req, out := c.AssociateKmsKeyRequest(input)
- return out, req.Send()
- }
- // AssociateKmsKeyWithContext is the same as AssociateKmsKey with the addition of
- // the ability to pass a context and additional request options.
- //
- // See AssociateKmsKey for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) AssociateKmsKeyWithContext(ctx aws.Context, input *AssociateKmsKeyInput, opts ...request.Option) (*AssociateKmsKeyOutput, error) {
- req, out := c.AssociateKmsKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCancelExportTask = "CancelExportTask"
- // CancelExportTaskRequest generates a "aws/request.Request" representing the
- // client's request for the CancelExportTask operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CancelExportTask for more information on using the CancelExportTask
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CancelExportTaskRequest method.
- // req, resp := client.CancelExportTaskRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask
- func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) {
- op := &request.Operation{
- Name: opCancelExportTask,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CancelExportTaskInput{}
- }
- output = &CancelExportTaskOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // CancelExportTask API operation for Amazon CloudWatch Logs.
- //
- // Cancels the specified export task.
- //
- // The task must be in the PENDING or RUNNING state.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation CancelExportTask for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeInvalidOperationException "InvalidOperationException"
- // The operation is not valid on the specified resource.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask
- func (c *CloudWatchLogs) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) {
- req, out := c.CancelExportTaskRequest(input)
- return out, req.Send()
- }
- // CancelExportTaskWithContext is the same as CancelExportTask with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CancelExportTask for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) CancelExportTaskWithContext(ctx aws.Context, input *CancelExportTaskInput, opts ...request.Option) (*CancelExportTaskOutput, error) {
- req, out := c.CancelExportTaskRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCreateExportTask = "CreateExportTask"
- // CreateExportTaskRequest generates a "aws/request.Request" representing the
- // client's request for the CreateExportTask operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateExportTask for more information on using the CreateExportTask
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateExportTaskRequest method.
- // req, resp := client.CreateExportTaskRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask
- func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) (req *request.Request, output *CreateExportTaskOutput) {
- op := &request.Operation{
- Name: opCreateExportTask,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateExportTaskInput{}
- }
- output = &CreateExportTaskOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // CreateExportTask API operation for Amazon CloudWatch Logs.
- //
- // Creates an export task, which allows you to efficiently export data from
- // a log group to an Amazon S3 bucket.
- //
- // This is an asynchronous call. If all the required information is provided,
- // this operation initiates an export task and responds with the ID of the task.
- // After the task has started, you can use DescribeExportTasks to get the status
- // of the export task. Each account can only have one active (RUNNING or PENDING)
- // export task at a time. To cancel an export task, use CancelExportTask.
- //
- // You can export logs from multiple log groups or multiple time ranges to the
- // same S3 bucket. To separate out log data for each export task, you can specify
- // a prefix to be used as the Amazon S3 key prefix for all exported objects.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation CreateExportTask for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // You have reached the maximum number of resources that can be created.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
- // The specified resource already exists.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask
- func (c *CloudWatchLogs) CreateExportTask(input *CreateExportTaskInput) (*CreateExportTaskOutput, error) {
- req, out := c.CreateExportTaskRequest(input)
- return out, req.Send()
- }
- // CreateExportTaskWithContext is the same as CreateExportTask with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateExportTask for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) CreateExportTaskWithContext(ctx aws.Context, input *CreateExportTaskInput, opts ...request.Option) (*CreateExportTaskOutput, error) {
- req, out := c.CreateExportTaskRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCreateLogGroup = "CreateLogGroup"
- // CreateLogGroupRequest generates a "aws/request.Request" representing the
- // client's request for the CreateLogGroup operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateLogGroup for more information on using the CreateLogGroup
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateLogGroupRequest method.
- // req, resp := client.CreateLogGroupRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup
- func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput) {
- op := &request.Operation{
- Name: opCreateLogGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateLogGroupInput{}
- }
- output = &CreateLogGroupOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // CreateLogGroup API operation for Amazon CloudWatch Logs.
- //
- // Creates a log group with the specified name.
- //
- // You can create up to 5000 log groups per account.
- //
- // You must use the following guidelines when naming a log group:
- //
- // * Log group names must be unique within a region for an AWS account.
- //
- // * Log group names can be between 1 and 512 characters long.
- //
- // * Log group names consist of the following characters: a-z, A-Z, 0-9,
- // '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).
- //
- // If you associate a AWS Key Management Service (AWS KMS) customer master key
- // (CMK) with the log group, ingested data is encrypted using the CMK. This
- // association is stored as long as the data encrypted with the CMK is still
- // within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt
- // this data whenever it is requested.
- //
- // If you attempt to associate a CMK with the log group but the CMK does not
- // exist or the CMK is disabled, you will receive an InvalidParameterException
- // error.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation CreateLogGroup for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
- // The specified resource already exists.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // You have reached the maximum number of resources that can be created.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup
- func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error) {
- req, out := c.CreateLogGroupRequest(input)
- return out, req.Send()
- }
- // CreateLogGroupWithContext is the same as CreateLogGroup with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateLogGroup for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) CreateLogGroupWithContext(ctx aws.Context, input *CreateLogGroupInput, opts ...request.Option) (*CreateLogGroupOutput, error) {
- req, out := c.CreateLogGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCreateLogStream = "CreateLogStream"
- // CreateLogStreamRequest generates a "aws/request.Request" representing the
- // client's request for the CreateLogStream operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateLogStream for more information on using the CreateLogStream
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateLogStreamRequest method.
- // req, resp := client.CreateLogStreamRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream
- func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput) {
- op := &request.Operation{
- Name: opCreateLogStream,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateLogStreamInput{}
- }
- output = &CreateLogStreamOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // CreateLogStream API operation for Amazon CloudWatch Logs.
- //
- // Creates a log stream for the specified log group.
- //
- // There is no limit on the number of log streams that you can create for a
- // log group.
- //
- // You must use the following guidelines when naming a log stream:
- //
- // * Log stream names must be unique within the log group.
- //
- // * Log stream names can be between 1 and 512 characters long.
- //
- // * The ':' (colon) and '*' (asterisk) characters are not allowed.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation CreateLogStream for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
- // The specified resource already exists.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream
- func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error) {
- req, out := c.CreateLogStreamRequest(input)
- return out, req.Send()
- }
- // CreateLogStreamWithContext is the same as CreateLogStream with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateLogStream for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) CreateLogStreamWithContext(ctx aws.Context, input *CreateLogStreamInput, opts ...request.Option) (*CreateLogStreamOutput, error) {
- req, out := c.CreateLogStreamRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteDestination = "DeleteDestination"
- // DeleteDestinationRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteDestination operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteDestination for more information on using the DeleteDestination
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteDestinationRequest method.
- // req, resp := client.DeleteDestinationRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination
- func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) {
- op := &request.Operation{
- Name: opDeleteDestination,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteDestinationInput{}
- }
- output = &DeleteDestinationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteDestination API operation for Amazon CloudWatch Logs.
- //
- // Deletes the specified destination, and eventually disables all the subscription
- // filters that publish to it. This operation does not delete the physical resource
- // encapsulated by the destination.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DeleteDestination for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination
- func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) {
- req, out := c.DeleteDestinationRequest(input)
- return out, req.Send()
- }
- // DeleteDestinationWithContext is the same as DeleteDestination with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteDestination for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error) {
- req, out := c.DeleteDestinationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteLogGroup = "DeleteLogGroup"
- // DeleteLogGroupRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteLogGroup operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteLogGroup for more information on using the DeleteLogGroup
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteLogGroupRequest method.
- // req, resp := client.DeleteLogGroupRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup
- func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) {
- op := &request.Operation{
- Name: opDeleteLogGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteLogGroupInput{}
- }
- output = &DeleteLogGroupOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteLogGroup API operation for Amazon CloudWatch Logs.
- //
- // Deletes the specified log group and permanently deletes all the archived
- // log events associated with the log group.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DeleteLogGroup for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup
- func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) {
- req, out := c.DeleteLogGroupRequest(input)
- return out, req.Send()
- }
- // DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteLogGroup for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error) {
- req, out := c.DeleteLogGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteLogStream = "DeleteLogStream"
- // DeleteLogStreamRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteLogStream operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteLogStream for more information on using the DeleteLogStream
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteLogStreamRequest method.
- // req, resp := client.DeleteLogStreamRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream
- func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) {
- op := &request.Operation{
- Name: opDeleteLogStream,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteLogStreamInput{}
- }
- output = &DeleteLogStreamOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteLogStream API operation for Amazon CloudWatch Logs.
- //
- // Deletes the specified log stream and permanently deletes all the archived
- // log events associated with the log stream.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DeleteLogStream for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream
- func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) {
- req, out := c.DeleteLogStreamRequest(input)
- return out, req.Send()
- }
- // DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteLogStream for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error) {
- req, out := c.DeleteLogStreamRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteMetricFilter = "DeleteMetricFilter"
- // DeleteMetricFilterRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteMetricFilter operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteMetricFilter for more information on using the DeleteMetricFilter
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteMetricFilterRequest method.
- // req, resp := client.DeleteMetricFilterRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter
- func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) {
- op := &request.Operation{
- Name: opDeleteMetricFilter,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteMetricFilterInput{}
- }
- output = &DeleteMetricFilterOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteMetricFilter API operation for Amazon CloudWatch Logs.
- //
- // Deletes the specified metric filter.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DeleteMetricFilter for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter
- func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) {
- req, out := c.DeleteMetricFilterRequest(input)
- return out, req.Send()
- }
- // DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteMetricFilter for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error) {
- req, out := c.DeleteMetricFilterRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteResourcePolicy = "DeleteResourcePolicy"
- // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteResourcePolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteResourcePolicy for more information on using the DeleteResourcePolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteResourcePolicyRequest method.
- // req, resp := client.DeleteResourcePolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy
- func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) {
- op := &request.Operation{
- Name: opDeleteResourcePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteResourcePolicyInput{}
- }
- output = &DeleteResourcePolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteResourcePolicy API operation for Amazon CloudWatch Logs.
- //
- // Deletes a resource policy from this account. This revokes the access of the
- // identities in that policy to put log events to this account.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DeleteResourcePolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy
- func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) {
- req, out := c.DeleteResourcePolicyRequest(input)
- return out, req.Send()
- }
- // DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteResourcePolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) {
- req, out := c.DeleteResourcePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteRetentionPolicy = "DeleteRetentionPolicy"
- // DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteRetentionPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteRetentionPolicyRequest method.
- // req, resp := client.DeleteRetentionPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy
- func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) {
- op := &request.Operation{
- Name: opDeleteRetentionPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteRetentionPolicyInput{}
- }
- output = &DeleteRetentionPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteRetentionPolicy API operation for Amazon CloudWatch Logs.
- //
- // Deletes the specified retention policy.
- //
- // Log events do not expire if they belong to log groups without a retention
- // policy.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DeleteRetentionPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy
- func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) {
- req, out := c.DeleteRetentionPolicyRequest(input)
- return out, req.Send()
- }
- // DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteRetentionPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) {
- req, out := c.DeleteRetentionPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter"
- // DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteSubscriptionFilter operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteSubscriptionFilterRequest method.
- // req, resp := client.DeleteSubscriptionFilterRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter
- func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) {
- op := &request.Operation{
- Name: opDeleteSubscriptionFilter,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteSubscriptionFilterInput{}
- }
- output = &DeleteSubscriptionFilterOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs.
- //
- // Deletes the specified subscription filter.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DeleteSubscriptionFilter for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter
- func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) {
- req, out := c.DeleteSubscriptionFilterRequest(input)
- return out, req.Send()
- }
- // DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteSubscriptionFilter for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error) {
- req, out := c.DeleteSubscriptionFilterRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeDestinations = "DescribeDestinations"
- // DescribeDestinationsRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeDestinations operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeDestinations for more information on using the DescribeDestinations
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeDestinationsRequest method.
- // req, resp := client.DescribeDestinationsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations
- func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) {
- op := &request.Operation{
- Name: opDescribeDestinations,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "limit",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &DescribeDestinationsInput{}
- }
- output = &DescribeDestinationsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeDestinations API operation for Amazon CloudWatch Logs.
- //
- // Lists all your destinations. The results are ASCII-sorted by destination
- // name.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DescribeDestinations for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations
- func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) {
- req, out := c.DescribeDestinationsRequest(input)
- return out, req.Send()
- }
- // DescribeDestinationsWithContext is the same as DescribeDestinations with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeDestinations for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeDestinationsWithContext(ctx aws.Context, input *DescribeDestinationsInput, opts ...request.Option) (*DescribeDestinationsOutput, error) {
- req, out := c.DescribeDestinationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See DescribeDestinations method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a DescribeDestinations operation.
- // pageNum := 0
- // err := client.DescribeDestinationsPages(params,
- // func(page *DescribeDestinationsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool) error {
- return c.DescribeDestinationsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // DescribeDestinationsPagesWithContext same as DescribeDestinationsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- EndPageOnSameToken: true,
- NewRequest: func() (*request.Request, error) {
- var inCpy *DescribeDestinationsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.DescribeDestinationsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opDescribeExportTasks = "DescribeExportTasks"
- // DescribeExportTasksRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeExportTasks operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeExportTasks for more information on using the DescribeExportTasks
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeExportTasksRequest method.
- // req, resp := client.DescribeExportTasksRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks
- func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) {
- op := &request.Operation{
- Name: opDescribeExportTasks,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeExportTasksInput{}
- }
- output = &DescribeExportTasksOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeExportTasks API operation for Amazon CloudWatch Logs.
- //
- // Lists the specified export tasks. You can list all your export tasks or filter
- // the results based on task ID or task status.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DescribeExportTasks for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks
- func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) {
- req, out := c.DescribeExportTasksRequest(input)
- return out, req.Send()
- }
- // DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeExportTasks for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) {
- req, out := c.DescribeExportTasksRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeLogGroups = "DescribeLogGroups"
- // DescribeLogGroupsRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeLogGroups operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeLogGroups for more information on using the DescribeLogGroups
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeLogGroupsRequest method.
- // req, resp := client.DescribeLogGroupsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups
- func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) {
- op := &request.Operation{
- Name: opDescribeLogGroups,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "limit",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &DescribeLogGroupsInput{}
- }
- output = &DescribeLogGroupsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeLogGroups API operation for Amazon CloudWatch Logs.
- //
- // Lists the specified log groups. You can list all your log groups or filter
- // the results by prefix. The results are ASCII-sorted by log group name.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DescribeLogGroups for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups
- func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) {
- req, out := c.DescribeLogGroupsRequest(input)
- return out, req.Send()
- }
- // DescribeLogGroupsWithContext is the same as DescribeLogGroups with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeLogGroups for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeLogGroupsWithContext(ctx aws.Context, input *DescribeLogGroupsInput, opts ...request.Option) (*DescribeLogGroupsOutput, error) {
- req, out := c.DescribeLogGroupsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See DescribeLogGroups method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a DescribeLogGroups operation.
- // pageNum := 0
- // err := client.DescribeLogGroupsPages(params,
- // func(page *DescribeLogGroupsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool) error {
- return c.DescribeLogGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // DescribeLogGroupsPagesWithContext same as DescribeLogGroupsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- EndPageOnSameToken: true,
- NewRequest: func() (*request.Request, error) {
- var inCpy *DescribeLogGroupsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.DescribeLogGroupsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opDescribeLogStreams = "DescribeLogStreams"
- // DescribeLogStreamsRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeLogStreams operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeLogStreams for more information on using the DescribeLogStreams
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeLogStreamsRequest method.
- // req, resp := client.DescribeLogStreamsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams
- func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) {
- op := &request.Operation{
- Name: opDescribeLogStreams,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "limit",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &DescribeLogStreamsInput{}
- }
- output = &DescribeLogStreamsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeLogStreams API operation for Amazon CloudWatch Logs.
- //
- // Lists the log streams for the specified log group. You can list all the log
- // streams or filter the results by prefix. You can also control how the results
- // are ordered.
- //
- // This operation has a limit of five transactions per second, after which transactions
- // are throttled.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DescribeLogStreams for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams
- func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) {
- req, out := c.DescribeLogStreamsRequest(input)
- return out, req.Send()
- }
- // DescribeLogStreamsWithContext is the same as DescribeLogStreams with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeLogStreams for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeLogStreamsWithContext(ctx aws.Context, input *DescribeLogStreamsInput, opts ...request.Option) (*DescribeLogStreamsOutput, error) {
- req, out := c.DescribeLogStreamsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See DescribeLogStreams method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a DescribeLogStreams operation.
- // pageNum := 0
- // err := client.DescribeLogStreamsPages(params,
- // func(page *DescribeLogStreamsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool) error {
- return c.DescribeLogStreamsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // DescribeLogStreamsPagesWithContext same as DescribeLogStreamsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- EndPageOnSameToken: true,
- NewRequest: func() (*request.Request, error) {
- var inCpy *DescribeLogStreamsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.DescribeLogStreamsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opDescribeMetricFilters = "DescribeMetricFilters"
- // DescribeMetricFiltersRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeMetricFilters operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeMetricFilters for more information on using the DescribeMetricFilters
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeMetricFiltersRequest method.
- // req, resp := client.DescribeMetricFiltersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters
- func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) {
- op := &request.Operation{
- Name: opDescribeMetricFilters,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "limit",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &DescribeMetricFiltersInput{}
- }
- output = &DescribeMetricFiltersOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeMetricFilters API operation for Amazon CloudWatch Logs.
- //
- // Lists the specified metric filters. You can list all the metric filters or
- // filter the results by log name, prefix, metric name, or metric namespace.
- // The results are ASCII-sorted by filter name.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DescribeMetricFilters for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters
- func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) {
- req, out := c.DescribeMetricFiltersRequest(input)
- return out, req.Send()
- }
- // DescribeMetricFiltersWithContext is the same as DescribeMetricFilters with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeMetricFilters for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeMetricFiltersWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, opts ...request.Option) (*DescribeMetricFiltersOutput, error) {
- req, out := c.DescribeMetricFiltersRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See DescribeMetricFilters method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a DescribeMetricFilters operation.
- // pageNum := 0
- // err := client.DescribeMetricFiltersPages(params,
- // func(page *DescribeMetricFiltersOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool) error {
- return c.DescribeMetricFiltersPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // DescribeMetricFiltersPagesWithContext same as DescribeMetricFiltersPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- EndPageOnSameToken: true,
- NewRequest: func() (*request.Request, error) {
- var inCpy *DescribeMetricFiltersInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.DescribeMetricFiltersRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opDescribeQueries = "DescribeQueries"
- // DescribeQueriesRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeQueries operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeQueries for more information on using the DescribeQueries
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeQueriesRequest method.
- // req, resp := client.DescribeQueriesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries
- func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) {
- op := &request.Operation{
- Name: opDescribeQueries,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeQueriesInput{}
- }
- output = &DescribeQueriesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeQueries API operation for Amazon CloudWatch Logs.
- //
- // Returns a list of CloudWatch Logs Insights queries that are scheduled, executing,
- // or have been executed recently in this account. You can request all queries,
- // or limit it to queries of a specific log group or queries with a certain
- // status.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DescribeQueries for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries
- func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) {
- req, out := c.DescribeQueriesRequest(input)
- return out, req.Send()
- }
- // DescribeQueriesWithContext is the same as DescribeQueries with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeQueries for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) {
- req, out := c.DescribeQueriesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeResourcePolicies = "DescribeResourcePolicies"
- // DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeResourcePolicies operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeResourcePolicies for more information on using the DescribeResourcePolicies
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeResourcePoliciesRequest method.
- // req, resp := client.DescribeResourcePoliciesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies
- func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) {
- op := &request.Operation{
- Name: opDescribeResourcePolicies,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeResourcePoliciesInput{}
- }
- output = &DescribeResourcePoliciesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeResourcePolicies API operation for Amazon CloudWatch Logs.
- //
- // Lists the resource policies in this account.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DescribeResourcePolicies for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies
- func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) {
- req, out := c.DescribeResourcePoliciesRequest(input)
- return out, req.Send()
- }
- // DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeResourcePolicies for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) {
- req, out := c.DescribeResourcePoliciesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters"
- // DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeSubscriptionFilters operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeSubscriptionFilters for more information on using the DescribeSubscriptionFilters
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeSubscriptionFiltersRequest method.
- // req, resp := client.DescribeSubscriptionFiltersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters
- func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) {
- op := &request.Operation{
- Name: opDescribeSubscriptionFilters,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "limit",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &DescribeSubscriptionFiltersInput{}
- }
- output = &DescribeSubscriptionFiltersOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeSubscriptionFilters API operation for Amazon CloudWatch Logs.
- //
- // Lists the subscription filters for the specified log group. You can list
- // all the subscription filters or filter the results by prefix. The results
- // are ASCII-sorted by filter name.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DescribeSubscriptionFilters for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters
- func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) {
- req, out := c.DescribeSubscriptionFiltersRequest(input)
- return out, req.Send()
- }
- // DescribeSubscriptionFiltersWithContext is the same as DescribeSubscriptionFilters with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeSubscriptionFilters for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeSubscriptionFiltersWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, opts ...request.Option) (*DescribeSubscriptionFiltersOutput, error) {
- req, out := c.DescribeSubscriptionFiltersRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See DescribeSubscriptionFilters method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a DescribeSubscriptionFilters operation.
- // pageNum := 0
- // err := client.DescribeSubscriptionFiltersPages(params,
- // func(page *DescribeSubscriptionFiltersOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool) error {
- return c.DescribeSubscriptionFiltersPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // DescribeSubscriptionFiltersPagesWithContext same as DescribeSubscriptionFiltersPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- EndPageOnSameToken: true,
- NewRequest: func() (*request.Request, error) {
- var inCpy *DescribeSubscriptionFiltersInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.DescribeSubscriptionFiltersRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opDisassociateKmsKey = "DisassociateKmsKey"
- // DisassociateKmsKeyRequest generates a "aws/request.Request" representing the
- // client's request for the DisassociateKmsKey operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DisassociateKmsKey for more information on using the DisassociateKmsKey
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DisassociateKmsKeyRequest method.
- // req, resp := client.DisassociateKmsKeyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey
- func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) {
- op := &request.Operation{
- Name: opDisassociateKmsKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DisassociateKmsKeyInput{}
- }
- output = &DisassociateKmsKeyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DisassociateKmsKey API operation for Amazon CloudWatch Logs.
- //
- // Disassociates the associated AWS Key Management Service (AWS KMS) customer
- // master key (CMK) from the specified log group.
- //
- // After the AWS KMS CMK is disassociated from the log group, AWS CloudWatch
- // Logs stops encrypting newly ingested data for the log group. All previously
- // ingested data remains encrypted, and AWS CloudWatch Logs requires permissions
- // for the CMK whenever the encrypted data is requested.
- //
- // Note that it can take up to 5 minutes for this operation to take effect.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation DisassociateKmsKey for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey
- func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) {
- req, out := c.DisassociateKmsKeyRequest(input)
- return out, req.Send()
- }
- // DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DisassociateKmsKey for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) {
- req, out := c.DisassociateKmsKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opFilterLogEvents = "FilterLogEvents"
- // FilterLogEventsRequest generates a "aws/request.Request" representing the
- // client's request for the FilterLogEvents operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See FilterLogEvents for more information on using the FilterLogEvents
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the FilterLogEventsRequest method.
- // req, resp := client.FilterLogEventsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents
- func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) {
- op := &request.Operation{
- Name: opFilterLogEvents,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "limit",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &FilterLogEventsInput{}
- }
- output = &FilterLogEventsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // FilterLogEvents API operation for Amazon CloudWatch Logs.
- //
- // Lists log events from the specified log group. You can list all the log events
- // or filter the results using a filter pattern, a time range, and the name
- // of the log stream.
- //
- // By default, this operation returns as many log events as can fit in 1 MB
- // (up to 10,000 log events), or all the events found within the time range
- // that you specify. If the results include a token, then there are more log
- // events available, and you can get additional results by specifying the token
- // in a subsequent call.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation FilterLogEvents for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents
- func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) {
- req, out := c.FilterLogEventsRequest(input)
- return out, req.Send()
- }
- // FilterLogEventsWithContext is the same as FilterLogEvents with the addition of
- // the ability to pass a context and additional request options.
- //
- // See FilterLogEvents for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) FilterLogEventsWithContext(ctx aws.Context, input *FilterLogEventsInput, opts ...request.Option) (*FilterLogEventsOutput, error) {
- req, out := c.FilterLogEventsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // FilterLogEventsPages iterates over the pages of a FilterLogEvents operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See FilterLogEvents method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a FilterLogEvents operation.
- // pageNum := 0
- // err := client.FilterLogEventsPages(params,
- // func(page *FilterLogEventsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool) error {
- return c.FilterLogEventsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // FilterLogEventsPagesWithContext same as FilterLogEventsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- EndPageOnSameToken: true,
- NewRequest: func() (*request.Request, error) {
- var inCpy *FilterLogEventsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.FilterLogEventsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opGetLogEvents = "GetLogEvents"
- // GetLogEventsRequest generates a "aws/request.Request" representing the
- // client's request for the GetLogEvents operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetLogEvents for more information on using the GetLogEvents
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetLogEventsRequest method.
- // req, resp := client.GetLogEventsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents
- func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) {
- op := &request.Operation{
- Name: opGetLogEvents,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextForwardToken"},
- LimitToken: "limit",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &GetLogEventsInput{}
- }
- output = &GetLogEventsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetLogEvents API operation for Amazon CloudWatch Logs.
- //
- // Lists log events from the specified log stream. You can list all the log
- // events or filter using a time range.
- //
- // By default, this operation returns as many log events as can fit in a response
- // size of 1MB (up to 10,000 log events). You can get additional log events
- // by specifying one of the tokens in a subsequent call.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation GetLogEvents for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents
- func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) {
- req, out := c.GetLogEventsRequest(input)
- return out, req.Send()
- }
- // GetLogEventsWithContext is the same as GetLogEvents with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetLogEvents for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) GetLogEventsWithContext(ctx aws.Context, input *GetLogEventsInput, opts ...request.Option) (*GetLogEventsOutput, error) {
- req, out := c.GetLogEventsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // GetLogEventsPages iterates over the pages of a GetLogEvents operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See GetLogEvents method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a GetLogEvents operation.
- // pageNum := 0
- // err := client.GetLogEventsPages(params,
- // func(page *GetLogEventsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool) error {
- return c.GetLogEventsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // GetLogEventsPagesWithContext same as GetLogEventsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- EndPageOnSameToken: true,
- NewRequest: func() (*request.Request, error) {
- var inCpy *GetLogEventsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.GetLogEventsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opGetLogGroupFields = "GetLogGroupFields"
- // GetLogGroupFieldsRequest generates a "aws/request.Request" representing the
- // client's request for the GetLogGroupFields operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetLogGroupFields for more information on using the GetLogGroupFields
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetLogGroupFieldsRequest method.
- // req, resp := client.GetLogGroupFieldsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields
- func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) {
- op := &request.Operation{
- Name: opGetLogGroupFields,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetLogGroupFieldsInput{}
- }
- output = &GetLogGroupFieldsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetLogGroupFields API operation for Amazon CloudWatch Logs.
- //
- // Returns a list of the fields that are included in log events in the specified
- // log group, along with the percentage of log events that contain each field.
- // The search is limited to a time period that you specify.
- //
- // In the results, fields that start with @ are fields generated by CloudWatch
- // Logs. For example, @timestamp is the timestamp of each log event.
- //
- // The response results are sorted by the frequency percentage, starting with
- // the highest percentage.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation GetLogGroupFields for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // You have reached the maximum number of resources that can be created.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields
- func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) {
- req, out := c.GetLogGroupFieldsRequest(input)
- return out, req.Send()
- }
- // GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetLogGroupFields for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) {
- req, out := c.GetLogGroupFieldsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetLogRecord = "GetLogRecord"
- // GetLogRecordRequest generates a "aws/request.Request" representing the
- // client's request for the GetLogRecord operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetLogRecord for more information on using the GetLogRecord
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetLogRecordRequest method.
- // req, resp := client.GetLogRecordRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord
- func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) {
- op := &request.Operation{
- Name: opGetLogRecord,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetLogRecordInput{}
- }
- output = &GetLogRecordOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetLogRecord API operation for Amazon CloudWatch Logs.
- //
- // Retrieves all the fields and values of a single log event. All fields are
- // retrieved, even if the original query that produced the logRecordPointer
- // retrieved only a subset of fields. Fields are returned as field name/field
- // value pairs.
- //
- // Additionally, the entire unparsed log event is returned within @message.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation GetLogRecord for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // You have reached the maximum number of resources that can be created.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord
- func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) {
- req, out := c.GetLogRecordRequest(input)
- return out, req.Send()
- }
- // GetLogRecordWithContext is the same as GetLogRecord with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetLogRecord for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) {
- req, out := c.GetLogRecordRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetQueryResults = "GetQueryResults"
- // GetQueryResultsRequest generates a "aws/request.Request" representing the
- // client's request for the GetQueryResults operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetQueryResults for more information on using the GetQueryResults
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetQueryResultsRequest method.
- // req, resp := client.GetQueryResultsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults
- func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) {
- op := &request.Operation{
- Name: opGetQueryResults,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetQueryResultsInput{}
- }
- output = &GetQueryResultsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetQueryResults API operation for Amazon CloudWatch Logs.
- //
- // Returns the results from the specified query. If the query is in progress,
- // partial results of that current execution are returned. Only the fields requested
- // in the query are returned.
- //
- // GetQueryResults does not start a query execution. To run a query, use .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation GetQueryResults for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults
- func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) {
- req, out := c.GetQueryResultsRequest(input)
- return out, req.Send()
- }
- // GetQueryResultsWithContext is the same as GetQueryResults with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetQueryResults for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) {
- req, out := c.GetQueryResultsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListTagsLogGroup = "ListTagsLogGroup"
- // ListTagsLogGroupRequest generates a "aws/request.Request" representing the
- // client's request for the ListTagsLogGroup operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListTagsLogGroup for more information on using the ListTagsLogGroup
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListTagsLogGroupRequest method.
- // req, resp := client.ListTagsLogGroupRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup
- func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) (req *request.Request, output *ListTagsLogGroupOutput) {
- op := &request.Operation{
- Name: opListTagsLogGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListTagsLogGroupInput{}
- }
- output = &ListTagsLogGroupOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListTagsLogGroup API operation for Amazon CloudWatch Logs.
- //
- // Lists the tags for the specified log group.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation ListTagsLogGroup for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup
- func (c *CloudWatchLogs) ListTagsLogGroup(input *ListTagsLogGroupInput) (*ListTagsLogGroupOutput, error) {
- req, out := c.ListTagsLogGroupRequest(input)
- return out, req.Send()
- }
- // ListTagsLogGroupWithContext is the same as ListTagsLogGroup with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListTagsLogGroup for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) ListTagsLogGroupWithContext(ctx aws.Context, input *ListTagsLogGroupInput, opts ...request.Option) (*ListTagsLogGroupOutput, error) {
- req, out := c.ListTagsLogGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutDestination = "PutDestination"
- // PutDestinationRequest generates a "aws/request.Request" representing the
- // client's request for the PutDestination operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutDestination for more information on using the PutDestination
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutDestinationRequest method.
- // req, resp := client.PutDestinationRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination
- func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) {
- op := &request.Operation{
- Name: opPutDestination,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutDestinationInput{}
- }
- output = &PutDestinationOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // PutDestination API operation for Amazon CloudWatch Logs.
- //
- // Creates or updates a destination. A destination encapsulates a physical resource
- // (such as an Amazon Kinesis stream) and enables you to subscribe to a real-time
- // stream of log events for a different account, ingested using PutLogEvents.
- // Currently, the only supported physical resource is a Kinesis stream belonging
- // to the same account as the destination.
- //
- // Through an access policy, a destination controls what is written to its Kinesis
- // stream. By default, PutDestination does not set any access policy with the
- // destination, which means a cross-account user cannot call PutSubscriptionFilter
- // against this destination. To enable this, the destination owner must call
- // PutDestinationPolicy after PutDestination.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation PutDestination for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination
- func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) {
- req, out := c.PutDestinationRequest(input)
- return out, req.Send()
- }
- // PutDestinationWithContext is the same as PutDestination with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutDestination for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) PutDestinationWithContext(ctx aws.Context, input *PutDestinationInput, opts ...request.Option) (*PutDestinationOutput, error) {
- req, out := c.PutDestinationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutDestinationPolicy = "PutDestinationPolicy"
- // PutDestinationPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the PutDestinationPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutDestinationPolicy for more information on using the PutDestinationPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutDestinationPolicyRequest method.
- // req, resp := client.PutDestinationPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy
- func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) {
- op := &request.Operation{
- Name: opPutDestinationPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutDestinationPolicyInput{}
- }
- output = &PutDestinationPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutDestinationPolicy API operation for Amazon CloudWatch Logs.
- //
- // Creates or updates an access policy associated with an existing destination.
- // An access policy is an IAM policy document (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html)
- // that is used to authorize claims to register a subscription filter against
- // a given destination.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation PutDestinationPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy
- func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) {
- req, out := c.PutDestinationPolicyRequest(input)
- return out, req.Send()
- }
- // PutDestinationPolicyWithContext is the same as PutDestinationPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutDestinationPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) PutDestinationPolicyWithContext(ctx aws.Context, input *PutDestinationPolicyInput, opts ...request.Option) (*PutDestinationPolicyOutput, error) {
- req, out := c.PutDestinationPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutLogEvents = "PutLogEvents"
- // PutLogEventsRequest generates a "aws/request.Request" representing the
- // client's request for the PutLogEvents operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutLogEvents for more information on using the PutLogEvents
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutLogEventsRequest method.
- // req, resp := client.PutLogEventsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents
- func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) {
- op := &request.Operation{
- Name: opPutLogEvents,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutLogEventsInput{}
- }
- output = &PutLogEventsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // PutLogEvents API operation for Amazon CloudWatch Logs.
- //
- // Uploads a batch of log events to the specified log stream.
- //
- // You must include the sequence token obtained from the response of the previous
- // call. An upload in a newly created log stream does not require a sequence
- // token. You can also get the sequence token using DescribeLogStreams. If you
- // call PutLogEvents twice within a narrow time period using the same value
- // for sequenceToken, both calls may be successful, or one may be rejected.
- //
- // The batch of events must satisfy the following constraints:
- //
- // * The maximum batch size is 1,048,576 bytes, and this size is calculated
- // as the sum of all event messages in UTF-8, plus 26 bytes for each log
- // event.
- //
- // * None of the log events in the batch can be more than 2 hours in the
- // future.
- //
- // * None of the log events in the batch can be older than 14 days or the
- // retention period of the log group.
- //
- // * The log events in the batch must be in chronological ordered by their
- // timestamp. The timestamp is the time the event occurred, expressed as
- // the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In AWS Tools
- // for PowerShell and the AWS SDK for .NET, the timestamp is specified in
- // .NET format: yyyy-mm-ddThh:mm:ss. For example, 2017-09-15T13:45:30.)
- //
- // * The maximum number of log events in a batch is 10,000.
- //
- // * A batch of log events in a single request cannot span more than 24 hours.
- // Otherwise, the operation fails.
- //
- // If a call to PutLogEvents returns "UnrecognizedClientException" the most
- // likely cause is an invalid AWS access key ID or secret key.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation PutLogEvents for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeInvalidSequenceTokenException "InvalidSequenceTokenException"
- // The sequence token is not valid.
- //
- // * ErrCodeDataAlreadyAcceptedException "DataAlreadyAcceptedException"
- // The event was already logged.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // * ErrCodeUnrecognizedClientException "UnrecognizedClientException"
- // The most likely cause is an invalid AWS access key ID or secret key.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents
- func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) {
- req, out := c.PutLogEventsRequest(input)
- return out, req.Send()
- }
- // PutLogEventsWithContext is the same as PutLogEvents with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutLogEvents for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) PutLogEventsWithContext(ctx aws.Context, input *PutLogEventsInput, opts ...request.Option) (*PutLogEventsOutput, error) {
- req, out := c.PutLogEventsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutMetricFilter = "PutMetricFilter"
- // PutMetricFilterRequest generates a "aws/request.Request" representing the
- // client's request for the PutMetricFilter operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutMetricFilter for more information on using the PutMetricFilter
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutMetricFilterRequest method.
- // req, resp := client.PutMetricFilterRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter
- func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) {
- op := &request.Operation{
- Name: opPutMetricFilter,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutMetricFilterInput{}
- }
- output = &PutMetricFilterOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutMetricFilter API operation for Amazon CloudWatch Logs.
- //
- // Creates or updates a metric filter and associates it with the specified log
- // group. Metric filters allow you to configure rules to extract metric data
- // from log events ingested through PutLogEvents.
- //
- // The maximum number of metric filters that can be associated with a log group
- // is 100.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation PutMetricFilter for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // You have reached the maximum number of resources that can be created.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter
- func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) {
- req, out := c.PutMetricFilterRequest(input)
- return out, req.Send()
- }
- // PutMetricFilterWithContext is the same as PutMetricFilter with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutMetricFilter for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutMetricFilterInput, opts ...request.Option) (*PutMetricFilterOutput, error) {
- req, out := c.PutMetricFilterRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutResourcePolicy = "PutResourcePolicy"
- // PutResourcePolicyRequest generates a "aws/request.Request" representing the
- // client's request for the PutResourcePolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutResourcePolicy for more information on using the PutResourcePolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutResourcePolicyRequest method.
- // req, resp := client.PutResourcePolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy
- func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) {
- op := &request.Operation{
- Name: opPutResourcePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutResourcePolicyInput{}
- }
- output = &PutResourcePolicyOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // PutResourcePolicy API operation for Amazon CloudWatch Logs.
- //
- // Creates or updates a resource policy allowing other AWS services to put log
- // events to this account, such as Amazon Route 53. An account can have up to
- // 10 resource policies per region.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation PutResourcePolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // You have reached the maximum number of resources that can be created.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy
- func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) {
- req, out := c.PutResourcePolicyRequest(input)
- return out, req.Send()
- }
- // PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutResourcePolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) {
- req, out := c.PutResourcePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutRetentionPolicy = "PutRetentionPolicy"
- // PutRetentionPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the PutRetentionPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutRetentionPolicy for more information on using the PutRetentionPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutRetentionPolicyRequest method.
- // req, resp := client.PutRetentionPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy
- func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) {
- op := &request.Operation{
- Name: opPutRetentionPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutRetentionPolicyInput{}
- }
- output = &PutRetentionPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutRetentionPolicy API operation for Amazon CloudWatch Logs.
- //
- // Sets the retention of the specified log group. A retention policy allows
- // you to configure the number of days for which to retain log events in the
- // specified log group.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation PutRetentionPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy
- func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) {
- req, out := c.PutRetentionPolicyRequest(input)
- return out, req.Send()
- }
- // PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutRetentionPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) {
- req, out := c.PutRetentionPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutSubscriptionFilter = "PutSubscriptionFilter"
- // PutSubscriptionFilterRequest generates a "aws/request.Request" representing the
- // client's request for the PutSubscriptionFilter operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutSubscriptionFilter for more information on using the PutSubscriptionFilter
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutSubscriptionFilterRequest method.
- // req, resp := client.PutSubscriptionFilterRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter
- func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) {
- op := &request.Operation{
- Name: opPutSubscriptionFilter,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutSubscriptionFilterInput{}
- }
- output = &PutSubscriptionFilterOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutSubscriptionFilter API operation for Amazon CloudWatch Logs.
- //
- // Creates or updates a subscription filter and associates it with the specified
- // log group. Subscription filters allow you to subscribe to a real-time stream
- // of log events ingested through PutLogEvents and have them delivered to a
- // specific destination. Currently, the supported destinations are:
- //
- // * An Amazon Kinesis stream belonging to the same account as the subscription
- // filter, for same-account delivery.
- //
- // * A logical destination that belongs to a different account, for cross-account
- // delivery.
- //
- // * An Amazon Kinesis Firehose delivery stream that belongs to the same
- // account as the subscription filter, for same-account delivery.
- //
- // * An AWS Lambda function that belongs to the same account as the subscription
- // filter, for same-account delivery.
- //
- // There can only be one subscription filter associated with a log group. If
- // you are updating an existing filter, you must specify the correct name in
- // filterName. Otherwise, the call fails because you cannot associate a second
- // filter with a log group.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation PutSubscriptionFilter for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeOperationAbortedException "OperationAbortedException"
- // Multiple requests to update the same resource were in conflict.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // You have reached the maximum number of resources that can be created.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter
- func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) {
- req, out := c.PutSubscriptionFilterRequest(input)
- return out, req.Send()
- }
- // PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutSubscriptionFilter for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) {
- req, out := c.PutSubscriptionFilterRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartQuery = "StartQuery"
- // StartQueryRequest generates a "aws/request.Request" representing the
- // client's request for the StartQuery operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartQuery for more information on using the StartQuery
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartQueryRequest method.
- // req, resp := client.StartQueryRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery
- func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) {
- op := &request.Operation{
- Name: opStartQuery,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StartQueryInput{}
- }
- output = &StartQueryOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartQuery API operation for Amazon CloudWatch Logs.
- //
- // Schedules a query of a log group using CloudWatch Logs Insights. You specify
- // the log group to query, the query string to use, and the time to query.
- //
- // For more information, see CloudWatch Logs Insights Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation StartQuery for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeMalformedQueryException "MalformedQueryException"
- // The query string is not valid. Details about this error are displayed in
- // a QueryCompileError object. For more information, see .
- //
- // For more information about valid query syntax, see CloudWatch Logs Insights
- // Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
- //
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // You have reached the maximum number of resources that can be created.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery
- func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) {
- req, out := c.StartQueryRequest(input)
- return out, req.Send()
- }
- // StartQueryWithContext is the same as StartQuery with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartQuery for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) {
- req, out := c.StartQueryRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopQuery = "StopQuery"
- // StopQueryRequest generates a "aws/request.Request" representing the
- // client's request for the StopQuery operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopQuery for more information on using the StopQuery
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopQueryRequest method.
- // req, resp := client.StopQueryRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery
- func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) {
- op := &request.Operation{
- Name: opStopQuery,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StopQueryInput{}
- }
- output = &StopQueryOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StopQuery API operation for Amazon CloudWatch Logs.
- //
- // Stops a CloudWatch Logs Insights query that is in progress. If the query
- // has already ended, the operation returns an error indicating that the specified
- // query is not running.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation StopQuery for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery
- func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) {
- req, out := c.StopQueryRequest(input)
- return out, req.Send()
- }
- // StopQueryWithContext is the same as StopQuery with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopQuery for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) {
- req, out := c.StopQueryRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opTagLogGroup = "TagLogGroup"
- // TagLogGroupRequest generates a "aws/request.Request" representing the
- // client's request for the TagLogGroup operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See TagLogGroup for more information on using the TagLogGroup
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the TagLogGroupRequest method.
- // req, resp := client.TagLogGroupRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup
- func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *request.Request, output *TagLogGroupOutput) {
- op := &request.Operation{
- Name: opTagLogGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &TagLogGroupInput{}
- }
- output = &TagLogGroupOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // TagLogGroup API operation for Amazon CloudWatch Logs.
- //
- // Adds or updates the specified tags for the specified log group.
- //
- // To list the tags for a log group, use ListTagsLogGroup. To remove tags, use
- // UntagLogGroup.
- //
- // For more information about tags, see Tag Log Groups in Amazon CloudWatch
- // Logs (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/log-group-tagging.html)
- // in the Amazon CloudWatch Logs User Guide.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation TagLogGroup for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup
- func (c *CloudWatchLogs) TagLogGroup(input *TagLogGroupInput) (*TagLogGroupOutput, error) {
- req, out := c.TagLogGroupRequest(input)
- return out, req.Send()
- }
- // TagLogGroupWithContext is the same as TagLogGroup with the addition of
- // the ability to pass a context and additional request options.
- //
- // See TagLogGroup for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) TagLogGroupWithContext(ctx aws.Context, input *TagLogGroupInput, opts ...request.Option) (*TagLogGroupOutput, error) {
- req, out := c.TagLogGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opTestMetricFilter = "TestMetricFilter"
- // TestMetricFilterRequest generates a "aws/request.Request" representing the
- // client's request for the TestMetricFilter operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See TestMetricFilter for more information on using the TestMetricFilter
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the TestMetricFilterRequest method.
- // req, resp := client.TestMetricFilterRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter
- func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) {
- op := &request.Operation{
- Name: opTestMetricFilter,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &TestMetricFilterInput{}
- }
- output = &TestMetricFilterOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // TestMetricFilter API operation for Amazon CloudWatch Logs.
- //
- // Tests the filter pattern of a metric filter against a sample of log event
- // messages. You can use this operation to validate the correctness of a metric
- // filter pattern.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation TestMetricFilter for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterException "InvalidParameterException"
- // A parameter is specified incorrectly.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The service cannot complete the request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter
- func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) {
- req, out := c.TestMetricFilterRequest(input)
- return out, req.Send()
- }
- // TestMetricFilterWithContext is the same as TestMetricFilter with the addition of
- // the ability to pass a context and additional request options.
- //
- // See TestMetricFilter for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) TestMetricFilterWithContext(ctx aws.Context, input *TestMetricFilterInput, opts ...request.Option) (*TestMetricFilterOutput, error) {
- req, out := c.TestMetricFilterRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opUntagLogGroup = "UntagLogGroup"
- // UntagLogGroupRequest generates a "aws/request.Request" representing the
- // client's request for the UntagLogGroup operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See UntagLogGroup for more information on using the UntagLogGroup
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the UntagLogGroupRequest method.
- // req, resp := client.UntagLogGroupRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup
- func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *request.Request, output *UntagLogGroupOutput) {
- op := &request.Operation{
- Name: opUntagLogGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UntagLogGroupInput{}
- }
- output = &UntagLogGroupOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // UntagLogGroup API operation for Amazon CloudWatch Logs.
- //
- // Removes the specified tags from the specified log group.
- //
- // To list the tags for a log group, use ListTagsLogGroup. To add tags, use
- // UntagLogGroup.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon CloudWatch Logs's
- // API operation UntagLogGroup for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource does not exist.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup
- func (c *CloudWatchLogs) UntagLogGroup(input *UntagLogGroupInput) (*UntagLogGroupOutput, error) {
- req, out := c.UntagLogGroupRequest(input)
- return out, req.Send()
- }
- // UntagLogGroupWithContext is the same as UntagLogGroup with the addition of
- // the ability to pass a context and additional request options.
- //
- // See UntagLogGroup for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagLogGroupInput, opts ...request.Option) (*UntagLogGroupOutput, error) {
- req, out := c.UntagLogGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- type AssociateKmsKeyInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
- // For more information, see Amazon Resource Names - AWS Key Management Service
- // (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms).
- //
- // KmsKeyId is a required field
- KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s AssociateKmsKeyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AssociateKmsKeyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *AssociateKmsKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"}
- if s.KmsKeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KmsKeyId"))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetKmsKeyId sets the KmsKeyId field's value.
- func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput {
- s.KmsKeyId = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput {
- s.LogGroupName = &v
- return s
- }
- type AssociateKmsKeyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s AssociateKmsKeyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AssociateKmsKeyOutput) GoString() string {
- return s.String()
- }
- type CancelExportTaskInput struct {
- _ struct{} `type:"structure"`
- // The ID of the export task.
- //
- // TaskId is a required field
- TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CancelExportTaskInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CancelExportTaskInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CancelExportTaskInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"}
- if s.TaskId == nil {
- invalidParams.Add(request.NewErrParamRequired("TaskId"))
- }
- if s.TaskId != nil && len(*s.TaskId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TaskId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetTaskId sets the TaskId field's value.
- func (s *CancelExportTaskInput) SetTaskId(v string) *CancelExportTaskInput {
- s.TaskId = &v
- return s
- }
- type CancelExportTaskOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s CancelExportTaskOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CancelExportTaskOutput) GoString() string {
- return s.String()
- }
- type CreateExportTaskInput struct {
- _ struct{} `type:"structure"`
- // The name of S3 bucket for the exported log data. The bucket must be in the
- // same AWS region.
- //
- // Destination is a required field
- Destination *string `locationName:"destination" min:"1" type:"string" required:"true"`
- // The prefix used as the start of the key for every object exported. If you
- // don't specify a value, the default is exportedlogs.
- DestinationPrefix *string `locationName:"destinationPrefix" type:"string"`
- // The start time of the range for the request, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this
- // time are not exported.
- //
- // From is a required field
- From *int64 `locationName:"from" type:"long" required:"true"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // Export only log streams that match the provided prefix. If you don't specify
- // a value, no prefix filter is applied.
- LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"`
- // The name of the export task.
- TaskName *string `locationName:"taskName" min:"1" type:"string"`
- // The end time of the range for the request, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time
- // are not exported.
- //
- // To is a required field
- To *int64 `locationName:"to" type:"long" required:"true"`
- }
- // String returns the string representation
- func (s CreateExportTaskInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateExportTaskInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateExportTaskInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"}
- if s.Destination == nil {
- invalidParams.Add(request.NewErrParamRequired("Destination"))
- }
- if s.Destination != nil && len(*s.Destination) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Destination", 1))
- }
- if s.From == nil {
- invalidParams.Add(request.NewErrParamRequired("From"))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1))
- }
- if s.TaskName != nil && len(*s.TaskName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TaskName", 1))
- }
- if s.To == nil {
- invalidParams.Add(request.NewErrParamRequired("To"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDestination sets the Destination field's value.
- func (s *CreateExportTaskInput) SetDestination(v string) *CreateExportTaskInput {
- s.Destination = &v
- return s
- }
- // SetDestinationPrefix sets the DestinationPrefix field's value.
- func (s *CreateExportTaskInput) SetDestinationPrefix(v string) *CreateExportTaskInput {
- s.DestinationPrefix = &v
- return s
- }
- // SetFrom sets the From field's value.
- func (s *CreateExportTaskInput) SetFrom(v int64) *CreateExportTaskInput {
- s.From = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *CreateExportTaskInput) SetLogGroupName(v string) *CreateExportTaskInput {
- s.LogGroupName = &v
- return s
- }
- // SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value.
- func (s *CreateExportTaskInput) SetLogStreamNamePrefix(v string) *CreateExportTaskInput {
- s.LogStreamNamePrefix = &v
- return s
- }
- // SetTaskName sets the TaskName field's value.
- func (s *CreateExportTaskInput) SetTaskName(v string) *CreateExportTaskInput {
- s.TaskName = &v
- return s
- }
- // SetTo sets the To field's value.
- func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput {
- s.To = &v
- return s
- }
- type CreateExportTaskOutput struct {
- _ struct{} `type:"structure"`
- // The ID of the export task.
- TaskId *string `locationName:"taskId" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s CreateExportTaskOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateExportTaskOutput) GoString() string {
- return s.String()
- }
- // SetTaskId sets the TaskId field's value.
- func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput {
- s.TaskId = &v
- return s
- }
- type CreateLogGroupInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
- // For more information, see Amazon Resource Names - AWS Key Management Service
- // (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms).
- KmsKeyId *string `locationName:"kmsKeyId" type:"string"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The key-value pairs to use for the tags.
- Tags map[string]*string `locationName:"tags" min:"1" type:"map"`
- }
- // String returns the string representation
- func (s CreateLogGroupInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateLogGroupInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateLogGroupInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.Tags != nil && len(s.Tags) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetKmsKeyId sets the KmsKeyId field's value.
- func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput {
- s.KmsKeyId = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput {
- s.LogGroupName = &v
- return s
- }
- // SetTags sets the Tags field's value.
- func (s *CreateLogGroupInput) SetTags(v map[string]*string) *CreateLogGroupInput {
- s.Tags = v
- return s
- }
- type CreateLogGroupOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s CreateLogGroupOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateLogGroupOutput) GoString() string {
- return s.String()
- }
- type CreateLogStreamInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The name of the log stream.
- //
- // LogStreamName is a required field
- LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateLogStreamInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateLogStreamInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateLogStreamInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.LogStreamName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
- }
- if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *CreateLogStreamInput) SetLogGroupName(v string) *CreateLogStreamInput {
- s.LogGroupName = &v
- return s
- }
- // SetLogStreamName sets the LogStreamName field's value.
- func (s *CreateLogStreamInput) SetLogStreamName(v string) *CreateLogStreamInput {
- s.LogStreamName = &v
- return s
- }
- type CreateLogStreamOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s CreateLogStreamOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateLogStreamOutput) GoString() string {
- return s.String()
- }
- type DeleteDestinationInput struct {
- _ struct{} `type:"structure"`
- // The name of the destination.
- //
- // DestinationName is a required field
- DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteDestinationInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteDestinationInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteDestinationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"}
- if s.DestinationName == nil {
- invalidParams.Add(request.NewErrParamRequired("DestinationName"))
- }
- if s.DestinationName != nil && len(*s.DestinationName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDestinationName sets the DestinationName field's value.
- func (s *DeleteDestinationInput) SetDestinationName(v string) *DeleteDestinationInput {
- s.DestinationName = &v
- return s
- }
- type DeleteDestinationOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteDestinationOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteDestinationOutput) GoString() string {
- return s.String()
- }
- type DeleteLogGroupInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteLogGroupInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteLogGroupInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteLogGroupInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DeleteLogGroupInput) SetLogGroupName(v string) *DeleteLogGroupInput {
- s.LogGroupName = &v
- return s
- }
- type DeleteLogGroupOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteLogGroupOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteLogGroupOutput) GoString() string {
- return s.String()
- }
- type DeleteLogStreamInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The name of the log stream.
- //
- // LogStreamName is a required field
- LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteLogStreamInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteLogStreamInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteLogStreamInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.LogStreamName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
- }
- if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DeleteLogStreamInput) SetLogGroupName(v string) *DeleteLogStreamInput {
- s.LogGroupName = &v
- return s
- }
- // SetLogStreamName sets the LogStreamName field's value.
- func (s *DeleteLogStreamInput) SetLogStreamName(v string) *DeleteLogStreamInput {
- s.LogStreamName = &v
- return s
- }
- type DeleteLogStreamOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteLogStreamOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteLogStreamOutput) GoString() string {
- return s.String()
- }
- type DeleteMetricFilterInput struct {
- _ struct{} `type:"structure"`
- // The name of the metric filter.
- //
- // FilterName is a required field
- FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteMetricFilterInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteMetricFilterInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteMetricFilterInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"}
- if s.FilterName == nil {
- invalidParams.Add(request.NewErrParamRequired("FilterName"))
- }
- if s.FilterName != nil && len(*s.FilterName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilterName sets the FilterName field's value.
- func (s *DeleteMetricFilterInput) SetFilterName(v string) *DeleteMetricFilterInput {
- s.FilterName = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DeleteMetricFilterInput) SetLogGroupName(v string) *DeleteMetricFilterInput {
- s.LogGroupName = &v
- return s
- }
- type DeleteMetricFilterOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteMetricFilterOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteMetricFilterOutput) GoString() string {
- return s.String()
- }
- type DeleteResourcePolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the policy to be revoked. This parameter is required.
- PolicyName *string `locationName:"policyName" type:"string"`
- }
- // String returns the string representation
- func (s DeleteResourcePolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteResourcePolicyInput) GoString() string {
- return s.String()
- }
- // SetPolicyName sets the PolicyName field's value.
- func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput {
- s.PolicyName = &v
- return s
- }
- type DeleteResourcePolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteResourcePolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteResourcePolicyOutput) GoString() string {
- return s.String()
- }
- type DeleteRetentionPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteRetentionPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRetentionPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteRetentionPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DeleteRetentionPolicyInput) SetLogGroupName(v string) *DeleteRetentionPolicyInput {
- s.LogGroupName = &v
- return s
- }
- type DeleteRetentionPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteRetentionPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRetentionPolicyOutput) GoString() string {
- return s.String()
- }
- type DeleteSubscriptionFilterInput struct {
- _ struct{} `type:"structure"`
- // The name of the subscription filter.
- //
- // FilterName is a required field
- FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteSubscriptionFilterInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteSubscriptionFilterInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteSubscriptionFilterInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"}
- if s.FilterName == nil {
- invalidParams.Add(request.NewErrParamRequired("FilterName"))
- }
- if s.FilterName != nil && len(*s.FilterName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilterName sets the FilterName field's value.
- func (s *DeleteSubscriptionFilterInput) SetFilterName(v string) *DeleteSubscriptionFilterInput {
- s.FilterName = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DeleteSubscriptionFilterInput) SetLogGroupName(v string) *DeleteSubscriptionFilterInput {
- s.LogGroupName = &v
- return s
- }
- type DeleteSubscriptionFilterOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteSubscriptionFilterOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteSubscriptionFilterOutput) GoString() string {
- return s.String()
- }
- type DescribeDestinationsInput struct {
- _ struct{} `type:"structure"`
- // The prefix to match. If you don't specify a value, no prefix filter is applied.
- DestinationNamePrefix *string `min:"1" type:"string"`
- // The maximum number of items returned. If you don't specify a value, the default
- // is up to 50 items.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The token for the next set of items to return. (You received this token from
- // a previous call.)
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeDestinationsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeDestinationsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeDestinationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"}
- if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDestinationNamePrefix sets the DestinationNamePrefix field's value.
- func (s *DescribeDestinationsInput) SetDestinationNamePrefix(v string) *DescribeDestinationsInput {
- s.DestinationNamePrefix = &v
- return s
- }
- // SetLimit sets the Limit field's value.
- func (s *DescribeDestinationsInput) SetLimit(v int64) *DescribeDestinationsInput {
- s.Limit = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeDestinationsInput) SetNextToken(v string) *DescribeDestinationsInput {
- s.NextToken = &v
- return s
- }
- type DescribeDestinationsOutput struct {
- _ struct{} `type:"structure"`
- // The destinations.
- Destinations []*Destination `locationName:"destinations" type:"list"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeDestinationsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeDestinationsOutput) GoString() string {
- return s.String()
- }
- // SetDestinations sets the Destinations field's value.
- func (s *DescribeDestinationsOutput) SetDestinations(v []*Destination) *DescribeDestinationsOutput {
- s.Destinations = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeDestinationsOutput) SetNextToken(v string) *DescribeDestinationsOutput {
- s.NextToken = &v
- return s
- }
- type DescribeExportTasksInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items returned. If you don't specify a value, the default
- // is up to 50 items.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The token for the next set of items to return. (You received this token from
- // a previous call.)
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // The status code of the export task. Specifying a status code filters the
- // results to zero or more export tasks.
- StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"`
- // The ID of the export task. Specifying a task ID filters the results to zero
- // or one export tasks.
- TaskId *string `locationName:"taskId" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeExportTasksInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeExportTasksInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeExportTasksInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"}
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if s.TaskId != nil && len(*s.TaskId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TaskId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLimit sets the Limit field's value.
- func (s *DescribeExportTasksInput) SetLimit(v int64) *DescribeExportTasksInput {
- s.Limit = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeExportTasksInput) SetNextToken(v string) *DescribeExportTasksInput {
- s.NextToken = &v
- return s
- }
- // SetStatusCode sets the StatusCode field's value.
- func (s *DescribeExportTasksInput) SetStatusCode(v string) *DescribeExportTasksInput {
- s.StatusCode = &v
- return s
- }
- // SetTaskId sets the TaskId field's value.
- func (s *DescribeExportTasksInput) SetTaskId(v string) *DescribeExportTasksInput {
- s.TaskId = &v
- return s
- }
- type DescribeExportTasksOutput struct {
- _ struct{} `type:"structure"`
- // The export tasks.
- ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeExportTasksOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeExportTasksOutput) GoString() string {
- return s.String()
- }
- // SetExportTasks sets the ExportTasks field's value.
- func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput {
- s.ExportTasks = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeExportTasksOutput) SetNextToken(v string) *DescribeExportTasksOutput {
- s.NextToken = &v
- return s
- }
- type DescribeLogGroupsInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items returned. If you don't specify a value, the default
- // is up to 50 items.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The prefix to match.
- LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"`
- // The token for the next set of items to return. (You received this token from
- // a previous call.)
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeLogGroupsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeLogGroupsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeLogGroupsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"}
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLimit sets the Limit field's value.
- func (s *DescribeLogGroupsInput) SetLimit(v int64) *DescribeLogGroupsInput {
- s.Limit = &v
- return s
- }
- // SetLogGroupNamePrefix sets the LogGroupNamePrefix field's value.
- func (s *DescribeLogGroupsInput) SetLogGroupNamePrefix(v string) *DescribeLogGroupsInput {
- s.LogGroupNamePrefix = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeLogGroupsInput) SetNextToken(v string) *DescribeLogGroupsInput {
- s.NextToken = &v
- return s
- }
- type DescribeLogGroupsOutput struct {
- _ struct{} `type:"structure"`
- // The log groups.
- LogGroups []*LogGroup `locationName:"logGroups" type:"list"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeLogGroupsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeLogGroupsOutput) GoString() string {
- return s.String()
- }
- // SetLogGroups sets the LogGroups field's value.
- func (s *DescribeLogGroupsOutput) SetLogGroups(v []*LogGroup) *DescribeLogGroupsOutput {
- s.LogGroups = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeLogGroupsOutput) SetNextToken(v string) *DescribeLogGroupsOutput {
- s.NextToken = &v
- return s
- }
- type DescribeLogStreamsInput struct {
- _ struct{} `type:"structure"`
- // If the value is true, results are returned in descending order. If the value
- // is to false, results are returned in ascending order. The default value is
- // false.
- Descending *bool `locationName:"descending" type:"boolean"`
- // The maximum number of items returned. If you don't specify a value, the default
- // is up to 50 items.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The prefix to match.
- //
- // If orderBy is LastEventTime,you cannot specify this parameter.
- LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"`
- // The token for the next set of items to return. (You received this token from
- // a previous call.)
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // If the value is LogStreamName, the results are ordered by log stream name.
- // If the value is LastEventTime, the results are ordered by the event time.
- // The default value is LogStreamName.
- //
- // If you order the results by event time, you cannot specify the logStreamNamePrefix
- // parameter.
- //
- // lastEventTimestamp represents the time of the most recent log event in the
- // log stream in CloudWatch Logs. This number is expressed as the number of
- // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimeStamp updates on
- // an eventual consistency basis. It typically updates in less than an hour
- // from ingestion, but may take longer in some rare situations.
- OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"`
- }
- // String returns the string representation
- func (s DescribeLogStreamsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeLogStreamsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeLogStreamsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"}
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDescending sets the Descending field's value.
- func (s *DescribeLogStreamsInput) SetDescending(v bool) *DescribeLogStreamsInput {
- s.Descending = &v
- return s
- }
- // SetLimit sets the Limit field's value.
- func (s *DescribeLogStreamsInput) SetLimit(v int64) *DescribeLogStreamsInput {
- s.Limit = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DescribeLogStreamsInput) SetLogGroupName(v string) *DescribeLogStreamsInput {
- s.LogGroupName = &v
- return s
- }
- // SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value.
- func (s *DescribeLogStreamsInput) SetLogStreamNamePrefix(v string) *DescribeLogStreamsInput {
- s.LogStreamNamePrefix = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeLogStreamsInput) SetNextToken(v string) *DescribeLogStreamsInput {
- s.NextToken = &v
- return s
- }
- // SetOrderBy sets the OrderBy field's value.
- func (s *DescribeLogStreamsInput) SetOrderBy(v string) *DescribeLogStreamsInput {
- s.OrderBy = &v
- return s
- }
- type DescribeLogStreamsOutput struct {
- _ struct{} `type:"structure"`
- // The log streams.
- LogStreams []*LogStream `locationName:"logStreams" type:"list"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeLogStreamsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeLogStreamsOutput) GoString() string {
- return s.String()
- }
- // SetLogStreams sets the LogStreams field's value.
- func (s *DescribeLogStreamsOutput) SetLogStreams(v []*LogStream) *DescribeLogStreamsOutput {
- s.LogStreams = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeLogStreamsOutput) SetNextToken(v string) *DescribeLogStreamsOutput {
- s.NextToken = &v
- return s
- }
- type DescribeMetricFiltersInput struct {
- _ struct{} `type:"structure"`
- // The prefix to match.
- FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"`
- // The maximum number of items returned. If you don't specify a value, the default
- // is up to 50 items.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The name of the log group.
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
- // Filters results to include only those with the specified metric name. If
- // you include this parameter in your request, you must also include the metricNamespace
- // parameter.
- MetricName *string `locationName:"metricName" type:"string"`
- // Filters results to include only those in the specified namespace. If you
- // include this parameter in your request, you must also include the metricName
- // parameter.
- MetricNamespace *string `locationName:"metricNamespace" type:"string"`
- // The token for the next set of items to return. (You received this token from
- // a previous call.)
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeMetricFiltersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeMetricFiltersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeMetricFiltersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"}
- if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilterNamePrefix sets the FilterNamePrefix field's value.
- func (s *DescribeMetricFiltersInput) SetFilterNamePrefix(v string) *DescribeMetricFiltersInput {
- s.FilterNamePrefix = &v
- return s
- }
- // SetLimit sets the Limit field's value.
- func (s *DescribeMetricFiltersInput) SetLimit(v int64) *DescribeMetricFiltersInput {
- s.Limit = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DescribeMetricFiltersInput) SetLogGroupName(v string) *DescribeMetricFiltersInput {
- s.LogGroupName = &v
- return s
- }
- // SetMetricName sets the MetricName field's value.
- func (s *DescribeMetricFiltersInput) SetMetricName(v string) *DescribeMetricFiltersInput {
- s.MetricName = &v
- return s
- }
- // SetMetricNamespace sets the MetricNamespace field's value.
- func (s *DescribeMetricFiltersInput) SetMetricNamespace(v string) *DescribeMetricFiltersInput {
- s.MetricNamespace = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeMetricFiltersInput) SetNextToken(v string) *DescribeMetricFiltersInput {
- s.NextToken = &v
- return s
- }
- type DescribeMetricFiltersOutput struct {
- _ struct{} `type:"structure"`
- // The metric filters.
- MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeMetricFiltersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeMetricFiltersOutput) GoString() string {
- return s.String()
- }
- // SetMetricFilters sets the MetricFilters field's value.
- func (s *DescribeMetricFiltersOutput) SetMetricFilters(v []*MetricFilter) *DescribeMetricFiltersOutput {
- s.MetricFilters = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFiltersOutput {
- s.NextToken = &v
- return s
- }
- type DescribeQueriesInput struct {
- _ struct{} `type:"structure"`
- // Limits the returned queries to only those for the specified log group.
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
- // Limits the number of returned queries to the specified number.
- MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // Limits the returned queries to only those that have the specified status.
- // Valid values are Cancelled, Complete, Failed, Running, and Scheduled.
- Status *string `locationName:"status" type:"string" enum:"QueryStatus"`
- }
- // String returns the string representation
- func (s DescribeQueriesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeQueriesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeQueriesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"}
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput {
- s.LogGroupName = &v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput {
- s.NextToken = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput {
- s.Status = &v
- return s
- }
- type DescribeQueriesOutput struct {
- _ struct{} `type:"structure"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // The list of queries that match the request.
- Queries []*QueryInfo `locationName:"queries" type:"list"`
- }
- // String returns the string representation
- func (s DescribeQueriesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeQueriesOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput {
- s.NextToken = &v
- return s
- }
- // SetQueries sets the Queries field's value.
- func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput {
- s.Queries = v
- return s
- }
- type DescribeResourcePoliciesInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of resource policies to be displayed with one call of
- // this API.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeResourcePoliciesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeResourcePoliciesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeResourcePoliciesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"}
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLimit sets the Limit field's value.
- func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput {
- s.Limit = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput {
- s.NextToken = &v
- return s
- }
- type DescribeResourcePoliciesOutput struct {
- _ struct{} `type:"structure"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // The resource policies that exist in this account.
- ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"`
- }
- // String returns the string representation
- func (s DescribeResourcePoliciesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeResourcePoliciesOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput {
- s.NextToken = &v
- return s
- }
- // SetResourcePolicies sets the ResourcePolicies field's value.
- func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput {
- s.ResourcePolicies = v
- return s
- }
- type DescribeSubscriptionFiltersInput struct {
- _ struct{} `type:"structure"`
- // The prefix to match. If you don't specify a value, no prefix filter is applied.
- FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"`
- // The maximum number of items returned. If you don't specify a value, the default
- // is up to 50 items.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The token for the next set of items to return. (You received this token from
- // a previous call.)
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeSubscriptionFiltersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeSubscriptionFiltersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeSubscriptionFiltersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"}
- if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilterNamePrefix sets the FilterNamePrefix field's value.
- func (s *DescribeSubscriptionFiltersInput) SetFilterNamePrefix(v string) *DescribeSubscriptionFiltersInput {
- s.FilterNamePrefix = &v
- return s
- }
- // SetLimit sets the Limit field's value.
- func (s *DescribeSubscriptionFiltersInput) SetLimit(v int64) *DescribeSubscriptionFiltersInput {
- s.Limit = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DescribeSubscriptionFiltersInput) SetLogGroupName(v string) *DescribeSubscriptionFiltersInput {
- s.LogGroupName = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeSubscriptionFiltersInput) SetNextToken(v string) *DescribeSubscriptionFiltersInput {
- s.NextToken = &v
- return s
- }
- type DescribeSubscriptionFiltersOutput struct {
- _ struct{} `type:"structure"`
- // The token for the next set of items to return. The token expires after 24
- // hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // The subscription filters.
- SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"`
- }
- // String returns the string representation
- func (s DescribeSubscriptionFiltersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeSubscriptionFiltersOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *DescribeSubscriptionFiltersOutput) SetNextToken(v string) *DescribeSubscriptionFiltersOutput {
- s.NextToken = &v
- return s
- }
- // SetSubscriptionFilters sets the SubscriptionFilters field's value.
- func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput {
- s.SubscriptionFilters = v
- return s
- }
- // Represents a cross-account destination that receives subscription log events.
- type Destination struct {
- _ struct{} `type:"structure"`
- // An IAM policy document that governs which AWS accounts can create subscription
- // filters against this destination.
- AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"`
- // The ARN of this destination.
- Arn *string `locationName:"arn" type:"string"`
- // The creation time of the destination, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC.
- CreationTime *int64 `locationName:"creationTime" type:"long"`
- // The name of the destination.
- DestinationName *string `locationName:"destinationName" min:"1" type:"string"`
- // A role for impersonation, used when delivering log events to the target.
- RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
- // The Amazon Resource Name (ARN) of the physical target to where the log events
- // are delivered (for example, a Kinesis stream).
- TargetArn *string `locationName:"targetArn" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s Destination) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Destination) GoString() string {
- return s.String()
- }
- // SetAccessPolicy sets the AccessPolicy field's value.
- func (s *Destination) SetAccessPolicy(v string) *Destination {
- s.AccessPolicy = &v
- return s
- }
- // SetArn sets the Arn field's value.
- func (s *Destination) SetArn(v string) *Destination {
- s.Arn = &v
- return s
- }
- // SetCreationTime sets the CreationTime field's value.
- func (s *Destination) SetCreationTime(v int64) *Destination {
- s.CreationTime = &v
- return s
- }
- // SetDestinationName sets the DestinationName field's value.
- func (s *Destination) SetDestinationName(v string) *Destination {
- s.DestinationName = &v
- return s
- }
- // SetRoleArn sets the RoleArn field's value.
- func (s *Destination) SetRoleArn(v string) *Destination {
- s.RoleArn = &v
- return s
- }
- // SetTargetArn sets the TargetArn field's value.
- func (s *Destination) SetTargetArn(v string) *Destination {
- s.TargetArn = &v
- return s
- }
- type DisassociateKmsKeyInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DisassociateKmsKeyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DisassociateKmsKeyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DisassociateKmsKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput {
- s.LogGroupName = &v
- return s
- }
- type DisassociateKmsKeyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DisassociateKmsKeyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DisassociateKmsKeyOutput) GoString() string {
- return s.String()
- }
- // Represents an export task.
- type ExportTask struct {
- _ struct{} `type:"structure"`
- // The name of Amazon S3 bucket to which the log data was exported.
- Destination *string `locationName:"destination" min:"1" type:"string"`
- // The prefix that was used as the start of Amazon S3 key for every object exported.
- DestinationPrefix *string `locationName:"destinationPrefix" type:"string"`
- // Execution info about the export task.
- ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"`
- // The start time, expressed as the number of milliseconds after Jan 1, 1970
- // 00:00:00 UTC. Events with a timestamp before this time are not exported.
- From *int64 `locationName:"from" type:"long"`
- // The name of the log group from which logs data was exported.
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
- // The status of the export task.
- Status *ExportTaskStatus `locationName:"status" type:"structure"`
- // The ID of the export task.
- TaskId *string `locationName:"taskId" min:"1" type:"string"`
- // The name of the export task.
- TaskName *string `locationName:"taskName" min:"1" type:"string"`
- // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00
- // UTC. Events with a timestamp later than this time are not exported.
- To *int64 `locationName:"to" type:"long"`
- }
- // String returns the string representation
- func (s ExportTask) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ExportTask) GoString() string {
- return s.String()
- }
- // SetDestination sets the Destination field's value.
- func (s *ExportTask) SetDestination(v string) *ExportTask {
- s.Destination = &v
- return s
- }
- // SetDestinationPrefix sets the DestinationPrefix field's value.
- func (s *ExportTask) SetDestinationPrefix(v string) *ExportTask {
- s.DestinationPrefix = &v
- return s
- }
- // SetExecutionInfo sets the ExecutionInfo field's value.
- func (s *ExportTask) SetExecutionInfo(v *ExportTaskExecutionInfo) *ExportTask {
- s.ExecutionInfo = v
- return s
- }
- // SetFrom sets the From field's value.
- func (s *ExportTask) SetFrom(v int64) *ExportTask {
- s.From = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *ExportTask) SetLogGroupName(v string) *ExportTask {
- s.LogGroupName = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *ExportTask) SetStatus(v *ExportTaskStatus) *ExportTask {
- s.Status = v
- return s
- }
- // SetTaskId sets the TaskId field's value.
- func (s *ExportTask) SetTaskId(v string) *ExportTask {
- s.TaskId = &v
- return s
- }
- // SetTaskName sets the TaskName field's value.
- func (s *ExportTask) SetTaskName(v string) *ExportTask {
- s.TaskName = &v
- return s
- }
- // SetTo sets the To field's value.
- func (s *ExportTask) SetTo(v int64) *ExportTask {
- s.To = &v
- return s
- }
- // Represents the status of an export task.
- type ExportTaskExecutionInfo struct {
- _ struct{} `type:"structure"`
- // The completion time of the export task, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC.
- CompletionTime *int64 `locationName:"completionTime" type:"long"`
- // The creation time of the export task, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC.
- CreationTime *int64 `locationName:"creationTime" type:"long"`
- }
- // String returns the string representation
- func (s ExportTaskExecutionInfo) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ExportTaskExecutionInfo) GoString() string {
- return s.String()
- }
- // SetCompletionTime sets the CompletionTime field's value.
- func (s *ExportTaskExecutionInfo) SetCompletionTime(v int64) *ExportTaskExecutionInfo {
- s.CompletionTime = &v
- return s
- }
- // SetCreationTime sets the CreationTime field's value.
- func (s *ExportTaskExecutionInfo) SetCreationTime(v int64) *ExportTaskExecutionInfo {
- s.CreationTime = &v
- return s
- }
- // Represents the status of an export task.
- type ExportTaskStatus struct {
- _ struct{} `type:"structure"`
- // The status code of the export task.
- Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"`
- // The status message related to the status code.
- Message *string `locationName:"message" type:"string"`
- }
- // String returns the string representation
- func (s ExportTaskStatus) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ExportTaskStatus) GoString() string {
- return s.String()
- }
- // SetCode sets the Code field's value.
- func (s *ExportTaskStatus) SetCode(v string) *ExportTaskStatus {
- s.Code = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus {
- s.Message = &v
- return s
- }
- type FilterLogEventsInput struct {
- _ struct{} `type:"structure"`
- // The end of the time range, expressed as the number of milliseconds after
- // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are
- // not returned.
- EndTime *int64 `locationName:"endTime" type:"long"`
- // The filter pattern to use. For more information, see Filter and Pattern Syntax
- // (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html).
- //
- // If not provided, all the events are matched.
- FilterPattern *string `locationName:"filterPattern" type:"string"`
- // If the value is true, the operation makes a best effort to provide responses
- // that contain events from multiple log streams within the log group, interleaved
- // in a single response. If the value is false, all the matched log events in
- // the first log stream are searched first, then those in the next log stream,
- // and so on. The default is false.
- Interleaved *bool `locationName:"interleaved" type:"boolean"`
- // The maximum number of events to return. The default is 10,000 events.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The name of the log group to search.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // Filters the results to include only events from log streams that have names
- // starting with this prefix.
- //
- // If you specify a value for both logStreamNamePrefix and logStreamNames, but
- // the value for logStreamNamePrefix does not match any log stream names specified
- // in logStreamNames, the action returns an InvalidParameterException error.
- LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"`
- // Filters the results to only logs from the log streams in this list.
- //
- // If you specify a value for both logStreamNamePrefix and logStreamNames, the
- // action returns an InvalidParameterException error.
- LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"`
- // The token for the next set of events to return. (You received this token
- // from a previous call.)
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // The start of the time range, expressed as the number of milliseconds after
- // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not
- // returned.
- StartTime *int64 `locationName:"startTime" type:"long"`
- }
- // String returns the string representation
- func (s FilterLogEventsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s FilterLogEventsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *FilterLogEventsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"}
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1))
- }
- if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetEndTime sets the EndTime field's value.
- func (s *FilterLogEventsInput) SetEndTime(v int64) *FilterLogEventsInput {
- s.EndTime = &v
- return s
- }
- // SetFilterPattern sets the FilterPattern field's value.
- func (s *FilterLogEventsInput) SetFilterPattern(v string) *FilterLogEventsInput {
- s.FilterPattern = &v
- return s
- }
- // SetInterleaved sets the Interleaved field's value.
- func (s *FilterLogEventsInput) SetInterleaved(v bool) *FilterLogEventsInput {
- s.Interleaved = &v
- return s
- }
- // SetLimit sets the Limit field's value.
- func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput {
- s.Limit = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput {
- s.LogGroupName = &v
- return s
- }
- // SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value.
- func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput {
- s.LogStreamNamePrefix = &v
- return s
- }
- // SetLogStreamNames sets the LogStreamNames field's value.
- func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput {
- s.LogStreamNames = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *FilterLogEventsInput) SetNextToken(v string) *FilterLogEventsInput {
- s.NextToken = &v
- return s
- }
- // SetStartTime sets the StartTime field's value.
- func (s *FilterLogEventsInput) SetStartTime(v int64) *FilterLogEventsInput {
- s.StartTime = &v
- return s
- }
- type FilterLogEventsOutput struct {
- _ struct{} `type:"structure"`
- // The matched events.
- Events []*FilteredLogEvent `locationName:"events" type:"list"`
- // The token to use when requesting the next set of items. The token expires
- // after 24 hours.
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // Indicates which log streams have been searched and whether each has been
- // searched completely.
- SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"`
- }
- // String returns the string representation
- func (s FilterLogEventsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s FilterLogEventsOutput) GoString() string {
- return s.String()
- }
- // SetEvents sets the Events field's value.
- func (s *FilterLogEventsOutput) SetEvents(v []*FilteredLogEvent) *FilterLogEventsOutput {
- s.Events = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *FilterLogEventsOutput) SetNextToken(v string) *FilterLogEventsOutput {
- s.NextToken = &v
- return s
- }
- // SetSearchedLogStreams sets the SearchedLogStreams field's value.
- func (s *FilterLogEventsOutput) SetSearchedLogStreams(v []*SearchedLogStream) *FilterLogEventsOutput {
- s.SearchedLogStreams = v
- return s
- }
- // Represents a matched event.
- type FilteredLogEvent struct {
- _ struct{} `type:"structure"`
- // The ID of the event.
- EventId *string `locationName:"eventId" type:"string"`
- // The time the event was ingested, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC.
- IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
- // The name of the log stream to which this event belongs.
- LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
- // The data contained in the log event.
- Message *string `locationName:"message" min:"1" type:"string"`
- // The time the event occurred, expressed as the number of milliseconds after
- // Jan 1, 1970 00:00:00 UTC.
- Timestamp *int64 `locationName:"timestamp" type:"long"`
- }
- // String returns the string representation
- func (s FilteredLogEvent) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s FilteredLogEvent) GoString() string {
- return s.String()
- }
- // SetEventId sets the EventId field's value.
- func (s *FilteredLogEvent) SetEventId(v string) *FilteredLogEvent {
- s.EventId = &v
- return s
- }
- // SetIngestionTime sets the IngestionTime field's value.
- func (s *FilteredLogEvent) SetIngestionTime(v int64) *FilteredLogEvent {
- s.IngestionTime = &v
- return s
- }
- // SetLogStreamName sets the LogStreamName field's value.
- func (s *FilteredLogEvent) SetLogStreamName(v string) *FilteredLogEvent {
- s.LogStreamName = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *FilteredLogEvent) SetMessage(v string) *FilteredLogEvent {
- s.Message = &v
- return s
- }
- // SetTimestamp sets the Timestamp field's value.
- func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent {
- s.Timestamp = &v
- return s
- }
- type GetLogEventsInput struct {
- _ struct{} `type:"structure"`
- // The end of the time range, expressed as the number of milliseconds after
- // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later than
- // this time are not included.
- EndTime *int64 `locationName:"endTime" type:"long"`
- // The maximum number of log events returned. If you don't specify a value,
- // the maximum is as many log events as can fit in a response size of 1 MB,
- // up to 10,000 log events.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The name of the log stream.
- //
- // LogStreamName is a required field
- LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
- // The token for the next set of items to return. (You received this token from
- // a previous call.)
- NextToken *string `locationName:"nextToken" min:"1" type:"string"`
- // If the value is true, the earliest log events are returned first. If the
- // value is false, the latest log events are returned first. The default value
- // is false.
- StartFromHead *bool `locationName:"startFromHead" type:"boolean"`
- // The start of the time range, expressed as the number of milliseconds after
- // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this time or later
- // than this time are included. Events with a timestamp earlier than this time
- // are not included.
- StartTime *int64 `locationName:"startTime" type:"long"`
- }
- // String returns the string representation
- func (s GetLogEventsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLogEventsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetLogEventsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetLogEventsInput"}
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.LogStreamName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
- }
- if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetEndTime sets the EndTime field's value.
- func (s *GetLogEventsInput) SetEndTime(v int64) *GetLogEventsInput {
- s.EndTime = &v
- return s
- }
- // SetLimit sets the Limit field's value.
- func (s *GetLogEventsInput) SetLimit(v int64) *GetLogEventsInput {
- s.Limit = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *GetLogEventsInput) SetLogGroupName(v string) *GetLogEventsInput {
- s.LogGroupName = &v
- return s
- }
- // SetLogStreamName sets the LogStreamName field's value.
- func (s *GetLogEventsInput) SetLogStreamName(v string) *GetLogEventsInput {
- s.LogStreamName = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *GetLogEventsInput) SetNextToken(v string) *GetLogEventsInput {
- s.NextToken = &v
- return s
- }
- // SetStartFromHead sets the StartFromHead field's value.
- func (s *GetLogEventsInput) SetStartFromHead(v bool) *GetLogEventsInput {
- s.StartFromHead = &v
- return s
- }
- // SetStartTime sets the StartTime field's value.
- func (s *GetLogEventsInput) SetStartTime(v int64) *GetLogEventsInput {
- s.StartTime = &v
- return s
- }
- type GetLogEventsOutput struct {
- _ struct{} `type:"structure"`
- // The events.
- Events []*OutputLogEvent `locationName:"events" type:"list"`
- // The token for the next set of items in the backward direction. The token
- // expires after 24 hours. This token will never be null. If you have reached
- // the end of the stream, it will return the same token you passed in.
- NextBackwardToken *string `locationName:"nextBackwardToken" min:"1" type:"string"`
- // The token for the next set of items in the forward direction. The token expires
- // after 24 hours. If you have reached the end of the stream, it will return
- // the same token you passed in.
- NextForwardToken *string `locationName:"nextForwardToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetLogEventsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLogEventsOutput) GoString() string {
- return s.String()
- }
- // SetEvents sets the Events field's value.
- func (s *GetLogEventsOutput) SetEvents(v []*OutputLogEvent) *GetLogEventsOutput {
- s.Events = v
- return s
- }
- // SetNextBackwardToken sets the NextBackwardToken field's value.
- func (s *GetLogEventsOutput) SetNextBackwardToken(v string) *GetLogEventsOutput {
- s.NextBackwardToken = &v
- return s
- }
- // SetNextForwardToken sets the NextForwardToken field's value.
- func (s *GetLogEventsOutput) SetNextForwardToken(v string) *GetLogEventsOutput {
- s.NextForwardToken = &v
- return s
- }
- type GetLogGroupFieldsInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group to search.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The time to set as the center of the query. If you specify time, the 8 minutes
- // before and 8 minutes after this time are searched. If you omit time, the
- // past 15 minutes are queried.
- //
- // The time value is specified as epoch time, the number of seconds since January
- // 1, 1970, 00:00:00 UTC.
- Time *int64 `locationName:"time" type:"long"`
- }
- // String returns the string representation
- func (s GetLogGroupFieldsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLogGroupFieldsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetLogGroupFieldsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetLogGroupFieldsInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *GetLogGroupFieldsInput) SetLogGroupName(v string) *GetLogGroupFieldsInput {
- s.LogGroupName = &v
- return s
- }
- // SetTime sets the Time field's value.
- func (s *GetLogGroupFieldsInput) SetTime(v int64) *GetLogGroupFieldsInput {
- s.Time = &v
- return s
- }
- type GetLogGroupFieldsOutput struct {
- _ struct{} `type:"structure"`
- // The array of fields found in the query. Each object in the array contains
- // the name of the field, along with the percentage of time it appeared in the
- // log events that were queried.
- LogGroupFields []*LogGroupField `locationName:"logGroupFields" type:"list"`
- }
- // String returns the string representation
- func (s GetLogGroupFieldsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLogGroupFieldsOutput) GoString() string {
- return s.String()
- }
- // SetLogGroupFields sets the LogGroupFields field's value.
- func (s *GetLogGroupFieldsOutput) SetLogGroupFields(v []*LogGroupField) *GetLogGroupFieldsOutput {
- s.LogGroupFields = v
- return s
- }
- type GetLogRecordInput struct {
- _ struct{} `type:"structure"`
- // The pointer corresponding to the log event record you want to retrieve. You
- // get this from the response of a GetQueryResults operation. In that response,
- // the value of the @ptr field for a log event is the value to use as logRecordPointer
- // to retrieve that complete log event record.
- //
- // LogRecordPointer is a required field
- LogRecordPointer *string `locationName:"logRecordPointer" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetLogRecordInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLogRecordInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetLogRecordInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetLogRecordInput"}
- if s.LogRecordPointer == nil {
- invalidParams.Add(request.NewErrParamRequired("LogRecordPointer"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogRecordPointer sets the LogRecordPointer field's value.
- func (s *GetLogRecordInput) SetLogRecordPointer(v string) *GetLogRecordInput {
- s.LogRecordPointer = &v
- return s
- }
- type GetLogRecordOutput struct {
- _ struct{} `type:"structure"`
- // The requested log event, as a JSON string.
- LogRecord map[string]*string `locationName:"logRecord" type:"map"`
- }
- // String returns the string representation
- func (s GetLogRecordOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLogRecordOutput) GoString() string {
- return s.String()
- }
- // SetLogRecord sets the LogRecord field's value.
- func (s *GetLogRecordOutput) SetLogRecord(v map[string]*string) *GetLogRecordOutput {
- s.LogRecord = v
- return s
- }
- type GetQueryResultsInput struct {
- _ struct{} `type:"structure"`
- // The ID number of the query.
- //
- // QueryId is a required field
- QueryId *string `locationName:"queryId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetQueryResultsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetQueryResultsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetQueryResultsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"}
- if s.QueryId == nil {
- invalidParams.Add(request.NewErrParamRequired("QueryId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetQueryId sets the QueryId field's value.
- func (s *GetQueryResultsInput) SetQueryId(v string) *GetQueryResultsInput {
- s.QueryId = &v
- return s
- }
- type GetQueryResultsOutput struct {
- _ struct{} `type:"structure"`
- // The log events that matched the query criteria during the most recent time
- // it ran.
- //
- // The results value is an array of arrays. Each log event is one object in
- // the top-level array. Each of these log event objects is an array of field/value
- // pairs.
- Results [][]*ResultField `locationName:"results" type:"list"`
- // Includes the number of log events scanned by the query, the number of log
- // events that matched the query criteria, and the total number of bytes in
- // the log events that were scanned.
- Statistics *QueryStatistics `locationName:"statistics" type:"structure"`
- // The status of the most recent running of the query. Possible values are Cancelled,
- // Complete, Failed, Running, Scheduled, and Unknown.
- Status *string `locationName:"status" type:"string" enum:"QueryStatus"`
- }
- // String returns the string representation
- func (s GetQueryResultsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetQueryResultsOutput) GoString() string {
- return s.String()
- }
- // SetResults sets the Results field's value.
- func (s *GetQueryResultsOutput) SetResults(v [][]*ResultField) *GetQueryResultsOutput {
- s.Results = v
- return s
- }
- // SetStatistics sets the Statistics field's value.
- func (s *GetQueryResultsOutput) SetStatistics(v *QueryStatistics) *GetQueryResultsOutput {
- s.Statistics = v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *GetQueryResultsOutput) SetStatus(v string) *GetQueryResultsOutput {
- s.Status = &v
- return s
- }
- // Represents a log event, which is a record of activity that was recorded by
- // the application or resource being monitored.
- type InputLogEvent struct {
- _ struct{} `type:"structure"`
- // The raw event message.
- //
- // Message is a required field
- Message *string `locationName:"message" min:"1" type:"string" required:"true"`
- // The time the event occurred, expressed as the number of milliseconds after
- // Jan 1, 1970 00:00:00 UTC.
- //
- // Timestamp is a required field
- Timestamp *int64 `locationName:"timestamp" type:"long" required:"true"`
- }
- // String returns the string representation
- func (s InputLogEvent) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s InputLogEvent) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *InputLogEvent) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InputLogEvent"}
- if s.Message == nil {
- invalidParams.Add(request.NewErrParamRequired("Message"))
- }
- if s.Message != nil && len(*s.Message) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Message", 1))
- }
- if s.Timestamp == nil {
- invalidParams.Add(request.NewErrParamRequired("Timestamp"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetMessage sets the Message field's value.
- func (s *InputLogEvent) SetMessage(v string) *InputLogEvent {
- s.Message = &v
- return s
- }
- // SetTimestamp sets the Timestamp field's value.
- func (s *InputLogEvent) SetTimestamp(v int64) *InputLogEvent {
- s.Timestamp = &v
- return s
- }
- type ListTagsLogGroupInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s ListTagsLogGroupInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListTagsLogGroupInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListTagsLogGroupInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListTagsLogGroupInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *ListTagsLogGroupInput) SetLogGroupName(v string) *ListTagsLogGroupInput {
- s.LogGroupName = &v
- return s
- }
- type ListTagsLogGroupOutput struct {
- _ struct{} `type:"structure"`
- // The tags for the log group.
- Tags map[string]*string `locationName:"tags" min:"1" type:"map"`
- }
- // String returns the string representation
- func (s ListTagsLogGroupOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListTagsLogGroupOutput) GoString() string {
- return s.String()
- }
- // SetTags sets the Tags field's value.
- func (s *ListTagsLogGroupOutput) SetTags(v map[string]*string) *ListTagsLogGroupOutput {
- s.Tags = v
- return s
- }
- // Represents a log group.
- type LogGroup struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the log group.
- Arn *string `locationName:"arn" type:"string"`
- // The creation time of the log group, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC.
- CreationTime *int64 `locationName:"creationTime" type:"long"`
- // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
- KmsKeyId *string `locationName:"kmsKeyId" type:"string"`
- // The name of the log group.
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
- // The number of metric filters.
- MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"`
- // The number of days to retain the log events in the specified log group. Possible
- // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731,
- // 1827, and 3653.
- RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"`
- // The number of bytes stored.
- StoredBytes *int64 `locationName:"storedBytes" type:"long"`
- }
- // String returns the string representation
- func (s LogGroup) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LogGroup) GoString() string {
- return s.String()
- }
- // SetArn sets the Arn field's value.
- func (s *LogGroup) SetArn(v string) *LogGroup {
- s.Arn = &v
- return s
- }
- // SetCreationTime sets the CreationTime field's value.
- func (s *LogGroup) SetCreationTime(v int64) *LogGroup {
- s.CreationTime = &v
- return s
- }
- // SetKmsKeyId sets the KmsKeyId field's value.
- func (s *LogGroup) SetKmsKeyId(v string) *LogGroup {
- s.KmsKeyId = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *LogGroup) SetLogGroupName(v string) *LogGroup {
- s.LogGroupName = &v
- return s
- }
- // SetMetricFilterCount sets the MetricFilterCount field's value.
- func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup {
- s.MetricFilterCount = &v
- return s
- }
- // SetRetentionInDays sets the RetentionInDays field's value.
- func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup {
- s.RetentionInDays = &v
- return s
- }
- // SetStoredBytes sets the StoredBytes field's value.
- func (s *LogGroup) SetStoredBytes(v int64) *LogGroup {
- s.StoredBytes = &v
- return s
- }
- // The fields contained in log events found by a GetLogGroupFields operation,
- // along with the percentage of queried log events in which each field appears.
- type LogGroupField struct {
- _ struct{} `type:"structure"`
- // The name of a log field.
- Name *string `locationName:"name" type:"string"`
- // The percentage of log events queried that contained the field.
- Percent *int64 `locationName:"percent" type:"integer"`
- }
- // String returns the string representation
- func (s LogGroupField) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LogGroupField) GoString() string {
- return s.String()
- }
- // SetName sets the Name field's value.
- func (s *LogGroupField) SetName(v string) *LogGroupField {
- s.Name = &v
- return s
- }
- // SetPercent sets the Percent field's value.
- func (s *LogGroupField) SetPercent(v int64) *LogGroupField {
- s.Percent = &v
- return s
- }
- // Represents a log stream, which is a sequence of log events from a single
- // emitter of logs.
- type LogStream struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the log stream.
- Arn *string `locationName:"arn" type:"string"`
- // The creation time of the stream, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC.
- CreationTime *int64 `locationName:"creationTime" type:"long"`
- // The time of the first event, expressed as the number of milliseconds after
- // Jan 1, 1970 00:00:00 UTC.
- FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"`
- // The time of the most recent log event in the log stream in CloudWatch Logs.
- // This number is expressed as the number of milliseconds after Jan 1, 1970
- // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency
- // basis. It typically updates in less than an hour from ingestion, but may
- // take longer in some rare situations.
- LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"`
- // The ingestion time, expressed as the number of milliseconds after Jan 1,
- // 1970 00:00:00 UTC.
- LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"`
- // The name of the log stream.
- LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
- // The number of bytes stored.
- StoredBytes *int64 `locationName:"storedBytes" type:"long"`
- // The sequence token.
- UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s LogStream) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LogStream) GoString() string {
- return s.String()
- }
- // SetArn sets the Arn field's value.
- func (s *LogStream) SetArn(v string) *LogStream {
- s.Arn = &v
- return s
- }
- // SetCreationTime sets the CreationTime field's value.
- func (s *LogStream) SetCreationTime(v int64) *LogStream {
- s.CreationTime = &v
- return s
- }
- // SetFirstEventTimestamp sets the FirstEventTimestamp field's value.
- func (s *LogStream) SetFirstEventTimestamp(v int64) *LogStream {
- s.FirstEventTimestamp = &v
- return s
- }
- // SetLastEventTimestamp sets the LastEventTimestamp field's value.
- func (s *LogStream) SetLastEventTimestamp(v int64) *LogStream {
- s.LastEventTimestamp = &v
- return s
- }
- // SetLastIngestionTime sets the LastIngestionTime field's value.
- func (s *LogStream) SetLastIngestionTime(v int64) *LogStream {
- s.LastIngestionTime = &v
- return s
- }
- // SetLogStreamName sets the LogStreamName field's value.
- func (s *LogStream) SetLogStreamName(v string) *LogStream {
- s.LogStreamName = &v
- return s
- }
- // SetStoredBytes sets the StoredBytes field's value.
- func (s *LogStream) SetStoredBytes(v int64) *LogStream {
- s.StoredBytes = &v
- return s
- }
- // SetUploadSequenceToken sets the UploadSequenceToken field's value.
- func (s *LogStream) SetUploadSequenceToken(v string) *LogStream {
- s.UploadSequenceToken = &v
- return s
- }
- // Metric filters express how CloudWatch Logs would extract metric observations
- // from ingested log events and transform them into metric data in a CloudWatch
- // metric.
- type MetricFilter struct {
- _ struct{} `type:"structure"`
- // The creation time of the metric filter, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC.
- CreationTime *int64 `locationName:"creationTime" type:"long"`
- // The name of the metric filter.
- FilterName *string `locationName:"filterName" min:"1" type:"string"`
- // A symbolic description of how CloudWatch Logs should interpret the data in
- // each log event. For example, a log event may contain timestamps, IP addresses,
- // strings, and so on. You use the filter pattern to specify what to look for
- // in the log event message.
- FilterPattern *string `locationName:"filterPattern" type:"string"`
- // The name of the log group.
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
- // The metric transformations.
- MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"`
- }
- // String returns the string representation
- func (s MetricFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s MetricFilter) GoString() string {
- return s.String()
- }
- // SetCreationTime sets the CreationTime field's value.
- func (s *MetricFilter) SetCreationTime(v int64) *MetricFilter {
- s.CreationTime = &v
- return s
- }
- // SetFilterName sets the FilterName field's value.
- func (s *MetricFilter) SetFilterName(v string) *MetricFilter {
- s.FilterName = &v
- return s
- }
- // SetFilterPattern sets the FilterPattern field's value.
- func (s *MetricFilter) SetFilterPattern(v string) *MetricFilter {
- s.FilterPattern = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *MetricFilter) SetLogGroupName(v string) *MetricFilter {
- s.LogGroupName = &v
- return s
- }
- // SetMetricTransformations sets the MetricTransformations field's value.
- func (s *MetricFilter) SetMetricTransformations(v []*MetricTransformation) *MetricFilter {
- s.MetricTransformations = v
- return s
- }
- // Represents a matched event.
- type MetricFilterMatchRecord struct {
- _ struct{} `type:"structure"`
- // The raw event data.
- EventMessage *string `locationName:"eventMessage" min:"1" type:"string"`
- // The event number.
- EventNumber *int64 `locationName:"eventNumber" type:"long"`
- // The values extracted from the event data by the filter.
- ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"`
- }
- // String returns the string representation
- func (s MetricFilterMatchRecord) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s MetricFilterMatchRecord) GoString() string {
- return s.String()
- }
- // SetEventMessage sets the EventMessage field's value.
- func (s *MetricFilterMatchRecord) SetEventMessage(v string) *MetricFilterMatchRecord {
- s.EventMessage = &v
- return s
- }
- // SetEventNumber sets the EventNumber field's value.
- func (s *MetricFilterMatchRecord) SetEventNumber(v int64) *MetricFilterMatchRecord {
- s.EventNumber = &v
- return s
- }
- // SetExtractedValues sets the ExtractedValues field's value.
- func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *MetricFilterMatchRecord {
- s.ExtractedValues = v
- return s
- }
- // Indicates how to transform ingested log eventsto metric data in a CloudWatch
- // metric.
- type MetricTransformation struct {
- _ struct{} `type:"structure"`
- // (Optional) The value to emit when a filter pattern does not match a log event.
- // This value can be null.
- DefaultValue *float64 `locationName:"defaultValue" type:"double"`
- // The name of the CloudWatch metric.
- //
- // MetricName is a required field
- MetricName *string `locationName:"metricName" type:"string" required:"true"`
- // The namespace of the CloudWatch metric.
- //
- // MetricNamespace is a required field
- MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"`
- // The value to publish to the CloudWatch metric when a filter pattern matches
- // a log event.
- //
- // MetricValue is a required field
- MetricValue *string `locationName:"metricValue" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s MetricTransformation) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s MetricTransformation) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *MetricTransformation) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"}
- if s.MetricName == nil {
- invalidParams.Add(request.NewErrParamRequired("MetricName"))
- }
- if s.MetricNamespace == nil {
- invalidParams.Add(request.NewErrParamRequired("MetricNamespace"))
- }
- if s.MetricValue == nil {
- invalidParams.Add(request.NewErrParamRequired("MetricValue"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDefaultValue sets the DefaultValue field's value.
- func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation {
- s.DefaultValue = &v
- return s
- }
- // SetMetricName sets the MetricName field's value.
- func (s *MetricTransformation) SetMetricName(v string) *MetricTransformation {
- s.MetricName = &v
- return s
- }
- // SetMetricNamespace sets the MetricNamespace field's value.
- func (s *MetricTransformation) SetMetricNamespace(v string) *MetricTransformation {
- s.MetricNamespace = &v
- return s
- }
- // SetMetricValue sets the MetricValue field's value.
- func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation {
- s.MetricValue = &v
- return s
- }
- // Represents a log event.
- type OutputLogEvent struct {
- _ struct{} `type:"structure"`
- // The time the event was ingested, expressed as the number of milliseconds
- // after Jan 1, 1970 00:00:00 UTC.
- IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
- // The data contained in the log event.
- Message *string `locationName:"message" min:"1" type:"string"`
- // The time the event occurred, expressed as the number of milliseconds after
- // Jan 1, 1970 00:00:00 UTC.
- Timestamp *int64 `locationName:"timestamp" type:"long"`
- }
- // String returns the string representation
- func (s OutputLogEvent) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s OutputLogEvent) GoString() string {
- return s.String()
- }
- // SetIngestionTime sets the IngestionTime field's value.
- func (s *OutputLogEvent) SetIngestionTime(v int64) *OutputLogEvent {
- s.IngestionTime = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *OutputLogEvent) SetMessage(v string) *OutputLogEvent {
- s.Message = &v
- return s
- }
- // SetTimestamp sets the Timestamp field's value.
- func (s *OutputLogEvent) SetTimestamp(v int64) *OutputLogEvent {
- s.Timestamp = &v
- return s
- }
- type PutDestinationInput struct {
- _ struct{} `type:"structure"`
- // A name for the destination.
- //
- // DestinationName is a required field
- DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
- // The ARN of an IAM role that grants CloudWatch Logs permissions to call the
- // Amazon Kinesis PutRecord operation on the destination stream.
- //
- // RoleArn is a required field
- RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"`
- // The ARN of an Amazon Kinesis stream to which to deliver matching log events.
- //
- // TargetArn is a required field
- TargetArn *string `locationName:"targetArn" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s PutDestinationInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutDestinationInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutDestinationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutDestinationInput"}
- if s.DestinationName == nil {
- invalidParams.Add(request.NewErrParamRequired("DestinationName"))
- }
- if s.DestinationName != nil && len(*s.DestinationName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
- }
- if s.RoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleArn"))
- }
- if s.RoleArn != nil && len(*s.RoleArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
- }
- if s.TargetArn == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetArn"))
- }
- if s.TargetArn != nil && len(*s.TargetArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDestinationName sets the DestinationName field's value.
- func (s *PutDestinationInput) SetDestinationName(v string) *PutDestinationInput {
- s.DestinationName = &v
- return s
- }
- // SetRoleArn sets the RoleArn field's value.
- func (s *PutDestinationInput) SetRoleArn(v string) *PutDestinationInput {
- s.RoleArn = &v
- return s
- }
- // SetTargetArn sets the TargetArn field's value.
- func (s *PutDestinationInput) SetTargetArn(v string) *PutDestinationInput {
- s.TargetArn = &v
- return s
- }
- type PutDestinationOutput struct {
- _ struct{} `type:"structure"`
- // The destination.
- Destination *Destination `locationName:"destination" type:"structure"`
- }
- // String returns the string representation
- func (s PutDestinationOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutDestinationOutput) GoString() string {
- return s.String()
- }
- // SetDestination sets the Destination field's value.
- func (s *PutDestinationOutput) SetDestination(v *Destination) *PutDestinationOutput {
- s.Destination = v
- return s
- }
- type PutDestinationPolicyInput struct {
- _ struct{} `type:"structure"`
- // An IAM policy document that authorizes cross-account users to deliver their
- // log events to the associated destination.
- //
- // AccessPolicy is a required field
- AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string" required:"true"`
- // A name for an existing destination.
- //
- // DestinationName is a required field
- DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s PutDestinationPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutDestinationPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutDestinationPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutDestinationPolicyInput"}
- if s.AccessPolicy == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessPolicy"))
- }
- if s.AccessPolicy != nil && len(*s.AccessPolicy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AccessPolicy", 1))
- }
- if s.DestinationName == nil {
- invalidParams.Add(request.NewErrParamRequired("DestinationName"))
- }
- if s.DestinationName != nil && len(*s.DestinationName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetAccessPolicy sets the AccessPolicy field's value.
- func (s *PutDestinationPolicyInput) SetAccessPolicy(v string) *PutDestinationPolicyInput {
- s.AccessPolicy = &v
- return s
- }
- // SetDestinationName sets the DestinationName field's value.
- func (s *PutDestinationPolicyInput) SetDestinationName(v string) *PutDestinationPolicyInput {
- s.DestinationName = &v
- return s
- }
- type PutDestinationPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutDestinationPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutDestinationPolicyOutput) GoString() string {
- return s.String()
- }
- type PutLogEventsInput struct {
- _ struct{} `type:"structure"`
- // The log events.
- //
- // LogEvents is a required field
- LogEvents []*InputLogEvent `locationName:"logEvents" min:"1" type:"list" required:"true"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The name of the log stream.
- //
- // LogStreamName is a required field
- LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
- // The sequence token obtained from the response of the previous PutLogEvents
- // call. An upload in a newly created log stream does not require a sequence
- // token. You can also get the sequence token using DescribeLogStreams. If you
- // call PutLogEvents twice within a narrow time period using the same value
- // for sequenceToken, both calls may be successful, or one may be rejected.
- SequenceToken *string `locationName:"sequenceToken" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s PutLogEventsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutLogEventsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutLogEventsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutLogEventsInput"}
- if s.LogEvents == nil {
- invalidParams.Add(request.NewErrParamRequired("LogEvents"))
- }
- if s.LogEvents != nil && len(s.LogEvents) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogEvents", 1))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.LogStreamName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
- }
- if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
- }
- if s.SequenceToken != nil && len(*s.SequenceToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SequenceToken", 1))
- }
- if s.LogEvents != nil {
- for i, v := range s.LogEvents {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LogEvents", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogEvents sets the LogEvents field's value.
- func (s *PutLogEventsInput) SetLogEvents(v []*InputLogEvent) *PutLogEventsInput {
- s.LogEvents = v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *PutLogEventsInput) SetLogGroupName(v string) *PutLogEventsInput {
- s.LogGroupName = &v
- return s
- }
- // SetLogStreamName sets the LogStreamName field's value.
- func (s *PutLogEventsInput) SetLogStreamName(v string) *PutLogEventsInput {
- s.LogStreamName = &v
- return s
- }
- // SetSequenceToken sets the SequenceToken field's value.
- func (s *PutLogEventsInput) SetSequenceToken(v string) *PutLogEventsInput {
- s.SequenceToken = &v
- return s
- }
- type PutLogEventsOutput struct {
- _ struct{} `type:"structure"`
- // The next sequence token.
- NextSequenceToken *string `locationName:"nextSequenceToken" min:"1" type:"string"`
- // The rejected events.
- RejectedLogEventsInfo *RejectedLogEventsInfo `locationName:"rejectedLogEventsInfo" type:"structure"`
- }
- // String returns the string representation
- func (s PutLogEventsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutLogEventsOutput) GoString() string {
- return s.String()
- }
- // SetNextSequenceToken sets the NextSequenceToken field's value.
- func (s *PutLogEventsOutput) SetNextSequenceToken(v string) *PutLogEventsOutput {
- s.NextSequenceToken = &v
- return s
- }
- // SetRejectedLogEventsInfo sets the RejectedLogEventsInfo field's value.
- func (s *PutLogEventsOutput) SetRejectedLogEventsInfo(v *RejectedLogEventsInfo) *PutLogEventsOutput {
- s.RejectedLogEventsInfo = v
- return s
- }
- type PutMetricFilterInput struct {
- _ struct{} `type:"structure"`
- // A name for the metric filter.
- //
- // FilterName is a required field
- FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
- // A filter pattern for extracting metric data out of ingested log events.
- //
- // FilterPattern is a required field
- FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // A collection of information that defines how metric data gets emitted.
- //
- // MetricTransformations is a required field
- MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list" required:"true"`
- }
- // String returns the string representation
- func (s PutMetricFilterInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutMetricFilterInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutMetricFilterInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutMetricFilterInput"}
- if s.FilterName == nil {
- invalidParams.Add(request.NewErrParamRequired("FilterName"))
- }
- if s.FilterName != nil && len(*s.FilterName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
- }
- if s.FilterPattern == nil {
- invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.MetricTransformations == nil {
- invalidParams.Add(request.NewErrParamRequired("MetricTransformations"))
- }
- if s.MetricTransformations != nil && len(s.MetricTransformations) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("MetricTransformations", 1))
- }
- if s.MetricTransformations != nil {
- for i, v := range s.MetricTransformations {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricTransformations", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilterName sets the FilterName field's value.
- func (s *PutMetricFilterInput) SetFilterName(v string) *PutMetricFilterInput {
- s.FilterName = &v
- return s
- }
- // SetFilterPattern sets the FilterPattern field's value.
- func (s *PutMetricFilterInput) SetFilterPattern(v string) *PutMetricFilterInput {
- s.FilterPattern = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *PutMetricFilterInput) SetLogGroupName(v string) *PutMetricFilterInput {
- s.LogGroupName = &v
- return s
- }
- // SetMetricTransformations sets the MetricTransformations field's value.
- func (s *PutMetricFilterInput) SetMetricTransformations(v []*MetricTransformation) *PutMetricFilterInput {
- s.MetricTransformations = v
- return s
- }
- type PutMetricFilterOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutMetricFilterOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutMetricFilterOutput) GoString() string {
- return s.String()
- }
- type PutResourcePolicyInput struct {
- _ struct{} `type:"structure"`
- // Details of the new policy, including the identity of the principal that is
- // enabled to put logs to this account. This is formatted as a JSON string.
- //
- // The following example creates a resource policy enabling the Route 53 service
- // to put DNS query logs in to the specified log group. Replace "logArn" with
- // the ARN of your CloudWatch Logs resource, such as a log group or log stream.
- //
- // { "Version": "2012-10-17", "Statement": [ { "Sid": "Route53LogsToCloudWatchLogs",
- // "Effect": "Allow", "Principal": { "Service": [ "route53.amazonaws.com" ]
- // }, "Action":"logs:PutLogEvents", "Resource": "logArn" } ] }
- PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"`
- // Name of the new policy. This parameter is required.
- PolicyName *string `locationName:"policyName" type:"string"`
- }
- // String returns the string representation
- func (s PutResourcePolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutResourcePolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutResourcePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"}
- if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetPolicyDocument sets the PolicyDocument field's value.
- func (s *PutResourcePolicyInput) SetPolicyDocument(v string) *PutResourcePolicyInput {
- s.PolicyDocument = &v
- return s
- }
- // SetPolicyName sets the PolicyName field's value.
- func (s *PutResourcePolicyInput) SetPolicyName(v string) *PutResourcePolicyInput {
- s.PolicyName = &v
- return s
- }
- type PutResourcePolicyOutput struct {
- _ struct{} `type:"structure"`
- // The new policy.
- ResourcePolicy *ResourcePolicy `locationName:"resourcePolicy" type:"structure"`
- }
- // String returns the string representation
- func (s PutResourcePolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutResourcePolicyOutput) GoString() string {
- return s.String()
- }
- // SetResourcePolicy sets the ResourcePolicy field's value.
- func (s *PutResourcePolicyOutput) SetResourcePolicy(v *ResourcePolicy) *PutResourcePolicyOutput {
- s.ResourcePolicy = v
- return s
- }
- type PutRetentionPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The number of days to retain the log events in the specified log group. Possible
- // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731,
- // 1827, and 3653.
- //
- // RetentionInDays is a required field
- RetentionInDays *int64 `locationName:"retentionInDays" type:"integer" required:"true"`
- }
- // String returns the string representation
- func (s PutRetentionPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutRetentionPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutRetentionPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutRetentionPolicyInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.RetentionInDays == nil {
- invalidParams.Add(request.NewErrParamRequired("RetentionInDays"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *PutRetentionPolicyInput) SetLogGroupName(v string) *PutRetentionPolicyInput {
- s.LogGroupName = &v
- return s
- }
- // SetRetentionInDays sets the RetentionInDays field's value.
- func (s *PutRetentionPolicyInput) SetRetentionInDays(v int64) *PutRetentionPolicyInput {
- s.RetentionInDays = &v
- return s
- }
- type PutRetentionPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutRetentionPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutRetentionPolicyOutput) GoString() string {
- return s.String()
- }
- type PutSubscriptionFilterInput struct {
- _ struct{} `type:"structure"`
- // The ARN of the destination to deliver matching log events to. Currently,
- // the supported destinations are:
- //
- // * An Amazon Kinesis stream belonging to the same account as the subscription
- // filter, for same-account delivery.
- //
- // * A logical destination (specified using an ARN) belonging to a different
- // account, for cross-account delivery.
- //
- // * An Amazon Kinesis Firehose delivery stream belonging to the same account
- // as the subscription filter, for same-account delivery.
- //
- // * An AWS Lambda function belonging to the same account as the subscription
- // filter, for same-account delivery.
- //
- // DestinationArn is a required field
- DestinationArn *string `locationName:"destinationArn" min:"1" type:"string" required:"true"`
- // The method used to distribute log data to the destination. By default log
- // data is grouped by log stream, but the grouping can be set to random for
- // a more even distribution. This property is only applicable when the destination
- // is an Amazon Kinesis stream.
- Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"`
- // A name for the subscription filter. If you are updating an existing filter,
- // you must specify the correct name in filterName. Otherwise, the call fails
- // because you cannot associate a second filter with a log group. To find the
- // name of the filter currently associated with a log group, use DescribeSubscriptionFilters.
- //
- // FilterName is a required field
- FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
- // A filter pattern for subscribing to a filtered stream of log events.
- //
- // FilterPattern is a required field
- FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The ARN of an IAM role that grants CloudWatch Logs permissions to deliver
- // ingested log events to the destination stream. You don't need to provide
- // the ARN when you are working with a logical destination for cross-account
- // delivery.
- RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s PutSubscriptionFilterInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutSubscriptionFilterInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutSubscriptionFilterInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutSubscriptionFilterInput"}
- if s.DestinationArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DestinationArn"))
- }
- if s.DestinationArn != nil && len(*s.DestinationArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DestinationArn", 1))
- }
- if s.FilterName == nil {
- invalidParams.Add(request.NewErrParamRequired("FilterName"))
- }
- if s.FilterName != nil && len(*s.FilterName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
- }
- if s.FilterPattern == nil {
- invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.RoleArn != nil && len(*s.RoleArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDestinationArn sets the DestinationArn field's value.
- func (s *PutSubscriptionFilterInput) SetDestinationArn(v string) *PutSubscriptionFilterInput {
- s.DestinationArn = &v
- return s
- }
- // SetDistribution sets the Distribution field's value.
- func (s *PutSubscriptionFilterInput) SetDistribution(v string) *PutSubscriptionFilterInput {
- s.Distribution = &v
- return s
- }
- // SetFilterName sets the FilterName field's value.
- func (s *PutSubscriptionFilterInput) SetFilterName(v string) *PutSubscriptionFilterInput {
- s.FilterName = &v
- return s
- }
- // SetFilterPattern sets the FilterPattern field's value.
- func (s *PutSubscriptionFilterInput) SetFilterPattern(v string) *PutSubscriptionFilterInput {
- s.FilterPattern = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *PutSubscriptionFilterInput) SetLogGroupName(v string) *PutSubscriptionFilterInput {
- s.LogGroupName = &v
- return s
- }
- // SetRoleArn sets the RoleArn field's value.
- func (s *PutSubscriptionFilterInput) SetRoleArn(v string) *PutSubscriptionFilterInput {
- s.RoleArn = &v
- return s
- }
- type PutSubscriptionFilterOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutSubscriptionFilterOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutSubscriptionFilterOutput) GoString() string {
- return s.String()
- }
- // Reserved.
- type QueryCompileError struct {
- _ struct{} `type:"structure"`
- // Reserved.
- Location *QueryCompileErrorLocation `locationName:"location" type:"structure"`
- // Reserved.
- Message *string `locationName:"message" type:"string"`
- }
- // String returns the string representation
- func (s QueryCompileError) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s QueryCompileError) GoString() string {
- return s.String()
- }
- // SetLocation sets the Location field's value.
- func (s *QueryCompileError) SetLocation(v *QueryCompileErrorLocation) *QueryCompileError {
- s.Location = v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *QueryCompileError) SetMessage(v string) *QueryCompileError {
- s.Message = &v
- return s
- }
- // Reserved.
- type QueryCompileErrorLocation struct {
- _ struct{} `type:"structure"`
- // Reserved.
- EndCharOffset *int64 `locationName:"endCharOffset" type:"integer"`
- // Reserved.
- StartCharOffset *int64 `locationName:"startCharOffset" type:"integer"`
- }
- // String returns the string representation
- func (s QueryCompileErrorLocation) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s QueryCompileErrorLocation) GoString() string {
- return s.String()
- }
- // SetEndCharOffset sets the EndCharOffset field's value.
- func (s *QueryCompileErrorLocation) SetEndCharOffset(v int64) *QueryCompileErrorLocation {
- s.EndCharOffset = &v
- return s
- }
- // SetStartCharOffset sets the StartCharOffset field's value.
- func (s *QueryCompileErrorLocation) SetStartCharOffset(v int64) *QueryCompileErrorLocation {
- s.StartCharOffset = &v
- return s
- }
- // Information about one CloudWatch Logs Insights query that matches the request
- // in a DescribeQueries operation.
- type QueryInfo struct {
- _ struct{} `type:"structure"`
- // The date and time that this query was created.
- CreateTime *int64 `locationName:"createTime" type:"long"`
- // The name of the log group scanned by this query.
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
- // The unique ID number of this query.
- QueryId *string `locationName:"queryId" type:"string"`
- // The query string used in this query.
- QueryString *string `locationName:"queryString" type:"string"`
- // The status of this query. Possible values are Cancelled, Complete, Failed,
- // Running, Scheduled, and Unknown.
- Status *string `locationName:"status" type:"string" enum:"QueryStatus"`
- }
- // String returns the string representation
- func (s QueryInfo) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s QueryInfo) GoString() string {
- return s.String()
- }
- // SetCreateTime sets the CreateTime field's value.
- func (s *QueryInfo) SetCreateTime(v int64) *QueryInfo {
- s.CreateTime = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *QueryInfo) SetLogGroupName(v string) *QueryInfo {
- s.LogGroupName = &v
- return s
- }
- // SetQueryId sets the QueryId field's value.
- func (s *QueryInfo) SetQueryId(v string) *QueryInfo {
- s.QueryId = &v
- return s
- }
- // SetQueryString sets the QueryString field's value.
- func (s *QueryInfo) SetQueryString(v string) *QueryInfo {
- s.QueryString = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *QueryInfo) SetStatus(v string) *QueryInfo {
- s.Status = &v
- return s
- }
- // Contains the number of log events scanned by the query, the number of log
- // events that matched the query criteria, and the total number of bytes in
- // the log events that were scanned.
- type QueryStatistics struct {
- _ struct{} `type:"structure"`
- // The total number of bytes in the log events scanned during the query.
- BytesScanned *float64 `locationName:"bytesScanned" type:"double"`
- // The number of log events that matched the query string.
- RecordsMatched *float64 `locationName:"recordsMatched" type:"double"`
- // The total number of log events scanned during the query.
- RecordsScanned *float64 `locationName:"recordsScanned" type:"double"`
- }
- // String returns the string representation
- func (s QueryStatistics) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s QueryStatistics) GoString() string {
- return s.String()
- }
- // SetBytesScanned sets the BytesScanned field's value.
- func (s *QueryStatistics) SetBytesScanned(v float64) *QueryStatistics {
- s.BytesScanned = &v
- return s
- }
- // SetRecordsMatched sets the RecordsMatched field's value.
- func (s *QueryStatistics) SetRecordsMatched(v float64) *QueryStatistics {
- s.RecordsMatched = &v
- return s
- }
- // SetRecordsScanned sets the RecordsScanned field's value.
- func (s *QueryStatistics) SetRecordsScanned(v float64) *QueryStatistics {
- s.RecordsScanned = &v
- return s
- }
- // Represents the rejected events.
- type RejectedLogEventsInfo struct {
- _ struct{} `type:"structure"`
- // The expired log events.
- ExpiredLogEventEndIndex *int64 `locationName:"expiredLogEventEndIndex" type:"integer"`
- // The log events that are too new.
- TooNewLogEventStartIndex *int64 `locationName:"tooNewLogEventStartIndex" type:"integer"`
- // The log events that are too old.
- TooOldLogEventEndIndex *int64 `locationName:"tooOldLogEventEndIndex" type:"integer"`
- }
- // String returns the string representation
- func (s RejectedLogEventsInfo) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RejectedLogEventsInfo) GoString() string {
- return s.String()
- }
- // SetExpiredLogEventEndIndex sets the ExpiredLogEventEndIndex field's value.
- func (s *RejectedLogEventsInfo) SetExpiredLogEventEndIndex(v int64) *RejectedLogEventsInfo {
- s.ExpiredLogEventEndIndex = &v
- return s
- }
- // SetTooNewLogEventStartIndex sets the TooNewLogEventStartIndex field's value.
- func (s *RejectedLogEventsInfo) SetTooNewLogEventStartIndex(v int64) *RejectedLogEventsInfo {
- s.TooNewLogEventStartIndex = &v
- return s
- }
- // SetTooOldLogEventEndIndex sets the TooOldLogEventEndIndex field's value.
- func (s *RejectedLogEventsInfo) SetTooOldLogEventEndIndex(v int64) *RejectedLogEventsInfo {
- s.TooOldLogEventEndIndex = &v
- return s
- }
- // A policy enabling one or more entities to put logs to a log group in this
- // account.
- type ResourcePolicy struct {
- _ struct{} `type:"structure"`
- // Timestamp showing when this policy was last updated, expressed as the number
- // of milliseconds after Jan 1, 1970 00:00:00 UTC.
- LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"`
- // The details of the policy.
- PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"`
- // The name of the resource policy.
- PolicyName *string `locationName:"policyName" type:"string"`
- }
- // String returns the string representation
- func (s ResourcePolicy) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ResourcePolicy) GoString() string {
- return s.String()
- }
- // SetLastUpdatedTime sets the LastUpdatedTime field's value.
- func (s *ResourcePolicy) SetLastUpdatedTime(v int64) *ResourcePolicy {
- s.LastUpdatedTime = &v
- return s
- }
- // SetPolicyDocument sets the PolicyDocument field's value.
- func (s *ResourcePolicy) SetPolicyDocument(v string) *ResourcePolicy {
- s.PolicyDocument = &v
- return s
- }
- // SetPolicyName sets the PolicyName field's value.
- func (s *ResourcePolicy) SetPolicyName(v string) *ResourcePolicy {
- s.PolicyName = &v
- return s
- }
- // Contains one field from one log event returned by a CloudWatch Logs Insights
- // query, along with the value of that field.
- type ResultField struct {
- _ struct{} `type:"structure"`
- // The log event field.
- Field *string `locationName:"field" type:"string"`
- // The value of this field.
- Value *string `locationName:"value" type:"string"`
- }
- // String returns the string representation
- func (s ResultField) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ResultField) GoString() string {
- return s.String()
- }
- // SetField sets the Field field's value.
- func (s *ResultField) SetField(v string) *ResultField {
- s.Field = &v
- return s
- }
- // SetValue sets the Value field's value.
- func (s *ResultField) SetValue(v string) *ResultField {
- s.Value = &v
- return s
- }
- // Represents the search status of a log stream.
- type SearchedLogStream struct {
- _ struct{} `type:"structure"`
- // The name of the log stream.
- LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
- // Indicates whether all the events in this log stream were searched.
- SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"`
- }
- // String returns the string representation
- func (s SearchedLogStream) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SearchedLogStream) GoString() string {
- return s.String()
- }
- // SetLogStreamName sets the LogStreamName field's value.
- func (s *SearchedLogStream) SetLogStreamName(v string) *SearchedLogStream {
- s.LogStreamName = &v
- return s
- }
- // SetSearchedCompletely sets the SearchedCompletely field's value.
- func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream {
- s.SearchedCompletely = &v
- return s
- }
- type StartQueryInput struct {
- _ struct{} `type:"structure"`
- // The time to end this query, if it is still running. Specified as epoch time,
- // the number of seconds since January 1, 1970, 00:00:00 UTC.
- //
- // EndTime is a required field
- EndTime *int64 `locationName:"endTime" type:"long" required:"true"`
- // The maximum number of log events to return in the query. If the query string
- // uses the fields command, only the specified fields and their values are returned.
- Limit *int64 `locationName:"limit" min:"1" type:"integer"`
- // The log group on which to perform the query.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The query string to use. For more information, see CloudWatch Logs Insights
- // Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
- //
- // QueryString is a required field
- QueryString *string `locationName:"queryString" type:"string" required:"true"`
- // The time to start the query. Specified as epoch time, the number of seconds
- // since January 1, 1970, 00:00:00 UTC.
- //
- // StartTime is a required field
- StartTime *int64 `locationName:"startTime" type:"long" required:"true"`
- }
- // String returns the string representation
- func (s StartQueryInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartQueryInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartQueryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartQueryInput"}
- if s.EndTime == nil {
- invalidParams.Add(request.NewErrParamRequired("EndTime"))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.QueryString == nil {
- invalidParams.Add(request.NewErrParamRequired("QueryString"))
- }
- if s.StartTime == nil {
- invalidParams.Add(request.NewErrParamRequired("StartTime"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetEndTime sets the EndTime field's value.
- func (s *StartQueryInput) SetEndTime(v int64) *StartQueryInput {
- s.EndTime = &v
- return s
- }
- // SetLimit sets the Limit field's value.
- func (s *StartQueryInput) SetLimit(v int64) *StartQueryInput {
- s.Limit = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *StartQueryInput) SetLogGroupName(v string) *StartQueryInput {
- s.LogGroupName = &v
- return s
- }
- // SetQueryString sets the QueryString field's value.
- func (s *StartQueryInput) SetQueryString(v string) *StartQueryInput {
- s.QueryString = &v
- return s
- }
- // SetStartTime sets the StartTime field's value.
- func (s *StartQueryInput) SetStartTime(v int64) *StartQueryInput {
- s.StartTime = &v
- return s
- }
- type StartQueryOutput struct {
- _ struct{} `type:"structure"`
- // The unique ID of the query.
- QueryId *string `locationName:"queryId" type:"string"`
- }
- // String returns the string representation
- func (s StartQueryOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartQueryOutput) GoString() string {
- return s.String()
- }
- // SetQueryId sets the QueryId field's value.
- func (s *StartQueryOutput) SetQueryId(v string) *StartQueryOutput {
- s.QueryId = &v
- return s
- }
- type StopQueryInput struct {
- _ struct{} `type:"structure"`
- // The ID number of the query to stop. If necessary, you can use DescribeQueries
- // to find this ID number.
- //
- // QueryId is a required field
- QueryId *string `locationName:"queryId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopQueryInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopQueryInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopQueryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopQueryInput"}
- if s.QueryId == nil {
- invalidParams.Add(request.NewErrParamRequired("QueryId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetQueryId sets the QueryId field's value.
- func (s *StopQueryInput) SetQueryId(v string) *StopQueryInput {
- s.QueryId = &v
- return s
- }
- type StopQueryOutput struct {
- _ struct{} `type:"structure"`
- // This is true if the query was stopped by the StopQuery operation.
- Success *bool `locationName:"success" type:"boolean"`
- }
- // String returns the string representation
- func (s StopQueryOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopQueryOutput) GoString() string {
- return s.String()
- }
- // SetSuccess sets the Success field's value.
- func (s *StopQueryOutput) SetSuccess(v bool) *StopQueryOutput {
- s.Success = &v
- return s
- }
- // Represents a subscription filter.
- type SubscriptionFilter struct {
- _ struct{} `type:"structure"`
- // The creation time of the subscription filter, expressed as the number of
- // milliseconds after Jan 1, 1970 00:00:00 UTC.
- CreationTime *int64 `locationName:"creationTime" type:"long"`
- // The Amazon Resource Name (ARN) of the destination.
- DestinationArn *string `locationName:"destinationArn" min:"1" type:"string"`
- // The method used to distribute log data to the destination, which can be either
- // random or grouped by log stream.
- Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"`
- // The name of the subscription filter.
- FilterName *string `locationName:"filterName" min:"1" type:"string"`
- // A symbolic description of how CloudWatch Logs should interpret the data in
- // each log event. For example, a log event may contain timestamps, IP addresses,
- // strings, and so on. You use the filter pattern to specify what to look for
- // in the log event message.
- FilterPattern *string `locationName:"filterPattern" type:"string"`
- // The name of the log group.
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
- RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s SubscriptionFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SubscriptionFilter) GoString() string {
- return s.String()
- }
- // SetCreationTime sets the CreationTime field's value.
- func (s *SubscriptionFilter) SetCreationTime(v int64) *SubscriptionFilter {
- s.CreationTime = &v
- return s
- }
- // SetDestinationArn sets the DestinationArn field's value.
- func (s *SubscriptionFilter) SetDestinationArn(v string) *SubscriptionFilter {
- s.DestinationArn = &v
- return s
- }
- // SetDistribution sets the Distribution field's value.
- func (s *SubscriptionFilter) SetDistribution(v string) *SubscriptionFilter {
- s.Distribution = &v
- return s
- }
- // SetFilterName sets the FilterName field's value.
- func (s *SubscriptionFilter) SetFilterName(v string) *SubscriptionFilter {
- s.FilterName = &v
- return s
- }
- // SetFilterPattern sets the FilterPattern field's value.
- func (s *SubscriptionFilter) SetFilterPattern(v string) *SubscriptionFilter {
- s.FilterPattern = &v
- return s
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *SubscriptionFilter) SetLogGroupName(v string) *SubscriptionFilter {
- s.LogGroupName = &v
- return s
- }
- // SetRoleArn sets the RoleArn field's value.
- func (s *SubscriptionFilter) SetRoleArn(v string) *SubscriptionFilter {
- s.RoleArn = &v
- return s
- }
- type TagLogGroupInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The key-value pairs to use for the tags.
- //
- // Tags is a required field
- Tags map[string]*string `locationName:"tags" min:"1" type:"map" required:"true"`
- }
- // String returns the string representation
- func (s TagLogGroupInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TagLogGroupInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *TagLogGroupInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TagLogGroupInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.Tags == nil {
- invalidParams.Add(request.NewErrParamRequired("Tags"))
- }
- if s.Tags != nil && len(s.Tags) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *TagLogGroupInput) SetLogGroupName(v string) *TagLogGroupInput {
- s.LogGroupName = &v
- return s
- }
- // SetTags sets the Tags field's value.
- func (s *TagLogGroupInput) SetTags(v map[string]*string) *TagLogGroupInput {
- s.Tags = v
- return s
- }
- type TagLogGroupOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s TagLogGroupOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TagLogGroupOutput) GoString() string {
- return s.String()
- }
- type TestMetricFilterInput struct {
- _ struct{} `type:"structure"`
- // A symbolic description of how CloudWatch Logs should interpret the data in
- // each log event. For example, a log event may contain timestamps, IP addresses,
- // strings, and so on. You use the filter pattern to specify what to look for
- // in the log event message.
- //
- // FilterPattern is a required field
- FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
- // The log event messages to test.
- //
- // LogEventMessages is a required field
- LogEventMessages []*string `locationName:"logEventMessages" min:"1" type:"list" required:"true"`
- }
- // String returns the string representation
- func (s TestMetricFilterInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TestMetricFilterInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *TestMetricFilterInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TestMetricFilterInput"}
- if s.FilterPattern == nil {
- invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
- }
- if s.LogEventMessages == nil {
- invalidParams.Add(request.NewErrParamRequired("LogEventMessages"))
- }
- if s.LogEventMessages != nil && len(s.LogEventMessages) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogEventMessages", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilterPattern sets the FilterPattern field's value.
- func (s *TestMetricFilterInput) SetFilterPattern(v string) *TestMetricFilterInput {
- s.FilterPattern = &v
- return s
- }
- // SetLogEventMessages sets the LogEventMessages field's value.
- func (s *TestMetricFilterInput) SetLogEventMessages(v []*string) *TestMetricFilterInput {
- s.LogEventMessages = v
- return s
- }
- type TestMetricFilterOutput struct {
- _ struct{} `type:"structure"`
- // The matched events.
- Matches []*MetricFilterMatchRecord `locationName:"matches" type:"list"`
- }
- // String returns the string representation
- func (s TestMetricFilterOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TestMetricFilterOutput) GoString() string {
- return s.String()
- }
- // SetMatches sets the Matches field's value.
- func (s *TestMetricFilterOutput) SetMatches(v []*MetricFilterMatchRecord) *TestMetricFilterOutput {
- s.Matches = v
- return s
- }
- type UntagLogGroupInput struct {
- _ struct{} `type:"structure"`
- // The name of the log group.
- //
- // LogGroupName is a required field
- LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
- // The tag keys. The corresponding tags are removed from the log group.
- //
- // Tags is a required field
- Tags []*string `locationName:"tags" min:"1" type:"list" required:"true"`
- }
- // String returns the string representation
- func (s UntagLogGroupInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UntagLogGroupInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UntagLogGroupInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UntagLogGroupInput"}
- if s.LogGroupName == nil {
- invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
- }
- if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
- }
- if s.Tags == nil {
- invalidParams.Add(request.NewErrParamRequired("Tags"))
- }
- if s.Tags != nil && len(s.Tags) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLogGroupName sets the LogGroupName field's value.
- func (s *UntagLogGroupInput) SetLogGroupName(v string) *UntagLogGroupInput {
- s.LogGroupName = &v
- return s
- }
- // SetTags sets the Tags field's value.
- func (s *UntagLogGroupInput) SetTags(v []*string) *UntagLogGroupInput {
- s.Tags = v
- return s
- }
- type UntagLogGroupOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UntagLogGroupOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UntagLogGroupOutput) GoString() string {
- return s.String()
- }
- // The method used to distribute log data to the destination, which can be either
- // random or grouped by log stream.
- const (
- // DistributionRandom is a Distribution enum value
- DistributionRandom = "Random"
- // DistributionByLogStream is a Distribution enum value
- DistributionByLogStream = "ByLogStream"
- )
- const (
- // ExportTaskStatusCodeCancelled is a ExportTaskStatusCode enum value
- ExportTaskStatusCodeCancelled = "CANCELLED"
- // ExportTaskStatusCodeCompleted is a ExportTaskStatusCode enum value
- ExportTaskStatusCodeCompleted = "COMPLETED"
- // ExportTaskStatusCodeFailed is a ExportTaskStatusCode enum value
- ExportTaskStatusCodeFailed = "FAILED"
- // ExportTaskStatusCodePending is a ExportTaskStatusCode enum value
- ExportTaskStatusCodePending = "PENDING"
- // ExportTaskStatusCodePendingCancel is a ExportTaskStatusCode enum value
- ExportTaskStatusCodePendingCancel = "PENDING_CANCEL"
- // ExportTaskStatusCodeRunning is a ExportTaskStatusCode enum value
- ExportTaskStatusCodeRunning = "RUNNING"
- )
- const (
- // OrderByLogStreamName is a OrderBy enum value
- OrderByLogStreamName = "LogStreamName"
- // OrderByLastEventTime is a OrderBy enum value
- OrderByLastEventTime = "LastEventTime"
- )
- const (
- // QueryStatusScheduled is a QueryStatus enum value
- QueryStatusScheduled = "Scheduled"
- // QueryStatusRunning is a QueryStatus enum value
- QueryStatusRunning = "Running"
- // QueryStatusComplete is a QueryStatus enum value
- QueryStatusComplete = "Complete"
- // QueryStatusFailed is a QueryStatus enum value
- QueryStatusFailed = "Failed"
- // QueryStatusCancelled is a QueryStatus enum value
- QueryStatusCancelled = "Cancelled"
- )
|