api.go 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package budgets provides a client for AWS Budgets.
  3. package budgets
  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. )
  10. const opCreateBudget = "CreateBudget"
  11. // CreateBudgetRequest generates a "aws/request.Request" representing the
  12. // client's request for the CreateBudget operation. The "output" return
  13. // value can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // See CreateBudget for usage and error information.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the CreateBudget method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the CreateBudgetRequest method.
  28. // req, resp := client.CreateBudgetRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *Budgets) CreateBudgetRequest(input *CreateBudgetInput) (req *request.Request, output *CreateBudgetOutput) {
  36. op := &request.Operation{
  37. Name: opCreateBudget,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &CreateBudgetInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &CreateBudgetOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // CreateBudget API operation for AWS Budgets.
  50. //
  51. // Create a new budget
  52. //
  53. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  54. // with awserr.Error's Code and Message methods to get detailed information about
  55. // the error.
  56. //
  57. // See the AWS API reference guide for AWS Budgets's
  58. // API operation CreateBudget for usage and error information.
  59. //
  60. // Returned Error Codes:
  61. // * InvalidParameterException
  62. // This exception is thrown if any request is given an invalid parameter. E.g.,
  63. // if a required Date field is null.
  64. //
  65. // * InternalErrorException
  66. // This exception is thrown on an unknown internal failure.
  67. //
  68. // * CreationLimitExceededException
  69. // The exception is thrown when customer tries to create a record (e.g. budget),
  70. // but the number this record already exceeds the limitation.
  71. //
  72. // * DuplicateRecordException
  73. // The exception is thrown when customer tries to create a record (e.g. budget)
  74. // that already exists.
  75. //
  76. func (c *Budgets) CreateBudget(input *CreateBudgetInput) (*CreateBudgetOutput, error) {
  77. req, out := c.CreateBudgetRequest(input)
  78. err := req.Send()
  79. return out, err
  80. }
  81. const opCreateNotification = "CreateNotification"
  82. // CreateNotificationRequest generates a "aws/request.Request" representing the
  83. // client's request for the CreateNotification operation. The "output" return
  84. // value can be used to capture response data after the request's "Send" method
  85. // is called.
  86. //
  87. // See CreateNotification for usage and error information.
  88. //
  89. // Creating a request object using this method should be used when you want to inject
  90. // custom logic into the request's lifecycle using a custom handler, or if you want to
  91. // access properties on the request object before or after sending the request. If
  92. // you just want the service response, call the CreateNotification method directly
  93. // instead.
  94. //
  95. // Note: You must call the "Send" method on the returned request object in order
  96. // to execute the request.
  97. //
  98. // // Example sending a request using the CreateNotificationRequest method.
  99. // req, resp := client.CreateNotificationRequest(params)
  100. //
  101. // err := req.Send()
  102. // if err == nil { // resp is now filled
  103. // fmt.Println(resp)
  104. // }
  105. //
  106. func (c *Budgets) CreateNotificationRequest(input *CreateNotificationInput) (req *request.Request, output *CreateNotificationOutput) {
  107. op := &request.Operation{
  108. Name: opCreateNotification,
  109. HTTPMethod: "POST",
  110. HTTPPath: "/",
  111. }
  112. if input == nil {
  113. input = &CreateNotificationInput{}
  114. }
  115. req = c.newRequest(op, input, output)
  116. output = &CreateNotificationOutput{}
  117. req.Data = output
  118. return
  119. }
  120. // CreateNotification API operation for AWS Budgets.
  121. //
  122. // Create a new Notification with subscribers for a budget
  123. //
  124. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  125. // with awserr.Error's Code and Message methods to get detailed information about
  126. // the error.
  127. //
  128. // See the AWS API reference guide for AWS Budgets's
  129. // API operation CreateNotification for usage and error information.
  130. //
  131. // Returned Error Codes:
  132. // * InternalErrorException
  133. // This exception is thrown on an unknown internal failure.
  134. //
  135. // * InvalidParameterException
  136. // This exception is thrown if any request is given an invalid parameter. E.g.,
  137. // if a required Date field is null.
  138. //
  139. // * NotFoundException
  140. // This exception is thrown if a requested entity is not found. E.g., if a budget
  141. // id doesn't exist for an account ID.
  142. //
  143. // * CreationLimitExceededException
  144. // The exception is thrown when customer tries to create a record (e.g. budget),
  145. // but the number this record already exceeds the limitation.
  146. //
  147. // * DuplicateRecordException
  148. // The exception is thrown when customer tries to create a record (e.g. budget)
  149. // that already exists.
  150. //
  151. func (c *Budgets) CreateNotification(input *CreateNotificationInput) (*CreateNotificationOutput, error) {
  152. req, out := c.CreateNotificationRequest(input)
  153. err := req.Send()
  154. return out, err
  155. }
  156. const opCreateSubscriber = "CreateSubscriber"
  157. // CreateSubscriberRequest generates a "aws/request.Request" representing the
  158. // client's request for the CreateSubscriber operation. The "output" return
  159. // value can be used to capture response data after the request's "Send" method
  160. // is called.
  161. //
  162. // See CreateSubscriber for usage and error information.
  163. //
  164. // Creating a request object using this method should be used when you want to inject
  165. // custom logic into the request's lifecycle using a custom handler, or if you want to
  166. // access properties on the request object before or after sending the request. If
  167. // you just want the service response, call the CreateSubscriber method directly
  168. // instead.
  169. //
  170. // Note: You must call the "Send" method on the returned request object in order
  171. // to execute the request.
  172. //
  173. // // Example sending a request using the CreateSubscriberRequest method.
  174. // req, resp := client.CreateSubscriberRequest(params)
  175. //
  176. // err := req.Send()
  177. // if err == nil { // resp is now filled
  178. // fmt.Println(resp)
  179. // }
  180. //
  181. func (c *Budgets) CreateSubscriberRequest(input *CreateSubscriberInput) (req *request.Request, output *CreateSubscriberOutput) {
  182. op := &request.Operation{
  183. Name: opCreateSubscriber,
  184. HTTPMethod: "POST",
  185. HTTPPath: "/",
  186. }
  187. if input == nil {
  188. input = &CreateSubscriberInput{}
  189. }
  190. req = c.newRequest(op, input, output)
  191. output = &CreateSubscriberOutput{}
  192. req.Data = output
  193. return
  194. }
  195. // CreateSubscriber API operation for AWS Budgets.
  196. //
  197. // Create a new Subscriber for a notification
  198. //
  199. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  200. // with awserr.Error's Code and Message methods to get detailed information about
  201. // the error.
  202. //
  203. // See the AWS API reference guide for AWS Budgets's
  204. // API operation CreateSubscriber for usage and error information.
  205. //
  206. // Returned Error Codes:
  207. // * InternalErrorException
  208. // This exception is thrown on an unknown internal failure.
  209. //
  210. // * InvalidParameterException
  211. // This exception is thrown if any request is given an invalid parameter. E.g.,
  212. // if a required Date field is null.
  213. //
  214. // * CreationLimitExceededException
  215. // The exception is thrown when customer tries to create a record (e.g. budget),
  216. // but the number this record already exceeds the limitation.
  217. //
  218. // * DuplicateRecordException
  219. // The exception is thrown when customer tries to create a record (e.g. budget)
  220. // that already exists.
  221. //
  222. func (c *Budgets) CreateSubscriber(input *CreateSubscriberInput) (*CreateSubscriberOutput, error) {
  223. req, out := c.CreateSubscriberRequest(input)
  224. err := req.Send()
  225. return out, err
  226. }
  227. const opDeleteBudget = "DeleteBudget"
  228. // DeleteBudgetRequest generates a "aws/request.Request" representing the
  229. // client's request for the DeleteBudget operation. The "output" return
  230. // value can be used to capture response data after the request's "Send" method
  231. // is called.
  232. //
  233. // See DeleteBudget for usage and error information.
  234. //
  235. // Creating a request object using this method should be used when you want to inject
  236. // custom logic into the request's lifecycle using a custom handler, or if you want to
  237. // access properties on the request object before or after sending the request. If
  238. // you just want the service response, call the DeleteBudget method directly
  239. // instead.
  240. //
  241. // Note: You must call the "Send" method on the returned request object in order
  242. // to execute the request.
  243. //
  244. // // Example sending a request using the DeleteBudgetRequest method.
  245. // req, resp := client.DeleteBudgetRequest(params)
  246. //
  247. // err := req.Send()
  248. // if err == nil { // resp is now filled
  249. // fmt.Println(resp)
  250. // }
  251. //
  252. func (c *Budgets) DeleteBudgetRequest(input *DeleteBudgetInput) (req *request.Request, output *DeleteBudgetOutput) {
  253. op := &request.Operation{
  254. Name: opDeleteBudget,
  255. HTTPMethod: "POST",
  256. HTTPPath: "/",
  257. }
  258. if input == nil {
  259. input = &DeleteBudgetInput{}
  260. }
  261. req = c.newRequest(op, input, output)
  262. output = &DeleteBudgetOutput{}
  263. req.Data = output
  264. return
  265. }
  266. // DeleteBudget API operation for AWS Budgets.
  267. //
  268. // Delete a budget and related notifications
  269. //
  270. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  271. // with awserr.Error's Code and Message methods to get detailed information about
  272. // the error.
  273. //
  274. // See the AWS API reference guide for AWS Budgets's
  275. // API operation DeleteBudget for usage and error information.
  276. //
  277. // Returned Error Codes:
  278. // * InternalErrorException
  279. // This exception is thrown on an unknown internal failure.
  280. //
  281. // * InvalidParameterException
  282. // This exception is thrown if any request is given an invalid parameter. E.g.,
  283. // if a required Date field is null.
  284. //
  285. // * NotFoundException
  286. // This exception is thrown if a requested entity is not found. E.g., if a budget
  287. // id doesn't exist for an account ID.
  288. //
  289. func (c *Budgets) DeleteBudget(input *DeleteBudgetInput) (*DeleteBudgetOutput, error) {
  290. req, out := c.DeleteBudgetRequest(input)
  291. err := req.Send()
  292. return out, err
  293. }
  294. const opDeleteNotification = "DeleteNotification"
  295. // DeleteNotificationRequest generates a "aws/request.Request" representing the
  296. // client's request for the DeleteNotification operation. The "output" return
  297. // value can be used to capture response data after the request's "Send" method
  298. // is called.
  299. //
  300. // See DeleteNotification for usage and error information.
  301. //
  302. // Creating a request object using this method should be used when you want to inject
  303. // custom logic into the request's lifecycle using a custom handler, or if you want to
  304. // access properties on the request object before or after sending the request. If
  305. // you just want the service response, call the DeleteNotification method directly
  306. // instead.
  307. //
  308. // Note: You must call the "Send" method on the returned request object in order
  309. // to execute the request.
  310. //
  311. // // Example sending a request using the DeleteNotificationRequest method.
  312. // req, resp := client.DeleteNotificationRequest(params)
  313. //
  314. // err := req.Send()
  315. // if err == nil { // resp is now filled
  316. // fmt.Println(resp)
  317. // }
  318. //
  319. func (c *Budgets) DeleteNotificationRequest(input *DeleteNotificationInput) (req *request.Request, output *DeleteNotificationOutput) {
  320. op := &request.Operation{
  321. Name: opDeleteNotification,
  322. HTTPMethod: "POST",
  323. HTTPPath: "/",
  324. }
  325. if input == nil {
  326. input = &DeleteNotificationInput{}
  327. }
  328. req = c.newRequest(op, input, output)
  329. output = &DeleteNotificationOutput{}
  330. req.Data = output
  331. return
  332. }
  333. // DeleteNotification API operation for AWS Budgets.
  334. //
  335. // Delete a notification and related subscribers
  336. //
  337. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  338. // with awserr.Error's Code and Message methods to get detailed information about
  339. // the error.
  340. //
  341. // See the AWS API reference guide for AWS Budgets's
  342. // API operation DeleteNotification for usage and error information.
  343. //
  344. // Returned Error Codes:
  345. // * InvalidParameterException
  346. // This exception is thrown if any request is given an invalid parameter. E.g.,
  347. // if a required Date field is null.
  348. //
  349. // * InternalErrorException
  350. // This exception is thrown on an unknown internal failure.
  351. //
  352. // * NotFoundException
  353. // This exception is thrown if a requested entity is not found. E.g., if a budget
  354. // id doesn't exist for an account ID.
  355. //
  356. func (c *Budgets) DeleteNotification(input *DeleteNotificationInput) (*DeleteNotificationOutput, error) {
  357. req, out := c.DeleteNotificationRequest(input)
  358. err := req.Send()
  359. return out, err
  360. }
  361. const opDeleteSubscriber = "DeleteSubscriber"
  362. // DeleteSubscriberRequest generates a "aws/request.Request" representing the
  363. // client's request for the DeleteSubscriber operation. The "output" return
  364. // value can be used to capture response data after the request's "Send" method
  365. // is called.
  366. //
  367. // See DeleteSubscriber for usage and error information.
  368. //
  369. // Creating a request object using this method should be used when you want to inject
  370. // custom logic into the request's lifecycle using a custom handler, or if you want to
  371. // access properties on the request object before or after sending the request. If
  372. // you just want the service response, call the DeleteSubscriber method directly
  373. // instead.
  374. //
  375. // Note: You must call the "Send" method on the returned request object in order
  376. // to execute the request.
  377. //
  378. // // Example sending a request using the DeleteSubscriberRequest method.
  379. // req, resp := client.DeleteSubscriberRequest(params)
  380. //
  381. // err := req.Send()
  382. // if err == nil { // resp is now filled
  383. // fmt.Println(resp)
  384. // }
  385. //
  386. func (c *Budgets) DeleteSubscriberRequest(input *DeleteSubscriberInput) (req *request.Request, output *DeleteSubscriberOutput) {
  387. op := &request.Operation{
  388. Name: opDeleteSubscriber,
  389. HTTPMethod: "POST",
  390. HTTPPath: "/",
  391. }
  392. if input == nil {
  393. input = &DeleteSubscriberInput{}
  394. }
  395. req = c.newRequest(op, input, output)
  396. output = &DeleteSubscriberOutput{}
  397. req.Data = output
  398. return
  399. }
  400. // DeleteSubscriber API operation for AWS Budgets.
  401. //
  402. // Delete a Subscriber for a notification
  403. //
  404. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  405. // with awserr.Error's Code and Message methods to get detailed information about
  406. // the error.
  407. //
  408. // See the AWS API reference guide for AWS Budgets's
  409. // API operation DeleteSubscriber for usage and error information.
  410. //
  411. // Returned Error Codes:
  412. // * InternalErrorException
  413. // This exception is thrown on an unknown internal failure.
  414. //
  415. // * InvalidParameterException
  416. // This exception is thrown if any request is given an invalid parameter. E.g.,
  417. // if a required Date field is null.
  418. //
  419. // * NotFoundException
  420. // This exception is thrown if a requested entity is not found. E.g., if a budget
  421. // id doesn't exist for an account ID.
  422. //
  423. func (c *Budgets) DeleteSubscriber(input *DeleteSubscriberInput) (*DeleteSubscriberOutput, error) {
  424. req, out := c.DeleteSubscriberRequest(input)
  425. err := req.Send()
  426. return out, err
  427. }
  428. const opDescribeBudget = "DescribeBudget"
  429. // DescribeBudgetRequest generates a "aws/request.Request" representing the
  430. // client's request for the DescribeBudget operation. The "output" return
  431. // value can be used to capture response data after the request's "Send" method
  432. // is called.
  433. //
  434. // See DescribeBudget for usage and error information.
  435. //
  436. // Creating a request object using this method should be used when you want to inject
  437. // custom logic into the request's lifecycle using a custom handler, or if you want to
  438. // access properties on the request object before or after sending the request. If
  439. // you just want the service response, call the DescribeBudget method directly
  440. // instead.
  441. //
  442. // Note: You must call the "Send" method on the returned request object in order
  443. // to execute the request.
  444. //
  445. // // Example sending a request using the DescribeBudgetRequest method.
  446. // req, resp := client.DescribeBudgetRequest(params)
  447. //
  448. // err := req.Send()
  449. // if err == nil { // resp is now filled
  450. // fmt.Println(resp)
  451. // }
  452. //
  453. func (c *Budgets) DescribeBudgetRequest(input *DescribeBudgetInput) (req *request.Request, output *DescribeBudgetOutput) {
  454. op := &request.Operation{
  455. Name: opDescribeBudget,
  456. HTTPMethod: "POST",
  457. HTTPPath: "/",
  458. }
  459. if input == nil {
  460. input = &DescribeBudgetInput{}
  461. }
  462. req = c.newRequest(op, input, output)
  463. output = &DescribeBudgetOutput{}
  464. req.Data = output
  465. return
  466. }
  467. // DescribeBudget API operation for AWS Budgets.
  468. //
  469. // Get a single budget
  470. //
  471. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  472. // with awserr.Error's Code and Message methods to get detailed information about
  473. // the error.
  474. //
  475. // See the AWS API reference guide for AWS Budgets's
  476. // API operation DescribeBudget for usage and error information.
  477. //
  478. // Returned Error Codes:
  479. // * InternalErrorException
  480. // This exception is thrown on an unknown internal failure.
  481. //
  482. // * InvalidParameterException
  483. // This exception is thrown if any request is given an invalid parameter. E.g.,
  484. // if a required Date field is null.
  485. //
  486. // * NotFoundException
  487. // This exception is thrown if a requested entity is not found. E.g., if a budget
  488. // id doesn't exist for an account ID.
  489. //
  490. func (c *Budgets) DescribeBudget(input *DescribeBudgetInput) (*DescribeBudgetOutput, error) {
  491. req, out := c.DescribeBudgetRequest(input)
  492. err := req.Send()
  493. return out, err
  494. }
  495. const opDescribeBudgets = "DescribeBudgets"
  496. // DescribeBudgetsRequest generates a "aws/request.Request" representing the
  497. // client's request for the DescribeBudgets operation. The "output" return
  498. // value can be used to capture response data after the request's "Send" method
  499. // is called.
  500. //
  501. // See DescribeBudgets for usage and error information.
  502. //
  503. // Creating a request object using this method should be used when you want to inject
  504. // custom logic into the request's lifecycle using a custom handler, or if you want to
  505. // access properties on the request object before or after sending the request. If
  506. // you just want the service response, call the DescribeBudgets method directly
  507. // instead.
  508. //
  509. // Note: You must call the "Send" method on the returned request object in order
  510. // to execute the request.
  511. //
  512. // // Example sending a request using the DescribeBudgetsRequest method.
  513. // req, resp := client.DescribeBudgetsRequest(params)
  514. //
  515. // err := req.Send()
  516. // if err == nil { // resp is now filled
  517. // fmt.Println(resp)
  518. // }
  519. //
  520. func (c *Budgets) DescribeBudgetsRequest(input *DescribeBudgetsInput) (req *request.Request, output *DescribeBudgetsOutput) {
  521. op := &request.Operation{
  522. Name: opDescribeBudgets,
  523. HTTPMethod: "POST",
  524. HTTPPath: "/",
  525. }
  526. if input == nil {
  527. input = &DescribeBudgetsInput{}
  528. }
  529. req = c.newRequest(op, input, output)
  530. output = &DescribeBudgetsOutput{}
  531. req.Data = output
  532. return
  533. }
  534. // DescribeBudgets API operation for AWS Budgets.
  535. //
  536. // Get all budgets for an account
  537. //
  538. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  539. // with awserr.Error's Code and Message methods to get detailed information about
  540. // the error.
  541. //
  542. // See the AWS API reference guide for AWS Budgets's
  543. // API operation DescribeBudgets for usage and error information.
  544. //
  545. // Returned Error Codes:
  546. // * InternalErrorException
  547. // This exception is thrown on an unknown internal failure.
  548. //
  549. // * InvalidParameterException
  550. // This exception is thrown if any request is given an invalid parameter. E.g.,
  551. // if a required Date field is null.
  552. //
  553. // * NotFoundException
  554. // This exception is thrown if a requested entity is not found. E.g., if a budget
  555. // id doesn't exist for an account ID.
  556. //
  557. // * InvalidNextTokenException
  558. // This exception is thrown if paging token signature didn't match the token,
  559. // or the paging token isn't for this request
  560. //
  561. // * ExpiredNextTokenException
  562. // This exception is thrown if the paging token is expired - past its TTL
  563. //
  564. func (c *Budgets) DescribeBudgets(input *DescribeBudgetsInput) (*DescribeBudgetsOutput, error) {
  565. req, out := c.DescribeBudgetsRequest(input)
  566. err := req.Send()
  567. return out, err
  568. }
  569. const opDescribeNotificationsForBudget = "DescribeNotificationsForBudget"
  570. // DescribeNotificationsForBudgetRequest generates a "aws/request.Request" representing the
  571. // client's request for the DescribeNotificationsForBudget operation. The "output" return
  572. // value can be used to capture response data after the request's "Send" method
  573. // is called.
  574. //
  575. // See DescribeNotificationsForBudget for usage and error information.
  576. //
  577. // Creating a request object using this method should be used when you want to inject
  578. // custom logic into the request's lifecycle using a custom handler, or if you want to
  579. // access properties on the request object before or after sending the request. If
  580. // you just want the service response, call the DescribeNotificationsForBudget method directly
  581. // instead.
  582. //
  583. // Note: You must call the "Send" method on the returned request object in order
  584. // to execute the request.
  585. //
  586. // // Example sending a request using the DescribeNotificationsForBudgetRequest method.
  587. // req, resp := client.DescribeNotificationsForBudgetRequest(params)
  588. //
  589. // err := req.Send()
  590. // if err == nil { // resp is now filled
  591. // fmt.Println(resp)
  592. // }
  593. //
  594. func (c *Budgets) DescribeNotificationsForBudgetRequest(input *DescribeNotificationsForBudgetInput) (req *request.Request, output *DescribeNotificationsForBudgetOutput) {
  595. op := &request.Operation{
  596. Name: opDescribeNotificationsForBudget,
  597. HTTPMethod: "POST",
  598. HTTPPath: "/",
  599. }
  600. if input == nil {
  601. input = &DescribeNotificationsForBudgetInput{}
  602. }
  603. req = c.newRequest(op, input, output)
  604. output = &DescribeNotificationsForBudgetOutput{}
  605. req.Data = output
  606. return
  607. }
  608. // DescribeNotificationsForBudget API operation for AWS Budgets.
  609. //
  610. // Get notifications of a budget
  611. //
  612. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  613. // with awserr.Error's Code and Message methods to get detailed information about
  614. // the error.
  615. //
  616. // See the AWS API reference guide for AWS Budgets's
  617. // API operation DescribeNotificationsForBudget for usage and error information.
  618. //
  619. // Returned Error Codes:
  620. // * InternalErrorException
  621. // This exception is thrown on an unknown internal failure.
  622. //
  623. // * InvalidParameterException
  624. // This exception is thrown if any request is given an invalid parameter. E.g.,
  625. // if a required Date field is null.
  626. //
  627. // * NotFoundException
  628. // This exception is thrown if a requested entity is not found. E.g., if a budget
  629. // id doesn't exist for an account ID.
  630. //
  631. // * InvalidNextTokenException
  632. // This exception is thrown if paging token signature didn't match the token,
  633. // or the paging token isn't for this request
  634. //
  635. // * ExpiredNextTokenException
  636. // This exception is thrown if the paging token is expired - past its TTL
  637. //
  638. func (c *Budgets) DescribeNotificationsForBudget(input *DescribeNotificationsForBudgetInput) (*DescribeNotificationsForBudgetOutput, error) {
  639. req, out := c.DescribeNotificationsForBudgetRequest(input)
  640. err := req.Send()
  641. return out, err
  642. }
  643. const opDescribeSubscribersForNotification = "DescribeSubscribersForNotification"
  644. // DescribeSubscribersForNotificationRequest generates a "aws/request.Request" representing the
  645. // client's request for the DescribeSubscribersForNotification operation. The "output" return
  646. // value can be used to capture response data after the request's "Send" method
  647. // is called.
  648. //
  649. // See DescribeSubscribersForNotification for usage and error information.
  650. //
  651. // Creating a request object using this method should be used when you want to inject
  652. // custom logic into the request's lifecycle using a custom handler, or if you want to
  653. // access properties on the request object before or after sending the request. If
  654. // you just want the service response, call the DescribeSubscribersForNotification method directly
  655. // instead.
  656. //
  657. // Note: You must call the "Send" method on the returned request object in order
  658. // to execute the request.
  659. //
  660. // // Example sending a request using the DescribeSubscribersForNotificationRequest method.
  661. // req, resp := client.DescribeSubscribersForNotificationRequest(params)
  662. //
  663. // err := req.Send()
  664. // if err == nil { // resp is now filled
  665. // fmt.Println(resp)
  666. // }
  667. //
  668. func (c *Budgets) DescribeSubscribersForNotificationRequest(input *DescribeSubscribersForNotificationInput) (req *request.Request, output *DescribeSubscribersForNotificationOutput) {
  669. op := &request.Operation{
  670. Name: opDescribeSubscribersForNotification,
  671. HTTPMethod: "POST",
  672. HTTPPath: "/",
  673. }
  674. if input == nil {
  675. input = &DescribeSubscribersForNotificationInput{}
  676. }
  677. req = c.newRequest(op, input, output)
  678. output = &DescribeSubscribersForNotificationOutput{}
  679. req.Data = output
  680. return
  681. }
  682. // DescribeSubscribersForNotification API operation for AWS Budgets.
  683. //
  684. // Get subscribers of a notification
  685. //
  686. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  687. // with awserr.Error's Code and Message methods to get detailed information about
  688. // the error.
  689. //
  690. // See the AWS API reference guide for AWS Budgets's
  691. // API operation DescribeSubscribersForNotification for usage and error information.
  692. //
  693. // Returned Error Codes:
  694. // * InternalErrorException
  695. // This exception is thrown on an unknown internal failure.
  696. //
  697. // * NotFoundException
  698. // This exception is thrown if a requested entity is not found. E.g., if a budget
  699. // id doesn't exist for an account ID.
  700. //
  701. // * InvalidParameterException
  702. // This exception is thrown if any request is given an invalid parameter. E.g.,
  703. // if a required Date field is null.
  704. //
  705. // * InvalidNextTokenException
  706. // This exception is thrown if paging token signature didn't match the token,
  707. // or the paging token isn't for this request
  708. //
  709. // * ExpiredNextTokenException
  710. // This exception is thrown if the paging token is expired - past its TTL
  711. //
  712. func (c *Budgets) DescribeSubscribersForNotification(input *DescribeSubscribersForNotificationInput) (*DescribeSubscribersForNotificationOutput, error) {
  713. req, out := c.DescribeSubscribersForNotificationRequest(input)
  714. err := req.Send()
  715. return out, err
  716. }
  717. const opUpdateBudget = "UpdateBudget"
  718. // UpdateBudgetRequest generates a "aws/request.Request" representing the
  719. // client's request for the UpdateBudget operation. The "output" return
  720. // value can be used to capture response data after the request's "Send" method
  721. // is called.
  722. //
  723. // See UpdateBudget for usage and error information.
  724. //
  725. // Creating a request object using this method should be used when you want to inject
  726. // custom logic into the request's lifecycle using a custom handler, or if you want to
  727. // access properties on the request object before or after sending the request. If
  728. // you just want the service response, call the UpdateBudget method directly
  729. // instead.
  730. //
  731. // Note: You must call the "Send" method on the returned request object in order
  732. // to execute the request.
  733. //
  734. // // Example sending a request using the UpdateBudgetRequest method.
  735. // req, resp := client.UpdateBudgetRequest(params)
  736. //
  737. // err := req.Send()
  738. // if err == nil { // resp is now filled
  739. // fmt.Println(resp)
  740. // }
  741. //
  742. func (c *Budgets) UpdateBudgetRequest(input *UpdateBudgetInput) (req *request.Request, output *UpdateBudgetOutput) {
  743. op := &request.Operation{
  744. Name: opUpdateBudget,
  745. HTTPMethod: "POST",
  746. HTTPPath: "/",
  747. }
  748. if input == nil {
  749. input = &UpdateBudgetInput{}
  750. }
  751. req = c.newRequest(op, input, output)
  752. output = &UpdateBudgetOutput{}
  753. req.Data = output
  754. return
  755. }
  756. // UpdateBudget API operation for AWS Budgets.
  757. //
  758. // Update the information of a budget already created
  759. //
  760. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  761. // with awserr.Error's Code and Message methods to get detailed information about
  762. // the error.
  763. //
  764. // See the AWS API reference guide for AWS Budgets's
  765. // API operation UpdateBudget for usage and error information.
  766. //
  767. // Returned Error Codes:
  768. // * InternalErrorException
  769. // This exception is thrown on an unknown internal failure.
  770. //
  771. // * InvalidParameterException
  772. // This exception is thrown if any request is given an invalid parameter. E.g.,
  773. // if a required Date field is null.
  774. //
  775. // * NotFoundException
  776. // This exception is thrown if a requested entity is not found. E.g., if a budget
  777. // id doesn't exist for an account ID.
  778. //
  779. func (c *Budgets) UpdateBudget(input *UpdateBudgetInput) (*UpdateBudgetOutput, error) {
  780. req, out := c.UpdateBudgetRequest(input)
  781. err := req.Send()
  782. return out, err
  783. }
  784. const opUpdateNotification = "UpdateNotification"
  785. // UpdateNotificationRequest generates a "aws/request.Request" representing the
  786. // client's request for the UpdateNotification operation. The "output" return
  787. // value can be used to capture response data after the request's "Send" method
  788. // is called.
  789. //
  790. // See UpdateNotification for usage and error information.
  791. //
  792. // Creating a request object using this method should be used when you want to inject
  793. // custom logic into the request's lifecycle using a custom handler, or if you want to
  794. // access properties on the request object before or after sending the request. If
  795. // you just want the service response, call the UpdateNotification method directly
  796. // instead.
  797. //
  798. // Note: You must call the "Send" method on the returned request object in order
  799. // to execute the request.
  800. //
  801. // // Example sending a request using the UpdateNotificationRequest method.
  802. // req, resp := client.UpdateNotificationRequest(params)
  803. //
  804. // err := req.Send()
  805. // if err == nil { // resp is now filled
  806. // fmt.Println(resp)
  807. // }
  808. //
  809. func (c *Budgets) UpdateNotificationRequest(input *UpdateNotificationInput) (req *request.Request, output *UpdateNotificationOutput) {
  810. op := &request.Operation{
  811. Name: opUpdateNotification,
  812. HTTPMethod: "POST",
  813. HTTPPath: "/",
  814. }
  815. if input == nil {
  816. input = &UpdateNotificationInput{}
  817. }
  818. req = c.newRequest(op, input, output)
  819. output = &UpdateNotificationOutput{}
  820. req.Data = output
  821. return
  822. }
  823. // UpdateNotification API operation for AWS Budgets.
  824. //
  825. // Update the information about a notification already created
  826. //
  827. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  828. // with awserr.Error's Code and Message methods to get detailed information about
  829. // the error.
  830. //
  831. // See the AWS API reference guide for AWS Budgets's
  832. // API operation UpdateNotification for usage and error information.
  833. //
  834. // Returned Error Codes:
  835. // * InternalErrorException
  836. // This exception is thrown on an unknown internal failure.
  837. //
  838. // * InvalidParameterException
  839. // This exception is thrown if any request is given an invalid parameter. E.g.,
  840. // if a required Date field is null.
  841. //
  842. // * NotFoundException
  843. // This exception is thrown if a requested entity is not found. E.g., if a budget
  844. // id doesn't exist for an account ID.
  845. //
  846. func (c *Budgets) UpdateNotification(input *UpdateNotificationInput) (*UpdateNotificationOutput, error) {
  847. req, out := c.UpdateNotificationRequest(input)
  848. err := req.Send()
  849. return out, err
  850. }
  851. const opUpdateSubscriber = "UpdateSubscriber"
  852. // UpdateSubscriberRequest generates a "aws/request.Request" representing the
  853. // client's request for the UpdateSubscriber operation. The "output" return
  854. // value can be used to capture response data after the request's "Send" method
  855. // is called.
  856. //
  857. // See UpdateSubscriber for usage and error information.
  858. //
  859. // Creating a request object using this method should be used when you want to inject
  860. // custom logic into the request's lifecycle using a custom handler, or if you want to
  861. // access properties on the request object before or after sending the request. If
  862. // you just want the service response, call the UpdateSubscriber method directly
  863. // instead.
  864. //
  865. // Note: You must call the "Send" method on the returned request object in order
  866. // to execute the request.
  867. //
  868. // // Example sending a request using the UpdateSubscriberRequest method.
  869. // req, resp := client.UpdateSubscriberRequest(params)
  870. //
  871. // err := req.Send()
  872. // if err == nil { // resp is now filled
  873. // fmt.Println(resp)
  874. // }
  875. //
  876. func (c *Budgets) UpdateSubscriberRequest(input *UpdateSubscriberInput) (req *request.Request, output *UpdateSubscriberOutput) {
  877. op := &request.Operation{
  878. Name: opUpdateSubscriber,
  879. HTTPMethod: "POST",
  880. HTTPPath: "/",
  881. }
  882. if input == nil {
  883. input = &UpdateSubscriberInput{}
  884. }
  885. req = c.newRequest(op, input, output)
  886. output = &UpdateSubscriberOutput{}
  887. req.Data = output
  888. return
  889. }
  890. // UpdateSubscriber API operation for AWS Budgets.
  891. //
  892. // Update a subscriber
  893. //
  894. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  895. // with awserr.Error's Code and Message methods to get detailed information about
  896. // the error.
  897. //
  898. // See the AWS API reference guide for AWS Budgets's
  899. // API operation UpdateSubscriber for usage and error information.
  900. //
  901. // Returned Error Codes:
  902. // * InternalErrorException
  903. // This exception is thrown on an unknown internal failure.
  904. //
  905. // * InvalidParameterException
  906. // This exception is thrown if any request is given an invalid parameter. E.g.,
  907. // if a required Date field is null.
  908. //
  909. // * NotFoundException
  910. // This exception is thrown if a requested entity is not found. E.g., if a budget
  911. // id doesn't exist for an account ID.
  912. //
  913. func (c *Budgets) UpdateSubscriber(input *UpdateSubscriberInput) (*UpdateSubscriberOutput, error) {
  914. req, out := c.UpdateSubscriberRequest(input)
  915. err := req.Send()
  916. return out, err
  917. }
  918. // AWS Budget model
  919. type Budget struct {
  920. _ struct{} `type:"structure"`
  921. // A structure represent either a cost spend or usage spend. Contains an amount
  922. // and a unit.
  923. //
  924. // BudgetLimit is a required field
  925. BudgetLimit *Spend `type:"structure" required:"true"`
  926. // A string represents the budget name. No ":" character is allowed.
  927. //
  928. // BudgetName is a required field
  929. BudgetName *string `type:"string" required:"true"`
  930. // The type of a budget. Can be COST or USAGE.
  931. //
  932. // BudgetType is a required field
  933. BudgetType *string `type:"string" required:"true" enum:"BudgetType"`
  934. // A structure holds the actual and forecasted spend for a budget.
  935. CalculatedSpend *CalculatedSpend `type:"structure"`
  936. // A map represents the cost filters applied to the budget.
  937. CostFilters map[string][]*string `type:"map"`
  938. // This includes the options for getting the cost of a budget.
  939. //
  940. // CostTypes is a required field
  941. CostTypes *CostTypes `type:"structure" required:"true"`
  942. // A time period indicated the start date and end date of a budget.
  943. //
  944. // TimePeriod is a required field
  945. TimePeriod *TimePeriod `type:"structure" required:"true"`
  946. // The time unit of the budget. e.g. weekly, monthly, etc.
  947. //
  948. // TimeUnit is a required field
  949. TimeUnit *string `type:"string" required:"true" enum:"TimeUnit"`
  950. }
  951. // String returns the string representation
  952. func (s Budget) String() string {
  953. return awsutil.Prettify(s)
  954. }
  955. // GoString returns the string representation
  956. func (s Budget) GoString() string {
  957. return s.String()
  958. }
  959. // Validate inspects the fields of the type to determine if they are valid.
  960. func (s *Budget) Validate() error {
  961. invalidParams := request.ErrInvalidParams{Context: "Budget"}
  962. if s.BudgetLimit == nil {
  963. invalidParams.Add(request.NewErrParamRequired("BudgetLimit"))
  964. }
  965. if s.BudgetName == nil {
  966. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  967. }
  968. if s.BudgetType == nil {
  969. invalidParams.Add(request.NewErrParamRequired("BudgetType"))
  970. }
  971. if s.CostTypes == nil {
  972. invalidParams.Add(request.NewErrParamRequired("CostTypes"))
  973. }
  974. if s.TimePeriod == nil {
  975. invalidParams.Add(request.NewErrParamRequired("TimePeriod"))
  976. }
  977. if s.TimeUnit == nil {
  978. invalidParams.Add(request.NewErrParamRequired("TimeUnit"))
  979. }
  980. if s.BudgetLimit != nil {
  981. if err := s.BudgetLimit.Validate(); err != nil {
  982. invalidParams.AddNested("BudgetLimit", err.(request.ErrInvalidParams))
  983. }
  984. }
  985. if s.CalculatedSpend != nil {
  986. if err := s.CalculatedSpend.Validate(); err != nil {
  987. invalidParams.AddNested("CalculatedSpend", err.(request.ErrInvalidParams))
  988. }
  989. }
  990. if s.CostTypes != nil {
  991. if err := s.CostTypes.Validate(); err != nil {
  992. invalidParams.AddNested("CostTypes", err.(request.ErrInvalidParams))
  993. }
  994. }
  995. if s.TimePeriod != nil {
  996. if err := s.TimePeriod.Validate(); err != nil {
  997. invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams))
  998. }
  999. }
  1000. if invalidParams.Len() > 0 {
  1001. return invalidParams
  1002. }
  1003. return nil
  1004. }
  1005. // A structure holds the actual and forecasted spend for a budget.
  1006. type CalculatedSpend struct {
  1007. _ struct{} `type:"structure"`
  1008. // A structure represent either a cost spend or usage spend. Contains an amount
  1009. // and a unit.
  1010. //
  1011. // ActualSpend is a required field
  1012. ActualSpend *Spend `type:"structure" required:"true"`
  1013. // A structure represent either a cost spend or usage spend. Contains an amount
  1014. // and a unit.
  1015. ForecastedSpend *Spend `type:"structure"`
  1016. }
  1017. // String returns the string representation
  1018. func (s CalculatedSpend) String() string {
  1019. return awsutil.Prettify(s)
  1020. }
  1021. // GoString returns the string representation
  1022. func (s CalculatedSpend) GoString() string {
  1023. return s.String()
  1024. }
  1025. // Validate inspects the fields of the type to determine if they are valid.
  1026. func (s *CalculatedSpend) Validate() error {
  1027. invalidParams := request.ErrInvalidParams{Context: "CalculatedSpend"}
  1028. if s.ActualSpend == nil {
  1029. invalidParams.Add(request.NewErrParamRequired("ActualSpend"))
  1030. }
  1031. if s.ActualSpend != nil {
  1032. if err := s.ActualSpend.Validate(); err != nil {
  1033. invalidParams.AddNested("ActualSpend", err.(request.ErrInvalidParams))
  1034. }
  1035. }
  1036. if s.ForecastedSpend != nil {
  1037. if err := s.ForecastedSpend.Validate(); err != nil {
  1038. invalidParams.AddNested("ForecastedSpend", err.(request.ErrInvalidParams))
  1039. }
  1040. }
  1041. if invalidParams.Len() > 0 {
  1042. return invalidParams
  1043. }
  1044. return nil
  1045. }
  1046. // This includes the options for getting the cost of a budget.
  1047. type CostTypes struct {
  1048. _ struct{} `type:"structure"`
  1049. // A generic boolean value.
  1050. //
  1051. // IncludeSubscription is a required field
  1052. IncludeSubscription *bool `type:"boolean" required:"true"`
  1053. // A generic boolean value.
  1054. //
  1055. // IncludeTax is a required field
  1056. IncludeTax *bool `type:"boolean" required:"true"`
  1057. // A generic boolean value.
  1058. //
  1059. // UseBlended is a required field
  1060. UseBlended *bool `type:"boolean" required:"true"`
  1061. }
  1062. // String returns the string representation
  1063. func (s CostTypes) String() string {
  1064. return awsutil.Prettify(s)
  1065. }
  1066. // GoString returns the string representation
  1067. func (s CostTypes) GoString() string {
  1068. return s.String()
  1069. }
  1070. // Validate inspects the fields of the type to determine if they are valid.
  1071. func (s *CostTypes) Validate() error {
  1072. invalidParams := request.ErrInvalidParams{Context: "CostTypes"}
  1073. if s.IncludeSubscription == nil {
  1074. invalidParams.Add(request.NewErrParamRequired("IncludeSubscription"))
  1075. }
  1076. if s.IncludeTax == nil {
  1077. invalidParams.Add(request.NewErrParamRequired("IncludeTax"))
  1078. }
  1079. if s.UseBlended == nil {
  1080. invalidParams.Add(request.NewErrParamRequired("UseBlended"))
  1081. }
  1082. if invalidParams.Len() > 0 {
  1083. return invalidParams
  1084. }
  1085. return nil
  1086. }
  1087. // Request of CreateBudget
  1088. type CreateBudgetInput struct {
  1089. _ struct{} `type:"structure"`
  1090. // Account Id of the customer. It should be a 12 digit number.
  1091. //
  1092. // AccountId is a required field
  1093. AccountId *string `min:"12" type:"string" required:"true"`
  1094. // AWS Budget model
  1095. //
  1096. // Budget is a required field
  1097. Budget *Budget `type:"structure" required:"true"`
  1098. // A list of Notifications, each with a list of subscribers.
  1099. NotificationsWithSubscribers []*NotificationWithSubscribers `type:"list"`
  1100. }
  1101. // String returns the string representation
  1102. func (s CreateBudgetInput) String() string {
  1103. return awsutil.Prettify(s)
  1104. }
  1105. // GoString returns the string representation
  1106. func (s CreateBudgetInput) GoString() string {
  1107. return s.String()
  1108. }
  1109. // Validate inspects the fields of the type to determine if they are valid.
  1110. func (s *CreateBudgetInput) Validate() error {
  1111. invalidParams := request.ErrInvalidParams{Context: "CreateBudgetInput"}
  1112. if s.AccountId == nil {
  1113. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1114. }
  1115. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1116. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1117. }
  1118. if s.Budget == nil {
  1119. invalidParams.Add(request.NewErrParamRequired("Budget"))
  1120. }
  1121. if s.Budget != nil {
  1122. if err := s.Budget.Validate(); err != nil {
  1123. invalidParams.AddNested("Budget", err.(request.ErrInvalidParams))
  1124. }
  1125. }
  1126. if s.NotificationsWithSubscribers != nil {
  1127. for i, v := range s.NotificationsWithSubscribers {
  1128. if v == nil {
  1129. continue
  1130. }
  1131. if err := v.Validate(); err != nil {
  1132. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NotificationsWithSubscribers", i), err.(request.ErrInvalidParams))
  1133. }
  1134. }
  1135. }
  1136. if invalidParams.Len() > 0 {
  1137. return invalidParams
  1138. }
  1139. return nil
  1140. }
  1141. // Response of CreateBudget
  1142. type CreateBudgetOutput struct {
  1143. _ struct{} `type:"structure"`
  1144. }
  1145. // String returns the string representation
  1146. func (s CreateBudgetOutput) String() string {
  1147. return awsutil.Prettify(s)
  1148. }
  1149. // GoString returns the string representation
  1150. func (s CreateBudgetOutput) GoString() string {
  1151. return s.String()
  1152. }
  1153. // Request of CreateNotification
  1154. type CreateNotificationInput struct {
  1155. _ struct{} `type:"structure"`
  1156. // Account Id of the customer. It should be a 12 digit number.
  1157. //
  1158. // AccountId is a required field
  1159. AccountId *string `min:"12" type:"string" required:"true"`
  1160. // A string represents the budget name. No ":" character is allowed.
  1161. //
  1162. // BudgetName is a required field
  1163. BudgetName *string `type:"string" required:"true"`
  1164. // Notification model. Each budget may contain multiple notifications with different
  1165. // settings.
  1166. //
  1167. // Notification is a required field
  1168. Notification *Notification `type:"structure" required:"true"`
  1169. // A list of subscribers.
  1170. //
  1171. // Subscribers is a required field
  1172. Subscribers []*Subscriber `min:"1" type:"list" required:"true"`
  1173. }
  1174. // String returns the string representation
  1175. func (s CreateNotificationInput) String() string {
  1176. return awsutil.Prettify(s)
  1177. }
  1178. // GoString returns the string representation
  1179. func (s CreateNotificationInput) GoString() string {
  1180. return s.String()
  1181. }
  1182. // Validate inspects the fields of the type to determine if they are valid.
  1183. func (s *CreateNotificationInput) Validate() error {
  1184. invalidParams := request.ErrInvalidParams{Context: "CreateNotificationInput"}
  1185. if s.AccountId == nil {
  1186. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1187. }
  1188. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1189. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1190. }
  1191. if s.BudgetName == nil {
  1192. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  1193. }
  1194. if s.Notification == nil {
  1195. invalidParams.Add(request.NewErrParamRequired("Notification"))
  1196. }
  1197. if s.Subscribers == nil {
  1198. invalidParams.Add(request.NewErrParamRequired("Subscribers"))
  1199. }
  1200. if s.Subscribers != nil && len(s.Subscribers) < 1 {
  1201. invalidParams.Add(request.NewErrParamMinLen("Subscribers", 1))
  1202. }
  1203. if s.Notification != nil {
  1204. if err := s.Notification.Validate(); err != nil {
  1205. invalidParams.AddNested("Notification", err.(request.ErrInvalidParams))
  1206. }
  1207. }
  1208. if s.Subscribers != nil {
  1209. for i, v := range s.Subscribers {
  1210. if v == nil {
  1211. continue
  1212. }
  1213. if err := v.Validate(); err != nil {
  1214. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Subscribers", i), err.(request.ErrInvalidParams))
  1215. }
  1216. }
  1217. }
  1218. if invalidParams.Len() > 0 {
  1219. return invalidParams
  1220. }
  1221. return nil
  1222. }
  1223. // Response of CreateNotification
  1224. type CreateNotificationOutput struct {
  1225. _ struct{} `type:"structure"`
  1226. }
  1227. // String returns the string representation
  1228. func (s CreateNotificationOutput) String() string {
  1229. return awsutil.Prettify(s)
  1230. }
  1231. // GoString returns the string representation
  1232. func (s CreateNotificationOutput) GoString() string {
  1233. return s.String()
  1234. }
  1235. // Request of CreateSubscriber
  1236. type CreateSubscriberInput struct {
  1237. _ struct{} `type:"structure"`
  1238. // Account Id of the customer. It should be a 12 digit number.
  1239. //
  1240. // AccountId is a required field
  1241. AccountId *string `min:"12" type:"string" required:"true"`
  1242. // A string represents the budget name. No ":" character is allowed.
  1243. //
  1244. // BudgetName is a required field
  1245. BudgetName *string `type:"string" required:"true"`
  1246. // Notification model. Each budget may contain multiple notifications with different
  1247. // settings.
  1248. //
  1249. // Notification is a required field
  1250. Notification *Notification `type:"structure" required:"true"`
  1251. // Subscriber model. Each notification may contain multiple subscribers with
  1252. // different addresses.
  1253. //
  1254. // Subscriber is a required field
  1255. Subscriber *Subscriber `type:"structure" required:"true"`
  1256. }
  1257. // String returns the string representation
  1258. func (s CreateSubscriberInput) String() string {
  1259. return awsutil.Prettify(s)
  1260. }
  1261. // GoString returns the string representation
  1262. func (s CreateSubscriberInput) GoString() string {
  1263. return s.String()
  1264. }
  1265. // Validate inspects the fields of the type to determine if they are valid.
  1266. func (s *CreateSubscriberInput) Validate() error {
  1267. invalidParams := request.ErrInvalidParams{Context: "CreateSubscriberInput"}
  1268. if s.AccountId == nil {
  1269. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1270. }
  1271. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1272. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1273. }
  1274. if s.BudgetName == nil {
  1275. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  1276. }
  1277. if s.Notification == nil {
  1278. invalidParams.Add(request.NewErrParamRequired("Notification"))
  1279. }
  1280. if s.Subscriber == nil {
  1281. invalidParams.Add(request.NewErrParamRequired("Subscriber"))
  1282. }
  1283. if s.Notification != nil {
  1284. if err := s.Notification.Validate(); err != nil {
  1285. invalidParams.AddNested("Notification", err.(request.ErrInvalidParams))
  1286. }
  1287. }
  1288. if s.Subscriber != nil {
  1289. if err := s.Subscriber.Validate(); err != nil {
  1290. invalidParams.AddNested("Subscriber", err.(request.ErrInvalidParams))
  1291. }
  1292. }
  1293. if invalidParams.Len() > 0 {
  1294. return invalidParams
  1295. }
  1296. return nil
  1297. }
  1298. // Response of CreateSubscriber
  1299. type CreateSubscriberOutput struct {
  1300. _ struct{} `type:"structure"`
  1301. }
  1302. // String returns the string representation
  1303. func (s CreateSubscriberOutput) String() string {
  1304. return awsutil.Prettify(s)
  1305. }
  1306. // GoString returns the string representation
  1307. func (s CreateSubscriberOutput) GoString() string {
  1308. return s.String()
  1309. }
  1310. // Request of DeleteBudget
  1311. type DeleteBudgetInput struct {
  1312. _ struct{} `type:"structure"`
  1313. // Account Id of the customer. It should be a 12 digit number.
  1314. //
  1315. // AccountId is a required field
  1316. AccountId *string `min:"12" type:"string" required:"true"`
  1317. // A string represents the budget name. No ":" character is allowed.
  1318. //
  1319. // BudgetName is a required field
  1320. BudgetName *string `type:"string" required:"true"`
  1321. }
  1322. // String returns the string representation
  1323. func (s DeleteBudgetInput) String() string {
  1324. return awsutil.Prettify(s)
  1325. }
  1326. // GoString returns the string representation
  1327. func (s DeleteBudgetInput) GoString() string {
  1328. return s.String()
  1329. }
  1330. // Validate inspects the fields of the type to determine if they are valid.
  1331. func (s *DeleteBudgetInput) Validate() error {
  1332. invalidParams := request.ErrInvalidParams{Context: "DeleteBudgetInput"}
  1333. if s.AccountId == nil {
  1334. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1335. }
  1336. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1337. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1338. }
  1339. if s.BudgetName == nil {
  1340. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  1341. }
  1342. if invalidParams.Len() > 0 {
  1343. return invalidParams
  1344. }
  1345. return nil
  1346. }
  1347. // Response of DeleteBudget
  1348. type DeleteBudgetOutput struct {
  1349. _ struct{} `type:"structure"`
  1350. }
  1351. // String returns the string representation
  1352. func (s DeleteBudgetOutput) String() string {
  1353. return awsutil.Prettify(s)
  1354. }
  1355. // GoString returns the string representation
  1356. func (s DeleteBudgetOutput) GoString() string {
  1357. return s.String()
  1358. }
  1359. // Request of DeleteNotification
  1360. type DeleteNotificationInput struct {
  1361. _ struct{} `type:"structure"`
  1362. // Account Id of the customer. It should be a 12 digit number.
  1363. //
  1364. // AccountId is a required field
  1365. AccountId *string `min:"12" type:"string" required:"true"`
  1366. // A string represents the budget name. No ":" character is allowed.
  1367. //
  1368. // BudgetName is a required field
  1369. BudgetName *string `type:"string" required:"true"`
  1370. // Notification model. Each budget may contain multiple notifications with different
  1371. // settings.
  1372. //
  1373. // Notification is a required field
  1374. Notification *Notification `type:"structure" required:"true"`
  1375. }
  1376. // String returns the string representation
  1377. func (s DeleteNotificationInput) String() string {
  1378. return awsutil.Prettify(s)
  1379. }
  1380. // GoString returns the string representation
  1381. func (s DeleteNotificationInput) GoString() string {
  1382. return s.String()
  1383. }
  1384. // Validate inspects the fields of the type to determine if they are valid.
  1385. func (s *DeleteNotificationInput) Validate() error {
  1386. invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationInput"}
  1387. if s.AccountId == nil {
  1388. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1389. }
  1390. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1391. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1392. }
  1393. if s.BudgetName == nil {
  1394. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  1395. }
  1396. if s.Notification == nil {
  1397. invalidParams.Add(request.NewErrParamRequired("Notification"))
  1398. }
  1399. if s.Notification != nil {
  1400. if err := s.Notification.Validate(); err != nil {
  1401. invalidParams.AddNested("Notification", err.(request.ErrInvalidParams))
  1402. }
  1403. }
  1404. if invalidParams.Len() > 0 {
  1405. return invalidParams
  1406. }
  1407. return nil
  1408. }
  1409. // Response of DeleteNotification
  1410. type DeleteNotificationOutput struct {
  1411. _ struct{} `type:"structure"`
  1412. }
  1413. // String returns the string representation
  1414. func (s DeleteNotificationOutput) String() string {
  1415. return awsutil.Prettify(s)
  1416. }
  1417. // GoString returns the string representation
  1418. func (s DeleteNotificationOutput) GoString() string {
  1419. return s.String()
  1420. }
  1421. // Request of DeleteSubscriber
  1422. type DeleteSubscriberInput struct {
  1423. _ struct{} `type:"structure"`
  1424. // Account Id of the customer. It should be a 12 digit number.
  1425. //
  1426. // AccountId is a required field
  1427. AccountId *string `min:"12" type:"string" required:"true"`
  1428. // A string represents the budget name. No ":" character is allowed.
  1429. //
  1430. // BudgetName is a required field
  1431. BudgetName *string `type:"string" required:"true"`
  1432. // Notification model. Each budget may contain multiple notifications with different
  1433. // settings.
  1434. //
  1435. // Notification is a required field
  1436. Notification *Notification `type:"structure" required:"true"`
  1437. // Subscriber model. Each notification may contain multiple subscribers with
  1438. // different addresses.
  1439. //
  1440. // Subscriber is a required field
  1441. Subscriber *Subscriber `type:"structure" required:"true"`
  1442. }
  1443. // String returns the string representation
  1444. func (s DeleteSubscriberInput) String() string {
  1445. return awsutil.Prettify(s)
  1446. }
  1447. // GoString returns the string representation
  1448. func (s DeleteSubscriberInput) GoString() string {
  1449. return s.String()
  1450. }
  1451. // Validate inspects the fields of the type to determine if they are valid.
  1452. func (s *DeleteSubscriberInput) Validate() error {
  1453. invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriberInput"}
  1454. if s.AccountId == nil {
  1455. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1456. }
  1457. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1458. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1459. }
  1460. if s.BudgetName == nil {
  1461. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  1462. }
  1463. if s.Notification == nil {
  1464. invalidParams.Add(request.NewErrParamRequired("Notification"))
  1465. }
  1466. if s.Subscriber == nil {
  1467. invalidParams.Add(request.NewErrParamRequired("Subscriber"))
  1468. }
  1469. if s.Notification != nil {
  1470. if err := s.Notification.Validate(); err != nil {
  1471. invalidParams.AddNested("Notification", err.(request.ErrInvalidParams))
  1472. }
  1473. }
  1474. if s.Subscriber != nil {
  1475. if err := s.Subscriber.Validate(); err != nil {
  1476. invalidParams.AddNested("Subscriber", err.(request.ErrInvalidParams))
  1477. }
  1478. }
  1479. if invalidParams.Len() > 0 {
  1480. return invalidParams
  1481. }
  1482. return nil
  1483. }
  1484. // Response of DeleteSubscriber
  1485. type DeleteSubscriberOutput struct {
  1486. _ struct{} `type:"structure"`
  1487. }
  1488. // String returns the string representation
  1489. func (s DeleteSubscriberOutput) String() string {
  1490. return awsutil.Prettify(s)
  1491. }
  1492. // GoString returns the string representation
  1493. func (s DeleteSubscriberOutput) GoString() string {
  1494. return s.String()
  1495. }
  1496. // Request of DescribeBudget
  1497. type DescribeBudgetInput struct {
  1498. _ struct{} `type:"structure"`
  1499. // Account Id of the customer. It should be a 12 digit number.
  1500. //
  1501. // AccountId is a required field
  1502. AccountId *string `min:"12" type:"string" required:"true"`
  1503. // A string represents the budget name. No ":" character is allowed.
  1504. //
  1505. // BudgetName is a required field
  1506. BudgetName *string `type:"string" required:"true"`
  1507. }
  1508. // String returns the string representation
  1509. func (s DescribeBudgetInput) String() string {
  1510. return awsutil.Prettify(s)
  1511. }
  1512. // GoString returns the string representation
  1513. func (s DescribeBudgetInput) GoString() string {
  1514. return s.String()
  1515. }
  1516. // Validate inspects the fields of the type to determine if they are valid.
  1517. func (s *DescribeBudgetInput) Validate() error {
  1518. invalidParams := request.ErrInvalidParams{Context: "DescribeBudgetInput"}
  1519. if s.AccountId == nil {
  1520. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1521. }
  1522. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1523. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1524. }
  1525. if s.BudgetName == nil {
  1526. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  1527. }
  1528. if invalidParams.Len() > 0 {
  1529. return invalidParams
  1530. }
  1531. return nil
  1532. }
  1533. // Response of DescribeBudget
  1534. type DescribeBudgetOutput struct {
  1535. _ struct{} `type:"structure"`
  1536. // AWS Budget model
  1537. Budget *Budget `type:"structure"`
  1538. }
  1539. // String returns the string representation
  1540. func (s DescribeBudgetOutput) String() string {
  1541. return awsutil.Prettify(s)
  1542. }
  1543. // GoString returns the string representation
  1544. func (s DescribeBudgetOutput) GoString() string {
  1545. return s.String()
  1546. }
  1547. // Request of DescribeBudgets
  1548. type DescribeBudgetsInput struct {
  1549. _ struct{} `type:"structure"`
  1550. // Account Id of the customer. It should be a 12 digit number.
  1551. //
  1552. // AccountId is a required field
  1553. AccountId *string `min:"12" type:"string" required:"true"`
  1554. // An integer to represent how many entries should a pagianted response contains.
  1555. // Maxium is set to 100.
  1556. MaxResults *int64 `min:"1" type:"integer"`
  1557. // A generic String.
  1558. NextToken *string `type:"string"`
  1559. }
  1560. // String returns the string representation
  1561. func (s DescribeBudgetsInput) String() string {
  1562. return awsutil.Prettify(s)
  1563. }
  1564. // GoString returns the string representation
  1565. func (s DescribeBudgetsInput) GoString() string {
  1566. return s.String()
  1567. }
  1568. // Validate inspects the fields of the type to determine if they are valid.
  1569. func (s *DescribeBudgetsInput) Validate() error {
  1570. invalidParams := request.ErrInvalidParams{Context: "DescribeBudgetsInput"}
  1571. if s.AccountId == nil {
  1572. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1573. }
  1574. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1575. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1576. }
  1577. if s.MaxResults != nil && *s.MaxResults < 1 {
  1578. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1579. }
  1580. if invalidParams.Len() > 0 {
  1581. return invalidParams
  1582. }
  1583. return nil
  1584. }
  1585. // Response of DescribeBudgets
  1586. type DescribeBudgetsOutput struct {
  1587. _ struct{} `type:"structure"`
  1588. // A list of budgets
  1589. Budgets []*Budget `type:"list"`
  1590. // A generic String.
  1591. NextToken *string `type:"string"`
  1592. }
  1593. // String returns the string representation
  1594. func (s DescribeBudgetsOutput) String() string {
  1595. return awsutil.Prettify(s)
  1596. }
  1597. // GoString returns the string representation
  1598. func (s DescribeBudgetsOutput) GoString() string {
  1599. return s.String()
  1600. }
  1601. // Request of DescribeNotificationsForBudget
  1602. type DescribeNotificationsForBudgetInput struct {
  1603. _ struct{} `type:"structure"`
  1604. // Account Id of the customer. It should be a 12 digit number.
  1605. //
  1606. // AccountId is a required field
  1607. AccountId *string `min:"12" type:"string" required:"true"`
  1608. // A string represents the budget name. No ":" character is allowed.
  1609. //
  1610. // BudgetName is a required field
  1611. BudgetName *string `type:"string" required:"true"`
  1612. // An integer to represent how many entries should a pagianted response contains.
  1613. // Maxium is set to 100.
  1614. MaxResults *int64 `min:"1" type:"integer"`
  1615. // A generic String.
  1616. NextToken *string `type:"string"`
  1617. }
  1618. // String returns the string representation
  1619. func (s DescribeNotificationsForBudgetInput) String() string {
  1620. return awsutil.Prettify(s)
  1621. }
  1622. // GoString returns the string representation
  1623. func (s DescribeNotificationsForBudgetInput) GoString() string {
  1624. return s.String()
  1625. }
  1626. // Validate inspects the fields of the type to determine if they are valid.
  1627. func (s *DescribeNotificationsForBudgetInput) Validate() error {
  1628. invalidParams := request.ErrInvalidParams{Context: "DescribeNotificationsForBudgetInput"}
  1629. if s.AccountId == nil {
  1630. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1631. }
  1632. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1633. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1634. }
  1635. if s.BudgetName == nil {
  1636. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  1637. }
  1638. if s.MaxResults != nil && *s.MaxResults < 1 {
  1639. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1640. }
  1641. if invalidParams.Len() > 0 {
  1642. return invalidParams
  1643. }
  1644. return nil
  1645. }
  1646. // Response of GetNotificationsForBudget
  1647. type DescribeNotificationsForBudgetOutput struct {
  1648. _ struct{} `type:"structure"`
  1649. // A generic String.
  1650. NextToken *string `type:"string"`
  1651. // A list of notifications.
  1652. Notifications []*Notification `type:"list"`
  1653. }
  1654. // String returns the string representation
  1655. func (s DescribeNotificationsForBudgetOutput) String() string {
  1656. return awsutil.Prettify(s)
  1657. }
  1658. // GoString returns the string representation
  1659. func (s DescribeNotificationsForBudgetOutput) GoString() string {
  1660. return s.String()
  1661. }
  1662. // Request of DescribeSubscribersForNotification
  1663. type DescribeSubscribersForNotificationInput struct {
  1664. _ struct{} `type:"structure"`
  1665. // Account Id of the customer. It should be a 12 digit number.
  1666. //
  1667. // AccountId is a required field
  1668. AccountId *string `min:"12" type:"string" required:"true"`
  1669. // A string represents the budget name. No ":" character is allowed.
  1670. //
  1671. // BudgetName is a required field
  1672. BudgetName *string `type:"string" required:"true"`
  1673. // An integer to represent how many entries should a pagianted response contains.
  1674. // Maxium is set to 100.
  1675. MaxResults *int64 `min:"1" type:"integer"`
  1676. // A generic String.
  1677. NextToken *string `type:"string"`
  1678. // Notification model. Each budget may contain multiple notifications with different
  1679. // settings.
  1680. //
  1681. // Notification is a required field
  1682. Notification *Notification `type:"structure" required:"true"`
  1683. }
  1684. // String returns the string representation
  1685. func (s DescribeSubscribersForNotificationInput) String() string {
  1686. return awsutil.Prettify(s)
  1687. }
  1688. // GoString returns the string representation
  1689. func (s DescribeSubscribersForNotificationInput) GoString() string {
  1690. return s.String()
  1691. }
  1692. // Validate inspects the fields of the type to determine if they are valid.
  1693. func (s *DescribeSubscribersForNotificationInput) Validate() error {
  1694. invalidParams := request.ErrInvalidParams{Context: "DescribeSubscribersForNotificationInput"}
  1695. if s.AccountId == nil {
  1696. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1697. }
  1698. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1699. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1700. }
  1701. if s.BudgetName == nil {
  1702. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  1703. }
  1704. if s.MaxResults != nil && *s.MaxResults < 1 {
  1705. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1706. }
  1707. if s.Notification == nil {
  1708. invalidParams.Add(request.NewErrParamRequired("Notification"))
  1709. }
  1710. if s.Notification != nil {
  1711. if err := s.Notification.Validate(); err != nil {
  1712. invalidParams.AddNested("Notification", err.(request.ErrInvalidParams))
  1713. }
  1714. }
  1715. if invalidParams.Len() > 0 {
  1716. return invalidParams
  1717. }
  1718. return nil
  1719. }
  1720. // Response of DescribeSubscribersForNotification
  1721. type DescribeSubscribersForNotificationOutput struct {
  1722. _ struct{} `type:"structure"`
  1723. // A generic String.
  1724. NextToken *string `type:"string"`
  1725. // A list of subscribers.
  1726. Subscribers []*Subscriber `min:"1" type:"list"`
  1727. }
  1728. // String returns the string representation
  1729. func (s DescribeSubscribersForNotificationOutput) String() string {
  1730. return awsutil.Prettify(s)
  1731. }
  1732. // GoString returns the string representation
  1733. func (s DescribeSubscribersForNotificationOutput) GoString() string {
  1734. return s.String()
  1735. }
  1736. // Notification model. Each budget may contain multiple notifications with different
  1737. // settings.
  1738. type Notification struct {
  1739. _ struct{} `type:"structure"`
  1740. // The comparison operator of a notification. Currently we support less than,
  1741. // equal to and greater than.
  1742. //
  1743. // ComparisonOperator is a required field
  1744. ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
  1745. // The type of a notification. It should be ACTUAL or FORECASTED.
  1746. //
  1747. // NotificationType is a required field
  1748. NotificationType *string `type:"string" required:"true" enum:"NotificationType"`
  1749. // The threshold of the a notification. It should be a number between 0 and
  1750. // 100.
  1751. //
  1752. // Threshold is a required field
  1753. Threshold *float64 `min:"0.1" type:"double" required:"true"`
  1754. }
  1755. // String returns the string representation
  1756. func (s Notification) String() string {
  1757. return awsutil.Prettify(s)
  1758. }
  1759. // GoString returns the string representation
  1760. func (s Notification) GoString() string {
  1761. return s.String()
  1762. }
  1763. // Validate inspects the fields of the type to determine if they are valid.
  1764. func (s *Notification) Validate() error {
  1765. invalidParams := request.ErrInvalidParams{Context: "Notification"}
  1766. if s.ComparisonOperator == nil {
  1767. invalidParams.Add(request.NewErrParamRequired("ComparisonOperator"))
  1768. }
  1769. if s.NotificationType == nil {
  1770. invalidParams.Add(request.NewErrParamRequired("NotificationType"))
  1771. }
  1772. if s.Threshold == nil {
  1773. invalidParams.Add(request.NewErrParamRequired("Threshold"))
  1774. }
  1775. if s.Threshold != nil && *s.Threshold < 0.1 {
  1776. invalidParams.Add(request.NewErrParamMinValue("Threshold", 0.1))
  1777. }
  1778. if invalidParams.Len() > 0 {
  1779. return invalidParams
  1780. }
  1781. return nil
  1782. }
  1783. // A structure to relate notification and a list of subscribers who belong to
  1784. // the notification.
  1785. type NotificationWithSubscribers struct {
  1786. _ struct{} `type:"structure"`
  1787. // Notification model. Each budget may contain multiple notifications with different
  1788. // settings.
  1789. //
  1790. // Notification is a required field
  1791. Notification *Notification `type:"structure" required:"true"`
  1792. // A list of subscribers.
  1793. //
  1794. // Subscribers is a required field
  1795. Subscribers []*Subscriber `min:"1" type:"list" required:"true"`
  1796. }
  1797. // String returns the string representation
  1798. func (s NotificationWithSubscribers) String() string {
  1799. return awsutil.Prettify(s)
  1800. }
  1801. // GoString returns the string representation
  1802. func (s NotificationWithSubscribers) GoString() string {
  1803. return s.String()
  1804. }
  1805. // Validate inspects the fields of the type to determine if they are valid.
  1806. func (s *NotificationWithSubscribers) Validate() error {
  1807. invalidParams := request.ErrInvalidParams{Context: "NotificationWithSubscribers"}
  1808. if s.Notification == nil {
  1809. invalidParams.Add(request.NewErrParamRequired("Notification"))
  1810. }
  1811. if s.Subscribers == nil {
  1812. invalidParams.Add(request.NewErrParamRequired("Subscribers"))
  1813. }
  1814. if s.Subscribers != nil && len(s.Subscribers) < 1 {
  1815. invalidParams.Add(request.NewErrParamMinLen("Subscribers", 1))
  1816. }
  1817. if s.Notification != nil {
  1818. if err := s.Notification.Validate(); err != nil {
  1819. invalidParams.AddNested("Notification", err.(request.ErrInvalidParams))
  1820. }
  1821. }
  1822. if s.Subscribers != nil {
  1823. for i, v := range s.Subscribers {
  1824. if v == nil {
  1825. continue
  1826. }
  1827. if err := v.Validate(); err != nil {
  1828. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Subscribers", i), err.(request.ErrInvalidParams))
  1829. }
  1830. }
  1831. }
  1832. if invalidParams.Len() > 0 {
  1833. return invalidParams
  1834. }
  1835. return nil
  1836. }
  1837. // A structure represent either a cost spend or usage spend. Contains an amount
  1838. // and a unit.
  1839. type Spend struct {
  1840. _ struct{} `type:"structure"`
  1841. // A string to represent NumericValue.
  1842. //
  1843. // Amount is a required field
  1844. Amount *string `type:"string" required:"true"`
  1845. // A generic String.
  1846. //
  1847. // Unit is a required field
  1848. Unit *string `type:"string" required:"true"`
  1849. }
  1850. // String returns the string representation
  1851. func (s Spend) String() string {
  1852. return awsutil.Prettify(s)
  1853. }
  1854. // GoString returns the string representation
  1855. func (s Spend) GoString() string {
  1856. return s.String()
  1857. }
  1858. // Validate inspects the fields of the type to determine if they are valid.
  1859. func (s *Spend) Validate() error {
  1860. invalidParams := request.ErrInvalidParams{Context: "Spend"}
  1861. if s.Amount == nil {
  1862. invalidParams.Add(request.NewErrParamRequired("Amount"))
  1863. }
  1864. if s.Unit == nil {
  1865. invalidParams.Add(request.NewErrParamRequired("Unit"))
  1866. }
  1867. if invalidParams.Len() > 0 {
  1868. return invalidParams
  1869. }
  1870. return nil
  1871. }
  1872. // Subscriber model. Each notification may contain multiple subscribers with
  1873. // different addresses.
  1874. type Subscriber struct {
  1875. _ struct{} `type:"structure"`
  1876. // A generic String.
  1877. //
  1878. // Address is a required field
  1879. Address *string `type:"string" required:"true"`
  1880. // The subscription type of the subscriber. It can be SMS or EMAIL.
  1881. //
  1882. // SubscriptionType is a required field
  1883. SubscriptionType *string `type:"string" required:"true" enum:"SubscriptionType"`
  1884. }
  1885. // String returns the string representation
  1886. func (s Subscriber) String() string {
  1887. return awsutil.Prettify(s)
  1888. }
  1889. // GoString returns the string representation
  1890. func (s Subscriber) GoString() string {
  1891. return s.String()
  1892. }
  1893. // Validate inspects the fields of the type to determine if they are valid.
  1894. func (s *Subscriber) Validate() error {
  1895. invalidParams := request.ErrInvalidParams{Context: "Subscriber"}
  1896. if s.Address == nil {
  1897. invalidParams.Add(request.NewErrParamRequired("Address"))
  1898. }
  1899. if s.SubscriptionType == nil {
  1900. invalidParams.Add(request.NewErrParamRequired("SubscriptionType"))
  1901. }
  1902. if invalidParams.Len() > 0 {
  1903. return invalidParams
  1904. }
  1905. return nil
  1906. }
  1907. // A time period indicated the start date and end date of a budget.
  1908. type TimePeriod struct {
  1909. _ struct{} `type:"structure"`
  1910. // A generic timestamp. In Java it is transformed to a Date object.
  1911. //
  1912. // End is a required field
  1913. End *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  1914. // A generic timestamp. In Java it is transformed to a Date object.
  1915. //
  1916. // Start is a required field
  1917. Start *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  1918. }
  1919. // String returns the string representation
  1920. func (s TimePeriod) String() string {
  1921. return awsutil.Prettify(s)
  1922. }
  1923. // GoString returns the string representation
  1924. func (s TimePeriod) GoString() string {
  1925. return s.String()
  1926. }
  1927. // Validate inspects the fields of the type to determine if they are valid.
  1928. func (s *TimePeriod) Validate() error {
  1929. invalidParams := request.ErrInvalidParams{Context: "TimePeriod"}
  1930. if s.End == nil {
  1931. invalidParams.Add(request.NewErrParamRequired("End"))
  1932. }
  1933. if s.Start == nil {
  1934. invalidParams.Add(request.NewErrParamRequired("Start"))
  1935. }
  1936. if invalidParams.Len() > 0 {
  1937. return invalidParams
  1938. }
  1939. return nil
  1940. }
  1941. // Request of UpdateBudget
  1942. type UpdateBudgetInput struct {
  1943. _ struct{} `type:"structure"`
  1944. // Account Id of the customer. It should be a 12 digit number.
  1945. //
  1946. // AccountId is a required field
  1947. AccountId *string `min:"12" type:"string" required:"true"`
  1948. // AWS Budget model
  1949. //
  1950. // NewBudget is a required field
  1951. NewBudget *Budget `type:"structure" required:"true"`
  1952. }
  1953. // String returns the string representation
  1954. func (s UpdateBudgetInput) String() string {
  1955. return awsutil.Prettify(s)
  1956. }
  1957. // GoString returns the string representation
  1958. func (s UpdateBudgetInput) GoString() string {
  1959. return s.String()
  1960. }
  1961. // Validate inspects the fields of the type to determine if they are valid.
  1962. func (s *UpdateBudgetInput) Validate() error {
  1963. invalidParams := request.ErrInvalidParams{Context: "UpdateBudgetInput"}
  1964. if s.AccountId == nil {
  1965. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  1966. }
  1967. if s.AccountId != nil && len(*s.AccountId) < 12 {
  1968. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  1969. }
  1970. if s.NewBudget == nil {
  1971. invalidParams.Add(request.NewErrParamRequired("NewBudget"))
  1972. }
  1973. if s.NewBudget != nil {
  1974. if err := s.NewBudget.Validate(); err != nil {
  1975. invalidParams.AddNested("NewBudget", err.(request.ErrInvalidParams))
  1976. }
  1977. }
  1978. if invalidParams.Len() > 0 {
  1979. return invalidParams
  1980. }
  1981. return nil
  1982. }
  1983. // Response of UpdateBudget
  1984. type UpdateBudgetOutput struct {
  1985. _ struct{} `type:"structure"`
  1986. }
  1987. // String returns the string representation
  1988. func (s UpdateBudgetOutput) String() string {
  1989. return awsutil.Prettify(s)
  1990. }
  1991. // GoString returns the string representation
  1992. func (s UpdateBudgetOutput) GoString() string {
  1993. return s.String()
  1994. }
  1995. // Request of UpdateNotification
  1996. type UpdateNotificationInput struct {
  1997. _ struct{} `type:"structure"`
  1998. // Account Id of the customer. It should be a 12 digit number.
  1999. //
  2000. // AccountId is a required field
  2001. AccountId *string `min:"12" type:"string" required:"true"`
  2002. // A string represents the budget name. No ":" character is allowed.
  2003. //
  2004. // BudgetName is a required field
  2005. BudgetName *string `type:"string" required:"true"`
  2006. // Notification model. Each budget may contain multiple notifications with different
  2007. // settings.
  2008. //
  2009. // NewNotification is a required field
  2010. NewNotification *Notification `type:"structure" required:"true"`
  2011. // Notification model. Each budget may contain multiple notifications with different
  2012. // settings.
  2013. //
  2014. // OldNotification is a required field
  2015. OldNotification *Notification `type:"structure" required:"true"`
  2016. }
  2017. // String returns the string representation
  2018. func (s UpdateNotificationInput) String() string {
  2019. return awsutil.Prettify(s)
  2020. }
  2021. // GoString returns the string representation
  2022. func (s UpdateNotificationInput) GoString() string {
  2023. return s.String()
  2024. }
  2025. // Validate inspects the fields of the type to determine if they are valid.
  2026. func (s *UpdateNotificationInput) Validate() error {
  2027. invalidParams := request.ErrInvalidParams{Context: "UpdateNotificationInput"}
  2028. if s.AccountId == nil {
  2029. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2030. }
  2031. if s.AccountId != nil && len(*s.AccountId) < 12 {
  2032. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  2033. }
  2034. if s.BudgetName == nil {
  2035. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  2036. }
  2037. if s.NewNotification == nil {
  2038. invalidParams.Add(request.NewErrParamRequired("NewNotification"))
  2039. }
  2040. if s.OldNotification == nil {
  2041. invalidParams.Add(request.NewErrParamRequired("OldNotification"))
  2042. }
  2043. if s.NewNotification != nil {
  2044. if err := s.NewNotification.Validate(); err != nil {
  2045. invalidParams.AddNested("NewNotification", err.(request.ErrInvalidParams))
  2046. }
  2047. }
  2048. if s.OldNotification != nil {
  2049. if err := s.OldNotification.Validate(); err != nil {
  2050. invalidParams.AddNested("OldNotification", err.(request.ErrInvalidParams))
  2051. }
  2052. }
  2053. if invalidParams.Len() > 0 {
  2054. return invalidParams
  2055. }
  2056. return nil
  2057. }
  2058. // Response of UpdateNotification
  2059. type UpdateNotificationOutput struct {
  2060. _ struct{} `type:"structure"`
  2061. }
  2062. // String returns the string representation
  2063. func (s UpdateNotificationOutput) String() string {
  2064. return awsutil.Prettify(s)
  2065. }
  2066. // GoString returns the string representation
  2067. func (s UpdateNotificationOutput) GoString() string {
  2068. return s.String()
  2069. }
  2070. // Request of UpdateSubscriber
  2071. type UpdateSubscriberInput struct {
  2072. _ struct{} `type:"structure"`
  2073. // Account Id of the customer. It should be a 12 digit number.
  2074. //
  2075. // AccountId is a required field
  2076. AccountId *string `min:"12" type:"string" required:"true"`
  2077. // A string represents the budget name. No ":" character is allowed.
  2078. //
  2079. // BudgetName is a required field
  2080. BudgetName *string `type:"string" required:"true"`
  2081. // Subscriber model. Each notification may contain multiple subscribers with
  2082. // different addresses.
  2083. //
  2084. // NewSubscriber is a required field
  2085. NewSubscriber *Subscriber `type:"structure" required:"true"`
  2086. // Notification model. Each budget may contain multiple notifications with different
  2087. // settings.
  2088. //
  2089. // Notification is a required field
  2090. Notification *Notification `type:"structure" required:"true"`
  2091. // Subscriber model. Each notification may contain multiple subscribers with
  2092. // different addresses.
  2093. //
  2094. // OldSubscriber is a required field
  2095. OldSubscriber *Subscriber `type:"structure" required:"true"`
  2096. }
  2097. // String returns the string representation
  2098. func (s UpdateSubscriberInput) String() string {
  2099. return awsutil.Prettify(s)
  2100. }
  2101. // GoString returns the string representation
  2102. func (s UpdateSubscriberInput) GoString() string {
  2103. return s.String()
  2104. }
  2105. // Validate inspects the fields of the type to determine if they are valid.
  2106. func (s *UpdateSubscriberInput) Validate() error {
  2107. invalidParams := request.ErrInvalidParams{Context: "UpdateSubscriberInput"}
  2108. if s.AccountId == nil {
  2109. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2110. }
  2111. if s.AccountId != nil && len(*s.AccountId) < 12 {
  2112. invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
  2113. }
  2114. if s.BudgetName == nil {
  2115. invalidParams.Add(request.NewErrParamRequired("BudgetName"))
  2116. }
  2117. if s.NewSubscriber == nil {
  2118. invalidParams.Add(request.NewErrParamRequired("NewSubscriber"))
  2119. }
  2120. if s.Notification == nil {
  2121. invalidParams.Add(request.NewErrParamRequired("Notification"))
  2122. }
  2123. if s.OldSubscriber == nil {
  2124. invalidParams.Add(request.NewErrParamRequired("OldSubscriber"))
  2125. }
  2126. if s.NewSubscriber != nil {
  2127. if err := s.NewSubscriber.Validate(); err != nil {
  2128. invalidParams.AddNested("NewSubscriber", err.(request.ErrInvalidParams))
  2129. }
  2130. }
  2131. if s.Notification != nil {
  2132. if err := s.Notification.Validate(); err != nil {
  2133. invalidParams.AddNested("Notification", err.(request.ErrInvalidParams))
  2134. }
  2135. }
  2136. if s.OldSubscriber != nil {
  2137. if err := s.OldSubscriber.Validate(); err != nil {
  2138. invalidParams.AddNested("OldSubscriber", err.(request.ErrInvalidParams))
  2139. }
  2140. }
  2141. if invalidParams.Len() > 0 {
  2142. return invalidParams
  2143. }
  2144. return nil
  2145. }
  2146. // Response of UpdateSubscriber
  2147. type UpdateSubscriberOutput struct {
  2148. _ struct{} `type:"structure"`
  2149. }
  2150. // String returns the string representation
  2151. func (s UpdateSubscriberOutput) String() string {
  2152. return awsutil.Prettify(s)
  2153. }
  2154. // GoString returns the string representation
  2155. func (s UpdateSubscriberOutput) GoString() string {
  2156. return s.String()
  2157. }
  2158. // The type of a budget. Can be COST or USAGE.
  2159. const (
  2160. // BudgetTypeUsage is a BudgetType enum value
  2161. BudgetTypeUsage = "USAGE"
  2162. // BudgetTypeCost is a BudgetType enum value
  2163. BudgetTypeCost = "COST"
  2164. )
  2165. // The comparison operator of a notification. Currently we support less than,
  2166. // equal to and greater than.
  2167. const (
  2168. // ComparisonOperatorGreaterThan is a ComparisonOperator enum value
  2169. ComparisonOperatorGreaterThan = "GREATER_THAN"
  2170. // ComparisonOperatorLessThan is a ComparisonOperator enum value
  2171. ComparisonOperatorLessThan = "LESS_THAN"
  2172. // ComparisonOperatorEqualTo is a ComparisonOperator enum value
  2173. ComparisonOperatorEqualTo = "EQUAL_TO"
  2174. )
  2175. // The type of a notification. It should be ACTUAL or FORECASTED.
  2176. const (
  2177. // NotificationTypeActual is a NotificationType enum value
  2178. NotificationTypeActual = "ACTUAL"
  2179. // NotificationTypeForecasted is a NotificationType enum value
  2180. NotificationTypeForecasted = "FORECASTED"
  2181. )
  2182. // The subscription type of the subscriber. It can be SMS or EMAIL.
  2183. const (
  2184. // SubscriptionTypeSns is a SubscriptionType enum value
  2185. SubscriptionTypeSns = "SNS"
  2186. // SubscriptionTypeEmail is a SubscriptionType enum value
  2187. SubscriptionTypeEmail = "EMAIL"
  2188. )
  2189. // The time unit of the budget. e.g. weekly, monthly, etc.
  2190. const (
  2191. // TimeUnitMonthly is a TimeUnit enum value
  2192. TimeUnitMonthly = "MONTHLY"
  2193. // TimeUnitQuarterly is a TimeUnit enum value
  2194. TimeUnitQuarterly = "QUARTERLY"
  2195. // TimeUnitAnnually is a TimeUnit enum value
  2196. TimeUnitAnnually = "ANNUALLY"
  2197. )