3 Star 1 Fork 0

Gitee 极速下载 / aws-sdk-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/aws/aws-sdk-go
克隆/下载
api.go 232.20 KB
一键复制 编辑 原始数据 按行查看 历史
awssdkgo 提交于 2017-05-17 22:36 . Release v1.8.25
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693
// 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 opCancelExportTask = "CancelExportTask"
// CancelExportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelExportTask operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CancelExportTask for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CancelExportTask method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CancelExportTaskRequest method.
// req, resp := client.CancelExportTaskRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateExportTask for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateExportTask method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateExportTaskRequest method.
// req, resp := client.CreateExportTaskRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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 that will 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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateLogGroup for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateLogGroup method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateLogGroupRequest method.
// req, resp := client.CreateLogGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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).
//
// 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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateLogStream for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateLogStream method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateLogStreamRequest method.
// req, resp := client.CreateLogStreamRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteDestination for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteDestination method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteDestinationRequest method.
// req, resp := client.DeleteDestinationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteLogGroup for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteLogGroup method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteLogGroupRequest method.
// req, resp := client.DeleteLogGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteLogStream for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteLogStream method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteLogStreamRequest method.
// req, resp := client.DeleteLogStreamRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteMetricFilter for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteMetricFilter method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteMetricFilterRequest method.
// req, resp := client.DeleteMetricFilterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 opDeleteRetentionPolicy = "DeleteRetentionPolicy"
// DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRetentionPolicy operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteRetentionPolicy for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteRetentionPolicy method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteRetentionPolicyRequest method.
// req, resp := client.DeleteRetentionPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteSubscriptionFilter for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteSubscriptionFilter method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteSubscriptionFilterRequest method.
// req, resp := client.DeleteSubscriptionFilterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DescribeDestinations for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeDestinations method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeDestinationsRequest method.
// req, resp := client.DescribeDestinationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.
//
// Please also see 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{
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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DescribeExportTasks for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeExportTasks method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeExportTasksRequest method.
// req, resp := client.DescribeExportTasksRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DescribeLogGroups for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeLogGroups method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeLogGroupsRequest method.
// req, resp := client.DescribeLogGroupsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.
//
// Please also see 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{
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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DescribeLogStreams for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeLogStreams method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeLogStreamsRequest method.
// req, resp := client.DescribeLogStreamsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.
//
// Please also see 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{
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 can be used to capture response data after the request's "Send" method
// is called.
//
// See DescribeMetricFilters for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeMetricFilters method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeMetricFiltersRequest method.
// req, resp := client.DescribeMetricFiltersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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, and 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.
//
// Please also see 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{
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 opDescribeSubscriptionFilters = "DescribeSubscriptionFilters"
// DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSubscriptionFilters operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DescribeSubscriptionFilters for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeSubscriptionFilters method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeSubscriptionFiltersRequest method.
// req, resp := client.DescribeSubscriptionFiltersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.
//
// Please also see 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{
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 opFilterLogEvents = "FilterLogEvents"
// FilterLogEventsRequest generates a "aws/request.Request" representing the
// client's request for the FilterLogEvents operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See FilterLogEvents for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the FilterLogEvents method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the FilterLogEventsRequest method.
// req, resp := client.FilterLogEventsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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 1MB (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.
//
// Please also see 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{
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 can be used to capture response data after the request's "Send" method
// is called.
//
// See GetLogEvents for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetLogEvents method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetLogEventsRequest method.
// req, resp := client.GetLogEventsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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). If the results include tokens, there
// are more log events available. 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.
//
// Please also see 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{
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 opListTagsLogGroup = "ListTagsLogGroup"
// ListTagsLogGroupRequest generates a "aws/request.Request" representing the
// client's request for the ListTagsLogGroup operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListTagsLogGroup for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListTagsLogGroup method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ListTagsLogGroupRequest method.
// req, resp := client.ListTagsLogGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.
//
// To add tags, use TagLogGroup. To remove 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 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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See PutDestination for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PutDestination method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PutDestinationRequest method.
// req, resp := client.PutDestinationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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 a Kinesis stream) and enables you to subscribe to a real-time stream
// of log events of a different account, ingested using PutLogEvents. Currently,
// the only supported physical resource is a Amazon Kinesis stream belonging
// to the same account as the destination.
//
// A destination controls what is written to its Amazon Kinesis stream through
// an access policy. 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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See PutDestinationPolicy for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PutDestinationPolicy method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PutDestinationPolicyRequest method.
// req, resp := client.PutDestinationPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See PutLogEvents for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PutLogEvents method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PutLogEventsRequest method.
// req, resp := client.PutLogEventsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.
//
// 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 time the event occurred, expressed as the number of milliseconds
// since Jan 1, 1970 00:00:00 UTC).
//
// * 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.
//
// 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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See PutMetricFilter for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PutMetricFilter method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PutMetricFilterRequest method.
// req, resp := client.PutMetricFilterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 opPutRetentionPolicy = "PutRetentionPolicy"
// PutRetentionPolicyRequest generates a "aws/request.Request" representing the
// client's request for the PutRetentionPolicy operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See PutRetentionPolicy for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PutRetentionPolicy method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PutRetentionPolicyRequest method.
// req, resp := client.PutRetentionPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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 you want 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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See PutSubscriptionFilter for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PutSubscriptionFilter method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PutSubscriptionFilterRequest method.
// req, resp := client.PutSubscriptionFilterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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 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 will fail 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.
//
// Please also see 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 opTagLogGroup = "TagLogGroup"
// TagLogGroupRequest generates a "aws/request.Request" representing the
// client's request for the TagLogGroup operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See TagLogGroup for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the TagLogGroup method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the TagLogGroupRequest method.
// req, resp := client.TagLogGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See TestMetricFilter for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the TestMetricFilter method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the TestMetricFilterRequest method.
// req, resp := client.TestMetricFilterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.
//
// Please also see 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 can be used to capture response data after the request's "Send" method
// is called.
//
// See UntagLogGroup for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the UntagLogGroup method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the UntagLogGroupRequest method.
// req, resp := client.UntagLogGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see 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.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(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.
//
// Please also see 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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTaskRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTaskOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTaskRequest
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
// since 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
// since 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTaskResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroupRequest
type CreateLogGroupInput 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 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
}
// 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroupOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStreamRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStreamOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestinationRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestinationOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroupRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroupOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStreamRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStreamOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilterRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilterOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicyRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicyOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilterRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilterOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinationsRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinationsResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasksRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasksResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroupsRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroupsResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreamsRequest
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.
//
// You cannot specify this parameter if orderBy is LastEventTime.
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 since 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreamsResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFiltersRequest
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"`
// The name of the CloudWatch metric.
MetricName *string `locationName:"metricName" type:"string"`
// The namespace of the CloudWatch metric.
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFiltersResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFiltersRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFiltersResponse
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.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/Destination
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
// since 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 where the log events
// will be 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
}
// Represents an export task.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ExportTask
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 since Jan 1, 1970
// 00:00:00 UTC. Events with a timestamp prior to 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 since 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.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ExportTaskExecutionInfo
type ExportTaskExecutionInfo struct {
_ struct{} `type:"structure"`
// The completion time of the export task, expressed as the number of milliseconds
// since 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
// since 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.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ExportTaskStatus
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEventsRequest
type FilterLogEventsInput struct {
_ struct{} `type:"structure"`
// The end of the time range, expressed as the number of milliseconds since
// 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. 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.
//
// LogGroupName is a required field
LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
// Optional list of log stream names.
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 since
// Jan 1, 1970 00:00:00 UTC. Events with a timestamp prior to 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.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
}
// 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEventsResponse
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.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilteredLogEvent
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
// since Jan 1, 1970 00:00:00 UTC.
IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
// The name of the log stream this event belongs to.
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 since
// 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEventsRequest
type GetLogEventsInput struct {
_ struct{} `type:"structure"`
// The end of the time range, expressed as the number of milliseconds since
// Jan 1, 1970 00:00:00 UTC. Events with a timestamp 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 1MB, 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 since
// Jan 1, 1970 00:00:00 UTC. 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEventsResponse
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.
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.
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
}
// Represents a log event, which is a record of activity that was recorded by
// the application or resource being monitored.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/InputLogEvent
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 since
// 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroupRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroupResponse
type ListTagsLogGroupOutput struct {
_ struct{} `type:"structure"`
// The tags.
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.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/LogGroup
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
// since Jan 1, 1970 00:00:00 UTC.
CreationTime *int64 `locationName:"creationTime" type:"long"`
// 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
}
// 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
}
// Represents a log stream, which is a sequence of log events from a single
// emitter of logs.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/LogStream
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
// since 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 since
// 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 since Jan 1, 1970
// 00:00:00 UTC. lastEventTime 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 since 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.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/MetricFilter
type MetricFilter struct {
_ struct{} `type:"structure"`
// The creation time of the metric filter, expressed as the number of milliseconds
// since 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.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/MetricFilterMatchRecord
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 events into metric data in a CloudWatch
// metric.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/MetricTransformation
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.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/OutputLogEvent
type OutputLogEvent struct {
_ struct{} `type:"structure"`
// The time the event was ingested, expressed as the number of milliseconds
// since 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 since
// 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationRequest
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 Amazon
// Kinesis PutRecord 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 deliver matching log events to.
//
// 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicyRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicyOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEventsRequest
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.
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEventsResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilterRequest
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 needed to define 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilterOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicyRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicyOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilterRequest
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 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, when the destination
// is an Amazon Kinesis stream. By default, log data is grouped by log stream.
// For a more even distribution, you can group log data randomly.
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 will
// fail 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilterOutput
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()
}
// Represents the rejected events.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/RejectedLogEventsInfo
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
}
// Represents the search status of a log stream.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/SearchedLogStream
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
}
// Represents a subscription filter.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/SubscriptionFilter
type SubscriptionFilter struct {
_ struct{} `type:"structure"`
// The creation time of the subscription filter, expressed as the number of
// milliseconds since 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, when the destination
// is an Amazon Kinesis 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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroupRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroupOutput
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()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilterRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilterResponse
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroupRequest
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
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroupOutput
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()
}
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"
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/aws-sdk-go.git
git@gitee.com:mirrors/aws-sdk-go.git
mirrors
aws-sdk-go
aws-sdk-go
v1.8.43

搜索帮助