api.go 131 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package cloudwatchlogs provides a client for Amazon CloudWatch Logs.
  3. package cloudwatchlogs
  4. import (
  5. "fmt"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. const opCancelExportTask = "CancelExportTask"
  12. // CancelExportTaskRequest generates a "aws/request.Request" representing the
  13. // client's request for the CancelExportTask operation. The "output" return
  14. // value can be used to capture response data after the request's "Send" method
  15. // is called.
  16. //
  17. // Creating a request object using this method should be used when you want to inject
  18. // custom logic into the request's lifecycle using a custom handler, or if you want to
  19. // access properties on the request object before or after sending the request. If
  20. // you just want the service response, call the CancelExportTask method directly
  21. // instead.
  22. //
  23. // Note: You must call the "Send" method on the returned request object in order
  24. // to execute the request.
  25. //
  26. // // Example sending a request using the CancelExportTaskRequest method.
  27. // req, resp := client.CancelExportTaskRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. //
  34. func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) {
  35. op := &request.Operation{
  36. Name: opCancelExportTask,
  37. HTTPMethod: "POST",
  38. HTTPPath: "/",
  39. }
  40. if input == nil {
  41. input = &CancelExportTaskInput{}
  42. }
  43. req = c.newRequest(op, input, output)
  44. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  45. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  46. output = &CancelExportTaskOutput{}
  47. req.Data = output
  48. return
  49. }
  50. // Cancels an export task if it is in PENDING or RUNNING state.
  51. func (c *CloudWatchLogs) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) {
  52. req, out := c.CancelExportTaskRequest(input)
  53. err := req.Send()
  54. return out, err
  55. }
  56. const opCreateExportTask = "CreateExportTask"
  57. // CreateExportTaskRequest generates a "aws/request.Request" representing the
  58. // client's request for the CreateExportTask operation. The "output" return
  59. // value can be used to capture response data after the request's "Send" method
  60. // is called.
  61. //
  62. // Creating a request object using this method should be used when you want to inject
  63. // custom logic into the request's lifecycle using a custom handler, or if you want to
  64. // access properties on the request object before or after sending the request. If
  65. // you just want the service response, call the CreateExportTask method directly
  66. // instead.
  67. //
  68. // Note: You must call the "Send" method on the returned request object in order
  69. // to execute the request.
  70. //
  71. // // Example sending a request using the CreateExportTaskRequest method.
  72. // req, resp := client.CreateExportTaskRequest(params)
  73. //
  74. // err := req.Send()
  75. // if err == nil { // resp is now filled
  76. // fmt.Println(resp)
  77. // }
  78. //
  79. func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) (req *request.Request, output *CreateExportTaskOutput) {
  80. op := &request.Operation{
  81. Name: opCreateExportTask,
  82. HTTPMethod: "POST",
  83. HTTPPath: "/",
  84. }
  85. if input == nil {
  86. input = &CreateExportTaskInput{}
  87. }
  88. req = c.newRequest(op, input, output)
  89. output = &CreateExportTaskOutput{}
  90. req.Data = output
  91. return
  92. }
  93. // Creates an ExportTask which allows you to efficiently export data from a
  94. // Log Group to your Amazon S3 bucket.
  95. //
  96. // This is an asynchronous call. If all the required information is provided,
  97. // this API will initiate an export task and respond with the task Id. Once
  98. // started, DescribeExportTasks can be used to get the status of an export task.
  99. // You can only have one active (RUNNING or PENDING) export task at a time,
  100. // per account.
  101. //
  102. // You can export logs from multiple log groups or multiple time ranges to
  103. // the same Amazon S3 bucket. To separate out log data for each export task,
  104. // you can specify a prefix that will be used as the Amazon S3 key prefix for
  105. // all exported objects.
  106. func (c *CloudWatchLogs) CreateExportTask(input *CreateExportTaskInput) (*CreateExportTaskOutput, error) {
  107. req, out := c.CreateExportTaskRequest(input)
  108. err := req.Send()
  109. return out, err
  110. }
  111. const opCreateLogGroup = "CreateLogGroup"
  112. // CreateLogGroupRequest generates a "aws/request.Request" representing the
  113. // client's request for the CreateLogGroup operation. The "output" return
  114. // value can be used to capture response data after the request's "Send" method
  115. // is called.
  116. //
  117. // Creating a request object using this method should be used when you want to inject
  118. // custom logic into the request's lifecycle using a custom handler, or if you want to
  119. // access properties on the request object before or after sending the request. If
  120. // you just want the service response, call the CreateLogGroup method directly
  121. // instead.
  122. //
  123. // Note: You must call the "Send" method on the returned request object in order
  124. // to execute the request.
  125. //
  126. // // Example sending a request using the CreateLogGroupRequest method.
  127. // req, resp := client.CreateLogGroupRequest(params)
  128. //
  129. // err := req.Send()
  130. // if err == nil { // resp is now filled
  131. // fmt.Println(resp)
  132. // }
  133. //
  134. func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput) {
  135. op := &request.Operation{
  136. Name: opCreateLogGroup,
  137. HTTPMethod: "POST",
  138. HTTPPath: "/",
  139. }
  140. if input == nil {
  141. input = &CreateLogGroupInput{}
  142. }
  143. req = c.newRequest(op, input, output)
  144. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  145. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  146. output = &CreateLogGroupOutput{}
  147. req.Data = output
  148. return
  149. }
  150. // Creates a new log group with the specified name. The name of the log group
  151. // must be unique within a region for an AWS account. You can create up to 500
  152. // log groups per account.
  153. //
  154. // You must use the following guidelines when naming a log group:
  155. //
  156. // Log group names can be between 1 and 512 characters long.
  157. //
  158. // Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen),
  159. // '/' (forward slash), and '.' (period).
  160. func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error) {
  161. req, out := c.CreateLogGroupRequest(input)
  162. err := req.Send()
  163. return out, err
  164. }
  165. const opCreateLogStream = "CreateLogStream"
  166. // CreateLogStreamRequest generates a "aws/request.Request" representing the
  167. // client's request for the CreateLogStream operation. The "output" return
  168. // value can be used to capture response data after the request's "Send" method
  169. // is called.
  170. //
  171. // Creating a request object using this method should be used when you want to inject
  172. // custom logic into the request's lifecycle using a custom handler, or if you want to
  173. // access properties on the request object before or after sending the request. If
  174. // you just want the service response, call the CreateLogStream method directly
  175. // instead.
  176. //
  177. // Note: You must call the "Send" method on the returned request object in order
  178. // to execute the request.
  179. //
  180. // // Example sending a request using the CreateLogStreamRequest method.
  181. // req, resp := client.CreateLogStreamRequest(params)
  182. //
  183. // err := req.Send()
  184. // if err == nil { // resp is now filled
  185. // fmt.Println(resp)
  186. // }
  187. //
  188. func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput) {
  189. op := &request.Operation{
  190. Name: opCreateLogStream,
  191. HTTPMethod: "POST",
  192. HTTPPath: "/",
  193. }
  194. if input == nil {
  195. input = &CreateLogStreamInput{}
  196. }
  197. req = c.newRequest(op, input, output)
  198. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  199. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  200. output = &CreateLogStreamOutput{}
  201. req.Data = output
  202. return
  203. }
  204. // Creates a new log stream in the specified log group. The name of the log
  205. // stream must be unique within the log group. There is no limit on the number
  206. // of log streams that can exist in a log group.
  207. //
  208. // You must use the following guidelines when naming a log stream:
  209. //
  210. // Log stream names can be between 1 and 512 characters long.
  211. //
  212. // The ':' colon character is not allowed.
  213. func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error) {
  214. req, out := c.CreateLogStreamRequest(input)
  215. err := req.Send()
  216. return out, err
  217. }
  218. const opDeleteDestination = "DeleteDestination"
  219. // DeleteDestinationRequest generates a "aws/request.Request" representing the
  220. // client's request for the DeleteDestination operation. The "output" return
  221. // value can be used to capture response data after the request's "Send" method
  222. // is called.
  223. //
  224. // Creating a request object using this method should be used when you want to inject
  225. // custom logic into the request's lifecycle using a custom handler, or if you want to
  226. // access properties on the request object before or after sending the request. If
  227. // you just want the service response, call the DeleteDestination method directly
  228. // instead.
  229. //
  230. // Note: You must call the "Send" method on the returned request object in order
  231. // to execute the request.
  232. //
  233. // // Example sending a request using the DeleteDestinationRequest method.
  234. // req, resp := client.DeleteDestinationRequest(params)
  235. //
  236. // err := req.Send()
  237. // if err == nil { // resp is now filled
  238. // fmt.Println(resp)
  239. // }
  240. //
  241. func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) {
  242. op := &request.Operation{
  243. Name: opDeleteDestination,
  244. HTTPMethod: "POST",
  245. HTTPPath: "/",
  246. }
  247. if input == nil {
  248. input = &DeleteDestinationInput{}
  249. }
  250. req = c.newRequest(op, input, output)
  251. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  252. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  253. output = &DeleteDestinationOutput{}
  254. req.Data = output
  255. return
  256. }
  257. // Deletes the destination with the specified name and eventually disables all
  258. // the subscription filters that publish to it. This will not delete the physical
  259. // resource encapsulated by the destination.
  260. func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) {
  261. req, out := c.DeleteDestinationRequest(input)
  262. err := req.Send()
  263. return out, err
  264. }
  265. const opDeleteLogGroup = "DeleteLogGroup"
  266. // DeleteLogGroupRequest generates a "aws/request.Request" representing the
  267. // client's request for the DeleteLogGroup operation. The "output" return
  268. // value can be used to capture response data after the request's "Send" method
  269. // is called.
  270. //
  271. // Creating a request object using this method should be used when you want to inject
  272. // custom logic into the request's lifecycle using a custom handler, or if you want to
  273. // access properties on the request object before or after sending the request. If
  274. // you just want the service response, call the DeleteLogGroup method directly
  275. // instead.
  276. //
  277. // Note: You must call the "Send" method on the returned request object in order
  278. // to execute the request.
  279. //
  280. // // Example sending a request using the DeleteLogGroupRequest method.
  281. // req, resp := client.DeleteLogGroupRequest(params)
  282. //
  283. // err := req.Send()
  284. // if err == nil { // resp is now filled
  285. // fmt.Println(resp)
  286. // }
  287. //
  288. func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) {
  289. op := &request.Operation{
  290. Name: opDeleteLogGroup,
  291. HTTPMethod: "POST",
  292. HTTPPath: "/",
  293. }
  294. if input == nil {
  295. input = &DeleteLogGroupInput{}
  296. }
  297. req = c.newRequest(op, input, output)
  298. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  299. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  300. output = &DeleteLogGroupOutput{}
  301. req.Data = output
  302. return
  303. }
  304. // Deletes the log group with the specified name and permanently deletes all
  305. // the archived log events associated with it.
  306. func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) {
  307. req, out := c.DeleteLogGroupRequest(input)
  308. err := req.Send()
  309. return out, err
  310. }
  311. const opDeleteLogStream = "DeleteLogStream"
  312. // DeleteLogStreamRequest generates a "aws/request.Request" representing the
  313. // client's request for the DeleteLogStream operation. The "output" return
  314. // value can be used to capture response data after the request's "Send" method
  315. // is called.
  316. //
  317. // Creating a request object using this method should be used when you want to inject
  318. // custom logic into the request's lifecycle using a custom handler, or if you want to
  319. // access properties on the request object before or after sending the request. If
  320. // you just want the service response, call the DeleteLogStream method directly
  321. // instead.
  322. //
  323. // Note: You must call the "Send" method on the returned request object in order
  324. // to execute the request.
  325. //
  326. // // Example sending a request using the DeleteLogStreamRequest method.
  327. // req, resp := client.DeleteLogStreamRequest(params)
  328. //
  329. // err := req.Send()
  330. // if err == nil { // resp is now filled
  331. // fmt.Println(resp)
  332. // }
  333. //
  334. func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) {
  335. op := &request.Operation{
  336. Name: opDeleteLogStream,
  337. HTTPMethod: "POST",
  338. HTTPPath: "/",
  339. }
  340. if input == nil {
  341. input = &DeleteLogStreamInput{}
  342. }
  343. req = c.newRequest(op, input, output)
  344. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  345. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  346. output = &DeleteLogStreamOutput{}
  347. req.Data = output
  348. return
  349. }
  350. // Deletes a log stream and permanently deletes all the archived log events
  351. // associated with it.
  352. func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) {
  353. req, out := c.DeleteLogStreamRequest(input)
  354. err := req.Send()
  355. return out, err
  356. }
  357. const opDeleteMetricFilter = "DeleteMetricFilter"
  358. // DeleteMetricFilterRequest generates a "aws/request.Request" representing the
  359. // client's request for the DeleteMetricFilter operation. The "output" return
  360. // value can be used to capture response data after the request's "Send" method
  361. // is called.
  362. //
  363. // Creating a request object using this method should be used when you want to inject
  364. // custom logic into the request's lifecycle using a custom handler, or if you want to
  365. // access properties on the request object before or after sending the request. If
  366. // you just want the service response, call the DeleteMetricFilter method directly
  367. // instead.
  368. //
  369. // Note: You must call the "Send" method on the returned request object in order
  370. // to execute the request.
  371. //
  372. // // Example sending a request using the DeleteMetricFilterRequest method.
  373. // req, resp := client.DeleteMetricFilterRequest(params)
  374. //
  375. // err := req.Send()
  376. // if err == nil { // resp is now filled
  377. // fmt.Println(resp)
  378. // }
  379. //
  380. func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) {
  381. op := &request.Operation{
  382. Name: opDeleteMetricFilter,
  383. HTTPMethod: "POST",
  384. HTTPPath: "/",
  385. }
  386. if input == nil {
  387. input = &DeleteMetricFilterInput{}
  388. }
  389. req = c.newRequest(op, input, output)
  390. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  391. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  392. output = &DeleteMetricFilterOutput{}
  393. req.Data = output
  394. return
  395. }
  396. // Deletes a metric filter associated with the specified log group.
  397. func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) {
  398. req, out := c.DeleteMetricFilterRequest(input)
  399. err := req.Send()
  400. return out, err
  401. }
  402. const opDeleteRetentionPolicy = "DeleteRetentionPolicy"
  403. // DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the
  404. // client's request for the DeleteRetentionPolicy operation. The "output" return
  405. // value can be used to capture response data after the request's "Send" method
  406. // is called.
  407. //
  408. // Creating a request object using this method should be used when you want to inject
  409. // custom logic into the request's lifecycle using a custom handler, or if you want to
  410. // access properties on the request object before or after sending the request. If
  411. // you just want the service response, call the DeleteRetentionPolicy method directly
  412. // instead.
  413. //
  414. // Note: You must call the "Send" method on the returned request object in order
  415. // to execute the request.
  416. //
  417. // // Example sending a request using the DeleteRetentionPolicyRequest method.
  418. // req, resp := client.DeleteRetentionPolicyRequest(params)
  419. //
  420. // err := req.Send()
  421. // if err == nil { // resp is now filled
  422. // fmt.Println(resp)
  423. // }
  424. //
  425. func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) {
  426. op := &request.Operation{
  427. Name: opDeleteRetentionPolicy,
  428. HTTPMethod: "POST",
  429. HTTPPath: "/",
  430. }
  431. if input == nil {
  432. input = &DeleteRetentionPolicyInput{}
  433. }
  434. req = c.newRequest(op, input, output)
  435. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  436. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  437. output = &DeleteRetentionPolicyOutput{}
  438. req.Data = output
  439. return
  440. }
  441. // Deletes the retention policy of the specified log group. Log events would
  442. // not expire if they belong to log groups without a retention policy.
  443. func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) {
  444. req, out := c.DeleteRetentionPolicyRequest(input)
  445. err := req.Send()
  446. return out, err
  447. }
  448. const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter"
  449. // DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the
  450. // client's request for the DeleteSubscriptionFilter operation. The "output" return
  451. // value can be used to capture response data after the request's "Send" method
  452. // is called.
  453. //
  454. // Creating a request object using this method should be used when you want to inject
  455. // custom logic into the request's lifecycle using a custom handler, or if you want to
  456. // access properties on the request object before or after sending the request. If
  457. // you just want the service response, call the DeleteSubscriptionFilter method directly
  458. // instead.
  459. //
  460. // Note: You must call the "Send" method on the returned request object in order
  461. // to execute the request.
  462. //
  463. // // Example sending a request using the DeleteSubscriptionFilterRequest method.
  464. // req, resp := client.DeleteSubscriptionFilterRequest(params)
  465. //
  466. // err := req.Send()
  467. // if err == nil { // resp is now filled
  468. // fmt.Println(resp)
  469. // }
  470. //
  471. func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) {
  472. op := &request.Operation{
  473. Name: opDeleteSubscriptionFilter,
  474. HTTPMethod: "POST",
  475. HTTPPath: "/",
  476. }
  477. if input == nil {
  478. input = &DeleteSubscriptionFilterInput{}
  479. }
  480. req = c.newRequest(op, input, output)
  481. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  482. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  483. output = &DeleteSubscriptionFilterOutput{}
  484. req.Data = output
  485. return
  486. }
  487. // Deletes a subscription filter associated with the specified log group.
  488. func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) {
  489. req, out := c.DeleteSubscriptionFilterRequest(input)
  490. err := req.Send()
  491. return out, err
  492. }
  493. const opDescribeDestinations = "DescribeDestinations"
  494. // DescribeDestinationsRequest generates a "aws/request.Request" representing the
  495. // client's request for the DescribeDestinations operation. The "output" return
  496. // value can be used to capture response data after the request's "Send" method
  497. // is called.
  498. //
  499. // Creating a request object using this method should be used when you want to inject
  500. // custom logic into the request's lifecycle using a custom handler, or if you want to
  501. // access properties on the request object before or after sending the request. If
  502. // you just want the service response, call the DescribeDestinations method directly
  503. // instead.
  504. //
  505. // Note: You must call the "Send" method on the returned request object in order
  506. // to execute the request.
  507. //
  508. // // Example sending a request using the DescribeDestinationsRequest method.
  509. // req, resp := client.DescribeDestinationsRequest(params)
  510. //
  511. // err := req.Send()
  512. // if err == nil { // resp is now filled
  513. // fmt.Println(resp)
  514. // }
  515. //
  516. func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) {
  517. op := &request.Operation{
  518. Name: opDescribeDestinations,
  519. HTTPMethod: "POST",
  520. HTTPPath: "/",
  521. Paginator: &request.Paginator{
  522. InputTokens: []string{"nextToken"},
  523. OutputTokens: []string{"nextToken"},
  524. LimitToken: "limit",
  525. TruncationToken: "",
  526. },
  527. }
  528. if input == nil {
  529. input = &DescribeDestinationsInput{}
  530. }
  531. req = c.newRequest(op, input, output)
  532. output = &DescribeDestinationsOutput{}
  533. req.Data = output
  534. return
  535. }
  536. // Returns all the destinations that are associated with the AWS account making
  537. // the request. The list returned in the response is ASCII-sorted by destination
  538. // name.
  539. //
  540. // By default, this operation returns up to 50 destinations. If there are more
  541. // destinations to list, the response would contain a nextToken value in the
  542. // response body. You can also limit the number of destinations returned in
  543. // the response by specifying the limit parameter in the request.
  544. func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) {
  545. req, out := c.DescribeDestinationsRequest(input)
  546. err := req.Send()
  547. return out, err
  548. }
  549. // DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation,
  550. // calling the "fn" function with the response data for each page. To stop
  551. // iterating, return false from the fn function.
  552. //
  553. // See DescribeDestinations method for more information on how to use this operation.
  554. //
  555. // Note: This operation can generate multiple requests to a service.
  556. //
  557. // // Example iterating over at most 3 pages of a DescribeDestinations operation.
  558. // pageNum := 0
  559. // err := client.DescribeDestinationsPages(params,
  560. // func(page *DescribeDestinationsOutput, lastPage bool) bool {
  561. // pageNum++
  562. // fmt.Println(page)
  563. // return pageNum <= 3
  564. // })
  565. //
  566. func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(p *DescribeDestinationsOutput, lastPage bool) (shouldContinue bool)) error {
  567. page, _ := c.DescribeDestinationsRequest(input)
  568. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  569. return page.EachPage(func(p interface{}, lastPage bool) bool {
  570. return fn(p.(*DescribeDestinationsOutput), lastPage)
  571. })
  572. }
  573. const opDescribeExportTasks = "DescribeExportTasks"
  574. // DescribeExportTasksRequest generates a "aws/request.Request" representing the
  575. // client's request for the DescribeExportTasks operation. The "output" return
  576. // value can be used to capture response data after the request's "Send" method
  577. // is called.
  578. //
  579. // Creating a request object using this method should be used when you want to inject
  580. // custom logic into the request's lifecycle using a custom handler, or if you want to
  581. // access properties on the request object before or after sending the request. If
  582. // you just want the service response, call the DescribeExportTasks method directly
  583. // instead.
  584. //
  585. // Note: You must call the "Send" method on the returned request object in order
  586. // to execute the request.
  587. //
  588. // // Example sending a request using the DescribeExportTasksRequest method.
  589. // req, resp := client.DescribeExportTasksRequest(params)
  590. //
  591. // err := req.Send()
  592. // if err == nil { // resp is now filled
  593. // fmt.Println(resp)
  594. // }
  595. //
  596. func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) {
  597. op := &request.Operation{
  598. Name: opDescribeExportTasks,
  599. HTTPMethod: "POST",
  600. HTTPPath: "/",
  601. }
  602. if input == nil {
  603. input = &DescribeExportTasksInput{}
  604. }
  605. req = c.newRequest(op, input, output)
  606. output = &DescribeExportTasksOutput{}
  607. req.Data = output
  608. return
  609. }
  610. // Returns all the export tasks that are associated with the AWS account making
  611. // the request. The export tasks can be filtered based on TaskId or TaskStatus.
  612. //
  613. // By default, this operation returns up to 50 export tasks that satisfy the
  614. // specified filters. If there are more export tasks to list, the response would
  615. // contain a nextToken value in the response body. You can also limit the number
  616. // of export tasks returned in the response by specifying the limit parameter
  617. // in the request.
  618. func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) {
  619. req, out := c.DescribeExportTasksRequest(input)
  620. err := req.Send()
  621. return out, err
  622. }
  623. const opDescribeLogGroups = "DescribeLogGroups"
  624. // DescribeLogGroupsRequest generates a "aws/request.Request" representing the
  625. // client's request for the DescribeLogGroups operation. The "output" return
  626. // value can be used to capture response data after the request's "Send" method
  627. // is called.
  628. //
  629. // Creating a request object using this method should be used when you want to inject
  630. // custom logic into the request's lifecycle using a custom handler, or if you want to
  631. // access properties on the request object before or after sending the request. If
  632. // you just want the service response, call the DescribeLogGroups method directly
  633. // instead.
  634. //
  635. // Note: You must call the "Send" method on the returned request object in order
  636. // to execute the request.
  637. //
  638. // // Example sending a request using the DescribeLogGroupsRequest method.
  639. // req, resp := client.DescribeLogGroupsRequest(params)
  640. //
  641. // err := req.Send()
  642. // if err == nil { // resp is now filled
  643. // fmt.Println(resp)
  644. // }
  645. //
  646. func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) {
  647. op := &request.Operation{
  648. Name: opDescribeLogGroups,
  649. HTTPMethod: "POST",
  650. HTTPPath: "/",
  651. Paginator: &request.Paginator{
  652. InputTokens: []string{"nextToken"},
  653. OutputTokens: []string{"nextToken"},
  654. LimitToken: "limit",
  655. TruncationToken: "",
  656. },
  657. }
  658. if input == nil {
  659. input = &DescribeLogGroupsInput{}
  660. }
  661. req = c.newRequest(op, input, output)
  662. output = &DescribeLogGroupsOutput{}
  663. req.Data = output
  664. return
  665. }
  666. // Returns all the log groups that are associated with the AWS account making
  667. // the request. The list returned in the response is ASCII-sorted by log group
  668. // name.
  669. //
  670. // By default, this operation returns up to 50 log groups. If there are more
  671. // log groups to list, the response would contain a nextToken value in the response
  672. // body. You can also limit the number of log groups returned in the response
  673. // by specifying the limit parameter in the request.
  674. func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) {
  675. req, out := c.DescribeLogGroupsRequest(input)
  676. err := req.Send()
  677. return out, err
  678. }
  679. // DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation,
  680. // calling the "fn" function with the response data for each page. To stop
  681. // iterating, return false from the fn function.
  682. //
  683. // See DescribeLogGroups method for more information on how to use this operation.
  684. //
  685. // Note: This operation can generate multiple requests to a service.
  686. //
  687. // // Example iterating over at most 3 pages of a DescribeLogGroups operation.
  688. // pageNum := 0
  689. // err := client.DescribeLogGroupsPages(params,
  690. // func(page *DescribeLogGroupsOutput, lastPage bool) bool {
  691. // pageNum++
  692. // fmt.Println(page)
  693. // return pageNum <= 3
  694. // })
  695. //
  696. func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(p *DescribeLogGroupsOutput, lastPage bool) (shouldContinue bool)) error {
  697. page, _ := c.DescribeLogGroupsRequest(input)
  698. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  699. return page.EachPage(func(p interface{}, lastPage bool) bool {
  700. return fn(p.(*DescribeLogGroupsOutput), lastPage)
  701. })
  702. }
  703. const opDescribeLogStreams = "DescribeLogStreams"
  704. // DescribeLogStreamsRequest generates a "aws/request.Request" representing the
  705. // client's request for the DescribeLogStreams operation. The "output" return
  706. // value can be used to capture response data after the request's "Send" method
  707. // is called.
  708. //
  709. // Creating a request object using this method should be used when you want to inject
  710. // custom logic into the request's lifecycle using a custom handler, or if you want to
  711. // access properties on the request object before or after sending the request. If
  712. // you just want the service response, call the DescribeLogStreams method directly
  713. // instead.
  714. //
  715. // Note: You must call the "Send" method on the returned request object in order
  716. // to execute the request.
  717. //
  718. // // Example sending a request using the DescribeLogStreamsRequest method.
  719. // req, resp := client.DescribeLogStreamsRequest(params)
  720. //
  721. // err := req.Send()
  722. // if err == nil { // resp is now filled
  723. // fmt.Println(resp)
  724. // }
  725. //
  726. func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) {
  727. op := &request.Operation{
  728. Name: opDescribeLogStreams,
  729. HTTPMethod: "POST",
  730. HTTPPath: "/",
  731. Paginator: &request.Paginator{
  732. InputTokens: []string{"nextToken"},
  733. OutputTokens: []string{"nextToken"},
  734. LimitToken: "limit",
  735. TruncationToken: "",
  736. },
  737. }
  738. if input == nil {
  739. input = &DescribeLogStreamsInput{}
  740. }
  741. req = c.newRequest(op, input, output)
  742. output = &DescribeLogStreamsOutput{}
  743. req.Data = output
  744. return
  745. }
  746. // Returns all the log streams that are associated with the specified log group.
  747. // The list returned in the response is ASCII-sorted by log stream name.
  748. //
  749. // By default, this operation returns up to 50 log streams. If there are more
  750. // log streams to list, the response would contain a nextToken value in the
  751. // response body. You can also limit the number of log streams returned in the
  752. // response by specifying the limit parameter in the request. This operation
  753. // has a limit of five transactions per second, after which transactions are
  754. // throttled.
  755. func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) {
  756. req, out := c.DescribeLogStreamsRequest(input)
  757. err := req.Send()
  758. return out, err
  759. }
  760. // DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation,
  761. // calling the "fn" function with the response data for each page. To stop
  762. // iterating, return false from the fn function.
  763. //
  764. // See DescribeLogStreams method for more information on how to use this operation.
  765. //
  766. // Note: This operation can generate multiple requests to a service.
  767. //
  768. // // Example iterating over at most 3 pages of a DescribeLogStreams operation.
  769. // pageNum := 0
  770. // err := client.DescribeLogStreamsPages(params,
  771. // func(page *DescribeLogStreamsOutput, lastPage bool) bool {
  772. // pageNum++
  773. // fmt.Println(page)
  774. // return pageNum <= 3
  775. // })
  776. //
  777. func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(p *DescribeLogStreamsOutput, lastPage bool) (shouldContinue bool)) error {
  778. page, _ := c.DescribeLogStreamsRequest(input)
  779. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  780. return page.EachPage(func(p interface{}, lastPage bool) bool {
  781. return fn(p.(*DescribeLogStreamsOutput), lastPage)
  782. })
  783. }
  784. const opDescribeMetricFilters = "DescribeMetricFilters"
  785. // DescribeMetricFiltersRequest generates a "aws/request.Request" representing the
  786. // client's request for the DescribeMetricFilters operation. The "output" return
  787. // value can be used to capture response data after the request's "Send" method
  788. // is called.
  789. //
  790. // Creating a request object using this method should be used when you want to inject
  791. // custom logic into the request's lifecycle using a custom handler, or if you want to
  792. // access properties on the request object before or after sending the request. If
  793. // you just want the service response, call the DescribeMetricFilters method directly
  794. // instead.
  795. //
  796. // Note: You must call the "Send" method on the returned request object in order
  797. // to execute the request.
  798. //
  799. // // Example sending a request using the DescribeMetricFiltersRequest method.
  800. // req, resp := client.DescribeMetricFiltersRequest(params)
  801. //
  802. // err := req.Send()
  803. // if err == nil { // resp is now filled
  804. // fmt.Println(resp)
  805. // }
  806. //
  807. func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) {
  808. op := &request.Operation{
  809. Name: opDescribeMetricFilters,
  810. HTTPMethod: "POST",
  811. HTTPPath: "/",
  812. Paginator: &request.Paginator{
  813. InputTokens: []string{"nextToken"},
  814. OutputTokens: []string{"nextToken"},
  815. LimitToken: "limit",
  816. TruncationToken: "",
  817. },
  818. }
  819. if input == nil {
  820. input = &DescribeMetricFiltersInput{}
  821. }
  822. req = c.newRequest(op, input, output)
  823. output = &DescribeMetricFiltersOutput{}
  824. req.Data = output
  825. return
  826. }
  827. // Returns all the metrics filters associated with the specified log group.
  828. // The list returned in the response is ASCII-sorted by filter name.
  829. //
  830. // By default, this operation returns up to 50 metric filters. If there are
  831. // more metric filters to list, the response would contain a nextToken value
  832. // in the response body. You can also limit the number of metric filters returned
  833. // in the response by specifying the limit parameter in the request.
  834. func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) {
  835. req, out := c.DescribeMetricFiltersRequest(input)
  836. err := req.Send()
  837. return out, err
  838. }
  839. // DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation,
  840. // calling the "fn" function with the response data for each page. To stop
  841. // iterating, return false from the fn function.
  842. //
  843. // See DescribeMetricFilters method for more information on how to use this operation.
  844. //
  845. // Note: This operation can generate multiple requests to a service.
  846. //
  847. // // Example iterating over at most 3 pages of a DescribeMetricFilters operation.
  848. // pageNum := 0
  849. // err := client.DescribeMetricFiltersPages(params,
  850. // func(page *DescribeMetricFiltersOutput, lastPage bool) bool {
  851. // pageNum++
  852. // fmt.Println(page)
  853. // return pageNum <= 3
  854. // })
  855. //
  856. func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(p *DescribeMetricFiltersOutput, lastPage bool) (shouldContinue bool)) error {
  857. page, _ := c.DescribeMetricFiltersRequest(input)
  858. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  859. return page.EachPage(func(p interface{}, lastPage bool) bool {
  860. return fn(p.(*DescribeMetricFiltersOutput), lastPage)
  861. })
  862. }
  863. const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters"
  864. // DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the
  865. // client's request for the DescribeSubscriptionFilters operation. The "output" return
  866. // value can be used to capture response data after the request's "Send" method
  867. // is called.
  868. //
  869. // Creating a request object using this method should be used when you want to inject
  870. // custom logic into the request's lifecycle using a custom handler, or if you want to
  871. // access properties on the request object before or after sending the request. If
  872. // you just want the service response, call the DescribeSubscriptionFilters method directly
  873. // instead.
  874. //
  875. // Note: You must call the "Send" method on the returned request object in order
  876. // to execute the request.
  877. //
  878. // // Example sending a request using the DescribeSubscriptionFiltersRequest method.
  879. // req, resp := client.DescribeSubscriptionFiltersRequest(params)
  880. //
  881. // err := req.Send()
  882. // if err == nil { // resp is now filled
  883. // fmt.Println(resp)
  884. // }
  885. //
  886. func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) {
  887. op := &request.Operation{
  888. Name: opDescribeSubscriptionFilters,
  889. HTTPMethod: "POST",
  890. HTTPPath: "/",
  891. Paginator: &request.Paginator{
  892. InputTokens: []string{"nextToken"},
  893. OutputTokens: []string{"nextToken"},
  894. LimitToken: "limit",
  895. TruncationToken: "",
  896. },
  897. }
  898. if input == nil {
  899. input = &DescribeSubscriptionFiltersInput{}
  900. }
  901. req = c.newRequest(op, input, output)
  902. output = &DescribeSubscriptionFiltersOutput{}
  903. req.Data = output
  904. return
  905. }
  906. // Returns all the subscription filters associated with the specified log group.
  907. // The list returned in the response is ASCII-sorted by filter name.
  908. //
  909. // By default, this operation returns up to 50 subscription filters. If there
  910. // are more subscription filters to list, the response would contain a nextToken
  911. // value in the response body. You can also limit the number of subscription
  912. // filters returned in the response by specifying the limit parameter in the
  913. // request.
  914. func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) {
  915. req, out := c.DescribeSubscriptionFiltersRequest(input)
  916. err := req.Send()
  917. return out, err
  918. }
  919. // DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation,
  920. // calling the "fn" function with the response data for each page. To stop
  921. // iterating, return false from the fn function.
  922. //
  923. // See DescribeSubscriptionFilters method for more information on how to use this operation.
  924. //
  925. // Note: This operation can generate multiple requests to a service.
  926. //
  927. // // Example iterating over at most 3 pages of a DescribeSubscriptionFilters operation.
  928. // pageNum := 0
  929. // err := client.DescribeSubscriptionFiltersPages(params,
  930. // func(page *DescribeSubscriptionFiltersOutput, lastPage bool) bool {
  931. // pageNum++
  932. // fmt.Println(page)
  933. // return pageNum <= 3
  934. // })
  935. //
  936. func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(p *DescribeSubscriptionFiltersOutput, lastPage bool) (shouldContinue bool)) error {
  937. page, _ := c.DescribeSubscriptionFiltersRequest(input)
  938. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  939. return page.EachPage(func(p interface{}, lastPage bool) bool {
  940. return fn(p.(*DescribeSubscriptionFiltersOutput), lastPage)
  941. })
  942. }
  943. const opFilterLogEvents = "FilterLogEvents"
  944. // FilterLogEventsRequest generates a "aws/request.Request" representing the
  945. // client's request for the FilterLogEvents operation. The "output" return
  946. // value can be used to capture response data after the request's "Send" method
  947. // is called.
  948. //
  949. // Creating a request object using this method should be used when you want to inject
  950. // custom logic into the request's lifecycle using a custom handler, or if you want to
  951. // access properties on the request object before or after sending the request. If
  952. // you just want the service response, call the FilterLogEvents method directly
  953. // instead.
  954. //
  955. // Note: You must call the "Send" method on the returned request object in order
  956. // to execute the request.
  957. //
  958. // // Example sending a request using the FilterLogEventsRequest method.
  959. // req, resp := client.FilterLogEventsRequest(params)
  960. //
  961. // err := req.Send()
  962. // if err == nil { // resp is now filled
  963. // fmt.Println(resp)
  964. // }
  965. //
  966. func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) {
  967. op := &request.Operation{
  968. Name: opFilterLogEvents,
  969. HTTPMethod: "POST",
  970. HTTPPath: "/",
  971. Paginator: &request.Paginator{
  972. InputTokens: []string{"nextToken"},
  973. OutputTokens: []string{"nextToken"},
  974. LimitToken: "limit",
  975. TruncationToken: "",
  976. },
  977. }
  978. if input == nil {
  979. input = &FilterLogEventsInput{}
  980. }
  981. req = c.newRequest(op, input, output)
  982. output = &FilterLogEventsOutput{}
  983. req.Data = output
  984. return
  985. }
  986. // Retrieves log events, optionally filtered by a filter pattern from the specified
  987. // log group. You can provide an optional time range to filter the results on
  988. // the event timestamp. You can limit the streams searched to an explicit list
  989. // of logStreamNames.
  990. //
  991. // By default, this operation returns as much matching log events as can fit
  992. // in a response size of 1MB, up to 10,000 log events, or all the events found
  993. // within a time-bounded scan window. If the response includes a nextToken,
  994. // then there is more data to search, and the search can be resumed with a new
  995. // request providing the nextToken. The response will contain a list of searchedLogStreams
  996. // that contains information about which streams were searched in the request
  997. // and whether they have been searched completely or require further pagination.
  998. // The limit parameter in the request can be used to specify the maximum number
  999. // of events to return in a page.
  1000. func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) {
  1001. req, out := c.FilterLogEventsRequest(input)
  1002. err := req.Send()
  1003. return out, err
  1004. }
  1005. // FilterLogEventsPages iterates over the pages of a FilterLogEvents operation,
  1006. // calling the "fn" function with the response data for each page. To stop
  1007. // iterating, return false from the fn function.
  1008. //
  1009. // See FilterLogEvents method for more information on how to use this operation.
  1010. //
  1011. // Note: This operation can generate multiple requests to a service.
  1012. //
  1013. // // Example iterating over at most 3 pages of a FilterLogEvents operation.
  1014. // pageNum := 0
  1015. // err := client.FilterLogEventsPages(params,
  1016. // func(page *FilterLogEventsOutput, lastPage bool) bool {
  1017. // pageNum++
  1018. // fmt.Println(page)
  1019. // return pageNum <= 3
  1020. // })
  1021. //
  1022. func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(p *FilterLogEventsOutput, lastPage bool) (shouldContinue bool)) error {
  1023. page, _ := c.FilterLogEventsRequest(input)
  1024. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1025. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1026. return fn(p.(*FilterLogEventsOutput), lastPage)
  1027. })
  1028. }
  1029. const opGetLogEvents = "GetLogEvents"
  1030. // GetLogEventsRequest generates a "aws/request.Request" representing the
  1031. // client's request for the GetLogEvents operation. The "output" return
  1032. // value can be used to capture response data after the request's "Send" method
  1033. // is called.
  1034. //
  1035. // Creating a request object using this method should be used when you want to inject
  1036. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1037. // access properties on the request object before or after sending the request. If
  1038. // you just want the service response, call the GetLogEvents method directly
  1039. // instead.
  1040. //
  1041. // Note: You must call the "Send" method on the returned request object in order
  1042. // to execute the request.
  1043. //
  1044. // // Example sending a request using the GetLogEventsRequest method.
  1045. // req, resp := client.GetLogEventsRequest(params)
  1046. //
  1047. // err := req.Send()
  1048. // if err == nil { // resp is now filled
  1049. // fmt.Println(resp)
  1050. // }
  1051. //
  1052. func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) {
  1053. op := &request.Operation{
  1054. Name: opGetLogEvents,
  1055. HTTPMethod: "POST",
  1056. HTTPPath: "/",
  1057. Paginator: &request.Paginator{
  1058. InputTokens: []string{"nextToken"},
  1059. OutputTokens: []string{"nextForwardToken"},
  1060. LimitToken: "limit",
  1061. TruncationToken: "",
  1062. },
  1063. }
  1064. if input == nil {
  1065. input = &GetLogEventsInput{}
  1066. }
  1067. req = c.newRequest(op, input, output)
  1068. output = &GetLogEventsOutput{}
  1069. req.Data = output
  1070. return
  1071. }
  1072. // Retrieves log events from the specified log stream. You can provide an optional
  1073. // time range to filter the results on the event timestamp.
  1074. //
  1075. // By default, this operation returns as much log events as can fit in a response
  1076. // size of 1MB, up to 10,000 log events. The response will always include a
  1077. // nextForwardToken and a nextBackwardToken in the response body. You can use
  1078. // any of these tokens in subsequent GetLogEvents requests to paginate through
  1079. // events in either forward or backward direction. You can also limit the number
  1080. // of log events returned in the response by specifying the limit parameter
  1081. // in the request.
  1082. func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) {
  1083. req, out := c.GetLogEventsRequest(input)
  1084. err := req.Send()
  1085. return out, err
  1086. }
  1087. // GetLogEventsPages iterates over the pages of a GetLogEvents operation,
  1088. // calling the "fn" function with the response data for each page. To stop
  1089. // iterating, return false from the fn function.
  1090. //
  1091. // See GetLogEvents method for more information on how to use this operation.
  1092. //
  1093. // Note: This operation can generate multiple requests to a service.
  1094. //
  1095. // // Example iterating over at most 3 pages of a GetLogEvents operation.
  1096. // pageNum := 0
  1097. // err := client.GetLogEventsPages(params,
  1098. // func(page *GetLogEventsOutput, lastPage bool) bool {
  1099. // pageNum++
  1100. // fmt.Println(page)
  1101. // return pageNum <= 3
  1102. // })
  1103. //
  1104. func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(p *GetLogEventsOutput, lastPage bool) (shouldContinue bool)) error {
  1105. page, _ := c.GetLogEventsRequest(input)
  1106. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1107. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1108. return fn(p.(*GetLogEventsOutput), lastPage)
  1109. })
  1110. }
  1111. const opPutDestination = "PutDestination"
  1112. // PutDestinationRequest generates a "aws/request.Request" representing the
  1113. // client's request for the PutDestination operation. The "output" return
  1114. // value can be used to capture response data after the request's "Send" method
  1115. // is called.
  1116. //
  1117. // Creating a request object using this method should be used when you want to inject
  1118. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1119. // access properties on the request object before or after sending the request. If
  1120. // you just want the service response, call the PutDestination method directly
  1121. // instead.
  1122. //
  1123. // Note: You must call the "Send" method on the returned request object in order
  1124. // to execute the request.
  1125. //
  1126. // // Example sending a request using the PutDestinationRequest method.
  1127. // req, resp := client.PutDestinationRequest(params)
  1128. //
  1129. // err := req.Send()
  1130. // if err == nil { // resp is now filled
  1131. // fmt.Println(resp)
  1132. // }
  1133. //
  1134. func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) {
  1135. op := &request.Operation{
  1136. Name: opPutDestination,
  1137. HTTPMethod: "POST",
  1138. HTTPPath: "/",
  1139. }
  1140. if input == nil {
  1141. input = &PutDestinationInput{}
  1142. }
  1143. req = c.newRequest(op, input, output)
  1144. output = &PutDestinationOutput{}
  1145. req.Data = output
  1146. return
  1147. }
  1148. // Creates or updates a Destination. A destination encapsulates a physical resource
  1149. // (such as a Kinesis stream) and allows you to subscribe to a real-time stream
  1150. // of log events of a different account, ingested through PutLogEvents requests.
  1151. // Currently, the only supported physical resource is a Amazon Kinesis stream
  1152. // belonging to the same account as the destination.
  1153. //
  1154. // A destination controls what is written to its Amazon Kinesis stream through
  1155. // an access policy. By default, PutDestination does not set any access policy
  1156. // with the destination, which means a cross-account user will not be able to
  1157. // call PutSubscriptionFilter against this destination. To enable that, the
  1158. // destination owner must call PutDestinationPolicy after PutDestination.
  1159. func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) {
  1160. req, out := c.PutDestinationRequest(input)
  1161. err := req.Send()
  1162. return out, err
  1163. }
  1164. const opPutDestinationPolicy = "PutDestinationPolicy"
  1165. // PutDestinationPolicyRequest generates a "aws/request.Request" representing the
  1166. // client's request for the PutDestinationPolicy operation. The "output" return
  1167. // value can be used to capture response data after the request's "Send" method
  1168. // is called.
  1169. //
  1170. // Creating a request object using this method should be used when you want to inject
  1171. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1172. // access properties on the request object before or after sending the request. If
  1173. // you just want the service response, call the PutDestinationPolicy method directly
  1174. // instead.
  1175. //
  1176. // Note: You must call the "Send" method on the returned request object in order
  1177. // to execute the request.
  1178. //
  1179. // // Example sending a request using the PutDestinationPolicyRequest method.
  1180. // req, resp := client.PutDestinationPolicyRequest(params)
  1181. //
  1182. // err := req.Send()
  1183. // if err == nil { // resp is now filled
  1184. // fmt.Println(resp)
  1185. // }
  1186. //
  1187. func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) {
  1188. op := &request.Operation{
  1189. Name: opPutDestinationPolicy,
  1190. HTTPMethod: "POST",
  1191. HTTPPath: "/",
  1192. }
  1193. if input == nil {
  1194. input = &PutDestinationPolicyInput{}
  1195. }
  1196. req = c.newRequest(op, input, output)
  1197. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1198. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1199. output = &PutDestinationPolicyOutput{}
  1200. req.Data = output
  1201. return
  1202. }
  1203. // Creates or updates an access policy associated with an existing Destination.
  1204. // An access policy is an IAM policy document (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html)
  1205. // that is used to authorize claims to register a subscription filter against
  1206. // a given destination.
  1207. func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) {
  1208. req, out := c.PutDestinationPolicyRequest(input)
  1209. err := req.Send()
  1210. return out, err
  1211. }
  1212. const opPutLogEvents = "PutLogEvents"
  1213. // PutLogEventsRequest generates a "aws/request.Request" representing the
  1214. // client's request for the PutLogEvents operation. The "output" return
  1215. // value can be used to capture response data after the request's "Send" method
  1216. // is called.
  1217. //
  1218. // Creating a request object using this method should be used when you want to inject
  1219. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1220. // access properties on the request object before or after sending the request. If
  1221. // you just want the service response, call the PutLogEvents method directly
  1222. // instead.
  1223. //
  1224. // Note: You must call the "Send" method on the returned request object in order
  1225. // to execute the request.
  1226. //
  1227. // // Example sending a request using the PutLogEventsRequest method.
  1228. // req, resp := client.PutLogEventsRequest(params)
  1229. //
  1230. // err := req.Send()
  1231. // if err == nil { // resp is now filled
  1232. // fmt.Println(resp)
  1233. // }
  1234. //
  1235. func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) {
  1236. op := &request.Operation{
  1237. Name: opPutLogEvents,
  1238. HTTPMethod: "POST",
  1239. HTTPPath: "/",
  1240. }
  1241. if input == nil {
  1242. input = &PutLogEventsInput{}
  1243. }
  1244. req = c.newRequest(op, input, output)
  1245. output = &PutLogEventsOutput{}
  1246. req.Data = output
  1247. return
  1248. }
  1249. // Uploads a batch of log events to the specified log stream.
  1250. //
  1251. // Every PutLogEvents request must include the sequenceToken obtained from
  1252. // the response of the previous request. An upload in a newly created log stream
  1253. // does not require a sequenceToken. You can also get the sequenceToken using
  1254. // DescribeLogStreams.
  1255. //
  1256. // The batch of events must satisfy the following constraints:
  1257. //
  1258. // The maximum batch size is 1,048,576 bytes, and this size is calculated
  1259. // as the sum of all event messages in UTF-8, plus 26 bytes for each log event.
  1260. //
  1261. // None of the log events in the batch can be more than 2 hours in the future.
  1262. //
  1263. // None of the log events in the batch can be older than 14 days or the retention
  1264. // period of the log group.
  1265. //
  1266. // The log events in the batch must be in chronological ordered by their
  1267. // timestamp.
  1268. //
  1269. // The maximum number of log events in a batch is 10,000.
  1270. //
  1271. // A batch of log events in a single PutLogEvents request cannot span more
  1272. // than 24 hours. Otherwise, the PutLogEvents operation will fail.
  1273. func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) {
  1274. req, out := c.PutLogEventsRequest(input)
  1275. err := req.Send()
  1276. return out, err
  1277. }
  1278. const opPutMetricFilter = "PutMetricFilter"
  1279. // PutMetricFilterRequest generates a "aws/request.Request" representing the
  1280. // client's request for the PutMetricFilter operation. The "output" return
  1281. // value can be used to capture response data after the request's "Send" method
  1282. // is called.
  1283. //
  1284. // Creating a request object using this method should be used when you want to inject
  1285. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1286. // access properties on the request object before or after sending the request. If
  1287. // you just want the service response, call the PutMetricFilter method directly
  1288. // instead.
  1289. //
  1290. // Note: You must call the "Send" method on the returned request object in order
  1291. // to execute the request.
  1292. //
  1293. // // Example sending a request using the PutMetricFilterRequest method.
  1294. // req, resp := client.PutMetricFilterRequest(params)
  1295. //
  1296. // err := req.Send()
  1297. // if err == nil { // resp is now filled
  1298. // fmt.Println(resp)
  1299. // }
  1300. //
  1301. func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) {
  1302. op := &request.Operation{
  1303. Name: opPutMetricFilter,
  1304. HTTPMethod: "POST",
  1305. HTTPPath: "/",
  1306. }
  1307. if input == nil {
  1308. input = &PutMetricFilterInput{}
  1309. }
  1310. req = c.newRequest(op, input, output)
  1311. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1312. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1313. output = &PutMetricFilterOutput{}
  1314. req.Data = output
  1315. return
  1316. }
  1317. // Creates or updates a metric filter and associates it with the specified log
  1318. // group. Metric filters allow you to configure rules to extract metric data
  1319. // from log events ingested through PutLogEvents requests.
  1320. //
  1321. // The maximum number of metric filters that can be associated with a log group
  1322. // is 100.
  1323. func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) {
  1324. req, out := c.PutMetricFilterRequest(input)
  1325. err := req.Send()
  1326. return out, err
  1327. }
  1328. const opPutRetentionPolicy = "PutRetentionPolicy"
  1329. // PutRetentionPolicyRequest generates a "aws/request.Request" representing the
  1330. // client's request for the PutRetentionPolicy operation. The "output" return
  1331. // value can be used to capture response data after the request's "Send" method
  1332. // is called.
  1333. //
  1334. // Creating a request object using this method should be used when you want to inject
  1335. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1336. // access properties on the request object before or after sending the request. If
  1337. // you just want the service response, call the PutRetentionPolicy method directly
  1338. // instead.
  1339. //
  1340. // Note: You must call the "Send" method on the returned request object in order
  1341. // to execute the request.
  1342. //
  1343. // // Example sending a request using the PutRetentionPolicyRequest method.
  1344. // req, resp := client.PutRetentionPolicyRequest(params)
  1345. //
  1346. // err := req.Send()
  1347. // if err == nil { // resp is now filled
  1348. // fmt.Println(resp)
  1349. // }
  1350. //
  1351. func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) {
  1352. op := &request.Operation{
  1353. Name: opPutRetentionPolicy,
  1354. HTTPMethod: "POST",
  1355. HTTPPath: "/",
  1356. }
  1357. if input == nil {
  1358. input = &PutRetentionPolicyInput{}
  1359. }
  1360. req = c.newRequest(op, input, output)
  1361. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1362. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1363. output = &PutRetentionPolicyOutput{}
  1364. req.Data = output
  1365. return
  1366. }
  1367. // Sets the retention of the specified log group. A retention policy allows
  1368. // you to configure the number of days you want to retain log events in the
  1369. // specified log group.
  1370. func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) {
  1371. req, out := c.PutRetentionPolicyRequest(input)
  1372. err := req.Send()
  1373. return out, err
  1374. }
  1375. const opPutSubscriptionFilter = "PutSubscriptionFilter"
  1376. // PutSubscriptionFilterRequest generates a "aws/request.Request" representing the
  1377. // client's request for the PutSubscriptionFilter operation. The "output" return
  1378. // value can be used to capture response data after the request's "Send" method
  1379. // is called.
  1380. //
  1381. // Creating a request object using this method should be used when you want to inject
  1382. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1383. // access properties on the request object before or after sending the request. If
  1384. // you just want the service response, call the PutSubscriptionFilter method directly
  1385. // instead.
  1386. //
  1387. // Note: You must call the "Send" method on the returned request object in order
  1388. // to execute the request.
  1389. //
  1390. // // Example sending a request using the PutSubscriptionFilterRequest method.
  1391. // req, resp := client.PutSubscriptionFilterRequest(params)
  1392. //
  1393. // err := req.Send()
  1394. // if err == nil { // resp is now filled
  1395. // fmt.Println(resp)
  1396. // }
  1397. //
  1398. func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) {
  1399. op := &request.Operation{
  1400. Name: opPutSubscriptionFilter,
  1401. HTTPMethod: "POST",
  1402. HTTPPath: "/",
  1403. }
  1404. if input == nil {
  1405. input = &PutSubscriptionFilterInput{}
  1406. }
  1407. req = c.newRequest(op, input, output)
  1408. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1409. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1410. output = &PutSubscriptionFilterOutput{}
  1411. req.Data = output
  1412. return
  1413. }
  1414. // Creates or updates a subscription filter and associates it with the specified
  1415. // log group. Subscription filters allow you to subscribe to a real-time stream
  1416. // of log events ingested through PutLogEvents requests and have them delivered
  1417. // to a specific destination. Currently, the supported destinations are:
  1418. //
  1419. // An Amazon Kinesis stream belonging to the same account as the subscription
  1420. // filter, for same-account delivery.
  1421. //
  1422. // A logical destination (used via an ARN of Destination) belonging to a
  1423. // different account, for cross-account delivery.
  1424. //
  1425. // An Amazon Kinesis Firehose stream belonging to the same account as the
  1426. // subscription filter, for same-account delivery.
  1427. //
  1428. // An AWS Lambda function belonging to the same account as the subscription
  1429. // filter, for same-account delivery.
  1430. //
  1431. // Currently there can only be one subscription filter associated with a
  1432. // log group.
  1433. func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) {
  1434. req, out := c.PutSubscriptionFilterRequest(input)
  1435. err := req.Send()
  1436. return out, err
  1437. }
  1438. const opTestMetricFilter = "TestMetricFilter"
  1439. // TestMetricFilterRequest generates a "aws/request.Request" representing the
  1440. // client's request for the TestMetricFilter operation. The "output" return
  1441. // value can be used to capture response data after the request's "Send" method
  1442. // is called.
  1443. //
  1444. // Creating a request object using this method should be used when you want to inject
  1445. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1446. // access properties on the request object before or after sending the request. If
  1447. // you just want the service response, call the TestMetricFilter method directly
  1448. // instead.
  1449. //
  1450. // Note: You must call the "Send" method on the returned request object in order
  1451. // to execute the request.
  1452. //
  1453. // // Example sending a request using the TestMetricFilterRequest method.
  1454. // req, resp := client.TestMetricFilterRequest(params)
  1455. //
  1456. // err := req.Send()
  1457. // if err == nil { // resp is now filled
  1458. // fmt.Println(resp)
  1459. // }
  1460. //
  1461. func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) {
  1462. op := &request.Operation{
  1463. Name: opTestMetricFilter,
  1464. HTTPMethod: "POST",
  1465. HTTPPath: "/",
  1466. }
  1467. if input == nil {
  1468. input = &TestMetricFilterInput{}
  1469. }
  1470. req = c.newRequest(op, input, output)
  1471. output = &TestMetricFilterOutput{}
  1472. req.Data = output
  1473. return
  1474. }
  1475. // Tests the filter pattern of a metric filter against a sample of log event
  1476. // messages. You can use this operation to validate the correctness of a metric
  1477. // filter pattern.
  1478. func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) {
  1479. req, out := c.TestMetricFilterRequest(input)
  1480. err := req.Send()
  1481. return out, err
  1482. }
  1483. type CancelExportTaskInput struct {
  1484. _ struct{} `type:"structure"`
  1485. // Id of the export task to cancel.
  1486. TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"`
  1487. }
  1488. // String returns the string representation
  1489. func (s CancelExportTaskInput) String() string {
  1490. return awsutil.Prettify(s)
  1491. }
  1492. // GoString returns the string representation
  1493. func (s CancelExportTaskInput) GoString() string {
  1494. return s.String()
  1495. }
  1496. // Validate inspects the fields of the type to determine if they are valid.
  1497. func (s *CancelExportTaskInput) Validate() error {
  1498. invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"}
  1499. if s.TaskId == nil {
  1500. invalidParams.Add(request.NewErrParamRequired("TaskId"))
  1501. }
  1502. if s.TaskId != nil && len(*s.TaskId) < 1 {
  1503. invalidParams.Add(request.NewErrParamMinLen("TaskId", 1))
  1504. }
  1505. if invalidParams.Len() > 0 {
  1506. return invalidParams
  1507. }
  1508. return nil
  1509. }
  1510. type CancelExportTaskOutput struct {
  1511. _ struct{} `type:"structure"`
  1512. }
  1513. // String returns the string representation
  1514. func (s CancelExportTaskOutput) String() string {
  1515. return awsutil.Prettify(s)
  1516. }
  1517. // GoString returns the string representation
  1518. func (s CancelExportTaskOutput) GoString() string {
  1519. return s.String()
  1520. }
  1521. type CreateExportTaskInput struct {
  1522. _ struct{} `type:"structure"`
  1523. // Name of Amazon S3 bucket to which the log data will be exported.
  1524. //
  1525. // Note: Only buckets in the same AWS region are supported.
  1526. Destination *string `locationName:"destination" min:"1" type:"string" required:"true"`
  1527. // Prefix that will be used as the start of Amazon S3 key for every object exported.
  1528. // If not specified, this defaults to 'exportedlogs'.
  1529. DestinationPrefix *string `locationName:"destinationPrefix" type:"string"`
  1530. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1531. // 00:00:00 UTC. It indicates the start time of the range for the request. Events
  1532. // with a timestamp prior to this time will not be exported.
  1533. From *int64 `locationName:"from" type:"long" required:"true"`
  1534. // The name of the log group to export.
  1535. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  1536. // Will only export log streams that match the provided logStreamNamePrefix.
  1537. // If you don't specify a value, no prefix filter is applied.
  1538. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"`
  1539. // The name of the export task.
  1540. TaskName *string `locationName:"taskName" min:"1" type:"string"`
  1541. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1542. // 00:00:00 UTC. It indicates the end time of the range for the request. Events
  1543. // with a timestamp later than this time will not be exported.
  1544. To *int64 `locationName:"to" type:"long" required:"true"`
  1545. }
  1546. // String returns the string representation
  1547. func (s CreateExportTaskInput) String() string {
  1548. return awsutil.Prettify(s)
  1549. }
  1550. // GoString returns the string representation
  1551. func (s CreateExportTaskInput) GoString() string {
  1552. return s.String()
  1553. }
  1554. // Validate inspects the fields of the type to determine if they are valid.
  1555. func (s *CreateExportTaskInput) Validate() error {
  1556. invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"}
  1557. if s.Destination == nil {
  1558. invalidParams.Add(request.NewErrParamRequired("Destination"))
  1559. }
  1560. if s.Destination != nil && len(*s.Destination) < 1 {
  1561. invalidParams.Add(request.NewErrParamMinLen("Destination", 1))
  1562. }
  1563. if s.From == nil {
  1564. invalidParams.Add(request.NewErrParamRequired("From"))
  1565. }
  1566. if s.LogGroupName == nil {
  1567. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  1568. }
  1569. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  1570. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  1571. }
  1572. if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 {
  1573. invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1))
  1574. }
  1575. if s.TaskName != nil && len(*s.TaskName) < 1 {
  1576. invalidParams.Add(request.NewErrParamMinLen("TaskName", 1))
  1577. }
  1578. if s.To == nil {
  1579. invalidParams.Add(request.NewErrParamRequired("To"))
  1580. }
  1581. if invalidParams.Len() > 0 {
  1582. return invalidParams
  1583. }
  1584. return nil
  1585. }
  1586. type CreateExportTaskOutput struct {
  1587. _ struct{} `type:"structure"`
  1588. // Id of the export task that got created.
  1589. TaskId *string `locationName:"taskId" min:"1" type:"string"`
  1590. }
  1591. // String returns the string representation
  1592. func (s CreateExportTaskOutput) String() string {
  1593. return awsutil.Prettify(s)
  1594. }
  1595. // GoString returns the string representation
  1596. func (s CreateExportTaskOutput) GoString() string {
  1597. return s.String()
  1598. }
  1599. type CreateLogGroupInput struct {
  1600. _ struct{} `type:"structure"`
  1601. // The name of the log group to create.
  1602. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  1603. }
  1604. // String returns the string representation
  1605. func (s CreateLogGroupInput) String() string {
  1606. return awsutil.Prettify(s)
  1607. }
  1608. // GoString returns the string representation
  1609. func (s CreateLogGroupInput) GoString() string {
  1610. return s.String()
  1611. }
  1612. // Validate inspects the fields of the type to determine if they are valid.
  1613. func (s *CreateLogGroupInput) Validate() error {
  1614. invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"}
  1615. if s.LogGroupName == nil {
  1616. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  1617. }
  1618. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  1619. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  1620. }
  1621. if invalidParams.Len() > 0 {
  1622. return invalidParams
  1623. }
  1624. return nil
  1625. }
  1626. type CreateLogGroupOutput struct {
  1627. _ struct{} `type:"structure"`
  1628. }
  1629. // String returns the string representation
  1630. func (s CreateLogGroupOutput) String() string {
  1631. return awsutil.Prettify(s)
  1632. }
  1633. // GoString returns the string representation
  1634. func (s CreateLogGroupOutput) GoString() string {
  1635. return s.String()
  1636. }
  1637. type CreateLogStreamInput struct {
  1638. _ struct{} `type:"structure"`
  1639. // The name of the log group under which the log stream is to be created.
  1640. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  1641. // The name of the log stream to create.
  1642. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
  1643. }
  1644. // String returns the string representation
  1645. func (s CreateLogStreamInput) String() string {
  1646. return awsutil.Prettify(s)
  1647. }
  1648. // GoString returns the string representation
  1649. func (s CreateLogStreamInput) GoString() string {
  1650. return s.String()
  1651. }
  1652. // Validate inspects the fields of the type to determine if they are valid.
  1653. func (s *CreateLogStreamInput) Validate() error {
  1654. invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"}
  1655. if s.LogGroupName == nil {
  1656. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  1657. }
  1658. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  1659. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  1660. }
  1661. if s.LogStreamName == nil {
  1662. invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
  1663. }
  1664. if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
  1665. invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
  1666. }
  1667. if invalidParams.Len() > 0 {
  1668. return invalidParams
  1669. }
  1670. return nil
  1671. }
  1672. type CreateLogStreamOutput struct {
  1673. _ struct{} `type:"structure"`
  1674. }
  1675. // String returns the string representation
  1676. func (s CreateLogStreamOutput) String() string {
  1677. return awsutil.Prettify(s)
  1678. }
  1679. // GoString returns the string representation
  1680. func (s CreateLogStreamOutput) GoString() string {
  1681. return s.String()
  1682. }
  1683. type DeleteDestinationInput struct {
  1684. _ struct{} `type:"structure"`
  1685. // The name of destination to delete.
  1686. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
  1687. }
  1688. // String returns the string representation
  1689. func (s DeleteDestinationInput) String() string {
  1690. return awsutil.Prettify(s)
  1691. }
  1692. // GoString returns the string representation
  1693. func (s DeleteDestinationInput) GoString() string {
  1694. return s.String()
  1695. }
  1696. // Validate inspects the fields of the type to determine if they are valid.
  1697. func (s *DeleteDestinationInput) Validate() error {
  1698. invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"}
  1699. if s.DestinationName == nil {
  1700. invalidParams.Add(request.NewErrParamRequired("DestinationName"))
  1701. }
  1702. if s.DestinationName != nil && len(*s.DestinationName) < 1 {
  1703. invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
  1704. }
  1705. if invalidParams.Len() > 0 {
  1706. return invalidParams
  1707. }
  1708. return nil
  1709. }
  1710. type DeleteDestinationOutput struct {
  1711. _ struct{} `type:"structure"`
  1712. }
  1713. // String returns the string representation
  1714. func (s DeleteDestinationOutput) String() string {
  1715. return awsutil.Prettify(s)
  1716. }
  1717. // GoString returns the string representation
  1718. func (s DeleteDestinationOutput) GoString() string {
  1719. return s.String()
  1720. }
  1721. type DeleteLogGroupInput struct {
  1722. _ struct{} `type:"structure"`
  1723. // The name of the log group to delete.
  1724. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  1725. }
  1726. // String returns the string representation
  1727. func (s DeleteLogGroupInput) String() string {
  1728. return awsutil.Prettify(s)
  1729. }
  1730. // GoString returns the string representation
  1731. func (s DeleteLogGroupInput) GoString() string {
  1732. return s.String()
  1733. }
  1734. // Validate inspects the fields of the type to determine if they are valid.
  1735. func (s *DeleteLogGroupInput) Validate() error {
  1736. invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"}
  1737. if s.LogGroupName == nil {
  1738. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  1739. }
  1740. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  1741. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  1742. }
  1743. if invalidParams.Len() > 0 {
  1744. return invalidParams
  1745. }
  1746. return nil
  1747. }
  1748. type DeleteLogGroupOutput struct {
  1749. _ struct{} `type:"structure"`
  1750. }
  1751. // String returns the string representation
  1752. func (s DeleteLogGroupOutput) String() string {
  1753. return awsutil.Prettify(s)
  1754. }
  1755. // GoString returns the string representation
  1756. func (s DeleteLogGroupOutput) GoString() string {
  1757. return s.String()
  1758. }
  1759. type DeleteLogStreamInput struct {
  1760. _ struct{} `type:"structure"`
  1761. // The name of the log group under which the log stream to delete belongs.
  1762. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  1763. // The name of the log stream to delete.
  1764. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
  1765. }
  1766. // String returns the string representation
  1767. func (s DeleteLogStreamInput) String() string {
  1768. return awsutil.Prettify(s)
  1769. }
  1770. // GoString returns the string representation
  1771. func (s DeleteLogStreamInput) GoString() string {
  1772. return s.String()
  1773. }
  1774. // Validate inspects the fields of the type to determine if they are valid.
  1775. func (s *DeleteLogStreamInput) Validate() error {
  1776. invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"}
  1777. if s.LogGroupName == nil {
  1778. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  1779. }
  1780. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  1781. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  1782. }
  1783. if s.LogStreamName == nil {
  1784. invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
  1785. }
  1786. if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
  1787. invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
  1788. }
  1789. if invalidParams.Len() > 0 {
  1790. return invalidParams
  1791. }
  1792. return nil
  1793. }
  1794. type DeleteLogStreamOutput struct {
  1795. _ struct{} `type:"structure"`
  1796. }
  1797. // String returns the string representation
  1798. func (s DeleteLogStreamOutput) String() string {
  1799. return awsutil.Prettify(s)
  1800. }
  1801. // GoString returns the string representation
  1802. func (s DeleteLogStreamOutput) GoString() string {
  1803. return s.String()
  1804. }
  1805. type DeleteMetricFilterInput struct {
  1806. _ struct{} `type:"structure"`
  1807. // The name of the metric filter to delete.
  1808. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
  1809. // The name of the log group that is associated with the metric filter to delete.
  1810. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  1811. }
  1812. // String returns the string representation
  1813. func (s DeleteMetricFilterInput) String() string {
  1814. return awsutil.Prettify(s)
  1815. }
  1816. // GoString returns the string representation
  1817. func (s DeleteMetricFilterInput) GoString() string {
  1818. return s.String()
  1819. }
  1820. // Validate inspects the fields of the type to determine if they are valid.
  1821. func (s *DeleteMetricFilterInput) Validate() error {
  1822. invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"}
  1823. if s.FilterName == nil {
  1824. invalidParams.Add(request.NewErrParamRequired("FilterName"))
  1825. }
  1826. if s.FilterName != nil && len(*s.FilterName) < 1 {
  1827. invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
  1828. }
  1829. if s.LogGroupName == nil {
  1830. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  1831. }
  1832. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  1833. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  1834. }
  1835. if invalidParams.Len() > 0 {
  1836. return invalidParams
  1837. }
  1838. return nil
  1839. }
  1840. type DeleteMetricFilterOutput struct {
  1841. _ struct{} `type:"structure"`
  1842. }
  1843. // String returns the string representation
  1844. func (s DeleteMetricFilterOutput) String() string {
  1845. return awsutil.Prettify(s)
  1846. }
  1847. // GoString returns the string representation
  1848. func (s DeleteMetricFilterOutput) GoString() string {
  1849. return s.String()
  1850. }
  1851. type DeleteRetentionPolicyInput struct {
  1852. _ struct{} `type:"structure"`
  1853. // The name of the log group that is associated with the retention policy to
  1854. // delete.
  1855. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  1856. }
  1857. // String returns the string representation
  1858. func (s DeleteRetentionPolicyInput) String() string {
  1859. return awsutil.Prettify(s)
  1860. }
  1861. // GoString returns the string representation
  1862. func (s DeleteRetentionPolicyInput) GoString() string {
  1863. return s.String()
  1864. }
  1865. // Validate inspects the fields of the type to determine if they are valid.
  1866. func (s *DeleteRetentionPolicyInput) Validate() error {
  1867. invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"}
  1868. if s.LogGroupName == nil {
  1869. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  1870. }
  1871. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  1872. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  1873. }
  1874. if invalidParams.Len() > 0 {
  1875. return invalidParams
  1876. }
  1877. return nil
  1878. }
  1879. type DeleteRetentionPolicyOutput struct {
  1880. _ struct{} `type:"structure"`
  1881. }
  1882. // String returns the string representation
  1883. func (s DeleteRetentionPolicyOutput) String() string {
  1884. return awsutil.Prettify(s)
  1885. }
  1886. // GoString returns the string representation
  1887. func (s DeleteRetentionPolicyOutput) GoString() string {
  1888. return s.String()
  1889. }
  1890. type DeleteSubscriptionFilterInput struct {
  1891. _ struct{} `type:"structure"`
  1892. // The name of the subscription filter to delete.
  1893. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
  1894. // The name of the log group that is associated with the subscription filter
  1895. // to delete.
  1896. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  1897. }
  1898. // String returns the string representation
  1899. func (s DeleteSubscriptionFilterInput) String() string {
  1900. return awsutil.Prettify(s)
  1901. }
  1902. // GoString returns the string representation
  1903. func (s DeleteSubscriptionFilterInput) GoString() string {
  1904. return s.String()
  1905. }
  1906. // Validate inspects the fields of the type to determine if they are valid.
  1907. func (s *DeleteSubscriptionFilterInput) Validate() error {
  1908. invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"}
  1909. if s.FilterName == nil {
  1910. invalidParams.Add(request.NewErrParamRequired("FilterName"))
  1911. }
  1912. if s.FilterName != nil && len(*s.FilterName) < 1 {
  1913. invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
  1914. }
  1915. if s.LogGroupName == nil {
  1916. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  1917. }
  1918. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  1919. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  1920. }
  1921. if invalidParams.Len() > 0 {
  1922. return invalidParams
  1923. }
  1924. return nil
  1925. }
  1926. type DeleteSubscriptionFilterOutput struct {
  1927. _ struct{} `type:"structure"`
  1928. }
  1929. // String returns the string representation
  1930. func (s DeleteSubscriptionFilterOutput) String() string {
  1931. return awsutil.Prettify(s)
  1932. }
  1933. // GoString returns the string representation
  1934. func (s DeleteSubscriptionFilterOutput) GoString() string {
  1935. return s.String()
  1936. }
  1937. type DescribeDestinationsInput struct {
  1938. _ struct{} `type:"structure"`
  1939. // Will only return destinations that match the provided destinationNamePrefix.
  1940. // If you don't specify a value, no prefix is applied.
  1941. DestinationNamePrefix *string `min:"1" type:"string"`
  1942. // The maximum number of results to return.
  1943. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  1944. // A string token used for pagination that points to the next page of results.
  1945. // It must be a value obtained from the response of the previous request. The
  1946. // token expires after 24 hours.
  1947. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  1948. }
  1949. // String returns the string representation
  1950. func (s DescribeDestinationsInput) String() string {
  1951. return awsutil.Prettify(s)
  1952. }
  1953. // GoString returns the string representation
  1954. func (s DescribeDestinationsInput) GoString() string {
  1955. return s.String()
  1956. }
  1957. // Validate inspects the fields of the type to determine if they are valid.
  1958. func (s *DescribeDestinationsInput) Validate() error {
  1959. invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"}
  1960. if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 {
  1961. invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1))
  1962. }
  1963. if s.Limit != nil && *s.Limit < 1 {
  1964. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  1965. }
  1966. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1967. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1968. }
  1969. if invalidParams.Len() > 0 {
  1970. return invalidParams
  1971. }
  1972. return nil
  1973. }
  1974. type DescribeDestinationsOutput struct {
  1975. _ struct{} `type:"structure"`
  1976. Destinations []*Destination `locationName:"destinations" type:"list"`
  1977. // A string token used for pagination that points to the next page of results.
  1978. // It must be a value obtained from the response of the previous request. The
  1979. // token expires after 24 hours.
  1980. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  1981. }
  1982. // String returns the string representation
  1983. func (s DescribeDestinationsOutput) String() string {
  1984. return awsutil.Prettify(s)
  1985. }
  1986. // GoString returns the string representation
  1987. func (s DescribeDestinationsOutput) GoString() string {
  1988. return s.String()
  1989. }
  1990. type DescribeExportTasksInput struct {
  1991. _ struct{} `type:"structure"`
  1992. // The maximum number of items returned in the response. If you don't specify
  1993. // a value, the request would return up to 50 items.
  1994. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  1995. // A string token used for pagination that points to the next page of results.
  1996. // It must be a value obtained from the response of the previous DescribeExportTasks
  1997. // request.
  1998. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  1999. // All export tasks that matches the specified status code will be returned.
  2000. // This can return zero or more export tasks.
  2001. StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"`
  2002. // Export task that matches the specified task Id will be returned. This can
  2003. // result in zero or one export task.
  2004. TaskId *string `locationName:"taskId" min:"1" type:"string"`
  2005. }
  2006. // String returns the string representation
  2007. func (s DescribeExportTasksInput) String() string {
  2008. return awsutil.Prettify(s)
  2009. }
  2010. // GoString returns the string representation
  2011. func (s DescribeExportTasksInput) GoString() string {
  2012. return s.String()
  2013. }
  2014. // Validate inspects the fields of the type to determine if they are valid.
  2015. func (s *DescribeExportTasksInput) Validate() error {
  2016. invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"}
  2017. if s.Limit != nil && *s.Limit < 1 {
  2018. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  2019. }
  2020. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2021. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2022. }
  2023. if s.TaskId != nil && len(*s.TaskId) < 1 {
  2024. invalidParams.Add(request.NewErrParamMinLen("TaskId", 1))
  2025. }
  2026. if invalidParams.Len() > 0 {
  2027. return invalidParams
  2028. }
  2029. return nil
  2030. }
  2031. type DescribeExportTasksOutput struct {
  2032. _ struct{} `type:"structure"`
  2033. // A list of export tasks.
  2034. ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"`
  2035. // A string token used for pagination that points to the next page of results.
  2036. // It must be a value obtained from the response of the previous request. The
  2037. // token expires after 24 hours.
  2038. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2039. }
  2040. // String returns the string representation
  2041. func (s DescribeExportTasksOutput) String() string {
  2042. return awsutil.Prettify(s)
  2043. }
  2044. // GoString returns the string representation
  2045. func (s DescribeExportTasksOutput) GoString() string {
  2046. return s.String()
  2047. }
  2048. type DescribeLogGroupsInput struct {
  2049. _ struct{} `type:"structure"`
  2050. // The maximum number of items returned in the response. If you don't specify
  2051. // a value, the request would return up to 50 items.
  2052. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  2053. // Will only return log groups that match the provided logGroupNamePrefix. If
  2054. // you don't specify a value, no prefix filter is applied.
  2055. LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"`
  2056. // A string token used for pagination that points to the next page of results.
  2057. // It must be a value obtained from the response of the previous DescribeLogGroups
  2058. // request.
  2059. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2060. }
  2061. // String returns the string representation
  2062. func (s DescribeLogGroupsInput) String() string {
  2063. return awsutil.Prettify(s)
  2064. }
  2065. // GoString returns the string representation
  2066. func (s DescribeLogGroupsInput) GoString() string {
  2067. return s.String()
  2068. }
  2069. // Validate inspects the fields of the type to determine if they are valid.
  2070. func (s *DescribeLogGroupsInput) Validate() error {
  2071. invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"}
  2072. if s.Limit != nil && *s.Limit < 1 {
  2073. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  2074. }
  2075. if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 {
  2076. invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1))
  2077. }
  2078. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2079. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2080. }
  2081. if invalidParams.Len() > 0 {
  2082. return invalidParams
  2083. }
  2084. return nil
  2085. }
  2086. type DescribeLogGroupsOutput struct {
  2087. _ struct{} `type:"structure"`
  2088. // A list of log groups.
  2089. LogGroups []*LogGroup `locationName:"logGroups" type:"list"`
  2090. // A string token used for pagination that points to the next page of results.
  2091. // It must be a value obtained from the response of the previous request. The
  2092. // token expires after 24 hours.
  2093. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2094. }
  2095. // String returns the string representation
  2096. func (s DescribeLogGroupsOutput) String() string {
  2097. return awsutil.Prettify(s)
  2098. }
  2099. // GoString returns the string representation
  2100. func (s DescribeLogGroupsOutput) GoString() string {
  2101. return s.String()
  2102. }
  2103. type DescribeLogStreamsInput struct {
  2104. _ struct{} `type:"structure"`
  2105. // If set to true, results are returned in descending order. If you don't specify
  2106. // a value or set it to false, results are returned in ascending order.
  2107. Descending *bool `locationName:"descending" type:"boolean"`
  2108. // The maximum number of items returned in the response. If you don't specify
  2109. // a value, the request would return up to 50 items.
  2110. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  2111. // The log group name for which log streams are to be listed.
  2112. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  2113. // Will only return log streams that match the provided logStreamNamePrefix.
  2114. // If you don't specify a value, no prefix filter is applied.
  2115. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"`
  2116. // A string token used for pagination that points to the next page of results.
  2117. // It must be a value obtained from the response of the previous DescribeLogStreams
  2118. // request.
  2119. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2120. // Specifies what to order the returned log streams by. Valid arguments are
  2121. // 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results
  2122. // are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot
  2123. // also contain a logStreamNamePrefix.
  2124. OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"`
  2125. }
  2126. // String returns the string representation
  2127. func (s DescribeLogStreamsInput) String() string {
  2128. return awsutil.Prettify(s)
  2129. }
  2130. // GoString returns the string representation
  2131. func (s DescribeLogStreamsInput) GoString() string {
  2132. return s.String()
  2133. }
  2134. // Validate inspects the fields of the type to determine if they are valid.
  2135. func (s *DescribeLogStreamsInput) Validate() error {
  2136. invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"}
  2137. if s.Limit != nil && *s.Limit < 1 {
  2138. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  2139. }
  2140. if s.LogGroupName == nil {
  2141. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  2142. }
  2143. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  2144. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  2145. }
  2146. if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 {
  2147. invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1))
  2148. }
  2149. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2150. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2151. }
  2152. if invalidParams.Len() > 0 {
  2153. return invalidParams
  2154. }
  2155. return nil
  2156. }
  2157. type DescribeLogStreamsOutput struct {
  2158. _ struct{} `type:"structure"`
  2159. // A list of log streams.
  2160. LogStreams []*LogStream `locationName:"logStreams" type:"list"`
  2161. // A string token used for pagination that points to the next page of results.
  2162. // It must be a value obtained from the response of the previous request. The
  2163. // token expires after 24 hours.
  2164. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2165. }
  2166. // String returns the string representation
  2167. func (s DescribeLogStreamsOutput) String() string {
  2168. return awsutil.Prettify(s)
  2169. }
  2170. // GoString returns the string representation
  2171. func (s DescribeLogStreamsOutput) GoString() string {
  2172. return s.String()
  2173. }
  2174. type DescribeMetricFiltersInput struct {
  2175. _ struct{} `type:"structure"`
  2176. // Will only return metric filters that match the provided filterNamePrefix.
  2177. // If you don't specify a value, no prefix filter is applied.
  2178. FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"`
  2179. // The maximum number of items returned in the response. If you don't specify
  2180. // a value, the request would return up to 50 items.
  2181. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  2182. // The log group name for which metric filters are to be listed.
  2183. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  2184. // A string token used for pagination that points to the next page of results.
  2185. // It must be a value obtained from the response of the previous DescribeMetricFilters
  2186. // request.
  2187. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2188. }
  2189. // String returns the string representation
  2190. func (s DescribeMetricFiltersInput) String() string {
  2191. return awsutil.Prettify(s)
  2192. }
  2193. // GoString returns the string representation
  2194. func (s DescribeMetricFiltersInput) GoString() string {
  2195. return s.String()
  2196. }
  2197. // Validate inspects the fields of the type to determine if they are valid.
  2198. func (s *DescribeMetricFiltersInput) Validate() error {
  2199. invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"}
  2200. if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 {
  2201. invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1))
  2202. }
  2203. if s.Limit != nil && *s.Limit < 1 {
  2204. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  2205. }
  2206. if s.LogGroupName == nil {
  2207. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  2208. }
  2209. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  2210. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  2211. }
  2212. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2213. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2214. }
  2215. if invalidParams.Len() > 0 {
  2216. return invalidParams
  2217. }
  2218. return nil
  2219. }
  2220. type DescribeMetricFiltersOutput struct {
  2221. _ struct{} `type:"structure"`
  2222. MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"`
  2223. // A string token used for pagination that points to the next page of results.
  2224. // It must be a value obtained from the response of the previous request. The
  2225. // token expires after 24 hours.
  2226. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2227. }
  2228. // String returns the string representation
  2229. func (s DescribeMetricFiltersOutput) String() string {
  2230. return awsutil.Prettify(s)
  2231. }
  2232. // GoString returns the string representation
  2233. func (s DescribeMetricFiltersOutput) GoString() string {
  2234. return s.String()
  2235. }
  2236. type DescribeSubscriptionFiltersInput struct {
  2237. _ struct{} `type:"structure"`
  2238. // Will only return subscription filters that match the provided filterNamePrefix.
  2239. // If you don't specify a value, no prefix filter is applied.
  2240. FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"`
  2241. // The maximum number of results to return.
  2242. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  2243. // The log group name for which subscription filters are to be listed.
  2244. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  2245. // A string token used for pagination that points to the next page of results.
  2246. // It must be a value obtained from the response of the previous request. The
  2247. // token expires after 24 hours.
  2248. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2249. }
  2250. // String returns the string representation
  2251. func (s DescribeSubscriptionFiltersInput) String() string {
  2252. return awsutil.Prettify(s)
  2253. }
  2254. // GoString returns the string representation
  2255. func (s DescribeSubscriptionFiltersInput) GoString() string {
  2256. return s.String()
  2257. }
  2258. // Validate inspects the fields of the type to determine if they are valid.
  2259. func (s *DescribeSubscriptionFiltersInput) Validate() error {
  2260. invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"}
  2261. if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 {
  2262. invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1))
  2263. }
  2264. if s.Limit != nil && *s.Limit < 1 {
  2265. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  2266. }
  2267. if s.LogGroupName == nil {
  2268. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  2269. }
  2270. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  2271. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  2272. }
  2273. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2274. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2275. }
  2276. if invalidParams.Len() > 0 {
  2277. return invalidParams
  2278. }
  2279. return nil
  2280. }
  2281. type DescribeSubscriptionFiltersOutput struct {
  2282. _ struct{} `type:"structure"`
  2283. // A string token used for pagination that points to the next page of results.
  2284. // It must be a value obtained from the response of the previous request. The
  2285. // token expires after 24 hours.
  2286. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2287. SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"`
  2288. }
  2289. // String returns the string representation
  2290. func (s DescribeSubscriptionFiltersOutput) String() string {
  2291. return awsutil.Prettify(s)
  2292. }
  2293. // GoString returns the string representation
  2294. func (s DescribeSubscriptionFiltersOutput) GoString() string {
  2295. return s.String()
  2296. }
  2297. // A cross account destination that is the recipient of subscription log events.
  2298. type Destination struct {
  2299. _ struct{} `type:"structure"`
  2300. // An IAM policy document that governs which AWS accounts can create subscription
  2301. // filters against this destination.
  2302. AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"`
  2303. // ARN of this destination.
  2304. Arn *string `locationName:"arn" type:"string"`
  2305. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2306. // 00:00:00 UTC specifying when this destination was created.
  2307. CreationTime *int64 `locationName:"creationTime" type:"long"`
  2308. // Name of the destination.
  2309. DestinationName *string `locationName:"destinationName" min:"1" type:"string"`
  2310. // A role for impersonation for delivering log events to the target.
  2311. RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
  2312. // ARN of the physical target where the log events will be delivered (eg. ARN
  2313. // of a Kinesis stream).
  2314. TargetArn *string `locationName:"targetArn" min:"1" type:"string"`
  2315. }
  2316. // String returns the string representation
  2317. func (s Destination) String() string {
  2318. return awsutil.Prettify(s)
  2319. }
  2320. // GoString returns the string representation
  2321. func (s Destination) GoString() string {
  2322. return s.String()
  2323. }
  2324. // Represents an export task.
  2325. type ExportTask struct {
  2326. _ struct{} `type:"structure"`
  2327. // Name of Amazon S3 bucket to which the log data was exported.
  2328. Destination *string `locationName:"destination" min:"1" type:"string"`
  2329. // Prefix that was used as the start of Amazon S3 key for every object exported.
  2330. DestinationPrefix *string `locationName:"destinationPrefix" type:"string"`
  2331. // Execution info about the export task.
  2332. ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"`
  2333. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2334. // 00:00:00 UTC. Events with a timestamp prior to this time are not exported.
  2335. From *int64 `locationName:"from" type:"long"`
  2336. // The name of the log group from which logs data was exported.
  2337. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  2338. // Status of the export task.
  2339. Status *ExportTaskStatus `locationName:"status" type:"structure"`
  2340. // Id of the export task.
  2341. TaskId *string `locationName:"taskId" min:"1" type:"string"`
  2342. // The name of the export task.
  2343. TaskName *string `locationName:"taskName" min:"1" type:"string"`
  2344. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2345. // 00:00:00 UTC. Events with a timestamp later than this time are not exported.
  2346. To *int64 `locationName:"to" type:"long"`
  2347. }
  2348. // String returns the string representation
  2349. func (s ExportTask) String() string {
  2350. return awsutil.Prettify(s)
  2351. }
  2352. // GoString returns the string representation
  2353. func (s ExportTask) GoString() string {
  2354. return s.String()
  2355. }
  2356. // Represents the status of an export task.
  2357. type ExportTaskExecutionInfo struct {
  2358. _ struct{} `type:"structure"`
  2359. // A point in time when the export task got completed.
  2360. CompletionTime *int64 `locationName:"completionTime" type:"long"`
  2361. // A point in time when the export task got created.
  2362. CreationTime *int64 `locationName:"creationTime" type:"long"`
  2363. }
  2364. // String returns the string representation
  2365. func (s ExportTaskExecutionInfo) String() string {
  2366. return awsutil.Prettify(s)
  2367. }
  2368. // GoString returns the string representation
  2369. func (s ExportTaskExecutionInfo) GoString() string {
  2370. return s.String()
  2371. }
  2372. // Represents the status of an export task.
  2373. type ExportTaskStatus struct {
  2374. _ struct{} `type:"structure"`
  2375. // Status code of the export task.
  2376. Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"`
  2377. // Status message related to the code.
  2378. Message *string `locationName:"message" type:"string"`
  2379. }
  2380. // String returns the string representation
  2381. func (s ExportTaskStatus) String() string {
  2382. return awsutil.Prettify(s)
  2383. }
  2384. // GoString returns the string representation
  2385. func (s ExportTaskStatus) GoString() string {
  2386. return s.String()
  2387. }
  2388. type FilterLogEventsInput struct {
  2389. _ struct{} `type:"structure"`
  2390. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2391. // 00:00:00 UTC. If provided, events with a timestamp later than this time are
  2392. // not returned.
  2393. EndTime *int64 `locationName:"endTime" type:"long"`
  2394. // A valid CloudWatch Logs filter pattern to use for filtering the response.
  2395. // If not provided, all the events are matched.
  2396. FilterPattern *string `locationName:"filterPattern" type:"string"`
  2397. // If provided, the API will make a best effort to provide responses that contain
  2398. // events from multiple log streams within the log group interleaved in a single
  2399. // response. If not provided, all the matched log events in the first log stream
  2400. // will be searched first, then those in the next log stream, etc.
  2401. Interleaved *bool `locationName:"interleaved" type:"boolean"`
  2402. // The maximum number of events to return in a page of results. Default is 10,000
  2403. // events.
  2404. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  2405. // The name of the log group to query.
  2406. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  2407. // Optional list of log stream names within the specified log group to search.
  2408. // Defaults to all the log streams in the log group.
  2409. LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"`
  2410. // A pagination token obtained from a FilterLogEvents response to continue paginating
  2411. // the FilterLogEvents results. This token is omitted from the response when
  2412. // there are no other events to display.
  2413. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2414. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2415. // 00:00:00 UTC. If provided, events with a timestamp prior to this time are
  2416. // not returned.
  2417. StartTime *int64 `locationName:"startTime" type:"long"`
  2418. }
  2419. // String returns the string representation
  2420. func (s FilterLogEventsInput) String() string {
  2421. return awsutil.Prettify(s)
  2422. }
  2423. // GoString returns the string representation
  2424. func (s FilterLogEventsInput) GoString() string {
  2425. return s.String()
  2426. }
  2427. // Validate inspects the fields of the type to determine if they are valid.
  2428. func (s *FilterLogEventsInput) Validate() error {
  2429. invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"}
  2430. if s.Limit != nil && *s.Limit < 1 {
  2431. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  2432. }
  2433. if s.LogGroupName == nil {
  2434. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  2435. }
  2436. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  2437. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  2438. }
  2439. if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 {
  2440. invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1))
  2441. }
  2442. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2443. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2444. }
  2445. if invalidParams.Len() > 0 {
  2446. return invalidParams
  2447. }
  2448. return nil
  2449. }
  2450. type FilterLogEventsOutput struct {
  2451. _ struct{} `type:"structure"`
  2452. // A list of FilteredLogEvent objects representing the matched events from the
  2453. // request.
  2454. Events []*FilteredLogEvent `locationName:"events" type:"list"`
  2455. // A pagination token obtained from a FilterLogEvents response to continue paginating
  2456. // the FilterLogEvents results. This token is omitted from the response when
  2457. // there are no other events to display.
  2458. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2459. // A list of SearchedLogStream objects indicating which log streams have been
  2460. // searched in this request and whether each has been searched completely or
  2461. // still has more to be paginated.
  2462. SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"`
  2463. }
  2464. // String returns the string representation
  2465. func (s FilterLogEventsOutput) String() string {
  2466. return awsutil.Prettify(s)
  2467. }
  2468. // GoString returns the string representation
  2469. func (s FilterLogEventsOutput) GoString() string {
  2470. return s.String()
  2471. }
  2472. // Represents a matched event from a FilterLogEvents request.
  2473. type FilteredLogEvent struct {
  2474. _ struct{} `type:"structure"`
  2475. // A unique identifier for this event.
  2476. EventId *string `locationName:"eventId" type:"string"`
  2477. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2478. // 00:00:00 UTC.
  2479. IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
  2480. // The name of the log stream this event belongs to.
  2481. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
  2482. // The data contained in the log event.
  2483. Message *string `locationName:"message" min:"1" type:"string"`
  2484. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2485. // 00:00:00 UTC.
  2486. Timestamp *int64 `locationName:"timestamp" type:"long"`
  2487. }
  2488. // String returns the string representation
  2489. func (s FilteredLogEvent) String() string {
  2490. return awsutil.Prettify(s)
  2491. }
  2492. // GoString returns the string representation
  2493. func (s FilteredLogEvent) GoString() string {
  2494. return s.String()
  2495. }
  2496. type GetLogEventsInput struct {
  2497. _ struct{} `type:"structure"`
  2498. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2499. // 00:00:00 UTC.
  2500. EndTime *int64 `locationName:"endTime" type:"long"`
  2501. // The maximum number of log events returned in the response. If you don't specify
  2502. // a value, the request would return as many log events as can fit in a response
  2503. // size of 1MB, up to 10,000 log events.
  2504. Limit *int64 `locationName:"limit" min:"1" type:"integer"`
  2505. // The name of the log group to query.
  2506. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  2507. // The name of the log stream to query.
  2508. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
  2509. // A string token used for pagination that points to the next page of results.
  2510. // It must be a value obtained from the nextForwardToken or nextBackwardToken
  2511. // fields in the response of the previous GetLogEvents request.
  2512. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  2513. // If set to true, the earliest log events would be returned first. The default
  2514. // is false (the latest log events are returned first).
  2515. StartFromHead *bool `locationName:"startFromHead" type:"boolean"`
  2516. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2517. // 00:00:00 UTC.
  2518. StartTime *int64 `locationName:"startTime" type:"long"`
  2519. }
  2520. // String returns the string representation
  2521. func (s GetLogEventsInput) String() string {
  2522. return awsutil.Prettify(s)
  2523. }
  2524. // GoString returns the string representation
  2525. func (s GetLogEventsInput) GoString() string {
  2526. return s.String()
  2527. }
  2528. // Validate inspects the fields of the type to determine if they are valid.
  2529. func (s *GetLogEventsInput) Validate() error {
  2530. invalidParams := request.ErrInvalidParams{Context: "GetLogEventsInput"}
  2531. if s.Limit != nil && *s.Limit < 1 {
  2532. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  2533. }
  2534. if s.LogGroupName == nil {
  2535. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  2536. }
  2537. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  2538. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  2539. }
  2540. if s.LogStreamName == nil {
  2541. invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
  2542. }
  2543. if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
  2544. invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
  2545. }
  2546. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2547. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2548. }
  2549. if invalidParams.Len() > 0 {
  2550. return invalidParams
  2551. }
  2552. return nil
  2553. }
  2554. type GetLogEventsOutput struct {
  2555. _ struct{} `type:"structure"`
  2556. Events []*OutputLogEvent `locationName:"events" type:"list"`
  2557. // A string token used for pagination that points to the next page of results.
  2558. // It must be a value obtained from the response of the previous request. The
  2559. // token expires after 24 hours.
  2560. NextBackwardToken *string `locationName:"nextBackwardToken" min:"1" type:"string"`
  2561. // A string token used for pagination that points to the next page of results.
  2562. // It must be a value obtained from the response of the previous request. The
  2563. // token expires after 24 hours.
  2564. NextForwardToken *string `locationName:"nextForwardToken" min:"1" type:"string"`
  2565. }
  2566. // String returns the string representation
  2567. func (s GetLogEventsOutput) String() string {
  2568. return awsutil.Prettify(s)
  2569. }
  2570. // GoString returns the string representation
  2571. func (s GetLogEventsOutput) GoString() string {
  2572. return s.String()
  2573. }
  2574. // A log event is a record of some activity that was recorded by the application
  2575. // or resource being monitored. The log event record that CloudWatch Logs understands
  2576. // contains two properties: the timestamp of when the event occurred, and the
  2577. // raw event message.
  2578. type InputLogEvent struct {
  2579. _ struct{} `type:"structure"`
  2580. Message *string `locationName:"message" min:"1" type:"string" required:"true"`
  2581. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2582. // 00:00:00 UTC.
  2583. Timestamp *int64 `locationName:"timestamp" type:"long" required:"true"`
  2584. }
  2585. // String returns the string representation
  2586. func (s InputLogEvent) String() string {
  2587. return awsutil.Prettify(s)
  2588. }
  2589. // GoString returns the string representation
  2590. func (s InputLogEvent) GoString() string {
  2591. return s.String()
  2592. }
  2593. // Validate inspects the fields of the type to determine if they are valid.
  2594. func (s *InputLogEvent) Validate() error {
  2595. invalidParams := request.ErrInvalidParams{Context: "InputLogEvent"}
  2596. if s.Message == nil {
  2597. invalidParams.Add(request.NewErrParamRequired("Message"))
  2598. }
  2599. if s.Message != nil && len(*s.Message) < 1 {
  2600. invalidParams.Add(request.NewErrParamMinLen("Message", 1))
  2601. }
  2602. if s.Timestamp == nil {
  2603. invalidParams.Add(request.NewErrParamRequired("Timestamp"))
  2604. }
  2605. if invalidParams.Len() > 0 {
  2606. return invalidParams
  2607. }
  2608. return nil
  2609. }
  2610. type LogGroup struct {
  2611. _ struct{} `type:"structure"`
  2612. Arn *string `locationName:"arn" type:"string"`
  2613. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2614. // 00:00:00 UTC.
  2615. CreationTime *int64 `locationName:"creationTime" type:"long"`
  2616. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  2617. // The number of metric filters associated with the log group.
  2618. MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"`
  2619. // Specifies the number of days you want to retain log events in the specified
  2620. // log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180,
  2621. // 365, 400, 545, 731, 1827, 3653.
  2622. RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"`
  2623. StoredBytes *int64 `locationName:"storedBytes" type:"long"`
  2624. }
  2625. // String returns the string representation
  2626. func (s LogGroup) String() string {
  2627. return awsutil.Prettify(s)
  2628. }
  2629. // GoString returns the string representation
  2630. func (s LogGroup) GoString() string {
  2631. return s.String()
  2632. }
  2633. // A log stream is sequence of log events from a single emitter of logs.
  2634. type LogStream struct {
  2635. _ struct{} `type:"structure"`
  2636. Arn *string `locationName:"arn" type:"string"`
  2637. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2638. // 00:00:00 UTC.
  2639. CreationTime *int64 `locationName:"creationTime" type:"long"`
  2640. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2641. // 00:00:00 UTC.
  2642. FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"`
  2643. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2644. // 00:00:00 UTC.
  2645. LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"`
  2646. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2647. // 00:00:00 UTC.
  2648. LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"`
  2649. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
  2650. StoredBytes *int64 `locationName:"storedBytes" type:"long"`
  2651. // A string token used for making PutLogEvents requests. A sequenceToken can
  2652. // only be used once, and PutLogEvents requests must include the sequenceToken
  2653. // obtained from the response of the previous request.
  2654. UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"`
  2655. }
  2656. // String returns the string representation
  2657. func (s LogStream) String() string {
  2658. return awsutil.Prettify(s)
  2659. }
  2660. // GoString returns the string representation
  2661. func (s LogStream) GoString() string {
  2662. return s.String()
  2663. }
  2664. // Metric filters can be used to express how CloudWatch Logs would extract metric
  2665. // observations from ingested log events and transform them to metric data in
  2666. // a CloudWatch metric.
  2667. type MetricFilter struct {
  2668. _ struct{} `type:"structure"`
  2669. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2670. // 00:00:00 UTC.
  2671. CreationTime *int64 `locationName:"creationTime" type:"long"`
  2672. // A name for a metric or subscription filter.
  2673. FilterName *string `locationName:"filterName" min:"1" type:"string"`
  2674. // A symbolic description of how CloudWatch Logs should interpret the data in
  2675. // each log event. For example, a log event may contain timestamps, IP addresses,
  2676. // strings, and so on. You use the filter pattern to specify what to look for
  2677. // in the log event message.
  2678. FilterPattern *string `locationName:"filterPattern" type:"string"`
  2679. MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"`
  2680. }
  2681. // String returns the string representation
  2682. func (s MetricFilter) String() string {
  2683. return awsutil.Prettify(s)
  2684. }
  2685. // GoString returns the string representation
  2686. func (s MetricFilter) GoString() string {
  2687. return s.String()
  2688. }
  2689. type MetricFilterMatchRecord struct {
  2690. _ struct{} `type:"structure"`
  2691. EventMessage *string `locationName:"eventMessage" min:"1" type:"string"`
  2692. EventNumber *int64 `locationName:"eventNumber" type:"long"`
  2693. ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"`
  2694. }
  2695. // String returns the string representation
  2696. func (s MetricFilterMatchRecord) String() string {
  2697. return awsutil.Prettify(s)
  2698. }
  2699. // GoString returns the string representation
  2700. func (s MetricFilterMatchRecord) GoString() string {
  2701. return s.String()
  2702. }
  2703. type MetricTransformation struct {
  2704. _ struct{} `type:"structure"`
  2705. // (Optional) A default value to emit when a filter pattern does not match a
  2706. // log event. Can be null.
  2707. DefaultValue *float64 `locationName:"defaultValue" type:"double"`
  2708. // Name of the metric.
  2709. MetricName *string `locationName:"metricName" type:"string" required:"true"`
  2710. // Namespace to which the metric belongs.
  2711. MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"`
  2712. // A string representing a value to publish to this metric when a filter pattern
  2713. // matches a log event.
  2714. MetricValue *string `locationName:"metricValue" type:"string" required:"true"`
  2715. }
  2716. // String returns the string representation
  2717. func (s MetricTransformation) String() string {
  2718. return awsutil.Prettify(s)
  2719. }
  2720. // GoString returns the string representation
  2721. func (s MetricTransformation) GoString() string {
  2722. return s.String()
  2723. }
  2724. // Validate inspects the fields of the type to determine if they are valid.
  2725. func (s *MetricTransformation) Validate() error {
  2726. invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"}
  2727. if s.MetricName == nil {
  2728. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  2729. }
  2730. if s.MetricNamespace == nil {
  2731. invalidParams.Add(request.NewErrParamRequired("MetricNamespace"))
  2732. }
  2733. if s.MetricValue == nil {
  2734. invalidParams.Add(request.NewErrParamRequired("MetricValue"))
  2735. }
  2736. if invalidParams.Len() > 0 {
  2737. return invalidParams
  2738. }
  2739. return nil
  2740. }
  2741. type OutputLogEvent struct {
  2742. _ struct{} `type:"structure"`
  2743. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2744. // 00:00:00 UTC.
  2745. IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
  2746. Message *string `locationName:"message" min:"1" type:"string"`
  2747. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  2748. // 00:00:00 UTC.
  2749. Timestamp *int64 `locationName:"timestamp" type:"long"`
  2750. }
  2751. // String returns the string representation
  2752. func (s OutputLogEvent) String() string {
  2753. return awsutil.Prettify(s)
  2754. }
  2755. // GoString returns the string representation
  2756. func (s OutputLogEvent) GoString() string {
  2757. return s.String()
  2758. }
  2759. type PutDestinationInput struct {
  2760. _ struct{} `type:"structure"`
  2761. // A name for the destination.
  2762. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
  2763. // The ARN of an IAM role that grants CloudWatch Logs permissions to do Amazon
  2764. // Kinesis PutRecord requests on the destination stream.
  2765. RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"`
  2766. // The ARN of an Amazon Kinesis stream to deliver matching log events to.
  2767. TargetArn *string `locationName:"targetArn" min:"1" type:"string" required:"true"`
  2768. }
  2769. // String returns the string representation
  2770. func (s PutDestinationInput) String() string {
  2771. return awsutil.Prettify(s)
  2772. }
  2773. // GoString returns the string representation
  2774. func (s PutDestinationInput) GoString() string {
  2775. return s.String()
  2776. }
  2777. // Validate inspects the fields of the type to determine if they are valid.
  2778. func (s *PutDestinationInput) Validate() error {
  2779. invalidParams := request.ErrInvalidParams{Context: "PutDestinationInput"}
  2780. if s.DestinationName == nil {
  2781. invalidParams.Add(request.NewErrParamRequired("DestinationName"))
  2782. }
  2783. if s.DestinationName != nil && len(*s.DestinationName) < 1 {
  2784. invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
  2785. }
  2786. if s.RoleArn == nil {
  2787. invalidParams.Add(request.NewErrParamRequired("RoleArn"))
  2788. }
  2789. if s.RoleArn != nil && len(*s.RoleArn) < 1 {
  2790. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
  2791. }
  2792. if s.TargetArn == nil {
  2793. invalidParams.Add(request.NewErrParamRequired("TargetArn"))
  2794. }
  2795. if s.TargetArn != nil && len(*s.TargetArn) < 1 {
  2796. invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1))
  2797. }
  2798. if invalidParams.Len() > 0 {
  2799. return invalidParams
  2800. }
  2801. return nil
  2802. }
  2803. type PutDestinationOutput struct {
  2804. _ struct{} `type:"structure"`
  2805. // A cross account destination that is the recipient of subscription log events.
  2806. Destination *Destination `locationName:"destination" type:"structure"`
  2807. }
  2808. // String returns the string representation
  2809. func (s PutDestinationOutput) String() string {
  2810. return awsutil.Prettify(s)
  2811. }
  2812. // GoString returns the string representation
  2813. func (s PutDestinationOutput) GoString() string {
  2814. return s.String()
  2815. }
  2816. type PutDestinationPolicyInput struct {
  2817. _ struct{} `type:"structure"`
  2818. // An IAM policy document that authorizes cross-account users to deliver their
  2819. // log events to associated destination.
  2820. AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string" required:"true"`
  2821. // A name for an existing destination.
  2822. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"`
  2823. }
  2824. // String returns the string representation
  2825. func (s PutDestinationPolicyInput) String() string {
  2826. return awsutil.Prettify(s)
  2827. }
  2828. // GoString returns the string representation
  2829. func (s PutDestinationPolicyInput) GoString() string {
  2830. return s.String()
  2831. }
  2832. // Validate inspects the fields of the type to determine if they are valid.
  2833. func (s *PutDestinationPolicyInput) Validate() error {
  2834. invalidParams := request.ErrInvalidParams{Context: "PutDestinationPolicyInput"}
  2835. if s.AccessPolicy == nil {
  2836. invalidParams.Add(request.NewErrParamRequired("AccessPolicy"))
  2837. }
  2838. if s.AccessPolicy != nil && len(*s.AccessPolicy) < 1 {
  2839. invalidParams.Add(request.NewErrParamMinLen("AccessPolicy", 1))
  2840. }
  2841. if s.DestinationName == nil {
  2842. invalidParams.Add(request.NewErrParamRequired("DestinationName"))
  2843. }
  2844. if s.DestinationName != nil && len(*s.DestinationName) < 1 {
  2845. invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1))
  2846. }
  2847. if invalidParams.Len() > 0 {
  2848. return invalidParams
  2849. }
  2850. return nil
  2851. }
  2852. type PutDestinationPolicyOutput struct {
  2853. _ struct{} `type:"structure"`
  2854. }
  2855. // String returns the string representation
  2856. func (s PutDestinationPolicyOutput) String() string {
  2857. return awsutil.Prettify(s)
  2858. }
  2859. // GoString returns the string representation
  2860. func (s PutDestinationPolicyOutput) GoString() string {
  2861. return s.String()
  2862. }
  2863. type PutLogEventsInput struct {
  2864. _ struct{} `type:"structure"`
  2865. // A list of log events belonging to a log stream.
  2866. LogEvents []*InputLogEvent `locationName:"logEvents" min:"1" type:"list" required:"true"`
  2867. // The name of the log group to put log events to.
  2868. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  2869. // The name of the log stream to put log events to.
  2870. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"`
  2871. // A string token that must be obtained from the response of the previous PutLogEvents
  2872. // request.
  2873. SequenceToken *string `locationName:"sequenceToken" min:"1" type:"string"`
  2874. }
  2875. // String returns the string representation
  2876. func (s PutLogEventsInput) String() string {
  2877. return awsutil.Prettify(s)
  2878. }
  2879. // GoString returns the string representation
  2880. func (s PutLogEventsInput) GoString() string {
  2881. return s.String()
  2882. }
  2883. // Validate inspects the fields of the type to determine if they are valid.
  2884. func (s *PutLogEventsInput) Validate() error {
  2885. invalidParams := request.ErrInvalidParams{Context: "PutLogEventsInput"}
  2886. if s.LogEvents == nil {
  2887. invalidParams.Add(request.NewErrParamRequired("LogEvents"))
  2888. }
  2889. if s.LogEvents != nil && len(s.LogEvents) < 1 {
  2890. invalidParams.Add(request.NewErrParamMinLen("LogEvents", 1))
  2891. }
  2892. if s.LogGroupName == nil {
  2893. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  2894. }
  2895. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  2896. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  2897. }
  2898. if s.LogStreamName == nil {
  2899. invalidParams.Add(request.NewErrParamRequired("LogStreamName"))
  2900. }
  2901. if s.LogStreamName != nil && len(*s.LogStreamName) < 1 {
  2902. invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1))
  2903. }
  2904. if s.SequenceToken != nil && len(*s.SequenceToken) < 1 {
  2905. invalidParams.Add(request.NewErrParamMinLen("SequenceToken", 1))
  2906. }
  2907. if s.LogEvents != nil {
  2908. for i, v := range s.LogEvents {
  2909. if v == nil {
  2910. continue
  2911. }
  2912. if err := v.Validate(); err != nil {
  2913. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LogEvents", i), err.(request.ErrInvalidParams))
  2914. }
  2915. }
  2916. }
  2917. if invalidParams.Len() > 0 {
  2918. return invalidParams
  2919. }
  2920. return nil
  2921. }
  2922. type PutLogEventsOutput struct {
  2923. _ struct{} `type:"structure"`
  2924. // A string token used for making PutLogEvents requests. A sequenceToken can
  2925. // only be used once, and PutLogEvents requests must include the sequenceToken
  2926. // obtained from the response of the previous request.
  2927. NextSequenceToken *string `locationName:"nextSequenceToken" min:"1" type:"string"`
  2928. RejectedLogEventsInfo *RejectedLogEventsInfo `locationName:"rejectedLogEventsInfo" type:"structure"`
  2929. }
  2930. // String returns the string representation
  2931. func (s PutLogEventsOutput) String() string {
  2932. return awsutil.Prettify(s)
  2933. }
  2934. // GoString returns the string representation
  2935. func (s PutLogEventsOutput) GoString() string {
  2936. return s.String()
  2937. }
  2938. type PutMetricFilterInput struct {
  2939. _ struct{} `type:"structure"`
  2940. // A name for the metric filter.
  2941. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
  2942. // A valid CloudWatch Logs filter pattern for extracting metric data out of
  2943. // ingested log events.
  2944. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  2945. // The name of the log group to associate the metric filter with.
  2946. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  2947. // A collection of information needed to define how metric data gets emitted.
  2948. MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list" required:"true"`
  2949. }
  2950. // String returns the string representation
  2951. func (s PutMetricFilterInput) String() string {
  2952. return awsutil.Prettify(s)
  2953. }
  2954. // GoString returns the string representation
  2955. func (s PutMetricFilterInput) GoString() string {
  2956. return s.String()
  2957. }
  2958. // Validate inspects the fields of the type to determine if they are valid.
  2959. func (s *PutMetricFilterInput) Validate() error {
  2960. invalidParams := request.ErrInvalidParams{Context: "PutMetricFilterInput"}
  2961. if s.FilterName == nil {
  2962. invalidParams.Add(request.NewErrParamRequired("FilterName"))
  2963. }
  2964. if s.FilterName != nil && len(*s.FilterName) < 1 {
  2965. invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
  2966. }
  2967. if s.FilterPattern == nil {
  2968. invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
  2969. }
  2970. if s.LogGroupName == nil {
  2971. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  2972. }
  2973. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  2974. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  2975. }
  2976. if s.MetricTransformations == nil {
  2977. invalidParams.Add(request.NewErrParamRequired("MetricTransformations"))
  2978. }
  2979. if s.MetricTransformations != nil && len(s.MetricTransformations) < 1 {
  2980. invalidParams.Add(request.NewErrParamMinLen("MetricTransformations", 1))
  2981. }
  2982. if s.MetricTransformations != nil {
  2983. for i, v := range s.MetricTransformations {
  2984. if v == nil {
  2985. continue
  2986. }
  2987. if err := v.Validate(); err != nil {
  2988. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricTransformations", i), err.(request.ErrInvalidParams))
  2989. }
  2990. }
  2991. }
  2992. if invalidParams.Len() > 0 {
  2993. return invalidParams
  2994. }
  2995. return nil
  2996. }
  2997. type PutMetricFilterOutput struct {
  2998. _ struct{} `type:"structure"`
  2999. }
  3000. // String returns the string representation
  3001. func (s PutMetricFilterOutput) String() string {
  3002. return awsutil.Prettify(s)
  3003. }
  3004. // GoString returns the string representation
  3005. func (s PutMetricFilterOutput) GoString() string {
  3006. return s.String()
  3007. }
  3008. type PutRetentionPolicyInput struct {
  3009. _ struct{} `type:"structure"`
  3010. // The name of the log group to associate the retention policy with.
  3011. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  3012. // Specifies the number of days you want to retain log events in the specified
  3013. // log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180,
  3014. // 365, 400, 545, 731, 1827, 3653.
  3015. RetentionInDays *int64 `locationName:"retentionInDays" type:"integer" required:"true"`
  3016. }
  3017. // String returns the string representation
  3018. func (s PutRetentionPolicyInput) String() string {
  3019. return awsutil.Prettify(s)
  3020. }
  3021. // GoString returns the string representation
  3022. func (s PutRetentionPolicyInput) GoString() string {
  3023. return s.String()
  3024. }
  3025. // Validate inspects the fields of the type to determine if they are valid.
  3026. func (s *PutRetentionPolicyInput) Validate() error {
  3027. invalidParams := request.ErrInvalidParams{Context: "PutRetentionPolicyInput"}
  3028. if s.LogGroupName == nil {
  3029. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  3030. }
  3031. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  3032. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  3033. }
  3034. if s.RetentionInDays == nil {
  3035. invalidParams.Add(request.NewErrParamRequired("RetentionInDays"))
  3036. }
  3037. if invalidParams.Len() > 0 {
  3038. return invalidParams
  3039. }
  3040. return nil
  3041. }
  3042. type PutRetentionPolicyOutput struct {
  3043. _ struct{} `type:"structure"`
  3044. }
  3045. // String returns the string representation
  3046. func (s PutRetentionPolicyOutput) String() string {
  3047. return awsutil.Prettify(s)
  3048. }
  3049. // GoString returns the string representation
  3050. func (s PutRetentionPolicyOutput) GoString() string {
  3051. return s.String()
  3052. }
  3053. type PutSubscriptionFilterInput struct {
  3054. _ struct{} `type:"structure"`
  3055. // The ARN of the destination to deliver matching log events to. Currently,
  3056. // the supported destinations are:
  3057. //
  3058. // An Amazon Kinesis stream belonging to the same account as the subscription
  3059. // filter, for same-account delivery.
  3060. //
  3061. // A logical destination (used via an ARN of Destination) belonging to a
  3062. // different account, for cross-account delivery.
  3063. //
  3064. // An Amazon Kinesis Firehose stream belonging to the same account as the
  3065. // subscription filter, for same-account delivery.
  3066. //
  3067. // An AWS Lambda function belonging to the same account as the subscription
  3068. // filter, for same-account delivery.
  3069. DestinationArn *string `locationName:"destinationArn" min:"1" type:"string" required:"true"`
  3070. // A name for the subscription filter.
  3071. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"`
  3072. // A valid CloudWatch Logs filter pattern for subscribing to a filtered stream
  3073. // of log events.
  3074. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  3075. // The name of the log group to associate the subscription filter with.
  3076. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"`
  3077. // The ARN of an IAM role that grants CloudWatch Logs permissions to deliver
  3078. // ingested log events to the destination stream. You don't need to provide
  3079. // the ARN when you are working with a logical destination (used via an ARN
  3080. // of Destination) for cross-account delivery.
  3081. RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
  3082. }
  3083. // String returns the string representation
  3084. func (s PutSubscriptionFilterInput) String() string {
  3085. return awsutil.Prettify(s)
  3086. }
  3087. // GoString returns the string representation
  3088. func (s PutSubscriptionFilterInput) GoString() string {
  3089. return s.String()
  3090. }
  3091. // Validate inspects the fields of the type to determine if they are valid.
  3092. func (s *PutSubscriptionFilterInput) Validate() error {
  3093. invalidParams := request.ErrInvalidParams{Context: "PutSubscriptionFilterInput"}
  3094. if s.DestinationArn == nil {
  3095. invalidParams.Add(request.NewErrParamRequired("DestinationArn"))
  3096. }
  3097. if s.DestinationArn != nil && len(*s.DestinationArn) < 1 {
  3098. invalidParams.Add(request.NewErrParamMinLen("DestinationArn", 1))
  3099. }
  3100. if s.FilterName == nil {
  3101. invalidParams.Add(request.NewErrParamRequired("FilterName"))
  3102. }
  3103. if s.FilterName != nil && len(*s.FilterName) < 1 {
  3104. invalidParams.Add(request.NewErrParamMinLen("FilterName", 1))
  3105. }
  3106. if s.FilterPattern == nil {
  3107. invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
  3108. }
  3109. if s.LogGroupName == nil {
  3110. invalidParams.Add(request.NewErrParamRequired("LogGroupName"))
  3111. }
  3112. if s.LogGroupName != nil && len(*s.LogGroupName) < 1 {
  3113. invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1))
  3114. }
  3115. if s.RoleArn != nil && len(*s.RoleArn) < 1 {
  3116. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
  3117. }
  3118. if invalidParams.Len() > 0 {
  3119. return invalidParams
  3120. }
  3121. return nil
  3122. }
  3123. type PutSubscriptionFilterOutput struct {
  3124. _ struct{} `type:"structure"`
  3125. }
  3126. // String returns the string representation
  3127. func (s PutSubscriptionFilterOutput) String() string {
  3128. return awsutil.Prettify(s)
  3129. }
  3130. // GoString returns the string representation
  3131. func (s PutSubscriptionFilterOutput) GoString() string {
  3132. return s.String()
  3133. }
  3134. type RejectedLogEventsInfo struct {
  3135. _ struct{} `type:"structure"`
  3136. ExpiredLogEventEndIndex *int64 `locationName:"expiredLogEventEndIndex" type:"integer"`
  3137. TooNewLogEventStartIndex *int64 `locationName:"tooNewLogEventStartIndex" type:"integer"`
  3138. TooOldLogEventEndIndex *int64 `locationName:"tooOldLogEventEndIndex" type:"integer"`
  3139. }
  3140. // String returns the string representation
  3141. func (s RejectedLogEventsInfo) String() string {
  3142. return awsutil.Prettify(s)
  3143. }
  3144. // GoString returns the string representation
  3145. func (s RejectedLogEventsInfo) GoString() string {
  3146. return s.String()
  3147. }
  3148. // An object indicating the search status of a log stream in a FilterLogEvents
  3149. // request.
  3150. type SearchedLogStream struct {
  3151. _ struct{} `type:"structure"`
  3152. // The name of the log stream.
  3153. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"`
  3154. // Indicates whether all the events in this log stream were searched or more
  3155. // data exists to search by paginating further.
  3156. SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"`
  3157. }
  3158. // String returns the string representation
  3159. func (s SearchedLogStream) String() string {
  3160. return awsutil.Prettify(s)
  3161. }
  3162. // GoString returns the string representation
  3163. func (s SearchedLogStream) GoString() string {
  3164. return s.String()
  3165. }
  3166. type SubscriptionFilter struct {
  3167. _ struct{} `type:"structure"`
  3168. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  3169. // 00:00:00 UTC.
  3170. CreationTime *int64 `locationName:"creationTime" type:"long"`
  3171. DestinationArn *string `locationName:"destinationArn" min:"1" type:"string"`
  3172. // A name for a metric or subscription filter.
  3173. FilterName *string `locationName:"filterName" min:"1" type:"string"`
  3174. // A symbolic description of how CloudWatch Logs should interpret the data in
  3175. // each log event. For example, a log event may contain timestamps, IP addresses,
  3176. // strings, and so on. You use the filter pattern to specify what to look for
  3177. // in the log event message.
  3178. FilterPattern *string `locationName:"filterPattern" type:"string"`
  3179. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`
  3180. RoleArn *string `locationName:"roleArn" min:"1" type:"string"`
  3181. }
  3182. // String returns the string representation
  3183. func (s SubscriptionFilter) String() string {
  3184. return awsutil.Prettify(s)
  3185. }
  3186. // GoString returns the string representation
  3187. func (s SubscriptionFilter) GoString() string {
  3188. return s.String()
  3189. }
  3190. type TestMetricFilterInput struct {
  3191. _ struct{} `type:"structure"`
  3192. // A symbolic description of how CloudWatch Logs should interpret the data in
  3193. // each log event. For example, a log event may contain timestamps, IP addresses,
  3194. // strings, and so on. You use the filter pattern to specify what to look for
  3195. // in the log event message.
  3196. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  3197. // A list of log event messages to test.
  3198. LogEventMessages []*string `locationName:"logEventMessages" min:"1" type:"list" required:"true"`
  3199. }
  3200. // String returns the string representation
  3201. func (s TestMetricFilterInput) String() string {
  3202. return awsutil.Prettify(s)
  3203. }
  3204. // GoString returns the string representation
  3205. func (s TestMetricFilterInput) GoString() string {
  3206. return s.String()
  3207. }
  3208. // Validate inspects the fields of the type to determine if they are valid.
  3209. func (s *TestMetricFilterInput) Validate() error {
  3210. invalidParams := request.ErrInvalidParams{Context: "TestMetricFilterInput"}
  3211. if s.FilterPattern == nil {
  3212. invalidParams.Add(request.NewErrParamRequired("FilterPattern"))
  3213. }
  3214. if s.LogEventMessages == nil {
  3215. invalidParams.Add(request.NewErrParamRequired("LogEventMessages"))
  3216. }
  3217. if s.LogEventMessages != nil && len(s.LogEventMessages) < 1 {
  3218. invalidParams.Add(request.NewErrParamMinLen("LogEventMessages", 1))
  3219. }
  3220. if invalidParams.Len() > 0 {
  3221. return invalidParams
  3222. }
  3223. return nil
  3224. }
  3225. type TestMetricFilterOutput struct {
  3226. _ struct{} `type:"structure"`
  3227. Matches []*MetricFilterMatchRecord `locationName:"matches" type:"list"`
  3228. }
  3229. // String returns the string representation
  3230. func (s TestMetricFilterOutput) String() string {
  3231. return awsutil.Prettify(s)
  3232. }
  3233. // GoString returns the string representation
  3234. func (s TestMetricFilterOutput) GoString() string {
  3235. return s.String()
  3236. }
  3237. const (
  3238. // @enum ExportTaskStatusCode
  3239. ExportTaskStatusCodeCancelled = "CANCELLED"
  3240. // @enum ExportTaskStatusCode
  3241. ExportTaskStatusCodeCompleted = "COMPLETED"
  3242. // @enum ExportTaskStatusCode
  3243. ExportTaskStatusCodeFailed = "FAILED"
  3244. // @enum ExportTaskStatusCode
  3245. ExportTaskStatusCodePending = "PENDING"
  3246. // @enum ExportTaskStatusCode
  3247. ExportTaskStatusCodePendingCancel = "PENDING_CANCEL"
  3248. // @enum ExportTaskStatusCode
  3249. ExportTaskStatusCodeRunning = "RUNNING"
  3250. )
  3251. const (
  3252. // @enum OrderBy
  3253. OrderByLogStreamName = "LogStreamName"
  3254. // @enum OrderBy
  3255. OrderByLastEventTime = "LastEventTime"
  3256. )