api.go 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package cloudwatch provides a client for Amazon CloudWatch.
  3. package cloudwatch
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/query"
  11. )
  12. const opDeleteAlarms = "DeleteAlarms"
  13. // DeleteAlarmsRequest generates a "aws/request.Request" representing the
  14. // client's request for the DeleteAlarms operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // See DeleteAlarms for usage and error information.
  19. //
  20. // Creating a request object using this method should be used when you want to inject
  21. // custom logic into the request's lifecycle using a custom handler, or if you want to
  22. // access properties on the request object before or after sending the request. If
  23. // you just want the service response, call the DeleteAlarms method directly
  24. // instead.
  25. //
  26. // Note: You must call the "Send" method on the returned request object in order
  27. // to execute the request.
  28. //
  29. // // Example sending a request using the DeleteAlarmsRequest method.
  30. // req, resp := client.DeleteAlarmsRequest(params)
  31. //
  32. // err := req.Send()
  33. // if err == nil { // resp is now filled
  34. // fmt.Println(resp)
  35. // }
  36. //
  37. func (c *CloudWatch) DeleteAlarmsRequest(input *DeleteAlarmsInput) (req *request.Request, output *DeleteAlarmsOutput) {
  38. op := &request.Operation{
  39. Name: opDeleteAlarms,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &DeleteAlarmsInput{}
  45. }
  46. req = c.newRequest(op, input, output)
  47. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  48. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  49. output = &DeleteAlarmsOutput{}
  50. req.Data = output
  51. return
  52. }
  53. // DeleteAlarms API operation for Amazon CloudWatch.
  54. //
  55. // Deletes all specified alarms. In the event of an error, no alarms are deleted.
  56. //
  57. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  58. // with awserr.Error's Code and Message methods to get detailed information about
  59. // the error.
  60. //
  61. // See the AWS API reference guide for Amazon CloudWatch's
  62. // API operation DeleteAlarms for usage and error information.
  63. //
  64. // Returned Error Codes:
  65. // * ResourceNotFound
  66. // The named resource does not exist.
  67. //
  68. func (c *CloudWatch) DeleteAlarms(input *DeleteAlarmsInput) (*DeleteAlarmsOutput, error) {
  69. req, out := c.DeleteAlarmsRequest(input)
  70. err := req.Send()
  71. return out, err
  72. }
  73. const opDescribeAlarmHistory = "DescribeAlarmHistory"
  74. // DescribeAlarmHistoryRequest generates a "aws/request.Request" representing the
  75. // client's request for the DescribeAlarmHistory operation. The "output" return
  76. // value can be used to capture response data after the request's "Send" method
  77. // is called.
  78. //
  79. // See DescribeAlarmHistory for usage and error information.
  80. //
  81. // Creating a request object using this method should be used when you want to inject
  82. // custom logic into the request's lifecycle using a custom handler, or if you want to
  83. // access properties on the request object before or after sending the request. If
  84. // you just want the service response, call the DescribeAlarmHistory method directly
  85. // instead.
  86. //
  87. // Note: You must call the "Send" method on the returned request object in order
  88. // to execute the request.
  89. //
  90. // // Example sending a request using the DescribeAlarmHistoryRequest method.
  91. // req, resp := client.DescribeAlarmHistoryRequest(params)
  92. //
  93. // err := req.Send()
  94. // if err == nil { // resp is now filled
  95. // fmt.Println(resp)
  96. // }
  97. //
  98. func (c *CloudWatch) DescribeAlarmHistoryRequest(input *DescribeAlarmHistoryInput) (req *request.Request, output *DescribeAlarmHistoryOutput) {
  99. op := &request.Operation{
  100. Name: opDescribeAlarmHistory,
  101. HTTPMethod: "POST",
  102. HTTPPath: "/",
  103. Paginator: &request.Paginator{
  104. InputTokens: []string{"NextToken"},
  105. OutputTokens: []string{"NextToken"},
  106. LimitToken: "MaxRecords",
  107. TruncationToken: "",
  108. },
  109. }
  110. if input == nil {
  111. input = &DescribeAlarmHistoryInput{}
  112. }
  113. req = c.newRequest(op, input, output)
  114. output = &DescribeAlarmHistoryOutput{}
  115. req.Data = output
  116. return
  117. }
  118. // DescribeAlarmHistory API operation for Amazon CloudWatch.
  119. //
  120. // Retrieves history for the specified alarm. Filter alarms by date range or
  121. // item type. If an alarm name is not specified, Amazon CloudWatch returns histories
  122. // for all of the owner's alarms.
  123. //
  124. // Amazon CloudWatch retains the history of an alarm for two weeks, whether
  125. // or not you delete the alarm.
  126. //
  127. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  128. // with awserr.Error's Code and Message methods to get detailed information about
  129. // the error.
  130. //
  131. // See the AWS API reference guide for Amazon CloudWatch's
  132. // API operation DescribeAlarmHistory for usage and error information.
  133. //
  134. // Returned Error Codes:
  135. // * InvalidNextToken
  136. // The next token specified is invalid.
  137. //
  138. func (c *CloudWatch) DescribeAlarmHistory(input *DescribeAlarmHistoryInput) (*DescribeAlarmHistoryOutput, error) {
  139. req, out := c.DescribeAlarmHistoryRequest(input)
  140. err := req.Send()
  141. return out, err
  142. }
  143. // DescribeAlarmHistoryPages iterates over the pages of a DescribeAlarmHistory operation,
  144. // calling the "fn" function with the response data for each page. To stop
  145. // iterating, return false from the fn function.
  146. //
  147. // See DescribeAlarmHistory method for more information on how to use this operation.
  148. //
  149. // Note: This operation can generate multiple requests to a service.
  150. //
  151. // // Example iterating over at most 3 pages of a DescribeAlarmHistory operation.
  152. // pageNum := 0
  153. // err := client.DescribeAlarmHistoryPages(params,
  154. // func(page *DescribeAlarmHistoryOutput, lastPage bool) bool {
  155. // pageNum++
  156. // fmt.Println(page)
  157. // return pageNum <= 3
  158. // })
  159. //
  160. func (c *CloudWatch) DescribeAlarmHistoryPages(input *DescribeAlarmHistoryInput, fn func(p *DescribeAlarmHistoryOutput, lastPage bool) (shouldContinue bool)) error {
  161. page, _ := c.DescribeAlarmHistoryRequest(input)
  162. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  163. return page.EachPage(func(p interface{}, lastPage bool) bool {
  164. return fn(p.(*DescribeAlarmHistoryOutput), lastPage)
  165. })
  166. }
  167. const opDescribeAlarms = "DescribeAlarms"
  168. // DescribeAlarmsRequest generates a "aws/request.Request" representing the
  169. // client's request for the DescribeAlarms operation. The "output" return
  170. // value can be used to capture response data after the request's "Send" method
  171. // is called.
  172. //
  173. // See DescribeAlarms for usage and error information.
  174. //
  175. // Creating a request object using this method should be used when you want to inject
  176. // custom logic into the request's lifecycle using a custom handler, or if you want to
  177. // access properties on the request object before or after sending the request. If
  178. // you just want the service response, call the DescribeAlarms method directly
  179. // instead.
  180. //
  181. // Note: You must call the "Send" method on the returned request object in order
  182. // to execute the request.
  183. //
  184. // // Example sending a request using the DescribeAlarmsRequest method.
  185. // req, resp := client.DescribeAlarmsRequest(params)
  186. //
  187. // err := req.Send()
  188. // if err == nil { // resp is now filled
  189. // fmt.Println(resp)
  190. // }
  191. //
  192. func (c *CloudWatch) DescribeAlarmsRequest(input *DescribeAlarmsInput) (req *request.Request, output *DescribeAlarmsOutput) {
  193. op := &request.Operation{
  194. Name: opDescribeAlarms,
  195. HTTPMethod: "POST",
  196. HTTPPath: "/",
  197. Paginator: &request.Paginator{
  198. InputTokens: []string{"NextToken"},
  199. OutputTokens: []string{"NextToken"},
  200. LimitToken: "MaxRecords",
  201. TruncationToken: "",
  202. },
  203. }
  204. if input == nil {
  205. input = &DescribeAlarmsInput{}
  206. }
  207. req = c.newRequest(op, input, output)
  208. output = &DescribeAlarmsOutput{}
  209. req.Data = output
  210. return
  211. }
  212. // DescribeAlarms API operation for Amazon CloudWatch.
  213. //
  214. // Retrieves alarms with the specified names. If no name is specified, all alarms
  215. // for the user are returned. Alarms can be retrieved by using only a prefix
  216. // for the alarm name, the alarm state, or a prefix for any action.
  217. //
  218. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  219. // with awserr.Error's Code and Message methods to get detailed information about
  220. // the error.
  221. //
  222. // See the AWS API reference guide for Amazon CloudWatch's
  223. // API operation DescribeAlarms for usage and error information.
  224. //
  225. // Returned Error Codes:
  226. // * InvalidNextToken
  227. // The next token specified is invalid.
  228. //
  229. func (c *CloudWatch) DescribeAlarms(input *DescribeAlarmsInput) (*DescribeAlarmsOutput, error) {
  230. req, out := c.DescribeAlarmsRequest(input)
  231. err := req.Send()
  232. return out, err
  233. }
  234. // DescribeAlarmsPages iterates over the pages of a DescribeAlarms operation,
  235. // calling the "fn" function with the response data for each page. To stop
  236. // iterating, return false from the fn function.
  237. //
  238. // See DescribeAlarms method for more information on how to use this operation.
  239. //
  240. // Note: This operation can generate multiple requests to a service.
  241. //
  242. // // Example iterating over at most 3 pages of a DescribeAlarms operation.
  243. // pageNum := 0
  244. // err := client.DescribeAlarmsPages(params,
  245. // func(page *DescribeAlarmsOutput, lastPage bool) bool {
  246. // pageNum++
  247. // fmt.Println(page)
  248. // return pageNum <= 3
  249. // })
  250. //
  251. func (c *CloudWatch) DescribeAlarmsPages(input *DescribeAlarmsInput, fn func(p *DescribeAlarmsOutput, lastPage bool) (shouldContinue bool)) error {
  252. page, _ := c.DescribeAlarmsRequest(input)
  253. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  254. return page.EachPage(func(p interface{}, lastPage bool) bool {
  255. return fn(p.(*DescribeAlarmsOutput), lastPage)
  256. })
  257. }
  258. const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric"
  259. // DescribeAlarmsForMetricRequest generates a "aws/request.Request" representing the
  260. // client's request for the DescribeAlarmsForMetric operation. The "output" return
  261. // value can be used to capture response data after the request's "Send" method
  262. // is called.
  263. //
  264. // See DescribeAlarmsForMetric for usage and error information.
  265. //
  266. // Creating a request object using this method should be used when you want to inject
  267. // custom logic into the request's lifecycle using a custom handler, or if you want to
  268. // access properties on the request object before or after sending the request. If
  269. // you just want the service response, call the DescribeAlarmsForMetric method directly
  270. // instead.
  271. //
  272. // Note: You must call the "Send" method on the returned request object in order
  273. // to execute the request.
  274. //
  275. // // Example sending a request using the DescribeAlarmsForMetricRequest method.
  276. // req, resp := client.DescribeAlarmsForMetricRequest(params)
  277. //
  278. // err := req.Send()
  279. // if err == nil { // resp is now filled
  280. // fmt.Println(resp)
  281. // }
  282. //
  283. func (c *CloudWatch) DescribeAlarmsForMetricRequest(input *DescribeAlarmsForMetricInput) (req *request.Request, output *DescribeAlarmsForMetricOutput) {
  284. op := &request.Operation{
  285. Name: opDescribeAlarmsForMetric,
  286. HTTPMethod: "POST",
  287. HTTPPath: "/",
  288. }
  289. if input == nil {
  290. input = &DescribeAlarmsForMetricInput{}
  291. }
  292. req = c.newRequest(op, input, output)
  293. output = &DescribeAlarmsForMetricOutput{}
  294. req.Data = output
  295. return
  296. }
  297. // DescribeAlarmsForMetric API operation for Amazon CloudWatch.
  298. //
  299. // Retrieves all alarms for a single metric. Specify a statistic, period, or
  300. // unit to filter the set of alarms further.
  301. //
  302. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  303. // with awserr.Error's Code and Message methods to get detailed information about
  304. // the error.
  305. //
  306. // See the AWS API reference guide for Amazon CloudWatch's
  307. // API operation DescribeAlarmsForMetric for usage and error information.
  308. func (c *CloudWatch) DescribeAlarmsForMetric(input *DescribeAlarmsForMetricInput) (*DescribeAlarmsForMetricOutput, error) {
  309. req, out := c.DescribeAlarmsForMetricRequest(input)
  310. err := req.Send()
  311. return out, err
  312. }
  313. const opDisableAlarmActions = "DisableAlarmActions"
  314. // DisableAlarmActionsRequest generates a "aws/request.Request" representing the
  315. // client's request for the DisableAlarmActions operation. The "output" return
  316. // value can be used to capture response data after the request's "Send" method
  317. // is called.
  318. //
  319. // See DisableAlarmActions for usage and error information.
  320. //
  321. // Creating a request object using this method should be used when you want to inject
  322. // custom logic into the request's lifecycle using a custom handler, or if you want to
  323. // access properties on the request object before or after sending the request. If
  324. // you just want the service response, call the DisableAlarmActions method directly
  325. // instead.
  326. //
  327. // Note: You must call the "Send" method on the returned request object in order
  328. // to execute the request.
  329. //
  330. // // Example sending a request using the DisableAlarmActionsRequest method.
  331. // req, resp := client.DisableAlarmActionsRequest(params)
  332. //
  333. // err := req.Send()
  334. // if err == nil { // resp is now filled
  335. // fmt.Println(resp)
  336. // }
  337. //
  338. func (c *CloudWatch) DisableAlarmActionsRequest(input *DisableAlarmActionsInput) (req *request.Request, output *DisableAlarmActionsOutput) {
  339. op := &request.Operation{
  340. Name: opDisableAlarmActions,
  341. HTTPMethod: "POST",
  342. HTTPPath: "/",
  343. }
  344. if input == nil {
  345. input = &DisableAlarmActionsInput{}
  346. }
  347. req = c.newRequest(op, input, output)
  348. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  349. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  350. output = &DisableAlarmActionsOutput{}
  351. req.Data = output
  352. return
  353. }
  354. // DisableAlarmActions API operation for Amazon CloudWatch.
  355. //
  356. // Disables actions for the specified alarms. When an alarm's actions are disabled
  357. // the alarm's state may change, but none of the alarm's actions will execute.
  358. //
  359. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  360. // with awserr.Error's Code and Message methods to get detailed information about
  361. // the error.
  362. //
  363. // See the AWS API reference guide for Amazon CloudWatch's
  364. // API operation DisableAlarmActions for usage and error information.
  365. func (c *CloudWatch) DisableAlarmActions(input *DisableAlarmActionsInput) (*DisableAlarmActionsOutput, error) {
  366. req, out := c.DisableAlarmActionsRequest(input)
  367. err := req.Send()
  368. return out, err
  369. }
  370. const opEnableAlarmActions = "EnableAlarmActions"
  371. // EnableAlarmActionsRequest generates a "aws/request.Request" representing the
  372. // client's request for the EnableAlarmActions operation. The "output" return
  373. // value can be used to capture response data after the request's "Send" method
  374. // is called.
  375. //
  376. // See EnableAlarmActions for usage and error information.
  377. //
  378. // Creating a request object using this method should be used when you want to inject
  379. // custom logic into the request's lifecycle using a custom handler, or if you want to
  380. // access properties on the request object before or after sending the request. If
  381. // you just want the service response, call the EnableAlarmActions method directly
  382. // instead.
  383. //
  384. // Note: You must call the "Send" method on the returned request object in order
  385. // to execute the request.
  386. //
  387. // // Example sending a request using the EnableAlarmActionsRequest method.
  388. // req, resp := client.EnableAlarmActionsRequest(params)
  389. //
  390. // err := req.Send()
  391. // if err == nil { // resp is now filled
  392. // fmt.Println(resp)
  393. // }
  394. //
  395. func (c *CloudWatch) EnableAlarmActionsRequest(input *EnableAlarmActionsInput) (req *request.Request, output *EnableAlarmActionsOutput) {
  396. op := &request.Operation{
  397. Name: opEnableAlarmActions,
  398. HTTPMethod: "POST",
  399. HTTPPath: "/",
  400. }
  401. if input == nil {
  402. input = &EnableAlarmActionsInput{}
  403. }
  404. req = c.newRequest(op, input, output)
  405. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  406. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  407. output = &EnableAlarmActionsOutput{}
  408. req.Data = output
  409. return
  410. }
  411. // EnableAlarmActions API operation for Amazon CloudWatch.
  412. //
  413. // Enables actions for the specified alarms.
  414. //
  415. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  416. // with awserr.Error's Code and Message methods to get detailed information about
  417. // the error.
  418. //
  419. // See the AWS API reference guide for Amazon CloudWatch's
  420. // API operation EnableAlarmActions for usage and error information.
  421. func (c *CloudWatch) EnableAlarmActions(input *EnableAlarmActionsInput) (*EnableAlarmActionsOutput, error) {
  422. req, out := c.EnableAlarmActionsRequest(input)
  423. err := req.Send()
  424. return out, err
  425. }
  426. const opGetMetricStatistics = "GetMetricStatistics"
  427. // GetMetricStatisticsRequest generates a "aws/request.Request" representing the
  428. // client's request for the GetMetricStatistics operation. The "output" return
  429. // value can be used to capture response data after the request's "Send" method
  430. // is called.
  431. //
  432. // See GetMetricStatistics for usage and error information.
  433. //
  434. // Creating a request object using this method should be used when you want to inject
  435. // custom logic into the request's lifecycle using a custom handler, or if you want to
  436. // access properties on the request object before or after sending the request. If
  437. // you just want the service response, call the GetMetricStatistics method directly
  438. // instead.
  439. //
  440. // Note: You must call the "Send" method on the returned request object in order
  441. // to execute the request.
  442. //
  443. // // Example sending a request using the GetMetricStatisticsRequest method.
  444. // req, resp := client.GetMetricStatisticsRequest(params)
  445. //
  446. // err := req.Send()
  447. // if err == nil { // resp is now filled
  448. // fmt.Println(resp)
  449. // }
  450. //
  451. func (c *CloudWatch) GetMetricStatisticsRequest(input *GetMetricStatisticsInput) (req *request.Request, output *GetMetricStatisticsOutput) {
  452. op := &request.Operation{
  453. Name: opGetMetricStatistics,
  454. HTTPMethod: "POST",
  455. HTTPPath: "/",
  456. }
  457. if input == nil {
  458. input = &GetMetricStatisticsInput{}
  459. }
  460. req = c.newRequest(op, input, output)
  461. output = &GetMetricStatisticsOutput{}
  462. req.Data = output
  463. return
  464. }
  465. // GetMetricStatistics API operation for Amazon CloudWatch.
  466. //
  467. // Gets statistics for the specified metric.
  468. //
  469. // The maximum number of data points that can be queried is 50,850, whereas
  470. // the maximum number of data points returned from a single GetMetricStatistics
  471. // request is 1,440. If you make a request that generates more than 1,440 data
  472. // points, Amazon CloudWatch returns an error. In such a case, you can alter
  473. // the request by narrowing the specified time range or increasing the specified
  474. // period. A period can be as short as one minute (60 seconds) or as long as
  475. // one day (86,400 seconds). Alternatively, you can make multiple requests across
  476. // adjacent time ranges. GetMetricStatistics does not return the data in chronological
  477. // order.
  478. //
  479. // Amazon CloudWatch aggregates data points based on the length of the period
  480. // that you specify. For example, if you request statistics with a one-minute
  481. // granularity, Amazon CloudWatch aggregates data points with time stamps that
  482. // fall within the same one-minute period. In such a case, the data points queried
  483. // can greatly outnumber the data points returned.
  484. //
  485. // The following examples show various statistics allowed by the data point
  486. // query maximum of 50,850 when you call GetMetricStatistics on Amazon EC2 instances
  487. // with detailed (one-minute) monitoring enabled:
  488. //
  489. // * Statistics for up to 400 instances for a span of one hour
  490. //
  491. // * Statistics for up to 35 instances over a span of 24 hours
  492. //
  493. // * Statistics for up to 2 instances over a span of 2 weeks
  494. //
  495. // For information about the namespace, metric names, and dimensions that other
  496. // Amazon Web Services products use to send metrics to CloudWatch, go to Amazon
  497. // CloudWatch Metrics, Namespaces, and Dimensions Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html)
  498. // in the Amazon CloudWatch Developer Guide.
  499. //
  500. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  501. // with awserr.Error's Code and Message methods to get detailed information about
  502. // the error.
  503. //
  504. // See the AWS API reference guide for Amazon CloudWatch's
  505. // API operation GetMetricStatistics for usage and error information.
  506. //
  507. // Returned Error Codes:
  508. // * InvalidParameterValue
  509. // Bad or out-of-range value was supplied for the input parameter.
  510. //
  511. // * MissingParameter
  512. // An input parameter that is mandatory for processing the request is not supplied.
  513. //
  514. // * InvalidParameterCombination
  515. // Parameters that must not be used together were used together.
  516. //
  517. // * InternalServiceError
  518. // Indicates that the request processing has failed due to some unknown error,
  519. // exception, or failure.
  520. //
  521. func (c *CloudWatch) GetMetricStatistics(input *GetMetricStatisticsInput) (*GetMetricStatisticsOutput, error) {
  522. req, out := c.GetMetricStatisticsRequest(input)
  523. err := req.Send()
  524. return out, err
  525. }
  526. const opListMetrics = "ListMetrics"
  527. // ListMetricsRequest generates a "aws/request.Request" representing the
  528. // client's request for the ListMetrics operation. The "output" return
  529. // value can be used to capture response data after the request's "Send" method
  530. // is called.
  531. //
  532. // See ListMetrics for usage and error information.
  533. //
  534. // Creating a request object using this method should be used when you want to inject
  535. // custom logic into the request's lifecycle using a custom handler, or if you want to
  536. // access properties on the request object before or after sending the request. If
  537. // you just want the service response, call the ListMetrics method directly
  538. // instead.
  539. //
  540. // Note: You must call the "Send" method on the returned request object in order
  541. // to execute the request.
  542. //
  543. // // Example sending a request using the ListMetricsRequest method.
  544. // req, resp := client.ListMetricsRequest(params)
  545. //
  546. // err := req.Send()
  547. // if err == nil { // resp is now filled
  548. // fmt.Println(resp)
  549. // }
  550. //
  551. func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.Request, output *ListMetricsOutput) {
  552. op := &request.Operation{
  553. Name: opListMetrics,
  554. HTTPMethod: "POST",
  555. HTTPPath: "/",
  556. Paginator: &request.Paginator{
  557. InputTokens: []string{"NextToken"},
  558. OutputTokens: []string{"NextToken"},
  559. LimitToken: "",
  560. TruncationToken: "",
  561. },
  562. }
  563. if input == nil {
  564. input = &ListMetricsInput{}
  565. }
  566. req = c.newRequest(op, input, output)
  567. output = &ListMetricsOutput{}
  568. req.Data = output
  569. return
  570. }
  571. // ListMetrics API operation for Amazon CloudWatch.
  572. //
  573. // Returns a list of valid metrics stored for the AWS account owner. Returned
  574. // metrics can be used with GetMetricStatistics to obtain statistical data for
  575. // a given metric.
  576. //
  577. // Up to 500 results are returned for any one call. To retrieve further results,
  578. // use returned NextToken values with subsequent ListMetrics operations.
  579. //
  580. // If you create a metric with PutMetricData, allow up to fifteen minutes for
  581. // the metric to appear in calls to ListMetrics. Statistics about the metric,
  582. // however, are available sooner using GetMetricStatistics.
  583. //
  584. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  585. // with awserr.Error's Code and Message methods to get detailed information about
  586. // the error.
  587. //
  588. // See the AWS API reference guide for Amazon CloudWatch's
  589. // API operation ListMetrics for usage and error information.
  590. //
  591. // Returned Error Codes:
  592. // * InternalServiceError
  593. // Indicates that the request processing has failed due to some unknown error,
  594. // exception, or failure.
  595. //
  596. // * InvalidParameterValue
  597. // Bad or out-of-range value was supplied for the input parameter.
  598. //
  599. func (c *CloudWatch) ListMetrics(input *ListMetricsInput) (*ListMetricsOutput, error) {
  600. req, out := c.ListMetricsRequest(input)
  601. err := req.Send()
  602. return out, err
  603. }
  604. // ListMetricsPages iterates over the pages of a ListMetrics operation,
  605. // calling the "fn" function with the response data for each page. To stop
  606. // iterating, return false from the fn function.
  607. //
  608. // See ListMetrics method for more information on how to use this operation.
  609. //
  610. // Note: This operation can generate multiple requests to a service.
  611. //
  612. // // Example iterating over at most 3 pages of a ListMetrics operation.
  613. // pageNum := 0
  614. // err := client.ListMetricsPages(params,
  615. // func(page *ListMetricsOutput, lastPage bool) bool {
  616. // pageNum++
  617. // fmt.Println(page)
  618. // return pageNum <= 3
  619. // })
  620. //
  621. func (c *CloudWatch) ListMetricsPages(input *ListMetricsInput, fn func(p *ListMetricsOutput, lastPage bool) (shouldContinue bool)) error {
  622. page, _ := c.ListMetricsRequest(input)
  623. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  624. return page.EachPage(func(p interface{}, lastPage bool) bool {
  625. return fn(p.(*ListMetricsOutput), lastPage)
  626. })
  627. }
  628. const opPutMetricAlarm = "PutMetricAlarm"
  629. // PutMetricAlarmRequest generates a "aws/request.Request" representing the
  630. // client's request for the PutMetricAlarm operation. The "output" return
  631. // value can be used to capture response data after the request's "Send" method
  632. // is called.
  633. //
  634. // See PutMetricAlarm for usage and error information.
  635. //
  636. // Creating a request object using this method should be used when you want to inject
  637. // custom logic into the request's lifecycle using a custom handler, or if you want to
  638. // access properties on the request object before or after sending the request. If
  639. // you just want the service response, call the PutMetricAlarm method directly
  640. // instead.
  641. //
  642. // Note: You must call the "Send" method on the returned request object in order
  643. // to execute the request.
  644. //
  645. // // Example sending a request using the PutMetricAlarmRequest method.
  646. // req, resp := client.PutMetricAlarmRequest(params)
  647. //
  648. // err := req.Send()
  649. // if err == nil { // resp is now filled
  650. // fmt.Println(resp)
  651. // }
  652. //
  653. func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *request.Request, output *PutMetricAlarmOutput) {
  654. op := &request.Operation{
  655. Name: opPutMetricAlarm,
  656. HTTPMethod: "POST",
  657. HTTPPath: "/",
  658. }
  659. if input == nil {
  660. input = &PutMetricAlarmInput{}
  661. }
  662. req = c.newRequest(op, input, output)
  663. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  664. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  665. output = &PutMetricAlarmOutput{}
  666. req.Data = output
  667. return
  668. }
  669. // PutMetricAlarm API operation for Amazon CloudWatch.
  670. //
  671. // Creates or updates an alarm and associates it with the specified Amazon CloudWatch
  672. // metric. Optionally, this operation can associate one or more Amazon SNS resources
  673. // with the alarm.
  674. //
  675. // When this operation creates an alarm, the alarm state is immediately set
  676. // to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is set appropriately.
  677. // Any actions associated with the StateValue are then executed.
  678. //
  679. // When updating an existing alarm, its StateValue is left unchanged, but it
  680. // completely overwrites the alarm's previous configuration.
  681. //
  682. // If you are using an AWS Identity and Access Management (IAM) account to create
  683. // or modify an alarm, you must have the following Amazon EC2 permissions:
  684. //
  685. // ec2:DescribeInstanceStatus and ec2:DescribeInstances for all alarms on Amazon
  686. // EC2 instance status metrics.
  687. //
  688. // ec2:StopInstances for alarms with stop actions.
  689. //
  690. // ec2:TerminateInstances for alarms with terminate actions.
  691. //
  692. // ec2:DescribeInstanceRecoveryAttribute, and ec2:RecoverInstances for alarms
  693. // with recover actions.
  694. //
  695. // If you have read/write permissions for Amazon CloudWatch but not for Amazon
  696. // EC2, you can still create an alarm but the stop or terminate actions won't
  697. // be performed on the Amazon EC2 instance. However, if you are later granted
  698. // permission to use the associated Amazon EC2 APIs, the alarm actions you created
  699. // earlier will be performed. For more information about IAM permissions, see
  700. // Permissions and Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html)
  701. // in Using IAM.
  702. //
  703. // If you are using an IAM role (e.g., an Amazon EC2 instance profile), you
  704. // cannot stop or terminate the instance using alarm actions. However, you can
  705. // still see the alarm state and perform any other actions such as Amazon SNS
  706. // notifications or Auto Scaling policies.
  707. //
  708. // If you are using temporary security credentials granted using the AWS Security
  709. // Token Service (AWS STS), you cannot stop or terminate an Amazon EC2 instance
  710. // using alarm actions.
  711. //
  712. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  713. // with awserr.Error's Code and Message methods to get detailed information about
  714. // the error.
  715. //
  716. // See the AWS API reference guide for Amazon CloudWatch's
  717. // API operation PutMetricAlarm for usage and error information.
  718. //
  719. // Returned Error Codes:
  720. // * LimitExceeded
  721. // The quota for alarms for this customer has already been reached.
  722. //
  723. func (c *CloudWatch) PutMetricAlarm(input *PutMetricAlarmInput) (*PutMetricAlarmOutput, error) {
  724. req, out := c.PutMetricAlarmRequest(input)
  725. err := req.Send()
  726. return out, err
  727. }
  728. const opPutMetricData = "PutMetricData"
  729. // PutMetricDataRequest generates a "aws/request.Request" representing the
  730. // client's request for the PutMetricData operation. The "output" return
  731. // value can be used to capture response data after the request's "Send" method
  732. // is called.
  733. //
  734. // See PutMetricData for usage and error information.
  735. //
  736. // Creating a request object using this method should be used when you want to inject
  737. // custom logic into the request's lifecycle using a custom handler, or if you want to
  738. // access properties on the request object before or after sending the request. If
  739. // you just want the service response, call the PutMetricData method directly
  740. // instead.
  741. //
  742. // Note: You must call the "Send" method on the returned request object in order
  743. // to execute the request.
  744. //
  745. // // Example sending a request using the PutMetricDataRequest method.
  746. // req, resp := client.PutMetricDataRequest(params)
  747. //
  748. // err := req.Send()
  749. // if err == nil { // resp is now filled
  750. // fmt.Println(resp)
  751. // }
  752. //
  753. func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *request.Request, output *PutMetricDataOutput) {
  754. op := &request.Operation{
  755. Name: opPutMetricData,
  756. HTTPMethod: "POST",
  757. HTTPPath: "/",
  758. }
  759. if input == nil {
  760. input = &PutMetricDataInput{}
  761. }
  762. req = c.newRequest(op, input, output)
  763. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  764. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  765. output = &PutMetricDataOutput{}
  766. req.Data = output
  767. return
  768. }
  769. // PutMetricData API operation for Amazon CloudWatch.
  770. //
  771. // Publishes metric data points to Amazon CloudWatch. Amazon CloudWatch associates
  772. // the data points with the specified metric. If the specified metric does not
  773. // exist, Amazon CloudWatch creates the metric. When Amazon CloudWatch creates
  774. // a metric, it can take up to fifteen minutes for the metric to appear in calls
  775. // to ListMetrics.
  776. //
  777. // Each PutMetricData request is limited to 8 KB in size for HTTP GET requests
  778. // and is limited to 40 KB in size for HTTP POST requests.
  779. //
  780. // Although the Value parameter accepts numbers of type Double, Amazon CloudWatch
  781. // rejects values that are either too small or too large. Values must be in
  782. // the range of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360
  783. // (Base 2). In addition, special values (e.g., NaN, +Infinity, -Infinity) are
  784. // not supported.
  785. //
  786. // Data that is timestamped 24 hours or more in the past may take in excess
  787. // of 48 hours to become available from submission time using GetMetricStatistics.
  788. //
  789. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  790. // with awserr.Error's Code and Message methods to get detailed information about
  791. // the error.
  792. //
  793. // See the AWS API reference guide for Amazon CloudWatch's
  794. // API operation PutMetricData for usage and error information.
  795. //
  796. // Returned Error Codes:
  797. // * InvalidParameterValue
  798. // Bad or out-of-range value was supplied for the input parameter.
  799. //
  800. // * MissingParameter
  801. // An input parameter that is mandatory for processing the request is not supplied.
  802. //
  803. // * InvalidParameterCombination
  804. // Parameters that must not be used together were used together.
  805. //
  806. // * InternalServiceError
  807. // Indicates that the request processing has failed due to some unknown error,
  808. // exception, or failure.
  809. //
  810. func (c *CloudWatch) PutMetricData(input *PutMetricDataInput) (*PutMetricDataOutput, error) {
  811. req, out := c.PutMetricDataRequest(input)
  812. err := req.Send()
  813. return out, err
  814. }
  815. const opSetAlarmState = "SetAlarmState"
  816. // SetAlarmStateRequest generates a "aws/request.Request" representing the
  817. // client's request for the SetAlarmState operation. The "output" return
  818. // value can be used to capture response data after the request's "Send" method
  819. // is called.
  820. //
  821. // See SetAlarmState for usage and error information.
  822. //
  823. // Creating a request object using this method should be used when you want to inject
  824. // custom logic into the request's lifecycle using a custom handler, or if you want to
  825. // access properties on the request object before or after sending the request. If
  826. // you just want the service response, call the SetAlarmState method directly
  827. // instead.
  828. //
  829. // Note: You must call the "Send" method on the returned request object in order
  830. // to execute the request.
  831. //
  832. // // Example sending a request using the SetAlarmStateRequest method.
  833. // req, resp := client.SetAlarmStateRequest(params)
  834. //
  835. // err := req.Send()
  836. // if err == nil { // resp is now filled
  837. // fmt.Println(resp)
  838. // }
  839. //
  840. func (c *CloudWatch) SetAlarmStateRequest(input *SetAlarmStateInput) (req *request.Request, output *SetAlarmStateOutput) {
  841. op := &request.Operation{
  842. Name: opSetAlarmState,
  843. HTTPMethod: "POST",
  844. HTTPPath: "/",
  845. }
  846. if input == nil {
  847. input = &SetAlarmStateInput{}
  848. }
  849. req = c.newRequest(op, input, output)
  850. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  851. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  852. output = &SetAlarmStateOutput{}
  853. req.Data = output
  854. return
  855. }
  856. // SetAlarmState API operation for Amazon CloudWatch.
  857. //
  858. // Temporarily sets the state of an alarm for testing purposes. When the updated
  859. // StateValue differs from the previous value, the action configured for the
  860. // appropriate state is invoked. For example, if your alarm is configured to
  861. // send an Amazon SNS message when an alarm is triggered, temporarily changing
  862. // the alarm's state to ALARM sends an Amazon SNS message. The alarm returns
  863. // to its actual state (often within seconds). Because the alarm state change
  864. // happens very quickly, it is typically only visible in the alarm's History
  865. // tab in the Amazon CloudWatch console or through DescribeAlarmHistory.
  866. //
  867. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  868. // with awserr.Error's Code and Message methods to get detailed information about
  869. // the error.
  870. //
  871. // See the AWS API reference guide for Amazon CloudWatch's
  872. // API operation SetAlarmState for usage and error information.
  873. //
  874. // Returned Error Codes:
  875. // * ResourceNotFound
  876. // The named resource does not exist.
  877. //
  878. // * InvalidFormat
  879. // Data was not syntactically valid JSON.
  880. //
  881. func (c *CloudWatch) SetAlarmState(input *SetAlarmStateInput) (*SetAlarmStateOutput, error) {
  882. req, out := c.SetAlarmStateRequest(input)
  883. err := req.Send()
  884. return out, err
  885. }
  886. // The AlarmHistoryItem data type contains descriptive information about the
  887. // history of a specific alarm. If you call DescribeAlarmHistory, Amazon CloudWatch
  888. // returns this data type as part of the DescribeAlarmHistoryResult data type.
  889. type AlarmHistoryItem struct {
  890. _ struct{} `type:"structure"`
  891. // The descriptive name for the alarm.
  892. AlarmName *string `min:"1" type:"string"`
  893. // Machine-readable data about the alarm in JSON format.
  894. HistoryData *string `min:"1" type:"string"`
  895. // The type of alarm history item.
  896. HistoryItemType *string `type:"string" enum:"HistoryItemType"`
  897. // A human-readable summary of the alarm history.
  898. HistorySummary *string `min:"1" type:"string"`
  899. // The time stamp for the alarm history item.
  900. Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  901. }
  902. // String returns the string representation
  903. func (s AlarmHistoryItem) String() string {
  904. return awsutil.Prettify(s)
  905. }
  906. // GoString returns the string representation
  907. func (s AlarmHistoryItem) GoString() string {
  908. return s.String()
  909. }
  910. // The Datapoint data type encapsulates the statistical data that Amazon CloudWatch
  911. // computes from metric data.
  912. type Datapoint struct {
  913. _ struct{} `type:"structure"`
  914. // The average of metric values that correspond to the datapoint.
  915. Average *float64 `type:"double"`
  916. // The maximum of the metric value used for the datapoint.
  917. Maximum *float64 `type:"double"`
  918. // The minimum metric value used for the datapoint.
  919. Minimum *float64 `type:"double"`
  920. // The number of metric values that contributed to the aggregate value of this
  921. // datapoint.
  922. SampleCount *float64 `type:"double"`
  923. // The sum of metric values used for the datapoint.
  924. Sum *float64 `type:"double"`
  925. // The time stamp used for the datapoint.
  926. Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  927. // The standard unit used for the datapoint.
  928. Unit *string `type:"string" enum:"StandardUnit"`
  929. }
  930. // String returns the string representation
  931. func (s Datapoint) String() string {
  932. return awsutil.Prettify(s)
  933. }
  934. // GoString returns the string representation
  935. func (s Datapoint) GoString() string {
  936. return s.String()
  937. }
  938. // Describes the inputs for DeleteAlarms.
  939. type DeleteAlarmsInput struct {
  940. _ struct{} `type:"structure"`
  941. // A list of alarms to be deleted.
  942. //
  943. // AlarmNames is a required field
  944. AlarmNames []*string `type:"list" required:"true"`
  945. }
  946. // String returns the string representation
  947. func (s DeleteAlarmsInput) String() string {
  948. return awsutil.Prettify(s)
  949. }
  950. // GoString returns the string representation
  951. func (s DeleteAlarmsInput) GoString() string {
  952. return s.String()
  953. }
  954. // Validate inspects the fields of the type to determine if they are valid.
  955. func (s *DeleteAlarmsInput) Validate() error {
  956. invalidParams := request.ErrInvalidParams{Context: "DeleteAlarmsInput"}
  957. if s.AlarmNames == nil {
  958. invalidParams.Add(request.NewErrParamRequired("AlarmNames"))
  959. }
  960. if invalidParams.Len() > 0 {
  961. return invalidParams
  962. }
  963. return nil
  964. }
  965. type DeleteAlarmsOutput struct {
  966. _ struct{} `type:"structure"`
  967. }
  968. // String returns the string representation
  969. func (s DeleteAlarmsOutput) String() string {
  970. return awsutil.Prettify(s)
  971. }
  972. // GoString returns the string representation
  973. func (s DeleteAlarmsOutput) GoString() string {
  974. return s.String()
  975. }
  976. // Describes the inputs for DescribeAlarmHistory.
  977. type DescribeAlarmHistoryInput struct {
  978. _ struct{} `type:"structure"`
  979. // The name of the alarm.
  980. AlarmName *string `min:"1" type:"string"`
  981. // The ending date to retrieve alarm history.
  982. EndDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  983. // The type of alarm histories to retrieve.
  984. HistoryItemType *string `type:"string" enum:"HistoryItemType"`
  985. // The maximum number of alarm history records to retrieve.
  986. MaxRecords *int64 `min:"1" type:"integer"`
  987. // The token returned by a previous call to indicate that there is more data
  988. // available.
  989. NextToken *string `type:"string"`
  990. // The starting date to retrieve alarm history.
  991. StartDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  992. }
  993. // String returns the string representation
  994. func (s DescribeAlarmHistoryInput) String() string {
  995. return awsutil.Prettify(s)
  996. }
  997. // GoString returns the string representation
  998. func (s DescribeAlarmHistoryInput) GoString() string {
  999. return s.String()
  1000. }
  1001. // Validate inspects the fields of the type to determine if they are valid.
  1002. func (s *DescribeAlarmHistoryInput) Validate() error {
  1003. invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmHistoryInput"}
  1004. if s.AlarmName != nil && len(*s.AlarmName) < 1 {
  1005. invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1))
  1006. }
  1007. if s.MaxRecords != nil && *s.MaxRecords < 1 {
  1008. invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1))
  1009. }
  1010. if invalidParams.Len() > 0 {
  1011. return invalidParams
  1012. }
  1013. return nil
  1014. }
  1015. // The output for DescribeAlarmHistory.
  1016. type DescribeAlarmHistoryOutput struct {
  1017. _ struct{} `type:"structure"`
  1018. // A list of alarm histories in JSON format.
  1019. AlarmHistoryItems []*AlarmHistoryItem `type:"list"`
  1020. // A string that marks the start of the next batch of returned results.
  1021. NextToken *string `type:"string"`
  1022. }
  1023. // String returns the string representation
  1024. func (s DescribeAlarmHistoryOutput) String() string {
  1025. return awsutil.Prettify(s)
  1026. }
  1027. // GoString returns the string representation
  1028. func (s DescribeAlarmHistoryOutput) GoString() string {
  1029. return s.String()
  1030. }
  1031. // Describes the inputs for DescribeAlarmsForMetric.
  1032. type DescribeAlarmsForMetricInput struct {
  1033. _ struct{} `type:"structure"`
  1034. // The list of dimensions associated with the metric. If the metric has any
  1035. // associated dimensions, you must specify them in order for the DescribeAlarmsForMetric
  1036. // to succeed.
  1037. Dimensions []*Dimension `type:"list"`
  1038. // The name of the metric.
  1039. //
  1040. // MetricName is a required field
  1041. MetricName *string `min:"1" type:"string" required:"true"`
  1042. // The namespace of the metric.
  1043. //
  1044. // Namespace is a required field
  1045. Namespace *string `min:"1" type:"string" required:"true"`
  1046. // The period in seconds over which the statistic is applied.
  1047. Period *int64 `min:"60" type:"integer"`
  1048. // The statistic for the metric.
  1049. Statistic *string `type:"string" enum:"Statistic"`
  1050. // The unit for the metric.
  1051. Unit *string `type:"string" enum:"StandardUnit"`
  1052. }
  1053. // String returns the string representation
  1054. func (s DescribeAlarmsForMetricInput) String() string {
  1055. return awsutil.Prettify(s)
  1056. }
  1057. // GoString returns the string representation
  1058. func (s DescribeAlarmsForMetricInput) GoString() string {
  1059. return s.String()
  1060. }
  1061. // Validate inspects the fields of the type to determine if they are valid.
  1062. func (s *DescribeAlarmsForMetricInput) Validate() error {
  1063. invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmsForMetricInput"}
  1064. if s.MetricName == nil {
  1065. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  1066. }
  1067. if s.MetricName != nil && len(*s.MetricName) < 1 {
  1068. invalidParams.Add(request.NewErrParamMinLen("MetricName", 1))
  1069. }
  1070. if s.Namespace == nil {
  1071. invalidParams.Add(request.NewErrParamRequired("Namespace"))
  1072. }
  1073. if s.Namespace != nil && len(*s.Namespace) < 1 {
  1074. invalidParams.Add(request.NewErrParamMinLen("Namespace", 1))
  1075. }
  1076. if s.Period != nil && *s.Period < 60 {
  1077. invalidParams.Add(request.NewErrParamMinValue("Period", 60))
  1078. }
  1079. if s.Dimensions != nil {
  1080. for i, v := range s.Dimensions {
  1081. if v == nil {
  1082. continue
  1083. }
  1084. if err := v.Validate(); err != nil {
  1085. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
  1086. }
  1087. }
  1088. }
  1089. if invalidParams.Len() > 0 {
  1090. return invalidParams
  1091. }
  1092. return nil
  1093. }
  1094. // The output for DescribeAlarmsForMetric.
  1095. type DescribeAlarmsForMetricOutput struct {
  1096. _ struct{} `type:"structure"`
  1097. // A list of information for each alarm with the specified metric.
  1098. MetricAlarms []*MetricAlarm `type:"list"`
  1099. }
  1100. // String returns the string representation
  1101. func (s DescribeAlarmsForMetricOutput) String() string {
  1102. return awsutil.Prettify(s)
  1103. }
  1104. // GoString returns the string representation
  1105. func (s DescribeAlarmsForMetricOutput) GoString() string {
  1106. return s.String()
  1107. }
  1108. // Describes the inputs for DescribeAlarms.
  1109. type DescribeAlarmsInput struct {
  1110. _ struct{} `type:"structure"`
  1111. // The action name prefix.
  1112. ActionPrefix *string `min:"1" type:"string"`
  1113. // The alarm name prefix. AlarmNames cannot be specified if this parameter is
  1114. // specified.
  1115. AlarmNamePrefix *string `min:"1" type:"string"`
  1116. // A list of alarm names to retrieve information for.
  1117. AlarmNames []*string `type:"list"`
  1118. // The maximum number of alarm descriptions to retrieve.
  1119. MaxRecords *int64 `min:"1" type:"integer"`
  1120. // The token returned by a previous call to indicate that there is more data
  1121. // available.
  1122. NextToken *string `type:"string"`
  1123. // The state value to be used in matching alarms.
  1124. StateValue *string `type:"string" enum:"StateValue"`
  1125. }
  1126. // String returns the string representation
  1127. func (s DescribeAlarmsInput) String() string {
  1128. return awsutil.Prettify(s)
  1129. }
  1130. // GoString returns the string representation
  1131. func (s DescribeAlarmsInput) GoString() string {
  1132. return s.String()
  1133. }
  1134. // Validate inspects the fields of the type to determine if they are valid.
  1135. func (s *DescribeAlarmsInput) Validate() error {
  1136. invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmsInput"}
  1137. if s.ActionPrefix != nil && len(*s.ActionPrefix) < 1 {
  1138. invalidParams.Add(request.NewErrParamMinLen("ActionPrefix", 1))
  1139. }
  1140. if s.AlarmNamePrefix != nil && len(*s.AlarmNamePrefix) < 1 {
  1141. invalidParams.Add(request.NewErrParamMinLen("AlarmNamePrefix", 1))
  1142. }
  1143. if s.MaxRecords != nil && *s.MaxRecords < 1 {
  1144. invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1))
  1145. }
  1146. if invalidParams.Len() > 0 {
  1147. return invalidParams
  1148. }
  1149. return nil
  1150. }
  1151. // The output for DescribeAlarms.
  1152. type DescribeAlarmsOutput struct {
  1153. _ struct{} `type:"structure"`
  1154. // A list of information for the specified alarms.
  1155. MetricAlarms []*MetricAlarm `type:"list"`
  1156. // A string that marks the start of the next batch of returned results.
  1157. NextToken *string `type:"string"`
  1158. }
  1159. // String returns the string representation
  1160. func (s DescribeAlarmsOutput) String() string {
  1161. return awsutil.Prettify(s)
  1162. }
  1163. // GoString returns the string representation
  1164. func (s DescribeAlarmsOutput) GoString() string {
  1165. return s.String()
  1166. }
  1167. // The Dimension data type further expands on the identity of a metric using
  1168. // a Name, Value pair.
  1169. //
  1170. // For examples that use one or more dimensions, see PutMetricData.
  1171. type Dimension struct {
  1172. _ struct{} `type:"structure"`
  1173. // The name of the dimension.
  1174. //
  1175. // Name is a required field
  1176. Name *string `min:"1" type:"string" required:"true"`
  1177. // The value representing the dimension measurement
  1178. //
  1179. // Value is a required field
  1180. Value *string `min:"1" type:"string" required:"true"`
  1181. }
  1182. // String returns the string representation
  1183. func (s Dimension) String() string {
  1184. return awsutil.Prettify(s)
  1185. }
  1186. // GoString returns the string representation
  1187. func (s Dimension) GoString() string {
  1188. return s.String()
  1189. }
  1190. // Validate inspects the fields of the type to determine if they are valid.
  1191. func (s *Dimension) Validate() error {
  1192. invalidParams := request.ErrInvalidParams{Context: "Dimension"}
  1193. if s.Name == nil {
  1194. invalidParams.Add(request.NewErrParamRequired("Name"))
  1195. }
  1196. if s.Name != nil && len(*s.Name) < 1 {
  1197. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1198. }
  1199. if s.Value == nil {
  1200. invalidParams.Add(request.NewErrParamRequired("Value"))
  1201. }
  1202. if s.Value != nil && len(*s.Value) < 1 {
  1203. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  1204. }
  1205. if invalidParams.Len() > 0 {
  1206. return invalidParams
  1207. }
  1208. return nil
  1209. }
  1210. // The DimensionFilter data type is used to filter ListMetrics results.
  1211. type DimensionFilter struct {
  1212. _ struct{} `type:"structure"`
  1213. // The dimension name to be matched.
  1214. //
  1215. // Name is a required field
  1216. Name *string `min:"1" type:"string" required:"true"`
  1217. // The value of the dimension to be matched.
  1218. //
  1219. // Specifying a Name without specifying a Value returns all values associated
  1220. // with that Name.
  1221. Value *string `min:"1" type:"string"`
  1222. }
  1223. // String returns the string representation
  1224. func (s DimensionFilter) String() string {
  1225. return awsutil.Prettify(s)
  1226. }
  1227. // GoString returns the string representation
  1228. func (s DimensionFilter) GoString() string {
  1229. return s.String()
  1230. }
  1231. // Validate inspects the fields of the type to determine if they are valid.
  1232. func (s *DimensionFilter) Validate() error {
  1233. invalidParams := request.ErrInvalidParams{Context: "DimensionFilter"}
  1234. if s.Name == nil {
  1235. invalidParams.Add(request.NewErrParamRequired("Name"))
  1236. }
  1237. if s.Name != nil && len(*s.Name) < 1 {
  1238. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1239. }
  1240. if s.Value != nil && len(*s.Value) < 1 {
  1241. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  1242. }
  1243. if invalidParams.Len() > 0 {
  1244. return invalidParams
  1245. }
  1246. return nil
  1247. }
  1248. type DisableAlarmActionsInput struct {
  1249. _ struct{} `type:"structure"`
  1250. // The names of the alarms to disable actions for.
  1251. //
  1252. // AlarmNames is a required field
  1253. AlarmNames []*string `type:"list" required:"true"`
  1254. }
  1255. // String returns the string representation
  1256. func (s DisableAlarmActionsInput) String() string {
  1257. return awsutil.Prettify(s)
  1258. }
  1259. // GoString returns the string representation
  1260. func (s DisableAlarmActionsInput) GoString() string {
  1261. return s.String()
  1262. }
  1263. // Validate inspects the fields of the type to determine if they are valid.
  1264. func (s *DisableAlarmActionsInput) Validate() error {
  1265. invalidParams := request.ErrInvalidParams{Context: "DisableAlarmActionsInput"}
  1266. if s.AlarmNames == nil {
  1267. invalidParams.Add(request.NewErrParamRequired("AlarmNames"))
  1268. }
  1269. if invalidParams.Len() > 0 {
  1270. return invalidParams
  1271. }
  1272. return nil
  1273. }
  1274. type DisableAlarmActionsOutput struct {
  1275. _ struct{} `type:"structure"`
  1276. }
  1277. // String returns the string representation
  1278. func (s DisableAlarmActionsOutput) String() string {
  1279. return awsutil.Prettify(s)
  1280. }
  1281. // GoString returns the string representation
  1282. func (s DisableAlarmActionsOutput) GoString() string {
  1283. return s.String()
  1284. }
  1285. // Describes the inputs for EnableAlarmActions.
  1286. type EnableAlarmActionsInput struct {
  1287. _ struct{} `type:"structure"`
  1288. // The names of the alarms to enable actions for.
  1289. //
  1290. // AlarmNames is a required field
  1291. AlarmNames []*string `type:"list" required:"true"`
  1292. }
  1293. // String returns the string representation
  1294. func (s EnableAlarmActionsInput) String() string {
  1295. return awsutil.Prettify(s)
  1296. }
  1297. // GoString returns the string representation
  1298. func (s EnableAlarmActionsInput) GoString() string {
  1299. return s.String()
  1300. }
  1301. // Validate inspects the fields of the type to determine if they are valid.
  1302. func (s *EnableAlarmActionsInput) Validate() error {
  1303. invalidParams := request.ErrInvalidParams{Context: "EnableAlarmActionsInput"}
  1304. if s.AlarmNames == nil {
  1305. invalidParams.Add(request.NewErrParamRequired("AlarmNames"))
  1306. }
  1307. if invalidParams.Len() > 0 {
  1308. return invalidParams
  1309. }
  1310. return nil
  1311. }
  1312. type EnableAlarmActionsOutput struct {
  1313. _ struct{} `type:"structure"`
  1314. }
  1315. // String returns the string representation
  1316. func (s EnableAlarmActionsOutput) String() string {
  1317. return awsutil.Prettify(s)
  1318. }
  1319. // GoString returns the string representation
  1320. func (s EnableAlarmActionsOutput) GoString() string {
  1321. return s.String()
  1322. }
  1323. // Describes the inputs for GetMetricStatistics.
  1324. type GetMetricStatisticsInput struct {
  1325. _ struct{} `type:"structure"`
  1326. // A list of dimensions describing qualities of the metric.
  1327. Dimensions []*Dimension `type:"list"`
  1328. // The time stamp to use for determining the last datapoint to return. The value
  1329. // specified is exclusive; results will include datapoints up to the time stamp
  1330. // specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
  1331. //
  1332. // EndTime is a required field
  1333. EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  1334. // The name of the metric, with or without spaces.
  1335. //
  1336. // MetricName is a required field
  1337. MetricName *string `min:"1" type:"string" required:"true"`
  1338. // The namespace of the metric, with or without spaces.
  1339. //
  1340. // Namespace is a required field
  1341. Namespace *string `min:"1" type:"string" required:"true"`
  1342. // The granularity, in seconds, of the returned datapoints. A Period can be
  1343. // as short as one minute (60 seconds) or as long as one day (86,400 seconds),
  1344. // and must be a multiple of 60. The default value is 60.
  1345. //
  1346. // Period is a required field
  1347. Period *int64 `min:"60" type:"integer" required:"true"`
  1348. // The time stamp to use for determining the first datapoint to return. The
  1349. // value specified is inclusive; results include datapoints with the time stamp
  1350. // specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
  1351. //
  1352. // The specified start time is rounded down to the nearest value. Datapoints
  1353. // are returned for start times up to two weeks in the past. Specified start
  1354. // times that are more than two weeks in the past will not return datapoints
  1355. // for metrics that are older than two weeks.
  1356. //
  1357. // Data that is timestamped 24 hours or more in the past may take in excess
  1358. // of 48 hours to become available from submission time using GetMetricStatistics.
  1359. //
  1360. // StartTime is a required field
  1361. StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  1362. // The metric statistics to return. For information about specific statistics
  1363. // returned by GetMetricStatistics, see Statistics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Statistic)
  1364. // in the Amazon CloudWatch Developer Guide.
  1365. //
  1366. // Statistics is a required field
  1367. Statistics []*string `min:"1" type:"list" required:"true"`
  1368. // The specific unit for a given metric. Metrics may be reported in multiple
  1369. // units. Not supplying a unit results in all units being returned. If the metric
  1370. // only ever reports one unit, specifying a unit will have no effect.
  1371. Unit *string `type:"string" enum:"StandardUnit"`
  1372. }
  1373. // String returns the string representation
  1374. func (s GetMetricStatisticsInput) String() string {
  1375. return awsutil.Prettify(s)
  1376. }
  1377. // GoString returns the string representation
  1378. func (s GetMetricStatisticsInput) GoString() string {
  1379. return s.String()
  1380. }
  1381. // Validate inspects the fields of the type to determine if they are valid.
  1382. func (s *GetMetricStatisticsInput) Validate() error {
  1383. invalidParams := request.ErrInvalidParams{Context: "GetMetricStatisticsInput"}
  1384. if s.EndTime == nil {
  1385. invalidParams.Add(request.NewErrParamRequired("EndTime"))
  1386. }
  1387. if s.MetricName == nil {
  1388. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  1389. }
  1390. if s.MetricName != nil && len(*s.MetricName) < 1 {
  1391. invalidParams.Add(request.NewErrParamMinLen("MetricName", 1))
  1392. }
  1393. if s.Namespace == nil {
  1394. invalidParams.Add(request.NewErrParamRequired("Namespace"))
  1395. }
  1396. if s.Namespace != nil && len(*s.Namespace) < 1 {
  1397. invalidParams.Add(request.NewErrParamMinLen("Namespace", 1))
  1398. }
  1399. if s.Period == nil {
  1400. invalidParams.Add(request.NewErrParamRequired("Period"))
  1401. }
  1402. if s.Period != nil && *s.Period < 60 {
  1403. invalidParams.Add(request.NewErrParamMinValue("Period", 60))
  1404. }
  1405. if s.StartTime == nil {
  1406. invalidParams.Add(request.NewErrParamRequired("StartTime"))
  1407. }
  1408. if s.Statistics == nil {
  1409. invalidParams.Add(request.NewErrParamRequired("Statistics"))
  1410. }
  1411. if s.Statistics != nil && len(s.Statistics) < 1 {
  1412. invalidParams.Add(request.NewErrParamMinLen("Statistics", 1))
  1413. }
  1414. if s.Dimensions != nil {
  1415. for i, v := range s.Dimensions {
  1416. if v == nil {
  1417. continue
  1418. }
  1419. if err := v.Validate(); err != nil {
  1420. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
  1421. }
  1422. }
  1423. }
  1424. if invalidParams.Len() > 0 {
  1425. return invalidParams
  1426. }
  1427. return nil
  1428. }
  1429. // The output for GetMetricStatistics.
  1430. type GetMetricStatisticsOutput struct {
  1431. _ struct{} `type:"structure"`
  1432. // The datapoints for the specified metric.
  1433. Datapoints []*Datapoint `type:"list"`
  1434. // A label describing the specified metric.
  1435. Label *string `type:"string"`
  1436. }
  1437. // String returns the string representation
  1438. func (s GetMetricStatisticsOutput) String() string {
  1439. return awsutil.Prettify(s)
  1440. }
  1441. // GoString returns the string representation
  1442. func (s GetMetricStatisticsOutput) GoString() string {
  1443. return s.String()
  1444. }
  1445. // Describes the inputs for ListMetrics.
  1446. type ListMetricsInput struct {
  1447. _ struct{} `type:"structure"`
  1448. // A list of dimensions to filter against.
  1449. Dimensions []*DimensionFilter `type:"list"`
  1450. // The name of the metric to filter against.
  1451. MetricName *string `min:"1" type:"string"`
  1452. // The namespace to filter against.
  1453. Namespace *string `min:"1" type:"string"`
  1454. // The token returned by a previous call to indicate that there is more data
  1455. // available.
  1456. NextToken *string `type:"string"`
  1457. }
  1458. // String returns the string representation
  1459. func (s ListMetricsInput) String() string {
  1460. return awsutil.Prettify(s)
  1461. }
  1462. // GoString returns the string representation
  1463. func (s ListMetricsInput) GoString() string {
  1464. return s.String()
  1465. }
  1466. // Validate inspects the fields of the type to determine if they are valid.
  1467. func (s *ListMetricsInput) Validate() error {
  1468. invalidParams := request.ErrInvalidParams{Context: "ListMetricsInput"}
  1469. if s.MetricName != nil && len(*s.MetricName) < 1 {
  1470. invalidParams.Add(request.NewErrParamMinLen("MetricName", 1))
  1471. }
  1472. if s.Namespace != nil && len(*s.Namespace) < 1 {
  1473. invalidParams.Add(request.NewErrParamMinLen("Namespace", 1))
  1474. }
  1475. if s.Dimensions != nil {
  1476. for i, v := range s.Dimensions {
  1477. if v == nil {
  1478. continue
  1479. }
  1480. if err := v.Validate(); err != nil {
  1481. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
  1482. }
  1483. }
  1484. }
  1485. if invalidParams.Len() > 0 {
  1486. return invalidParams
  1487. }
  1488. return nil
  1489. }
  1490. // The output for ListMetrics.
  1491. type ListMetricsOutput struct {
  1492. _ struct{} `type:"structure"`
  1493. // A list of metrics used to generate statistics for an AWS account.
  1494. Metrics []*Metric `type:"list"`
  1495. // A string that marks the start of the next batch of returned results.
  1496. NextToken *string `type:"string"`
  1497. }
  1498. // String returns the string representation
  1499. func (s ListMetricsOutput) String() string {
  1500. return awsutil.Prettify(s)
  1501. }
  1502. // GoString returns the string representation
  1503. func (s ListMetricsOutput) GoString() string {
  1504. return s.String()
  1505. }
  1506. // The Metric data type contains information about a specific metric. If you
  1507. // call ListMetrics, Amazon CloudWatch returns information contained by this
  1508. // data type.
  1509. //
  1510. // The example in the Examples section publishes two metrics named buffers and
  1511. // latency. Both metrics are in the examples namespace. Both metrics have two
  1512. // dimensions, InstanceID and InstanceType.
  1513. type Metric struct {
  1514. _ struct{} `type:"structure"`
  1515. // A list of dimensions associated with the metric.
  1516. Dimensions []*Dimension `type:"list"`
  1517. // The name of the metric.
  1518. MetricName *string `min:"1" type:"string"`
  1519. // The namespace of the metric.
  1520. Namespace *string `min:"1" type:"string"`
  1521. }
  1522. // String returns the string representation
  1523. func (s Metric) String() string {
  1524. return awsutil.Prettify(s)
  1525. }
  1526. // GoString returns the string representation
  1527. func (s Metric) GoString() string {
  1528. return s.String()
  1529. }
  1530. // The MetricAlarm data type represents an alarm. You can use PutMetricAlarm
  1531. // to create or update an alarm.
  1532. type MetricAlarm struct {
  1533. _ struct{} `type:"structure"`
  1534. // Indicates whether actions should be executed during any changes to the alarm's
  1535. // state.
  1536. ActionsEnabled *bool `type:"boolean"`
  1537. // The list of actions to execute when this alarm transitions into an ALARM
  1538. // state from any other state. Each action is specified as an Amazon Resource
  1539. // Name (ARN).
  1540. AlarmActions []*string `type:"list"`
  1541. // The Amazon Resource Name (ARN) of the alarm.
  1542. AlarmArn *string `min:"1" type:"string"`
  1543. // The time stamp of the last update to the alarm configuration.
  1544. AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  1545. // The description for the alarm.
  1546. AlarmDescription *string `type:"string"`
  1547. // The name of the alarm.
  1548. AlarmName *string `min:"1" type:"string"`
  1549. // The arithmetic operation to use when comparing the specified Statistic and
  1550. // Threshold. The specified Statistic value is used as the first operand.
  1551. ComparisonOperator *string `type:"string" enum:"ComparisonOperator"`
  1552. // The list of dimensions associated with the alarm's associated metric.
  1553. Dimensions []*Dimension `type:"list"`
  1554. // The number of periods over which data is compared to the specified threshold.
  1555. EvaluationPeriods *int64 `min:"1" type:"integer"`
  1556. // The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA
  1557. // state from any other state. Each action is specified as an Amazon Resource
  1558. // Name (ARN).
  1559. //
  1560. // The current WSDL lists this attribute as UnknownActions.
  1561. InsufficientDataActions []*string `type:"list"`
  1562. // The name of the alarm's metric.
  1563. MetricName *string `min:"1" type:"string"`
  1564. // The namespace of alarm's associated metric.
  1565. Namespace *string `min:"1" type:"string"`
  1566. // The list of actions to execute when this alarm transitions into an OK state
  1567. // from any other state. Each action is specified as an Amazon Resource Name
  1568. // (ARN).
  1569. OKActions []*string `type:"list"`
  1570. // The period in seconds over which the statistic is applied.
  1571. Period *int64 `min:"60" type:"integer"`
  1572. // A human-readable explanation for the alarm's state.
  1573. StateReason *string `type:"string"`
  1574. // An explanation for the alarm's state in machine-readable JSON format
  1575. StateReasonData *string `type:"string"`
  1576. // The time stamp of the last update to the alarm's state.
  1577. StateUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  1578. // The state value for the alarm.
  1579. StateValue *string `type:"string" enum:"StateValue"`
  1580. // The statistic to apply to the alarm's associated metric.
  1581. Statistic *string `type:"string" enum:"Statistic"`
  1582. // The value against which the specified statistic is compared.
  1583. Threshold *float64 `type:"double"`
  1584. // The unit of the alarm's associated metric.
  1585. Unit *string `type:"string" enum:"StandardUnit"`
  1586. }
  1587. // String returns the string representation
  1588. func (s MetricAlarm) String() string {
  1589. return awsutil.Prettify(s)
  1590. }
  1591. // GoString returns the string representation
  1592. func (s MetricAlarm) GoString() string {
  1593. return s.String()
  1594. }
  1595. // The MetricDatum data type encapsulates the information sent with PutMetricData
  1596. // to either create a new metric or add new values to be aggregated into an
  1597. // existing metric.
  1598. type MetricDatum struct {
  1599. _ struct{} `type:"structure"`
  1600. // A list of dimensions associated with the metric. Note, when using the Dimensions
  1601. // value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
  1602. Dimensions []*Dimension `type:"list"`
  1603. // The name of the metric.
  1604. //
  1605. // MetricName is a required field
  1606. MetricName *string `min:"1" type:"string" required:"true"`
  1607. // A set of statistical values describing the metric.
  1608. StatisticValues *StatisticSet `type:"structure"`
  1609. // The time stamp used for the metric in ISO 8601 Universal Coordinated Time
  1610. // (UTC) format. If not specified, the default value is set to the time the
  1611. // metric data was received.
  1612. Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  1613. // The unit of the metric.
  1614. Unit *string `type:"string" enum:"StandardUnit"`
  1615. // The value for the metric.
  1616. //
  1617. // Although the Value parameter accepts numbers of type Double, Amazon CloudWatch
  1618. // rejects values that are either too small or too large. Values must be in
  1619. // the range of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360
  1620. // (Base 2). In addition, special values (e.g., NaN, +Infinity, -Infinity) are
  1621. // not supported.
  1622. Value *float64 `type:"double"`
  1623. }
  1624. // String returns the string representation
  1625. func (s MetricDatum) String() string {
  1626. return awsutil.Prettify(s)
  1627. }
  1628. // GoString returns the string representation
  1629. func (s MetricDatum) GoString() string {
  1630. return s.String()
  1631. }
  1632. // Validate inspects the fields of the type to determine if they are valid.
  1633. func (s *MetricDatum) Validate() error {
  1634. invalidParams := request.ErrInvalidParams{Context: "MetricDatum"}
  1635. if s.MetricName == nil {
  1636. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  1637. }
  1638. if s.MetricName != nil && len(*s.MetricName) < 1 {
  1639. invalidParams.Add(request.NewErrParamMinLen("MetricName", 1))
  1640. }
  1641. if s.Dimensions != nil {
  1642. for i, v := range s.Dimensions {
  1643. if v == nil {
  1644. continue
  1645. }
  1646. if err := v.Validate(); err != nil {
  1647. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
  1648. }
  1649. }
  1650. }
  1651. if s.StatisticValues != nil {
  1652. if err := s.StatisticValues.Validate(); err != nil {
  1653. invalidParams.AddNested("StatisticValues", err.(request.ErrInvalidParams))
  1654. }
  1655. }
  1656. if invalidParams.Len() > 0 {
  1657. return invalidParams
  1658. }
  1659. return nil
  1660. }
  1661. // Describes the inputs for PutMetricAlarm.
  1662. type PutMetricAlarmInput struct {
  1663. _ struct{} `type:"structure"`
  1664. // Indicates whether or not actions should be executed during any changes to
  1665. // the alarm's state.
  1666. ActionsEnabled *bool `type:"boolean"`
  1667. // The list of actions to execute when this alarm transitions into an ALARM
  1668. // state from any other state. Each action is specified as an Amazon Resource
  1669. // Name (ARN).
  1670. //
  1671. // Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region
  1672. // (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover
  1673. //
  1674. // Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Stop/1.0
  1675. // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
  1676. // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
  1677. //
  1678. // Note: You must create at least one stop, terminate, or reboot alarm using
  1679. // the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role
  1680. // for the first time. After this IAM role is created, you can create stop,
  1681. // terminate, or reboot alarms using the CLI.
  1682. AlarmActions []*string `type:"list"`
  1683. // The description for the alarm.
  1684. AlarmDescription *string `type:"string"`
  1685. // The descriptive name for the alarm. This name must be unique within the user's
  1686. // AWS account
  1687. //
  1688. // AlarmName is a required field
  1689. AlarmName *string `min:"1" type:"string" required:"true"`
  1690. // The arithmetic operation to use when comparing the specified Statistic and
  1691. // Threshold. The specified Statistic value is used as the first operand.
  1692. //
  1693. // ComparisonOperator is a required field
  1694. ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
  1695. // The dimensions for the alarm's associated metric.
  1696. Dimensions []*Dimension `type:"list"`
  1697. // The number of periods over which data is compared to the specified threshold.
  1698. //
  1699. // EvaluationPeriods is a required field
  1700. EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"`
  1701. // The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA
  1702. // state from any other state. Each action is specified as an Amazon Resource
  1703. // Name (ARN).
  1704. //
  1705. // Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region
  1706. // (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover
  1707. //
  1708. // Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Stop/1.0
  1709. // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
  1710. // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
  1711. //
  1712. // Note: You must create at least one stop, terminate, or reboot alarm using
  1713. // the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role
  1714. // for the first time. After this IAM role is created, you can create stop,
  1715. // terminate, or reboot alarms using the CLI.
  1716. InsufficientDataActions []*string `type:"list"`
  1717. // The name for the alarm's associated metric.
  1718. //
  1719. // MetricName is a required field
  1720. MetricName *string `min:"1" type:"string" required:"true"`
  1721. // The namespace for the alarm's associated metric.
  1722. //
  1723. // Namespace is a required field
  1724. Namespace *string `min:"1" type:"string" required:"true"`
  1725. // The list of actions to execute when this alarm transitions into an OK state
  1726. // from any other state. Each action is specified as an Amazon Resource Name
  1727. // (ARN).
  1728. //
  1729. // Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region
  1730. // (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover
  1731. //
  1732. // Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Stop/1.0
  1733. // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
  1734. // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
  1735. //
  1736. // Note: You must create at least one stop, terminate, or reboot alarm using
  1737. // the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role
  1738. // for the first time. After this IAM role is created, you can create stop,
  1739. // terminate, or reboot alarms using the CLI.
  1740. OKActions []*string `type:"list"`
  1741. // The period in seconds over which the specified statistic is applied.
  1742. //
  1743. // Period is a required field
  1744. Period *int64 `min:"60" type:"integer" required:"true"`
  1745. // The statistic to apply to the alarm's associated metric.
  1746. //
  1747. // Statistic is a required field
  1748. Statistic *string `type:"string" required:"true" enum:"Statistic"`
  1749. // The value against which the specified statistic is compared.
  1750. //
  1751. // Threshold is a required field
  1752. Threshold *float64 `type:"double" required:"true"`
  1753. // The statistic's unit of measure. For example, the units for the Amazon EC2
  1754. // NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that
  1755. // an instance receives on all network interfaces. You can also specify a unit
  1756. // when you create a custom metric. Units help provide conceptual meaning to
  1757. // your data. Metric data points that specify a unit of measure, such as Percent,
  1758. // are aggregated separately.
  1759. //
  1760. // Note: If you specify a unit, you must use a unit that is appropriate for
  1761. // the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck
  1762. // in the INSUFFICIENT DATA state.
  1763. Unit *string `type:"string" enum:"StandardUnit"`
  1764. }
  1765. // String returns the string representation
  1766. func (s PutMetricAlarmInput) String() string {
  1767. return awsutil.Prettify(s)
  1768. }
  1769. // GoString returns the string representation
  1770. func (s PutMetricAlarmInput) GoString() string {
  1771. return s.String()
  1772. }
  1773. // Validate inspects the fields of the type to determine if they are valid.
  1774. func (s *PutMetricAlarmInput) Validate() error {
  1775. invalidParams := request.ErrInvalidParams{Context: "PutMetricAlarmInput"}
  1776. if s.AlarmName == nil {
  1777. invalidParams.Add(request.NewErrParamRequired("AlarmName"))
  1778. }
  1779. if s.AlarmName != nil && len(*s.AlarmName) < 1 {
  1780. invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1))
  1781. }
  1782. if s.ComparisonOperator == nil {
  1783. invalidParams.Add(request.NewErrParamRequired("ComparisonOperator"))
  1784. }
  1785. if s.EvaluationPeriods == nil {
  1786. invalidParams.Add(request.NewErrParamRequired("EvaluationPeriods"))
  1787. }
  1788. if s.EvaluationPeriods != nil && *s.EvaluationPeriods < 1 {
  1789. invalidParams.Add(request.NewErrParamMinValue("EvaluationPeriods", 1))
  1790. }
  1791. if s.MetricName == nil {
  1792. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  1793. }
  1794. if s.MetricName != nil && len(*s.MetricName) < 1 {
  1795. invalidParams.Add(request.NewErrParamMinLen("MetricName", 1))
  1796. }
  1797. if s.Namespace == nil {
  1798. invalidParams.Add(request.NewErrParamRequired("Namespace"))
  1799. }
  1800. if s.Namespace != nil && len(*s.Namespace) < 1 {
  1801. invalidParams.Add(request.NewErrParamMinLen("Namespace", 1))
  1802. }
  1803. if s.Period == nil {
  1804. invalidParams.Add(request.NewErrParamRequired("Period"))
  1805. }
  1806. if s.Period != nil && *s.Period < 60 {
  1807. invalidParams.Add(request.NewErrParamMinValue("Period", 60))
  1808. }
  1809. if s.Statistic == nil {
  1810. invalidParams.Add(request.NewErrParamRequired("Statistic"))
  1811. }
  1812. if s.Threshold == nil {
  1813. invalidParams.Add(request.NewErrParamRequired("Threshold"))
  1814. }
  1815. if s.Dimensions != nil {
  1816. for i, v := range s.Dimensions {
  1817. if v == nil {
  1818. continue
  1819. }
  1820. if err := v.Validate(); err != nil {
  1821. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
  1822. }
  1823. }
  1824. }
  1825. if invalidParams.Len() > 0 {
  1826. return invalidParams
  1827. }
  1828. return nil
  1829. }
  1830. type PutMetricAlarmOutput struct {
  1831. _ struct{} `type:"structure"`
  1832. }
  1833. // String returns the string representation
  1834. func (s PutMetricAlarmOutput) String() string {
  1835. return awsutil.Prettify(s)
  1836. }
  1837. // GoString returns the string representation
  1838. func (s PutMetricAlarmOutput) GoString() string {
  1839. return s.String()
  1840. }
  1841. // Describes the inputs for PutMetricData.
  1842. type PutMetricDataInput struct {
  1843. _ struct{} `type:"structure"`
  1844. // A list of data describing the metric.
  1845. //
  1846. // MetricData is a required field
  1847. MetricData []*MetricDatum `type:"list" required:"true"`
  1848. // The namespace for the metric data.
  1849. //
  1850. // You cannot specify a namespace that begins with "AWS/". Namespaces that begin
  1851. // with "AWS/" are reserved for other Amazon Web Services products that send
  1852. // metrics to Amazon CloudWatch.
  1853. //
  1854. // Namespace is a required field
  1855. Namespace *string `min:"1" type:"string" required:"true"`
  1856. }
  1857. // String returns the string representation
  1858. func (s PutMetricDataInput) String() string {
  1859. return awsutil.Prettify(s)
  1860. }
  1861. // GoString returns the string representation
  1862. func (s PutMetricDataInput) GoString() string {
  1863. return s.String()
  1864. }
  1865. // Validate inspects the fields of the type to determine if they are valid.
  1866. func (s *PutMetricDataInput) Validate() error {
  1867. invalidParams := request.ErrInvalidParams{Context: "PutMetricDataInput"}
  1868. if s.MetricData == nil {
  1869. invalidParams.Add(request.NewErrParamRequired("MetricData"))
  1870. }
  1871. if s.Namespace == nil {
  1872. invalidParams.Add(request.NewErrParamRequired("Namespace"))
  1873. }
  1874. if s.Namespace != nil && len(*s.Namespace) < 1 {
  1875. invalidParams.Add(request.NewErrParamMinLen("Namespace", 1))
  1876. }
  1877. if s.MetricData != nil {
  1878. for i, v := range s.MetricData {
  1879. if v == nil {
  1880. continue
  1881. }
  1882. if err := v.Validate(); err != nil {
  1883. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricData", i), err.(request.ErrInvalidParams))
  1884. }
  1885. }
  1886. }
  1887. if invalidParams.Len() > 0 {
  1888. return invalidParams
  1889. }
  1890. return nil
  1891. }
  1892. type PutMetricDataOutput struct {
  1893. _ struct{} `type:"structure"`
  1894. }
  1895. // String returns the string representation
  1896. func (s PutMetricDataOutput) String() string {
  1897. return awsutil.Prettify(s)
  1898. }
  1899. // GoString returns the string representation
  1900. func (s PutMetricDataOutput) GoString() string {
  1901. return s.String()
  1902. }
  1903. // Describes the inputs for SetAlarmState.
  1904. type SetAlarmStateInput struct {
  1905. _ struct{} `type:"structure"`
  1906. // The descriptive name for the alarm. This name must be unique within the user's
  1907. // AWS account. The maximum length is 255 characters.
  1908. //
  1909. // AlarmName is a required field
  1910. AlarmName *string `min:"1" type:"string" required:"true"`
  1911. // The reason that this alarm is set to this specific state (in human-readable
  1912. // text format)
  1913. //
  1914. // StateReason is a required field
  1915. StateReason *string `type:"string" required:"true"`
  1916. // The reason that this alarm is set to this specific state (in machine-readable
  1917. // JSON format)
  1918. StateReasonData *string `type:"string"`
  1919. // The value of the state.
  1920. //
  1921. // StateValue is a required field
  1922. StateValue *string `type:"string" required:"true" enum:"StateValue"`
  1923. }
  1924. // String returns the string representation
  1925. func (s SetAlarmStateInput) String() string {
  1926. return awsutil.Prettify(s)
  1927. }
  1928. // GoString returns the string representation
  1929. func (s SetAlarmStateInput) GoString() string {
  1930. return s.String()
  1931. }
  1932. // Validate inspects the fields of the type to determine if they are valid.
  1933. func (s *SetAlarmStateInput) Validate() error {
  1934. invalidParams := request.ErrInvalidParams{Context: "SetAlarmStateInput"}
  1935. if s.AlarmName == nil {
  1936. invalidParams.Add(request.NewErrParamRequired("AlarmName"))
  1937. }
  1938. if s.AlarmName != nil && len(*s.AlarmName) < 1 {
  1939. invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1))
  1940. }
  1941. if s.StateReason == nil {
  1942. invalidParams.Add(request.NewErrParamRequired("StateReason"))
  1943. }
  1944. if s.StateValue == nil {
  1945. invalidParams.Add(request.NewErrParamRequired("StateValue"))
  1946. }
  1947. if invalidParams.Len() > 0 {
  1948. return invalidParams
  1949. }
  1950. return nil
  1951. }
  1952. type SetAlarmStateOutput struct {
  1953. _ struct{} `type:"structure"`
  1954. }
  1955. // String returns the string representation
  1956. func (s SetAlarmStateOutput) String() string {
  1957. return awsutil.Prettify(s)
  1958. }
  1959. // GoString returns the string representation
  1960. func (s SetAlarmStateOutput) GoString() string {
  1961. return s.String()
  1962. }
  1963. // The StatisticSet data type describes the StatisticValues component of MetricDatum,
  1964. // and represents a set of statistics that describes a specific metric.
  1965. type StatisticSet struct {
  1966. _ struct{} `type:"structure"`
  1967. // The maximum value of the sample set.
  1968. //
  1969. // Maximum is a required field
  1970. Maximum *float64 `type:"double" required:"true"`
  1971. // The minimum value of the sample set.
  1972. //
  1973. // Minimum is a required field
  1974. Minimum *float64 `type:"double" required:"true"`
  1975. // The number of samples used for the statistic set.
  1976. //
  1977. // SampleCount is a required field
  1978. SampleCount *float64 `type:"double" required:"true"`
  1979. // The sum of values for the sample set.
  1980. //
  1981. // Sum is a required field
  1982. Sum *float64 `type:"double" required:"true"`
  1983. }
  1984. // String returns the string representation
  1985. func (s StatisticSet) String() string {
  1986. return awsutil.Prettify(s)
  1987. }
  1988. // GoString returns the string representation
  1989. func (s StatisticSet) GoString() string {
  1990. return s.String()
  1991. }
  1992. // Validate inspects the fields of the type to determine if they are valid.
  1993. func (s *StatisticSet) Validate() error {
  1994. invalidParams := request.ErrInvalidParams{Context: "StatisticSet"}
  1995. if s.Maximum == nil {
  1996. invalidParams.Add(request.NewErrParamRequired("Maximum"))
  1997. }
  1998. if s.Minimum == nil {
  1999. invalidParams.Add(request.NewErrParamRequired("Minimum"))
  2000. }
  2001. if s.SampleCount == nil {
  2002. invalidParams.Add(request.NewErrParamRequired("SampleCount"))
  2003. }
  2004. if s.Sum == nil {
  2005. invalidParams.Add(request.NewErrParamRequired("Sum"))
  2006. }
  2007. if invalidParams.Len() > 0 {
  2008. return invalidParams
  2009. }
  2010. return nil
  2011. }
  2012. const (
  2013. // ComparisonOperatorGreaterThanOrEqualToThreshold is a ComparisonOperator enum value
  2014. ComparisonOperatorGreaterThanOrEqualToThreshold = "GreaterThanOrEqualToThreshold"
  2015. // ComparisonOperatorGreaterThanThreshold is a ComparisonOperator enum value
  2016. ComparisonOperatorGreaterThanThreshold = "GreaterThanThreshold"
  2017. // ComparisonOperatorLessThanThreshold is a ComparisonOperator enum value
  2018. ComparisonOperatorLessThanThreshold = "LessThanThreshold"
  2019. // ComparisonOperatorLessThanOrEqualToThreshold is a ComparisonOperator enum value
  2020. ComparisonOperatorLessThanOrEqualToThreshold = "LessThanOrEqualToThreshold"
  2021. )
  2022. const (
  2023. // HistoryItemTypeConfigurationUpdate is a HistoryItemType enum value
  2024. HistoryItemTypeConfigurationUpdate = "ConfigurationUpdate"
  2025. // HistoryItemTypeStateUpdate is a HistoryItemType enum value
  2026. HistoryItemTypeStateUpdate = "StateUpdate"
  2027. // HistoryItemTypeAction is a HistoryItemType enum value
  2028. HistoryItemTypeAction = "Action"
  2029. )
  2030. const (
  2031. // StandardUnitSeconds is a StandardUnit enum value
  2032. StandardUnitSeconds = "Seconds"
  2033. // StandardUnitMicroseconds is a StandardUnit enum value
  2034. StandardUnitMicroseconds = "Microseconds"
  2035. // StandardUnitMilliseconds is a StandardUnit enum value
  2036. StandardUnitMilliseconds = "Milliseconds"
  2037. // StandardUnitBytes is a StandardUnit enum value
  2038. StandardUnitBytes = "Bytes"
  2039. // StandardUnitKilobytes is a StandardUnit enum value
  2040. StandardUnitKilobytes = "Kilobytes"
  2041. // StandardUnitMegabytes is a StandardUnit enum value
  2042. StandardUnitMegabytes = "Megabytes"
  2043. // StandardUnitGigabytes is a StandardUnit enum value
  2044. StandardUnitGigabytes = "Gigabytes"
  2045. // StandardUnitTerabytes is a StandardUnit enum value
  2046. StandardUnitTerabytes = "Terabytes"
  2047. // StandardUnitBits is a StandardUnit enum value
  2048. StandardUnitBits = "Bits"
  2049. // StandardUnitKilobits is a StandardUnit enum value
  2050. StandardUnitKilobits = "Kilobits"
  2051. // StandardUnitMegabits is a StandardUnit enum value
  2052. StandardUnitMegabits = "Megabits"
  2053. // StandardUnitGigabits is a StandardUnit enum value
  2054. StandardUnitGigabits = "Gigabits"
  2055. // StandardUnitTerabits is a StandardUnit enum value
  2056. StandardUnitTerabits = "Terabits"
  2057. // StandardUnitPercent is a StandardUnit enum value
  2058. StandardUnitPercent = "Percent"
  2059. // StandardUnitCount is a StandardUnit enum value
  2060. StandardUnitCount = "Count"
  2061. // StandardUnitBytesSecond is a StandardUnit enum value
  2062. StandardUnitBytesSecond = "Bytes/Second"
  2063. // StandardUnitKilobytesSecond is a StandardUnit enum value
  2064. StandardUnitKilobytesSecond = "Kilobytes/Second"
  2065. // StandardUnitMegabytesSecond is a StandardUnit enum value
  2066. StandardUnitMegabytesSecond = "Megabytes/Second"
  2067. // StandardUnitGigabytesSecond is a StandardUnit enum value
  2068. StandardUnitGigabytesSecond = "Gigabytes/Second"
  2069. // StandardUnitTerabytesSecond is a StandardUnit enum value
  2070. StandardUnitTerabytesSecond = "Terabytes/Second"
  2071. // StandardUnitBitsSecond is a StandardUnit enum value
  2072. StandardUnitBitsSecond = "Bits/Second"
  2073. // StandardUnitKilobitsSecond is a StandardUnit enum value
  2074. StandardUnitKilobitsSecond = "Kilobits/Second"
  2075. // StandardUnitMegabitsSecond is a StandardUnit enum value
  2076. StandardUnitMegabitsSecond = "Megabits/Second"
  2077. // StandardUnitGigabitsSecond is a StandardUnit enum value
  2078. StandardUnitGigabitsSecond = "Gigabits/Second"
  2079. // StandardUnitTerabitsSecond is a StandardUnit enum value
  2080. StandardUnitTerabitsSecond = "Terabits/Second"
  2081. // StandardUnitCountSecond is a StandardUnit enum value
  2082. StandardUnitCountSecond = "Count/Second"
  2083. // StandardUnitNone is a StandardUnit enum value
  2084. StandardUnitNone = "None"
  2085. )
  2086. const (
  2087. // StateValueOk is a StateValue enum value
  2088. StateValueOk = "OK"
  2089. // StateValueAlarm is a StateValue enum value
  2090. StateValueAlarm = "ALARM"
  2091. // StateValueInsufficientData is a StateValue enum value
  2092. StateValueInsufficientData = "INSUFFICIENT_DATA"
  2093. )
  2094. const (
  2095. // StatisticSampleCount is a Statistic enum value
  2096. StatisticSampleCount = "SampleCount"
  2097. // StatisticAverage is a Statistic enum value
  2098. StatisticAverage = "Average"
  2099. // StatisticSum is a Statistic enum value
  2100. StatisticSum = "Sum"
  2101. // StatisticMinimum is a Statistic enum value
  2102. StatisticMinimum = "Minimum"
  2103. // StatisticMaximum is a Statistic enum value
  2104. StatisticMaximum = "Maximum"
  2105. )