api.go 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332
  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. "github.com/aws/aws-sdk-go/aws/awsutil"
  6. "github.com/aws/aws-sdk-go/aws/request"
  7. )
  8. const opCreateLogGroup = "CreateLogGroup"
  9. // CreateLogGroupRequest generates a request for the CreateLogGroup operation.
  10. func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput) {
  11. op := &request.Operation{
  12. Name: opCreateLogGroup,
  13. HTTPMethod: "POST",
  14. HTTPPath: "/",
  15. }
  16. if input == nil {
  17. input = &CreateLogGroupInput{}
  18. }
  19. req = c.newRequest(op, input, output)
  20. output = &CreateLogGroupOutput{}
  21. req.Data = output
  22. return
  23. }
  24. // Creates a new log group with the specified name. The name of the log group
  25. // must be unique within a region for an AWS account. You can create up to 500
  26. // log groups per account.
  27. //
  28. // You must use the following guidelines when naming a log group: Log group
  29. // names can be between 1 and 512 characters long. Allowed characters are a-z,
  30. // A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).
  31. func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error) {
  32. req, out := c.CreateLogGroupRequest(input)
  33. err := req.Send()
  34. return out, err
  35. }
  36. const opCreateLogStream = "CreateLogStream"
  37. // CreateLogStreamRequest generates a request for the CreateLogStream operation.
  38. func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput) {
  39. op := &request.Operation{
  40. Name: opCreateLogStream,
  41. HTTPMethod: "POST",
  42. HTTPPath: "/",
  43. }
  44. if input == nil {
  45. input = &CreateLogStreamInput{}
  46. }
  47. req = c.newRequest(op, input, output)
  48. output = &CreateLogStreamOutput{}
  49. req.Data = output
  50. return
  51. }
  52. // Creates a new log stream in the specified log group. The name of the log
  53. // stream must be unique within the log group. There is no limit on the number
  54. // of log streams that can exist in a log group.
  55. //
  56. // You must use the following guidelines when naming a log stream: Log stream
  57. // names can be between 1 and 512 characters long. The ':' colon character is
  58. // not allowed.
  59. func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error) {
  60. req, out := c.CreateLogStreamRequest(input)
  61. err := req.Send()
  62. return out, err
  63. }
  64. const opDeleteDestination = "DeleteDestination"
  65. // DeleteDestinationRequest generates a request for the DeleteDestination operation.
  66. func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) {
  67. op := &request.Operation{
  68. Name: opDeleteDestination,
  69. HTTPMethod: "POST",
  70. HTTPPath: "/",
  71. }
  72. if input == nil {
  73. input = &DeleteDestinationInput{}
  74. }
  75. req = c.newRequest(op, input, output)
  76. output = &DeleteDestinationOutput{}
  77. req.Data = output
  78. return
  79. }
  80. // Deletes the destination with the specified name and eventually disables all
  81. // the subscription filters that publish to it. This will not delete the physical
  82. // resource encapsulated by the destination.
  83. func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) {
  84. req, out := c.DeleteDestinationRequest(input)
  85. err := req.Send()
  86. return out, err
  87. }
  88. const opDeleteLogGroup = "DeleteLogGroup"
  89. // DeleteLogGroupRequest generates a request for the DeleteLogGroup operation.
  90. func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) {
  91. op := &request.Operation{
  92. Name: opDeleteLogGroup,
  93. HTTPMethod: "POST",
  94. HTTPPath: "/",
  95. }
  96. if input == nil {
  97. input = &DeleteLogGroupInput{}
  98. }
  99. req = c.newRequest(op, input, output)
  100. output = &DeleteLogGroupOutput{}
  101. req.Data = output
  102. return
  103. }
  104. // Deletes the log group with the specified name and permanently deletes all
  105. // the archived log events associated with it.
  106. func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) {
  107. req, out := c.DeleteLogGroupRequest(input)
  108. err := req.Send()
  109. return out, err
  110. }
  111. const opDeleteLogStream = "DeleteLogStream"
  112. // DeleteLogStreamRequest generates a request for the DeleteLogStream operation.
  113. func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) {
  114. op := &request.Operation{
  115. Name: opDeleteLogStream,
  116. HTTPMethod: "POST",
  117. HTTPPath: "/",
  118. }
  119. if input == nil {
  120. input = &DeleteLogStreamInput{}
  121. }
  122. req = c.newRequest(op, input, output)
  123. output = &DeleteLogStreamOutput{}
  124. req.Data = output
  125. return
  126. }
  127. // Deletes a log stream and permanently deletes all the archived log events
  128. // associated with it.
  129. func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) {
  130. req, out := c.DeleteLogStreamRequest(input)
  131. err := req.Send()
  132. return out, err
  133. }
  134. const opDeleteMetricFilter = "DeleteMetricFilter"
  135. // DeleteMetricFilterRequest generates a request for the DeleteMetricFilter operation.
  136. func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) {
  137. op := &request.Operation{
  138. Name: opDeleteMetricFilter,
  139. HTTPMethod: "POST",
  140. HTTPPath: "/",
  141. }
  142. if input == nil {
  143. input = &DeleteMetricFilterInput{}
  144. }
  145. req = c.newRequest(op, input, output)
  146. output = &DeleteMetricFilterOutput{}
  147. req.Data = output
  148. return
  149. }
  150. // Deletes a metric filter associated with the specified log group.
  151. func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) {
  152. req, out := c.DeleteMetricFilterRequest(input)
  153. err := req.Send()
  154. return out, err
  155. }
  156. const opDeleteRetentionPolicy = "DeleteRetentionPolicy"
  157. // DeleteRetentionPolicyRequest generates a request for the DeleteRetentionPolicy operation.
  158. func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) {
  159. op := &request.Operation{
  160. Name: opDeleteRetentionPolicy,
  161. HTTPMethod: "POST",
  162. HTTPPath: "/",
  163. }
  164. if input == nil {
  165. input = &DeleteRetentionPolicyInput{}
  166. }
  167. req = c.newRequest(op, input, output)
  168. output = &DeleteRetentionPolicyOutput{}
  169. req.Data = output
  170. return
  171. }
  172. // Deletes the retention policy of the specified log group. Log events would
  173. // not expire if they belong to log groups without a retention policy.
  174. func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) {
  175. req, out := c.DeleteRetentionPolicyRequest(input)
  176. err := req.Send()
  177. return out, err
  178. }
  179. const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter"
  180. // DeleteSubscriptionFilterRequest generates a request for the DeleteSubscriptionFilter operation.
  181. func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) {
  182. op := &request.Operation{
  183. Name: opDeleteSubscriptionFilter,
  184. HTTPMethod: "POST",
  185. HTTPPath: "/",
  186. }
  187. if input == nil {
  188. input = &DeleteSubscriptionFilterInput{}
  189. }
  190. req = c.newRequest(op, input, output)
  191. output = &DeleteSubscriptionFilterOutput{}
  192. req.Data = output
  193. return
  194. }
  195. // Deletes a subscription filter associated with the specified log group.
  196. func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) {
  197. req, out := c.DeleteSubscriptionFilterRequest(input)
  198. err := req.Send()
  199. return out, err
  200. }
  201. const opDescribeDestinations = "DescribeDestinations"
  202. // DescribeDestinationsRequest generates a request for the DescribeDestinations operation.
  203. func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) {
  204. op := &request.Operation{
  205. Name: opDescribeDestinations,
  206. HTTPMethod: "POST",
  207. HTTPPath: "/",
  208. Paginator: &request.Paginator{
  209. InputTokens: []string{"nextToken"},
  210. OutputTokens: []string{"nextToken"},
  211. LimitToken: "limit",
  212. TruncationToken: "",
  213. },
  214. }
  215. if input == nil {
  216. input = &DescribeDestinationsInput{}
  217. }
  218. req = c.newRequest(op, input, output)
  219. output = &DescribeDestinationsOutput{}
  220. req.Data = output
  221. return
  222. }
  223. // Returns all the destinations that are associated with the AWS account making
  224. // the request. The list returned in the response is ASCII-sorted by destination
  225. // name.
  226. //
  227. // By default, this operation returns up to 50 destinations. If there are
  228. // more destinations to list, the response would contain a nextToken value in
  229. // the response body. You can also limit the number of destinations returned
  230. // in the response by specifying the limit parameter in the request.
  231. func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) {
  232. req, out := c.DescribeDestinationsRequest(input)
  233. err := req.Send()
  234. return out, err
  235. }
  236. func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(p *DescribeDestinationsOutput, lastPage bool) (shouldContinue bool)) error {
  237. page, _ := c.DescribeDestinationsRequest(input)
  238. return page.EachPage(func(p interface{}, lastPage bool) bool {
  239. return fn(p.(*DescribeDestinationsOutput), lastPage)
  240. })
  241. }
  242. const opDescribeLogGroups = "DescribeLogGroups"
  243. // DescribeLogGroupsRequest generates a request for the DescribeLogGroups operation.
  244. func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) {
  245. op := &request.Operation{
  246. Name: opDescribeLogGroups,
  247. HTTPMethod: "POST",
  248. HTTPPath: "/",
  249. Paginator: &request.Paginator{
  250. InputTokens: []string{"nextToken"},
  251. OutputTokens: []string{"nextToken"},
  252. LimitToken: "limit",
  253. TruncationToken: "",
  254. },
  255. }
  256. if input == nil {
  257. input = &DescribeLogGroupsInput{}
  258. }
  259. req = c.newRequest(op, input, output)
  260. output = &DescribeLogGroupsOutput{}
  261. req.Data = output
  262. return
  263. }
  264. // Returns all the log groups that are associated with the AWS account making
  265. // the request. The list returned in the response is ASCII-sorted by log group
  266. // name.
  267. //
  268. // By default, this operation returns up to 50 log groups. If there are more
  269. // log groups to list, the response would contain a nextToken value in the response
  270. // body. You can also limit the number of log groups returned in the response
  271. // by specifying the limit parameter in the request.
  272. func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) {
  273. req, out := c.DescribeLogGroupsRequest(input)
  274. err := req.Send()
  275. return out, err
  276. }
  277. func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(p *DescribeLogGroupsOutput, lastPage bool) (shouldContinue bool)) error {
  278. page, _ := c.DescribeLogGroupsRequest(input)
  279. return page.EachPage(func(p interface{}, lastPage bool) bool {
  280. return fn(p.(*DescribeLogGroupsOutput), lastPage)
  281. })
  282. }
  283. const opDescribeLogStreams = "DescribeLogStreams"
  284. // DescribeLogStreamsRequest generates a request for the DescribeLogStreams operation.
  285. func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) {
  286. op := &request.Operation{
  287. Name: opDescribeLogStreams,
  288. HTTPMethod: "POST",
  289. HTTPPath: "/",
  290. Paginator: &request.Paginator{
  291. InputTokens: []string{"nextToken"},
  292. OutputTokens: []string{"nextToken"},
  293. LimitToken: "limit",
  294. TruncationToken: "",
  295. },
  296. }
  297. if input == nil {
  298. input = &DescribeLogStreamsInput{}
  299. }
  300. req = c.newRequest(op, input, output)
  301. output = &DescribeLogStreamsOutput{}
  302. req.Data = output
  303. return
  304. }
  305. // Returns all the log streams that are associated with the specified log group.
  306. // The list returned in the response is ASCII-sorted by log stream name.
  307. //
  308. // By default, this operation returns up to 50 log streams. If there are more
  309. // log streams to list, the response would contain a nextToken value in the
  310. // response body. You can also limit the number of log streams returned in the
  311. // response by specifying the limit parameter in the request. This operation
  312. // has a limit of five transactions per second, after which transactions are
  313. // throttled.
  314. func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) {
  315. req, out := c.DescribeLogStreamsRequest(input)
  316. err := req.Send()
  317. return out, err
  318. }
  319. func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(p *DescribeLogStreamsOutput, lastPage bool) (shouldContinue bool)) error {
  320. page, _ := c.DescribeLogStreamsRequest(input)
  321. return page.EachPage(func(p interface{}, lastPage bool) bool {
  322. return fn(p.(*DescribeLogStreamsOutput), lastPage)
  323. })
  324. }
  325. const opDescribeMetricFilters = "DescribeMetricFilters"
  326. // DescribeMetricFiltersRequest generates a request for the DescribeMetricFilters operation.
  327. func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) {
  328. op := &request.Operation{
  329. Name: opDescribeMetricFilters,
  330. HTTPMethod: "POST",
  331. HTTPPath: "/",
  332. Paginator: &request.Paginator{
  333. InputTokens: []string{"nextToken"},
  334. OutputTokens: []string{"nextToken"},
  335. LimitToken: "limit",
  336. TruncationToken: "",
  337. },
  338. }
  339. if input == nil {
  340. input = &DescribeMetricFiltersInput{}
  341. }
  342. req = c.newRequest(op, input, output)
  343. output = &DescribeMetricFiltersOutput{}
  344. req.Data = output
  345. return
  346. }
  347. // Returns all the metrics filters associated with the specified log group.
  348. // The list returned in the response is ASCII-sorted by filter name.
  349. //
  350. // By default, this operation returns up to 50 metric filters. If there are
  351. // more metric filters to list, the response would contain a nextToken value
  352. // in the response body. You can also limit the number of metric filters returned
  353. // in the response by specifying the limit parameter in the request.
  354. func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) {
  355. req, out := c.DescribeMetricFiltersRequest(input)
  356. err := req.Send()
  357. return out, err
  358. }
  359. func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(p *DescribeMetricFiltersOutput, lastPage bool) (shouldContinue bool)) error {
  360. page, _ := c.DescribeMetricFiltersRequest(input)
  361. return page.EachPage(func(p interface{}, lastPage bool) bool {
  362. return fn(p.(*DescribeMetricFiltersOutput), lastPage)
  363. })
  364. }
  365. const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters"
  366. // DescribeSubscriptionFiltersRequest generates a request for the DescribeSubscriptionFilters operation.
  367. func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) {
  368. op := &request.Operation{
  369. Name: opDescribeSubscriptionFilters,
  370. HTTPMethod: "POST",
  371. HTTPPath: "/",
  372. Paginator: &request.Paginator{
  373. InputTokens: []string{"nextToken"},
  374. OutputTokens: []string{"nextToken"},
  375. LimitToken: "limit",
  376. TruncationToken: "",
  377. },
  378. }
  379. if input == nil {
  380. input = &DescribeSubscriptionFiltersInput{}
  381. }
  382. req = c.newRequest(op, input, output)
  383. output = &DescribeSubscriptionFiltersOutput{}
  384. req.Data = output
  385. return
  386. }
  387. // Returns all the subscription filters associated with the specified log group.
  388. // The list returned in the response is ASCII-sorted by filter name.
  389. //
  390. // By default, this operation returns up to 50 subscription filters. If there
  391. // are more subscription filters to list, the response would contain a nextToken
  392. // value in the response body. You can also limit the number of subscription
  393. // filters returned in the response by specifying the limit parameter in the
  394. // request.
  395. func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) {
  396. req, out := c.DescribeSubscriptionFiltersRequest(input)
  397. err := req.Send()
  398. return out, err
  399. }
  400. func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(p *DescribeSubscriptionFiltersOutput, lastPage bool) (shouldContinue bool)) error {
  401. page, _ := c.DescribeSubscriptionFiltersRequest(input)
  402. return page.EachPage(func(p interface{}, lastPage bool) bool {
  403. return fn(p.(*DescribeSubscriptionFiltersOutput), lastPage)
  404. })
  405. }
  406. const opFilterLogEvents = "FilterLogEvents"
  407. // FilterLogEventsRequest generates a request for the FilterLogEvents operation.
  408. func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) {
  409. op := &request.Operation{
  410. Name: opFilterLogEvents,
  411. HTTPMethod: "POST",
  412. HTTPPath: "/",
  413. Paginator: &request.Paginator{
  414. InputTokens: []string{"nextToken"},
  415. OutputTokens: []string{"nextToken"},
  416. LimitToken: "limit",
  417. TruncationToken: "",
  418. },
  419. }
  420. if input == nil {
  421. input = &FilterLogEventsInput{}
  422. }
  423. req = c.newRequest(op, input, output)
  424. output = &FilterLogEventsOutput{}
  425. req.Data = output
  426. return
  427. }
  428. // Retrieves log events, optionally filtered by a filter pattern from the specified
  429. // log group. You can provide an optional time range to filter the results on
  430. // the event timestamp. You can limit the streams searched to an explicit list
  431. // of logStreamNames.
  432. //
  433. // By default, this operation returns as much matching log events as can fit
  434. // in a response size of 1MB, up to 10,000 log events, or all the events found
  435. // within a time-bounded scan window. If the response includes a nextToken,
  436. // then there is more data to search, and the search can be resumed with a new
  437. // request providing the nextToken. The response will contain a list of searchedLogStreams
  438. // that contains information about which streams were searched in the request
  439. // and whether they have been searched completely or require further pagination.
  440. // The limit parameter in the request. can be used to specify the maximum number
  441. // of events to return in a page.
  442. func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) {
  443. req, out := c.FilterLogEventsRequest(input)
  444. err := req.Send()
  445. return out, err
  446. }
  447. func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(p *FilterLogEventsOutput, lastPage bool) (shouldContinue bool)) error {
  448. page, _ := c.FilterLogEventsRequest(input)
  449. return page.EachPage(func(p interface{}, lastPage bool) bool {
  450. return fn(p.(*FilterLogEventsOutput), lastPage)
  451. })
  452. }
  453. const opGetLogEvents = "GetLogEvents"
  454. // GetLogEventsRequest generates a request for the GetLogEvents operation.
  455. func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) {
  456. op := &request.Operation{
  457. Name: opGetLogEvents,
  458. HTTPMethod: "POST",
  459. HTTPPath: "/",
  460. Paginator: &request.Paginator{
  461. InputTokens: []string{"nextToken"},
  462. OutputTokens: []string{"nextForwardToken"},
  463. LimitToken: "limit",
  464. TruncationToken: "",
  465. },
  466. }
  467. if input == nil {
  468. input = &GetLogEventsInput{}
  469. }
  470. req = c.newRequest(op, input, output)
  471. output = &GetLogEventsOutput{}
  472. req.Data = output
  473. return
  474. }
  475. // Retrieves log events from the specified log stream. You can provide an optional
  476. // time range to filter the results on the event timestamp.
  477. //
  478. // By default, this operation returns as much log events as can fit in a response
  479. // size of 1MB, up to 10,000 log events. The response will always include a
  480. // nextForwardToken and a nextBackwardToken in the response body. You can use
  481. // any of these tokens in subsequent GetLogEvents requests to paginate through
  482. // events in either forward or backward direction. You can also limit the number
  483. // of log events returned in the response by specifying the limit parameter
  484. // in the request.
  485. func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) {
  486. req, out := c.GetLogEventsRequest(input)
  487. err := req.Send()
  488. return out, err
  489. }
  490. func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(p *GetLogEventsOutput, lastPage bool) (shouldContinue bool)) error {
  491. page, _ := c.GetLogEventsRequest(input)
  492. return page.EachPage(func(p interface{}, lastPage bool) bool {
  493. return fn(p.(*GetLogEventsOutput), lastPage)
  494. })
  495. }
  496. const opPutDestination = "PutDestination"
  497. // PutDestinationRequest generates a request for the PutDestination operation.
  498. func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) {
  499. op := &request.Operation{
  500. Name: opPutDestination,
  501. HTTPMethod: "POST",
  502. HTTPPath: "/",
  503. }
  504. if input == nil {
  505. input = &PutDestinationInput{}
  506. }
  507. req = c.newRequest(op, input, output)
  508. output = &PutDestinationOutput{}
  509. req.Data = output
  510. return
  511. }
  512. // Creates or updates a Destination. A destination encapsulates a physical resource
  513. // (such as a Kinesis stream) and allows you to subscribe to a real-time stream
  514. // of log events of a different account, ingested through PutLogEvents requests.
  515. // Currently, the only supported physical resource is a Amazon Kinesis stream
  516. // belonging to the same account as the destination.
  517. //
  518. // A destination controls what is written to its Amazon Kinesis stream through
  519. // an access policy. By default, PutDestination does not set any access policy
  520. // with the destination, which means a cross-account user will not be able to
  521. // call PutSubscriptionFilter against this destination. To enable that, the
  522. // destination owner must call PutDestinationPolicy after PutDestination.
  523. func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) {
  524. req, out := c.PutDestinationRequest(input)
  525. err := req.Send()
  526. return out, err
  527. }
  528. const opPutDestinationPolicy = "PutDestinationPolicy"
  529. // PutDestinationPolicyRequest generates a request for the PutDestinationPolicy operation.
  530. func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) {
  531. op := &request.Operation{
  532. Name: opPutDestinationPolicy,
  533. HTTPMethod: "POST",
  534. HTTPPath: "/",
  535. }
  536. if input == nil {
  537. input = &PutDestinationPolicyInput{}
  538. }
  539. req = c.newRequest(op, input, output)
  540. output = &PutDestinationPolicyOutput{}
  541. req.Data = output
  542. return
  543. }
  544. // Creates or updates an access policy associated with an existing Destination.
  545. // An access policy is an IAM policy document (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html)
  546. // that is used to authorize claims to register a subscription filter against
  547. // a given destination.
  548. func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) {
  549. req, out := c.PutDestinationPolicyRequest(input)
  550. err := req.Send()
  551. return out, err
  552. }
  553. const opPutLogEvents = "PutLogEvents"
  554. // PutLogEventsRequest generates a request for the PutLogEvents operation.
  555. func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) {
  556. op := &request.Operation{
  557. Name: opPutLogEvents,
  558. HTTPMethod: "POST",
  559. HTTPPath: "/",
  560. }
  561. if input == nil {
  562. input = &PutLogEventsInput{}
  563. }
  564. req = c.newRequest(op, input, output)
  565. output = &PutLogEventsOutput{}
  566. req.Data = output
  567. return
  568. }
  569. // Uploads a batch of log events to the specified log stream.
  570. //
  571. // Every PutLogEvents request must include the sequenceToken obtained from
  572. // the response of the previous request. An upload in a newly created log stream
  573. // does not require a sequenceToken.
  574. //
  575. // The batch of events must satisfy the following constraints: The maximum
  576. // batch size is 1,048,576 bytes, and this size is calculated as the sum of
  577. // all event messages in UTF-8, plus 26 bytes for each log event. None of the
  578. // log events in the batch can be more than 2 hours in the future. None of the
  579. // log events in the batch can be older than 14 days or the retention period
  580. // of the log group. The log events in the batch must be in chronological ordered
  581. // by their timestamp. The maximum number of log events in a batch is 10,000.
  582. func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) {
  583. req, out := c.PutLogEventsRequest(input)
  584. err := req.Send()
  585. return out, err
  586. }
  587. const opPutMetricFilter = "PutMetricFilter"
  588. // PutMetricFilterRequest generates a request for the PutMetricFilter operation.
  589. func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) {
  590. op := &request.Operation{
  591. Name: opPutMetricFilter,
  592. HTTPMethod: "POST",
  593. HTTPPath: "/",
  594. }
  595. if input == nil {
  596. input = &PutMetricFilterInput{}
  597. }
  598. req = c.newRequest(op, input, output)
  599. output = &PutMetricFilterOutput{}
  600. req.Data = output
  601. return
  602. }
  603. // Creates or updates a metric filter and associates it with the specified log
  604. // group. Metric filters allow you to configure rules to extract metric data
  605. // from log events ingested through PutLogEvents requests.
  606. //
  607. // The maximum number of metric filters that can be associated with a log
  608. // group is 100.
  609. func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) {
  610. req, out := c.PutMetricFilterRequest(input)
  611. err := req.Send()
  612. return out, err
  613. }
  614. const opPutRetentionPolicy = "PutRetentionPolicy"
  615. // PutRetentionPolicyRequest generates a request for the PutRetentionPolicy operation.
  616. func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) {
  617. op := &request.Operation{
  618. Name: opPutRetentionPolicy,
  619. HTTPMethod: "POST",
  620. HTTPPath: "/",
  621. }
  622. if input == nil {
  623. input = &PutRetentionPolicyInput{}
  624. }
  625. req = c.newRequest(op, input, output)
  626. output = &PutRetentionPolicyOutput{}
  627. req.Data = output
  628. return
  629. }
  630. // Sets the retention of the specified log group. A retention policy allows
  631. // you to configure the number of days you want to retain log events in the
  632. // specified log group.
  633. func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) {
  634. req, out := c.PutRetentionPolicyRequest(input)
  635. err := req.Send()
  636. return out, err
  637. }
  638. const opPutSubscriptionFilter = "PutSubscriptionFilter"
  639. // PutSubscriptionFilterRequest generates a request for the PutSubscriptionFilter operation.
  640. func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) {
  641. op := &request.Operation{
  642. Name: opPutSubscriptionFilter,
  643. HTTPMethod: "POST",
  644. HTTPPath: "/",
  645. }
  646. if input == nil {
  647. input = &PutSubscriptionFilterInput{}
  648. }
  649. req = c.newRequest(op, input, output)
  650. output = &PutSubscriptionFilterOutput{}
  651. req.Data = output
  652. return
  653. }
  654. // Creates or updates a subscription filter and associates it with the specified
  655. // log group. Subscription filters allow you to subscribe to a real-time stream
  656. // of log events ingested through PutLogEvents requests and have them delivered
  657. // to a specific destination. Currently, the supported destinations are: A
  658. // Amazon Kinesis stream belonging to the same account as the subscription filter,
  659. // for same-account delivery. A logical destination (used via an ARN of Destination)
  660. // belonging to a different account, for cross-account delivery.
  661. //
  662. // Currently there can only be one subscription filter associated with a log
  663. // group.
  664. func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) {
  665. req, out := c.PutSubscriptionFilterRequest(input)
  666. err := req.Send()
  667. return out, err
  668. }
  669. const opTestMetricFilter = "TestMetricFilter"
  670. // TestMetricFilterRequest generates a request for the TestMetricFilter operation.
  671. func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) {
  672. op := &request.Operation{
  673. Name: opTestMetricFilter,
  674. HTTPMethod: "POST",
  675. HTTPPath: "/",
  676. }
  677. if input == nil {
  678. input = &TestMetricFilterInput{}
  679. }
  680. req = c.newRequest(op, input, output)
  681. output = &TestMetricFilterOutput{}
  682. req.Data = output
  683. return
  684. }
  685. // Tests the filter pattern of a metric filter against a sample of log event
  686. // messages. You can use this operation to validate the correctness of a metric
  687. // filter pattern.
  688. func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) {
  689. req, out := c.TestMetricFilterRequest(input)
  690. err := req.Send()
  691. return out, err
  692. }
  693. type CreateLogGroupInput struct {
  694. // The name of the log group to create.
  695. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  696. metadataCreateLogGroupInput `json:"-" xml:"-"`
  697. }
  698. type metadataCreateLogGroupInput struct {
  699. SDKShapeTraits bool `type:"structure"`
  700. }
  701. // String returns the string representation
  702. func (s CreateLogGroupInput) String() string {
  703. return awsutil.Prettify(s)
  704. }
  705. // GoString returns the string representation
  706. func (s CreateLogGroupInput) GoString() string {
  707. return s.String()
  708. }
  709. type CreateLogGroupOutput struct {
  710. metadataCreateLogGroupOutput `json:"-" xml:"-"`
  711. }
  712. type metadataCreateLogGroupOutput struct {
  713. SDKShapeTraits bool `type:"structure"`
  714. }
  715. // String returns the string representation
  716. func (s CreateLogGroupOutput) String() string {
  717. return awsutil.Prettify(s)
  718. }
  719. // GoString returns the string representation
  720. func (s CreateLogGroupOutput) GoString() string {
  721. return s.String()
  722. }
  723. type CreateLogStreamInput struct {
  724. // The name of the log group under which the log stream is to be created.
  725. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  726. // The name of the log stream to create.
  727. LogStreamName *string `locationName:"logStreamName" type:"string" required:"true"`
  728. metadataCreateLogStreamInput `json:"-" xml:"-"`
  729. }
  730. type metadataCreateLogStreamInput struct {
  731. SDKShapeTraits bool `type:"structure"`
  732. }
  733. // String returns the string representation
  734. func (s CreateLogStreamInput) String() string {
  735. return awsutil.Prettify(s)
  736. }
  737. // GoString returns the string representation
  738. func (s CreateLogStreamInput) GoString() string {
  739. return s.String()
  740. }
  741. type CreateLogStreamOutput struct {
  742. metadataCreateLogStreamOutput `json:"-" xml:"-"`
  743. }
  744. type metadataCreateLogStreamOutput struct {
  745. SDKShapeTraits bool `type:"structure"`
  746. }
  747. // String returns the string representation
  748. func (s CreateLogStreamOutput) String() string {
  749. return awsutil.Prettify(s)
  750. }
  751. // GoString returns the string representation
  752. func (s CreateLogStreamOutput) GoString() string {
  753. return s.String()
  754. }
  755. type DeleteDestinationInput struct {
  756. // The name of destination to delete.
  757. DestinationName *string `locationName:"destinationName" type:"string" required:"true"`
  758. metadataDeleteDestinationInput `json:"-" xml:"-"`
  759. }
  760. type metadataDeleteDestinationInput struct {
  761. SDKShapeTraits bool `type:"structure"`
  762. }
  763. // String returns the string representation
  764. func (s DeleteDestinationInput) String() string {
  765. return awsutil.Prettify(s)
  766. }
  767. // GoString returns the string representation
  768. func (s DeleteDestinationInput) GoString() string {
  769. return s.String()
  770. }
  771. type DeleteDestinationOutput struct {
  772. metadataDeleteDestinationOutput `json:"-" xml:"-"`
  773. }
  774. type metadataDeleteDestinationOutput struct {
  775. SDKShapeTraits bool `type:"structure"`
  776. }
  777. // String returns the string representation
  778. func (s DeleteDestinationOutput) String() string {
  779. return awsutil.Prettify(s)
  780. }
  781. // GoString returns the string representation
  782. func (s DeleteDestinationOutput) GoString() string {
  783. return s.String()
  784. }
  785. type DeleteLogGroupInput struct {
  786. // The name of the log group to delete.
  787. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  788. metadataDeleteLogGroupInput `json:"-" xml:"-"`
  789. }
  790. type metadataDeleteLogGroupInput struct {
  791. SDKShapeTraits bool `type:"structure"`
  792. }
  793. // String returns the string representation
  794. func (s DeleteLogGroupInput) String() string {
  795. return awsutil.Prettify(s)
  796. }
  797. // GoString returns the string representation
  798. func (s DeleteLogGroupInput) GoString() string {
  799. return s.String()
  800. }
  801. type DeleteLogGroupOutput struct {
  802. metadataDeleteLogGroupOutput `json:"-" xml:"-"`
  803. }
  804. type metadataDeleteLogGroupOutput struct {
  805. SDKShapeTraits bool `type:"structure"`
  806. }
  807. // String returns the string representation
  808. func (s DeleteLogGroupOutput) String() string {
  809. return awsutil.Prettify(s)
  810. }
  811. // GoString returns the string representation
  812. func (s DeleteLogGroupOutput) GoString() string {
  813. return s.String()
  814. }
  815. type DeleteLogStreamInput struct {
  816. // The name of the log group under which the log stream to delete belongs.
  817. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  818. // The name of the log stream to delete.
  819. LogStreamName *string `locationName:"logStreamName" type:"string" required:"true"`
  820. metadataDeleteLogStreamInput `json:"-" xml:"-"`
  821. }
  822. type metadataDeleteLogStreamInput struct {
  823. SDKShapeTraits bool `type:"structure"`
  824. }
  825. // String returns the string representation
  826. func (s DeleteLogStreamInput) String() string {
  827. return awsutil.Prettify(s)
  828. }
  829. // GoString returns the string representation
  830. func (s DeleteLogStreamInput) GoString() string {
  831. return s.String()
  832. }
  833. type DeleteLogStreamOutput struct {
  834. metadataDeleteLogStreamOutput `json:"-" xml:"-"`
  835. }
  836. type metadataDeleteLogStreamOutput struct {
  837. SDKShapeTraits bool `type:"structure"`
  838. }
  839. // String returns the string representation
  840. func (s DeleteLogStreamOutput) String() string {
  841. return awsutil.Prettify(s)
  842. }
  843. // GoString returns the string representation
  844. func (s DeleteLogStreamOutput) GoString() string {
  845. return s.String()
  846. }
  847. type DeleteMetricFilterInput struct {
  848. // The name of the metric filter to delete.
  849. FilterName *string `locationName:"filterName" type:"string" required:"true"`
  850. // The name of the log group that is associated with the metric filter to delete.
  851. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  852. metadataDeleteMetricFilterInput `json:"-" xml:"-"`
  853. }
  854. type metadataDeleteMetricFilterInput struct {
  855. SDKShapeTraits bool `type:"structure"`
  856. }
  857. // String returns the string representation
  858. func (s DeleteMetricFilterInput) String() string {
  859. return awsutil.Prettify(s)
  860. }
  861. // GoString returns the string representation
  862. func (s DeleteMetricFilterInput) GoString() string {
  863. return s.String()
  864. }
  865. type DeleteMetricFilterOutput struct {
  866. metadataDeleteMetricFilterOutput `json:"-" xml:"-"`
  867. }
  868. type metadataDeleteMetricFilterOutput struct {
  869. SDKShapeTraits bool `type:"structure"`
  870. }
  871. // String returns the string representation
  872. func (s DeleteMetricFilterOutput) String() string {
  873. return awsutil.Prettify(s)
  874. }
  875. // GoString returns the string representation
  876. func (s DeleteMetricFilterOutput) GoString() string {
  877. return s.String()
  878. }
  879. type DeleteRetentionPolicyInput struct {
  880. // The name of the log group that is associated with the retention policy to
  881. // delete.
  882. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  883. metadataDeleteRetentionPolicyInput `json:"-" xml:"-"`
  884. }
  885. type metadataDeleteRetentionPolicyInput struct {
  886. SDKShapeTraits bool `type:"structure"`
  887. }
  888. // String returns the string representation
  889. func (s DeleteRetentionPolicyInput) String() string {
  890. return awsutil.Prettify(s)
  891. }
  892. // GoString returns the string representation
  893. func (s DeleteRetentionPolicyInput) GoString() string {
  894. return s.String()
  895. }
  896. type DeleteRetentionPolicyOutput struct {
  897. metadataDeleteRetentionPolicyOutput `json:"-" xml:"-"`
  898. }
  899. type metadataDeleteRetentionPolicyOutput struct {
  900. SDKShapeTraits bool `type:"structure"`
  901. }
  902. // String returns the string representation
  903. func (s DeleteRetentionPolicyOutput) String() string {
  904. return awsutil.Prettify(s)
  905. }
  906. // GoString returns the string representation
  907. func (s DeleteRetentionPolicyOutput) GoString() string {
  908. return s.String()
  909. }
  910. type DeleteSubscriptionFilterInput struct {
  911. // The name of the subscription filter to delete.
  912. FilterName *string `locationName:"filterName" type:"string" required:"true"`
  913. // The name of the log group that is associated with the subscription filter
  914. // to delete.
  915. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  916. metadataDeleteSubscriptionFilterInput `json:"-" xml:"-"`
  917. }
  918. type metadataDeleteSubscriptionFilterInput struct {
  919. SDKShapeTraits bool `type:"structure"`
  920. }
  921. // String returns the string representation
  922. func (s DeleteSubscriptionFilterInput) String() string {
  923. return awsutil.Prettify(s)
  924. }
  925. // GoString returns the string representation
  926. func (s DeleteSubscriptionFilterInput) GoString() string {
  927. return s.String()
  928. }
  929. type DeleteSubscriptionFilterOutput struct {
  930. metadataDeleteSubscriptionFilterOutput `json:"-" xml:"-"`
  931. }
  932. type metadataDeleteSubscriptionFilterOutput struct {
  933. SDKShapeTraits bool `type:"structure"`
  934. }
  935. // String returns the string representation
  936. func (s DeleteSubscriptionFilterOutput) String() string {
  937. return awsutil.Prettify(s)
  938. }
  939. // GoString returns the string representation
  940. func (s DeleteSubscriptionFilterOutput) GoString() string {
  941. return s.String()
  942. }
  943. type DescribeDestinationsInput struct {
  944. // Will only return destinations that match the provided destinationNamePrefix.
  945. // If you don't specify a value, no prefix is applied.
  946. DestinationNamePrefix *string `type:"string"`
  947. // The maximum number of results to return.
  948. Limit *int64 `locationName:"limit" type:"integer"`
  949. // A string token used for pagination that points to the next page of results.
  950. // It must be a value obtained from the response of the previous request. The
  951. // token expires after 24 hours.
  952. NextToken *string `locationName:"nextToken" type:"string"`
  953. metadataDescribeDestinationsInput `json:"-" xml:"-"`
  954. }
  955. type metadataDescribeDestinationsInput struct {
  956. SDKShapeTraits bool `type:"structure"`
  957. }
  958. // String returns the string representation
  959. func (s DescribeDestinationsInput) String() string {
  960. return awsutil.Prettify(s)
  961. }
  962. // GoString returns the string representation
  963. func (s DescribeDestinationsInput) GoString() string {
  964. return s.String()
  965. }
  966. type DescribeDestinationsOutput struct {
  967. Destinations []*Destination `locationName:"destinations" type:"list"`
  968. // A string token used for pagination that points to the next page of results.
  969. // It must be a value obtained from the response of the previous request. The
  970. // token expires after 24 hours.
  971. NextToken *string `locationName:"nextToken" type:"string"`
  972. metadataDescribeDestinationsOutput `json:"-" xml:"-"`
  973. }
  974. type metadataDescribeDestinationsOutput struct {
  975. SDKShapeTraits bool `type:"structure"`
  976. }
  977. // String returns the string representation
  978. func (s DescribeDestinationsOutput) String() string {
  979. return awsutil.Prettify(s)
  980. }
  981. // GoString returns the string representation
  982. func (s DescribeDestinationsOutput) GoString() string {
  983. return s.String()
  984. }
  985. type DescribeLogGroupsInput struct {
  986. // The maximum number of items returned in the response. If you don't specify
  987. // a value, the request would return up to 50 items.
  988. Limit *int64 `locationName:"limit" type:"integer"`
  989. // Will only return log groups that match the provided logGroupNamePrefix. If
  990. // you don't specify a value, no prefix filter is applied.
  991. LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" type:"string"`
  992. // A string token used for pagination that points to the next page of results.
  993. // It must be a value obtained from the response of the previous DescribeLogGroups
  994. // request.
  995. NextToken *string `locationName:"nextToken" type:"string"`
  996. metadataDescribeLogGroupsInput `json:"-" xml:"-"`
  997. }
  998. type metadataDescribeLogGroupsInput struct {
  999. SDKShapeTraits bool `type:"structure"`
  1000. }
  1001. // String returns the string representation
  1002. func (s DescribeLogGroupsInput) String() string {
  1003. return awsutil.Prettify(s)
  1004. }
  1005. // GoString returns the string representation
  1006. func (s DescribeLogGroupsInput) GoString() string {
  1007. return s.String()
  1008. }
  1009. type DescribeLogGroupsOutput struct {
  1010. // A list of log groups.
  1011. LogGroups []*LogGroup `locationName:"logGroups" type:"list"`
  1012. // A string token used for pagination that points to the next page of results.
  1013. // It must be a value obtained from the response of the previous request. The
  1014. // token expires after 24 hours.
  1015. NextToken *string `locationName:"nextToken" type:"string"`
  1016. metadataDescribeLogGroupsOutput `json:"-" xml:"-"`
  1017. }
  1018. type metadataDescribeLogGroupsOutput struct {
  1019. SDKShapeTraits bool `type:"structure"`
  1020. }
  1021. // String returns the string representation
  1022. func (s DescribeLogGroupsOutput) String() string {
  1023. return awsutil.Prettify(s)
  1024. }
  1025. // GoString returns the string representation
  1026. func (s DescribeLogGroupsOutput) GoString() string {
  1027. return s.String()
  1028. }
  1029. type DescribeLogStreamsInput struct {
  1030. // If set to true, results are returned in descending order. If you don't specify
  1031. // a value or set it to false, results are returned in ascending order.
  1032. Descending *bool `locationName:"descending" type:"boolean"`
  1033. // The maximum number of items returned in the response. If you don't specify
  1034. // a value, the request would return up to 50 items.
  1035. Limit *int64 `locationName:"limit" type:"integer"`
  1036. // The log group name for which log streams are to be listed.
  1037. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1038. // Will only return log streams that match the provided logStreamNamePrefix.
  1039. // If you don't specify a value, no prefix filter is applied.
  1040. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" type:"string"`
  1041. // A string token used for pagination that points to the next page of results.
  1042. // It must be a value obtained from the response of the previous DescribeLogStreams
  1043. // request.
  1044. NextToken *string `locationName:"nextToken" type:"string"`
  1045. // Specifies what to order the returned log streams by. Valid arguments are
  1046. // 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results
  1047. // are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot
  1048. // also contain a logStreamNamePrefix.
  1049. OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"`
  1050. metadataDescribeLogStreamsInput `json:"-" xml:"-"`
  1051. }
  1052. type metadataDescribeLogStreamsInput struct {
  1053. SDKShapeTraits bool `type:"structure"`
  1054. }
  1055. // String returns the string representation
  1056. func (s DescribeLogStreamsInput) String() string {
  1057. return awsutil.Prettify(s)
  1058. }
  1059. // GoString returns the string representation
  1060. func (s DescribeLogStreamsInput) GoString() string {
  1061. return s.String()
  1062. }
  1063. type DescribeLogStreamsOutput struct {
  1064. // A list of log streams.
  1065. LogStreams []*LogStream `locationName:"logStreams" type:"list"`
  1066. // A string token used for pagination that points to the next page of results.
  1067. // It must be a value obtained from the response of the previous request. The
  1068. // token expires after 24 hours.
  1069. NextToken *string `locationName:"nextToken" type:"string"`
  1070. metadataDescribeLogStreamsOutput `json:"-" xml:"-"`
  1071. }
  1072. type metadataDescribeLogStreamsOutput struct {
  1073. SDKShapeTraits bool `type:"structure"`
  1074. }
  1075. // String returns the string representation
  1076. func (s DescribeLogStreamsOutput) String() string {
  1077. return awsutil.Prettify(s)
  1078. }
  1079. // GoString returns the string representation
  1080. func (s DescribeLogStreamsOutput) GoString() string {
  1081. return s.String()
  1082. }
  1083. type DescribeMetricFiltersInput struct {
  1084. // Will only return metric filters that match the provided filterNamePrefix.
  1085. // If you don't specify a value, no prefix filter is applied.
  1086. FilterNamePrefix *string `locationName:"filterNamePrefix" type:"string"`
  1087. // The maximum number of items returned in the response. If you don't specify
  1088. // a value, the request would return up to 50 items.
  1089. Limit *int64 `locationName:"limit" type:"integer"`
  1090. // The log group name for which metric filters are to be listed.
  1091. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1092. // A string token used for pagination that points to the next page of results.
  1093. // It must be a value obtained from the response of the previous DescribeMetricFilters
  1094. // request.
  1095. NextToken *string `locationName:"nextToken" type:"string"`
  1096. metadataDescribeMetricFiltersInput `json:"-" xml:"-"`
  1097. }
  1098. type metadataDescribeMetricFiltersInput struct {
  1099. SDKShapeTraits bool `type:"structure"`
  1100. }
  1101. // String returns the string representation
  1102. func (s DescribeMetricFiltersInput) String() string {
  1103. return awsutil.Prettify(s)
  1104. }
  1105. // GoString returns the string representation
  1106. func (s DescribeMetricFiltersInput) GoString() string {
  1107. return s.String()
  1108. }
  1109. type DescribeMetricFiltersOutput struct {
  1110. MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"`
  1111. // A string token used for pagination that points to the next page of results.
  1112. // It must be a value obtained from the response of the previous request. The
  1113. // token expires after 24 hours.
  1114. NextToken *string `locationName:"nextToken" type:"string"`
  1115. metadataDescribeMetricFiltersOutput `json:"-" xml:"-"`
  1116. }
  1117. type metadataDescribeMetricFiltersOutput struct {
  1118. SDKShapeTraits bool `type:"structure"`
  1119. }
  1120. // String returns the string representation
  1121. func (s DescribeMetricFiltersOutput) String() string {
  1122. return awsutil.Prettify(s)
  1123. }
  1124. // GoString returns the string representation
  1125. func (s DescribeMetricFiltersOutput) GoString() string {
  1126. return s.String()
  1127. }
  1128. type DescribeSubscriptionFiltersInput struct {
  1129. // Will only return subscription filters that match the provided filterNamePrefix.
  1130. // If you don't specify a value, no prefix filter is applied.
  1131. FilterNamePrefix *string `locationName:"filterNamePrefix" type:"string"`
  1132. // The maximum number of results to return.
  1133. Limit *int64 `locationName:"limit" type:"integer"`
  1134. // The log group name for which subscription filters are to be listed.
  1135. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1136. // A string token used for pagination that points to the next page of results.
  1137. // It must be a value obtained from the response of the previous request. The
  1138. // token expires after 24 hours.
  1139. NextToken *string `locationName:"nextToken" type:"string"`
  1140. metadataDescribeSubscriptionFiltersInput `json:"-" xml:"-"`
  1141. }
  1142. type metadataDescribeSubscriptionFiltersInput struct {
  1143. SDKShapeTraits bool `type:"structure"`
  1144. }
  1145. // String returns the string representation
  1146. func (s DescribeSubscriptionFiltersInput) String() string {
  1147. return awsutil.Prettify(s)
  1148. }
  1149. // GoString returns the string representation
  1150. func (s DescribeSubscriptionFiltersInput) GoString() string {
  1151. return s.String()
  1152. }
  1153. type DescribeSubscriptionFiltersOutput struct {
  1154. // A string token used for pagination that points to the next page of results.
  1155. // It must be a value obtained from the response of the previous request. The
  1156. // token expires after 24 hours.
  1157. NextToken *string `locationName:"nextToken" type:"string"`
  1158. SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"`
  1159. metadataDescribeSubscriptionFiltersOutput `json:"-" xml:"-"`
  1160. }
  1161. type metadataDescribeSubscriptionFiltersOutput struct {
  1162. SDKShapeTraits bool `type:"structure"`
  1163. }
  1164. // String returns the string representation
  1165. func (s DescribeSubscriptionFiltersOutput) String() string {
  1166. return awsutil.Prettify(s)
  1167. }
  1168. // GoString returns the string representation
  1169. func (s DescribeSubscriptionFiltersOutput) GoString() string {
  1170. return s.String()
  1171. }
  1172. type Destination struct {
  1173. AccessPolicy *string `locationName:"accessPolicy" type:"string"`
  1174. Arn *string `locationName:"arn" type:"string"`
  1175. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1176. // 00:00:00 UTC.
  1177. CreationTime *int64 `locationName:"creationTime" type:"long"`
  1178. DestinationName *string `locationName:"destinationName" type:"string"`
  1179. RoleArn *string `locationName:"roleArn" type:"string"`
  1180. TargetArn *string `locationName:"targetArn" type:"string"`
  1181. metadataDestination `json:"-" xml:"-"`
  1182. }
  1183. type metadataDestination struct {
  1184. SDKShapeTraits bool `type:"structure"`
  1185. }
  1186. // String returns the string representation
  1187. func (s Destination) String() string {
  1188. return awsutil.Prettify(s)
  1189. }
  1190. // GoString returns the string representation
  1191. func (s Destination) GoString() string {
  1192. return s.String()
  1193. }
  1194. type FilterLogEventsInput struct {
  1195. // A unix timestamp indicating the end time of the range for the request. If
  1196. // provided, events with a timestamp later than this time will not be returned.
  1197. EndTime *int64 `locationName:"endTime" type:"long"`
  1198. // A valid CloudWatch Logs filter pattern to use for filtering the response.
  1199. // If not provided, all the events are matched.
  1200. FilterPattern *string `locationName:"filterPattern" type:"string"`
  1201. // If provided, the API will make a best effort to provide responses that contain
  1202. // events from multiple log streams within the log group interleaved in a single
  1203. // response. If not provided, all the matched log events in the first log stream
  1204. // will be searched first, then those in the next log stream, etc.
  1205. Interleaved *bool `locationName:"interleaved" type:"boolean"`
  1206. // The maximum number of events to return in a page of results. Default is 10,000
  1207. // events.
  1208. Limit *int64 `locationName:"limit" type:"integer"`
  1209. // The name of the log group to query.
  1210. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1211. // Optional list of log stream names within the specified log group to search.
  1212. // Defaults to all the log streams in the log group.
  1213. LogStreamNames []*string `locationName:"logStreamNames" type:"list"`
  1214. // A pagination token obtained from a FilterLogEvents response to continue paginating
  1215. // the FilterLogEvents results.
  1216. NextToken *string `locationName:"nextToken" type:"string"`
  1217. // A unix timestamp indicating the start time of the range for the request.
  1218. // If provided, events with a timestamp prior to this time will not be returned.
  1219. StartTime *int64 `locationName:"startTime" type:"long"`
  1220. metadataFilterLogEventsInput `json:"-" xml:"-"`
  1221. }
  1222. type metadataFilterLogEventsInput struct {
  1223. SDKShapeTraits bool `type:"structure"`
  1224. }
  1225. // String returns the string representation
  1226. func (s FilterLogEventsInput) String() string {
  1227. return awsutil.Prettify(s)
  1228. }
  1229. // GoString returns the string representation
  1230. func (s FilterLogEventsInput) GoString() string {
  1231. return s.String()
  1232. }
  1233. type FilterLogEventsOutput struct {
  1234. // A list of FilteredLogEvent objects representing the matched events from the
  1235. // request.
  1236. Events []*FilteredLogEvent `locationName:"events" type:"list"`
  1237. // A pagination token obtained from a FilterLogEvents response to continue paginating
  1238. // the FilterLogEvents results.
  1239. NextToken *string `locationName:"nextToken" type:"string"`
  1240. // A list of SearchedLogStream objects indicating which log streams have been
  1241. // searched in this request and whether each has been searched completely or
  1242. // still has more to be paginated.
  1243. SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"`
  1244. metadataFilterLogEventsOutput `json:"-" xml:"-"`
  1245. }
  1246. type metadataFilterLogEventsOutput struct {
  1247. SDKShapeTraits bool `type:"structure"`
  1248. }
  1249. // String returns the string representation
  1250. func (s FilterLogEventsOutput) String() string {
  1251. return awsutil.Prettify(s)
  1252. }
  1253. // GoString returns the string representation
  1254. func (s FilterLogEventsOutput) GoString() string {
  1255. return s.String()
  1256. }
  1257. // Represents a matched event from a FilterLogEvents request.
  1258. type FilteredLogEvent struct {
  1259. // A unique identifier for this event.
  1260. EventId *string `locationName:"eventId" type:"string"`
  1261. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1262. // 00:00:00 UTC.
  1263. IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
  1264. // The name of the log stream this event belongs to.
  1265. LogStreamName *string `locationName:"logStreamName" type:"string"`
  1266. // The data contained in the log event.
  1267. Message *string `locationName:"message" type:"string"`
  1268. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1269. // 00:00:00 UTC.
  1270. Timestamp *int64 `locationName:"timestamp" type:"long"`
  1271. metadataFilteredLogEvent `json:"-" xml:"-"`
  1272. }
  1273. type metadataFilteredLogEvent struct {
  1274. SDKShapeTraits bool `type:"structure"`
  1275. }
  1276. // String returns the string representation
  1277. func (s FilteredLogEvent) String() string {
  1278. return awsutil.Prettify(s)
  1279. }
  1280. // GoString returns the string representation
  1281. func (s FilteredLogEvent) GoString() string {
  1282. return s.String()
  1283. }
  1284. type GetLogEventsInput struct {
  1285. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1286. // 00:00:00 UTC.
  1287. EndTime *int64 `locationName:"endTime" type:"long"`
  1288. // The maximum number of log events returned in the response. If you don't specify
  1289. // a value, the request would return as many log events as can fit in a response
  1290. // size of 1MB, up to 10,000 log events.
  1291. Limit *int64 `locationName:"limit" type:"integer"`
  1292. // The name of the log group to query.
  1293. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1294. // The name of the log stream to query.
  1295. LogStreamName *string `locationName:"logStreamName" type:"string" required:"true"`
  1296. // A string token used for pagination that points to the next page of results.
  1297. // It must be a value obtained from the nextForwardToken or nextBackwardToken
  1298. // fields in the response of the previous GetLogEvents request.
  1299. NextToken *string `locationName:"nextToken" type:"string"`
  1300. // If set to true, the earliest log events would be returned first. The default
  1301. // is false (the latest log events are returned first).
  1302. StartFromHead *bool `locationName:"startFromHead" type:"boolean"`
  1303. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1304. // 00:00:00 UTC.
  1305. StartTime *int64 `locationName:"startTime" type:"long"`
  1306. metadataGetLogEventsInput `json:"-" xml:"-"`
  1307. }
  1308. type metadataGetLogEventsInput struct {
  1309. SDKShapeTraits bool `type:"structure"`
  1310. }
  1311. // String returns the string representation
  1312. func (s GetLogEventsInput) String() string {
  1313. return awsutil.Prettify(s)
  1314. }
  1315. // GoString returns the string representation
  1316. func (s GetLogEventsInput) GoString() string {
  1317. return s.String()
  1318. }
  1319. type GetLogEventsOutput struct {
  1320. Events []*OutputLogEvent `locationName:"events" type:"list"`
  1321. // A string token used for pagination that points to the next page of results.
  1322. // It must be a value obtained from the response of the previous request. The
  1323. // token expires after 24 hours.
  1324. NextBackwardToken *string `locationName:"nextBackwardToken" type:"string"`
  1325. // A string token used for pagination that points to the next page of results.
  1326. // It must be a value obtained from the response of the previous request. The
  1327. // token expires after 24 hours.
  1328. NextForwardToken *string `locationName:"nextForwardToken" type:"string"`
  1329. metadataGetLogEventsOutput `json:"-" xml:"-"`
  1330. }
  1331. type metadataGetLogEventsOutput struct {
  1332. SDKShapeTraits bool `type:"structure"`
  1333. }
  1334. // String returns the string representation
  1335. func (s GetLogEventsOutput) String() string {
  1336. return awsutil.Prettify(s)
  1337. }
  1338. // GoString returns the string representation
  1339. func (s GetLogEventsOutput) GoString() string {
  1340. return s.String()
  1341. }
  1342. // A log event is a record of some activity that was recorded by the application
  1343. // or resource being monitored. The log event record that Amazon CloudWatch
  1344. // Logs understands contains two properties: the timestamp of when the event
  1345. // occurred, and the raw event message.
  1346. type InputLogEvent struct {
  1347. Message *string `locationName:"message" type:"string" required:"true"`
  1348. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1349. // 00:00:00 UTC.
  1350. Timestamp *int64 `locationName:"timestamp" type:"long" required:"true"`
  1351. metadataInputLogEvent `json:"-" xml:"-"`
  1352. }
  1353. type metadataInputLogEvent struct {
  1354. SDKShapeTraits bool `type:"structure"`
  1355. }
  1356. // String returns the string representation
  1357. func (s InputLogEvent) String() string {
  1358. return awsutil.Prettify(s)
  1359. }
  1360. // GoString returns the string representation
  1361. func (s InputLogEvent) GoString() string {
  1362. return s.String()
  1363. }
  1364. type LogGroup struct {
  1365. Arn *string `locationName:"arn" type:"string"`
  1366. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1367. // 00:00:00 UTC.
  1368. CreationTime *int64 `locationName:"creationTime" type:"long"`
  1369. LogGroupName *string `locationName:"logGroupName" type:"string"`
  1370. // The number of metric filters associated with the log group.
  1371. MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"`
  1372. // Specifies the number of days you want to retain log events in the specified
  1373. // log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180,
  1374. // 365, 400, 545, 731, 1827, 3653.
  1375. RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"`
  1376. StoredBytes *int64 `locationName:"storedBytes" type:"long"`
  1377. metadataLogGroup `json:"-" xml:"-"`
  1378. }
  1379. type metadataLogGroup struct {
  1380. SDKShapeTraits bool `type:"structure"`
  1381. }
  1382. // String returns the string representation
  1383. func (s LogGroup) String() string {
  1384. return awsutil.Prettify(s)
  1385. }
  1386. // GoString returns the string representation
  1387. func (s LogGroup) GoString() string {
  1388. return s.String()
  1389. }
  1390. // A log stream is sequence of log events from a single emitter of logs.
  1391. type LogStream struct {
  1392. Arn *string `locationName:"arn" type:"string"`
  1393. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1394. // 00:00:00 UTC.
  1395. CreationTime *int64 `locationName:"creationTime" type:"long"`
  1396. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1397. // 00:00:00 UTC.
  1398. FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"`
  1399. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1400. // 00:00:00 UTC.
  1401. LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"`
  1402. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1403. // 00:00:00 UTC.
  1404. LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"`
  1405. LogStreamName *string `locationName:"logStreamName" type:"string"`
  1406. StoredBytes *int64 `locationName:"storedBytes" type:"long"`
  1407. // A string token used for making PutLogEvents requests. A sequenceToken can
  1408. // only be used once, and PutLogEvents requests must include the sequenceToken
  1409. // obtained from the response of the previous request.
  1410. UploadSequenceToken *string `locationName:"uploadSequenceToken" type:"string"`
  1411. metadataLogStream `json:"-" xml:"-"`
  1412. }
  1413. type metadataLogStream struct {
  1414. SDKShapeTraits bool `type:"structure"`
  1415. }
  1416. // String returns the string representation
  1417. func (s LogStream) String() string {
  1418. return awsutil.Prettify(s)
  1419. }
  1420. // GoString returns the string representation
  1421. func (s LogStream) GoString() string {
  1422. return s.String()
  1423. }
  1424. // Metric filters can be used to express how Amazon CloudWatch Logs would extract
  1425. // metric observations from ingested log events and transform them to metric
  1426. // data in a CloudWatch metric.
  1427. type MetricFilter struct {
  1428. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1429. // 00:00:00 UTC.
  1430. CreationTime *int64 `locationName:"creationTime" type:"long"`
  1431. // A name for a metric or subscription filter.
  1432. FilterName *string `locationName:"filterName" type:"string"`
  1433. // A symbolic description of how Amazon CloudWatch Logs should interpret the
  1434. // data in each log event. For example, a log event may contain timestamps,
  1435. // IP addresses, strings, and so on. You use the filter pattern to specify what
  1436. // to look for in the log event message.
  1437. FilterPattern *string `locationName:"filterPattern" type:"string"`
  1438. MetricTransformations []*MetricTransformation `locationName:"metricTransformations" type:"list"`
  1439. metadataMetricFilter `json:"-" xml:"-"`
  1440. }
  1441. type metadataMetricFilter struct {
  1442. SDKShapeTraits bool `type:"structure"`
  1443. }
  1444. // String returns the string representation
  1445. func (s MetricFilter) String() string {
  1446. return awsutil.Prettify(s)
  1447. }
  1448. // GoString returns the string representation
  1449. func (s MetricFilter) GoString() string {
  1450. return s.String()
  1451. }
  1452. type MetricFilterMatchRecord struct {
  1453. EventMessage *string `locationName:"eventMessage" type:"string"`
  1454. EventNumber *int64 `locationName:"eventNumber" type:"long"`
  1455. ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"`
  1456. metadataMetricFilterMatchRecord `json:"-" xml:"-"`
  1457. }
  1458. type metadataMetricFilterMatchRecord struct {
  1459. SDKShapeTraits bool `type:"structure"`
  1460. }
  1461. // String returns the string representation
  1462. func (s MetricFilterMatchRecord) String() string {
  1463. return awsutil.Prettify(s)
  1464. }
  1465. // GoString returns the string representation
  1466. func (s MetricFilterMatchRecord) GoString() string {
  1467. return s.String()
  1468. }
  1469. type MetricTransformation struct {
  1470. // The name of the CloudWatch metric to which the monitored log information
  1471. // should be published. For example, you may publish to a metric called ErrorCount.
  1472. MetricName *string `locationName:"metricName" type:"string" required:"true"`
  1473. // The destination namespace of the new CloudWatch metric.
  1474. MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"`
  1475. // What to publish to the metric. For example, if you're counting the occurrences
  1476. // of a particular term like "Error", the value will be "1" for each occurrence.
  1477. // If you're counting the bytes transferred the published value will be the
  1478. // value in the log event.
  1479. MetricValue *string `locationName:"metricValue" type:"string" required:"true"`
  1480. metadataMetricTransformation `json:"-" xml:"-"`
  1481. }
  1482. type metadataMetricTransformation struct {
  1483. SDKShapeTraits bool `type:"structure"`
  1484. }
  1485. // String returns the string representation
  1486. func (s MetricTransformation) String() string {
  1487. return awsutil.Prettify(s)
  1488. }
  1489. // GoString returns the string representation
  1490. func (s MetricTransformation) GoString() string {
  1491. return s.String()
  1492. }
  1493. type OutputLogEvent struct {
  1494. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1495. // 00:00:00 UTC.
  1496. IngestionTime *int64 `locationName:"ingestionTime" type:"long"`
  1497. Message *string `locationName:"message" type:"string"`
  1498. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1499. // 00:00:00 UTC.
  1500. Timestamp *int64 `locationName:"timestamp" type:"long"`
  1501. metadataOutputLogEvent `json:"-" xml:"-"`
  1502. }
  1503. type metadataOutputLogEvent struct {
  1504. SDKShapeTraits bool `type:"structure"`
  1505. }
  1506. // String returns the string representation
  1507. func (s OutputLogEvent) String() string {
  1508. return awsutil.Prettify(s)
  1509. }
  1510. // GoString returns the string representation
  1511. func (s OutputLogEvent) GoString() string {
  1512. return s.String()
  1513. }
  1514. type PutDestinationInput struct {
  1515. // A name for the destination.
  1516. DestinationName *string `locationName:"destinationName" type:"string" required:"true"`
  1517. // The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to
  1518. // do Amazon Kinesis PutRecord requests on the desitnation stream.
  1519. RoleArn *string `locationName:"roleArn" type:"string" required:"true"`
  1520. // The ARN of an Amazon Kinesis stream to deliver matching log events to.
  1521. TargetArn *string `locationName:"targetArn" type:"string" required:"true"`
  1522. metadataPutDestinationInput `json:"-" xml:"-"`
  1523. }
  1524. type metadataPutDestinationInput struct {
  1525. SDKShapeTraits bool `type:"structure"`
  1526. }
  1527. // String returns the string representation
  1528. func (s PutDestinationInput) String() string {
  1529. return awsutil.Prettify(s)
  1530. }
  1531. // GoString returns the string representation
  1532. func (s PutDestinationInput) GoString() string {
  1533. return s.String()
  1534. }
  1535. type PutDestinationOutput struct {
  1536. Destination *Destination `locationName:"destination" type:"structure"`
  1537. metadataPutDestinationOutput `json:"-" xml:"-"`
  1538. }
  1539. type metadataPutDestinationOutput struct {
  1540. SDKShapeTraits bool `type:"structure"`
  1541. }
  1542. // String returns the string representation
  1543. func (s PutDestinationOutput) String() string {
  1544. return awsutil.Prettify(s)
  1545. }
  1546. // GoString returns the string representation
  1547. func (s PutDestinationOutput) GoString() string {
  1548. return s.String()
  1549. }
  1550. type PutDestinationPolicyInput struct {
  1551. // An IAM policy document that authorizes cross-account users to deliver their
  1552. // log events to associated destination.
  1553. AccessPolicy *string `locationName:"accessPolicy" type:"string" required:"true"`
  1554. // A name for an existing destination.
  1555. DestinationName *string `locationName:"destinationName" type:"string" required:"true"`
  1556. metadataPutDestinationPolicyInput `json:"-" xml:"-"`
  1557. }
  1558. type metadataPutDestinationPolicyInput struct {
  1559. SDKShapeTraits bool `type:"structure"`
  1560. }
  1561. // String returns the string representation
  1562. func (s PutDestinationPolicyInput) String() string {
  1563. return awsutil.Prettify(s)
  1564. }
  1565. // GoString returns the string representation
  1566. func (s PutDestinationPolicyInput) GoString() string {
  1567. return s.String()
  1568. }
  1569. type PutDestinationPolicyOutput struct {
  1570. metadataPutDestinationPolicyOutput `json:"-" xml:"-"`
  1571. }
  1572. type metadataPutDestinationPolicyOutput struct {
  1573. SDKShapeTraits bool `type:"structure"`
  1574. }
  1575. // String returns the string representation
  1576. func (s PutDestinationPolicyOutput) String() string {
  1577. return awsutil.Prettify(s)
  1578. }
  1579. // GoString returns the string representation
  1580. func (s PutDestinationPolicyOutput) GoString() string {
  1581. return s.String()
  1582. }
  1583. type PutLogEventsInput struct {
  1584. // A list of log events belonging to a log stream.
  1585. LogEvents []*InputLogEvent `locationName:"logEvents" type:"list" required:"true"`
  1586. // The name of the log group to put log events to.
  1587. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1588. // The name of the log stream to put log events to.
  1589. LogStreamName *string `locationName:"logStreamName" type:"string" required:"true"`
  1590. // A string token that must be obtained from the response of the previous PutLogEvents
  1591. // request.
  1592. SequenceToken *string `locationName:"sequenceToken" type:"string"`
  1593. metadataPutLogEventsInput `json:"-" xml:"-"`
  1594. }
  1595. type metadataPutLogEventsInput struct {
  1596. SDKShapeTraits bool `type:"structure"`
  1597. }
  1598. // String returns the string representation
  1599. func (s PutLogEventsInput) String() string {
  1600. return awsutil.Prettify(s)
  1601. }
  1602. // GoString returns the string representation
  1603. func (s PutLogEventsInput) GoString() string {
  1604. return s.String()
  1605. }
  1606. type PutLogEventsOutput struct {
  1607. // A string token used for making PutLogEvents requests. A sequenceToken can
  1608. // only be used once, and PutLogEvents requests must include the sequenceToken
  1609. // obtained from the response of the previous request.
  1610. NextSequenceToken *string `locationName:"nextSequenceToken" type:"string"`
  1611. RejectedLogEventsInfo *RejectedLogEventsInfo `locationName:"rejectedLogEventsInfo" type:"structure"`
  1612. metadataPutLogEventsOutput `json:"-" xml:"-"`
  1613. }
  1614. type metadataPutLogEventsOutput struct {
  1615. SDKShapeTraits bool `type:"structure"`
  1616. }
  1617. // String returns the string representation
  1618. func (s PutLogEventsOutput) String() string {
  1619. return awsutil.Prettify(s)
  1620. }
  1621. // GoString returns the string representation
  1622. func (s PutLogEventsOutput) GoString() string {
  1623. return s.String()
  1624. }
  1625. type PutMetricFilterInput struct {
  1626. // A name for the metric filter.
  1627. FilterName *string `locationName:"filterName" type:"string" required:"true"`
  1628. // A valid CloudWatch Logs filter pattern for extracting metric data out of
  1629. // ingested log events.
  1630. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  1631. // The name of the log group to associate the metric filter with.
  1632. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1633. // A collection of information needed to define how metric data gets emitted.
  1634. MetricTransformations []*MetricTransformation `locationName:"metricTransformations" type:"list" required:"true"`
  1635. metadataPutMetricFilterInput `json:"-" xml:"-"`
  1636. }
  1637. type metadataPutMetricFilterInput struct {
  1638. SDKShapeTraits bool `type:"structure"`
  1639. }
  1640. // String returns the string representation
  1641. func (s PutMetricFilterInput) String() string {
  1642. return awsutil.Prettify(s)
  1643. }
  1644. // GoString returns the string representation
  1645. func (s PutMetricFilterInput) GoString() string {
  1646. return s.String()
  1647. }
  1648. type PutMetricFilterOutput struct {
  1649. metadataPutMetricFilterOutput `json:"-" xml:"-"`
  1650. }
  1651. type metadataPutMetricFilterOutput struct {
  1652. SDKShapeTraits bool `type:"structure"`
  1653. }
  1654. // String returns the string representation
  1655. func (s PutMetricFilterOutput) String() string {
  1656. return awsutil.Prettify(s)
  1657. }
  1658. // GoString returns the string representation
  1659. func (s PutMetricFilterOutput) GoString() string {
  1660. return s.String()
  1661. }
  1662. type PutRetentionPolicyInput struct {
  1663. // The name of the log group to associate the retention policy with.
  1664. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1665. // Specifies the number of days you want to retain log events in the specified
  1666. // log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180,
  1667. // 365, 400, 545, 731, 1827, 3653.
  1668. RetentionInDays *int64 `locationName:"retentionInDays" type:"integer" required:"true"`
  1669. metadataPutRetentionPolicyInput `json:"-" xml:"-"`
  1670. }
  1671. type metadataPutRetentionPolicyInput struct {
  1672. SDKShapeTraits bool `type:"structure"`
  1673. }
  1674. // String returns the string representation
  1675. func (s PutRetentionPolicyInput) String() string {
  1676. return awsutil.Prettify(s)
  1677. }
  1678. // GoString returns the string representation
  1679. func (s PutRetentionPolicyInput) GoString() string {
  1680. return s.String()
  1681. }
  1682. type PutRetentionPolicyOutput struct {
  1683. metadataPutRetentionPolicyOutput `json:"-" xml:"-"`
  1684. }
  1685. type metadataPutRetentionPolicyOutput struct {
  1686. SDKShapeTraits bool `type:"structure"`
  1687. }
  1688. // String returns the string representation
  1689. func (s PutRetentionPolicyOutput) String() string {
  1690. return awsutil.Prettify(s)
  1691. }
  1692. // GoString returns the string representation
  1693. func (s PutRetentionPolicyOutput) GoString() string {
  1694. return s.String()
  1695. }
  1696. type PutSubscriptionFilterInput struct {
  1697. // The ARN of the destination to deliver matching log events to. Currently,
  1698. // the supported destinations are: A Amazon Kinesis stream belonging to the
  1699. // same account as the subscription filter, for same-account delivery. A logical
  1700. // destination (used via an ARN of Destination) belonging to a different account,
  1701. // for cross-account delivery.
  1702. DestinationArn *string `locationName:"destinationArn" type:"string" required:"true"`
  1703. // A name for the subscription filter.
  1704. FilterName *string `locationName:"filterName" type:"string" required:"true"`
  1705. // A valid CloudWatch Logs filter pattern for subscribing to a filtered stream
  1706. // of log events.
  1707. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  1708. // The name of the log group to associate the subscription filter with.
  1709. LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"`
  1710. // The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to
  1711. // deliver ingested log events to the destination stream. You don't need to
  1712. // provide the ARN when you are working with a logical destination (used via
  1713. // an ARN of Destination) for cross-account delivery.
  1714. RoleArn *string `locationName:"roleArn" type:"string"`
  1715. metadataPutSubscriptionFilterInput `json:"-" xml:"-"`
  1716. }
  1717. type metadataPutSubscriptionFilterInput struct {
  1718. SDKShapeTraits bool `type:"structure"`
  1719. }
  1720. // String returns the string representation
  1721. func (s PutSubscriptionFilterInput) String() string {
  1722. return awsutil.Prettify(s)
  1723. }
  1724. // GoString returns the string representation
  1725. func (s PutSubscriptionFilterInput) GoString() string {
  1726. return s.String()
  1727. }
  1728. type PutSubscriptionFilterOutput struct {
  1729. metadataPutSubscriptionFilterOutput `json:"-" xml:"-"`
  1730. }
  1731. type metadataPutSubscriptionFilterOutput struct {
  1732. SDKShapeTraits bool `type:"structure"`
  1733. }
  1734. // String returns the string representation
  1735. func (s PutSubscriptionFilterOutput) String() string {
  1736. return awsutil.Prettify(s)
  1737. }
  1738. // GoString returns the string representation
  1739. func (s PutSubscriptionFilterOutput) GoString() string {
  1740. return s.String()
  1741. }
  1742. type RejectedLogEventsInfo struct {
  1743. ExpiredLogEventEndIndex *int64 `locationName:"expiredLogEventEndIndex" type:"integer"`
  1744. TooNewLogEventStartIndex *int64 `locationName:"tooNewLogEventStartIndex" type:"integer"`
  1745. TooOldLogEventEndIndex *int64 `locationName:"tooOldLogEventEndIndex" type:"integer"`
  1746. metadataRejectedLogEventsInfo `json:"-" xml:"-"`
  1747. }
  1748. type metadataRejectedLogEventsInfo struct {
  1749. SDKShapeTraits bool `type:"structure"`
  1750. }
  1751. // String returns the string representation
  1752. func (s RejectedLogEventsInfo) String() string {
  1753. return awsutil.Prettify(s)
  1754. }
  1755. // GoString returns the string representation
  1756. func (s RejectedLogEventsInfo) GoString() string {
  1757. return s.String()
  1758. }
  1759. // An object indicating the search status of a log stream in a FilterLogEvents
  1760. // request.
  1761. type SearchedLogStream struct {
  1762. // The name of the log stream.
  1763. LogStreamName *string `locationName:"logStreamName" type:"string"`
  1764. // Indicates whether all the events in this log stream were searched or more
  1765. // data exists to search by paginating further.
  1766. SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"`
  1767. metadataSearchedLogStream `json:"-" xml:"-"`
  1768. }
  1769. type metadataSearchedLogStream struct {
  1770. SDKShapeTraits bool `type:"structure"`
  1771. }
  1772. // String returns the string representation
  1773. func (s SearchedLogStream) String() string {
  1774. return awsutil.Prettify(s)
  1775. }
  1776. // GoString returns the string representation
  1777. func (s SearchedLogStream) GoString() string {
  1778. return s.String()
  1779. }
  1780. type SubscriptionFilter struct {
  1781. // A point in time expressed as the number of milliseconds since Jan 1, 1970
  1782. // 00:00:00 UTC.
  1783. CreationTime *int64 `locationName:"creationTime" type:"long"`
  1784. DestinationArn *string `locationName:"destinationArn" type:"string"`
  1785. // A name for a metric or subscription filter.
  1786. FilterName *string `locationName:"filterName" type:"string"`
  1787. // A symbolic description of how Amazon CloudWatch Logs should interpret the
  1788. // data in each log event. For example, a log event may contain timestamps,
  1789. // IP addresses, strings, and so on. You use the filter pattern to specify what
  1790. // to look for in the log event message.
  1791. FilterPattern *string `locationName:"filterPattern" type:"string"`
  1792. LogGroupName *string `locationName:"logGroupName" type:"string"`
  1793. RoleArn *string `locationName:"roleArn" type:"string"`
  1794. metadataSubscriptionFilter `json:"-" xml:"-"`
  1795. }
  1796. type metadataSubscriptionFilter struct {
  1797. SDKShapeTraits bool `type:"structure"`
  1798. }
  1799. // String returns the string representation
  1800. func (s SubscriptionFilter) String() string {
  1801. return awsutil.Prettify(s)
  1802. }
  1803. // GoString returns the string representation
  1804. func (s SubscriptionFilter) GoString() string {
  1805. return s.String()
  1806. }
  1807. type TestMetricFilterInput struct {
  1808. // A symbolic description of how Amazon CloudWatch Logs should interpret the
  1809. // data in each log event. For example, a log event may contain timestamps,
  1810. // IP addresses, strings, and so on. You use the filter pattern to specify what
  1811. // to look for in the log event message.
  1812. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"`
  1813. // A list of log event messages to test.
  1814. LogEventMessages []*string `locationName:"logEventMessages" type:"list" required:"true"`
  1815. metadataTestMetricFilterInput `json:"-" xml:"-"`
  1816. }
  1817. type metadataTestMetricFilterInput struct {
  1818. SDKShapeTraits bool `type:"structure"`
  1819. }
  1820. // String returns the string representation
  1821. func (s TestMetricFilterInput) String() string {
  1822. return awsutil.Prettify(s)
  1823. }
  1824. // GoString returns the string representation
  1825. func (s TestMetricFilterInput) GoString() string {
  1826. return s.String()
  1827. }
  1828. type TestMetricFilterOutput struct {
  1829. Matches []*MetricFilterMatchRecord `locationName:"matches" type:"list"`
  1830. metadataTestMetricFilterOutput `json:"-" xml:"-"`
  1831. }
  1832. type metadataTestMetricFilterOutput struct {
  1833. SDKShapeTraits bool `type:"structure"`
  1834. }
  1835. // String returns the string representation
  1836. func (s TestMetricFilterOutput) String() string {
  1837. return awsutil.Prettify(s)
  1838. }
  1839. // GoString returns the string representation
  1840. func (s TestMetricFilterOutput) GoString() string {
  1841. return s.String()
  1842. }
  1843. const (
  1844. // @enum OrderBy
  1845. OrderByLogStreamName = "LogStreamName"
  1846. // @enum OrderBy
  1847. OrderByLastEventTime = "LastEventTime"
  1848. )