api.go 102 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package kinesis provides a client for Amazon Kinesis.
  3. package kinesis
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opAddTagsToStream = "AddTagsToStream"
  13. // AddTagsToStreamRequest generates a "aws/request.Request" representing the
  14. // client's request for the AddTagsToStream operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  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 AddTagsToStream 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 AddTagsToStreamRequest method.
  28. // req, resp := client.AddTagsToStreamRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *Kinesis) AddTagsToStreamRequest(input *AddTagsToStreamInput) (req *request.Request, output *AddTagsToStreamOutput) {
  36. op := &request.Operation{
  37. Name: opAddTagsToStream,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &AddTagsToStreamInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  46. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  47. output = &AddTagsToStreamOutput{}
  48. req.Data = output
  49. return
  50. }
  51. // Adds or updates tags for the specified Amazon Kinesis stream. Each stream
  52. // can have up to 10 tags.
  53. //
  54. // If tags have already been assigned to the stream, AddTagsToStream overwrites
  55. // any existing tags that correspond to the specified tag keys.
  56. func (c *Kinesis) AddTagsToStream(input *AddTagsToStreamInput) (*AddTagsToStreamOutput, error) {
  57. req, out := c.AddTagsToStreamRequest(input)
  58. err := req.Send()
  59. return out, err
  60. }
  61. const opCreateStream = "CreateStream"
  62. // CreateStreamRequest generates a "aws/request.Request" representing the
  63. // client's request for the CreateStream operation. The "output" return
  64. // value can be used to capture response data after the request's "Send" method
  65. // is called.
  66. //
  67. // Creating a request object using this method should be used when you want to inject
  68. // custom logic into the request's lifecycle using a custom handler, or if you want to
  69. // access properties on the request object before or after sending the request. If
  70. // you just want the service response, call the CreateStream method directly
  71. // instead.
  72. //
  73. // Note: You must call the "Send" method on the returned request object in order
  74. // to execute the request.
  75. //
  76. // // Example sending a request using the CreateStreamRequest method.
  77. // req, resp := client.CreateStreamRequest(params)
  78. //
  79. // err := req.Send()
  80. // if err == nil { // resp is now filled
  81. // fmt.Println(resp)
  82. // }
  83. //
  84. func (c *Kinesis) CreateStreamRequest(input *CreateStreamInput) (req *request.Request, output *CreateStreamOutput) {
  85. op := &request.Operation{
  86. Name: opCreateStream,
  87. HTTPMethod: "POST",
  88. HTTPPath: "/",
  89. }
  90. if input == nil {
  91. input = &CreateStreamInput{}
  92. }
  93. req = c.newRequest(op, input, output)
  94. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  95. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  96. output = &CreateStreamOutput{}
  97. req.Data = output
  98. return
  99. }
  100. // Creates an Amazon Kinesis stream. A stream captures and transports data records
  101. // that are continuously emitted from different data sources or producers. Scale-out
  102. // within a stream is explicitly supported by means of shards, which are uniquely
  103. // identified groups of data records in a stream.
  104. //
  105. // You specify and control the number of shards that a stream is composed of.
  106. // Each shard can support reads up to 5 transactions per second, up to a maximum
  107. // data read total of 2 MB per second. Each shard can support writes up to 1,000
  108. // records per second, up to a maximum data write total of 1 MB per second.
  109. // You can add shards to a stream if the amount of data input increases and
  110. // you can remove shards if the amount of data input decreases.
  111. //
  112. // The stream name identifies the stream. The name is scoped to the AWS account
  113. // used by the application. It is also scoped by region. That is, two streams
  114. // in two different accounts can have the same name, and two streams in the
  115. // same account, but in two different regions, can have the same name.
  116. //
  117. // CreateStream is an asynchronous operation. Upon receiving a CreateStream
  118. // request, Amazon Kinesis immediately returns and sets the stream status to
  119. // CREATING. After the stream is created, Amazon Kinesis sets the stream status
  120. // to ACTIVE. You should perform read and write operations only on an ACTIVE
  121. // stream.
  122. //
  123. // You receive a LimitExceededException when making a CreateStream request
  124. // if you try to do one of the following:
  125. //
  126. // Have more than five streams in the CREATING state at any point in time.
  127. // Create more shards than are authorized for your account. For the default
  128. // shard limit for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  129. // in the Amazon Kinesis Streams Developer Guide. If you need to increase this
  130. // limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html).
  131. //
  132. // You can use DescribeStream to check the stream status, which is returned
  133. // in StreamStatus.
  134. //
  135. // CreateStream has a limit of 5 transactions per second per account.
  136. func (c *Kinesis) CreateStream(input *CreateStreamInput) (*CreateStreamOutput, error) {
  137. req, out := c.CreateStreamRequest(input)
  138. err := req.Send()
  139. return out, err
  140. }
  141. const opDecreaseStreamRetentionPeriod = "DecreaseStreamRetentionPeriod"
  142. // DecreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the
  143. // client's request for the DecreaseStreamRetentionPeriod operation. The "output" return
  144. // value can be used to capture response data after the request's "Send" method
  145. // is called.
  146. //
  147. // Creating a request object using this method should be used when you want to inject
  148. // custom logic into the request's lifecycle using a custom handler, or if you want to
  149. // access properties on the request object before or after sending the request. If
  150. // you just want the service response, call the DecreaseStreamRetentionPeriod method directly
  151. // instead.
  152. //
  153. // Note: You must call the "Send" method on the returned request object in order
  154. // to execute the request.
  155. //
  156. // // Example sending a request using the DecreaseStreamRetentionPeriodRequest method.
  157. // req, resp := client.DecreaseStreamRetentionPeriodRequest(params)
  158. //
  159. // err := req.Send()
  160. // if err == nil { // resp is now filled
  161. // fmt.Println(resp)
  162. // }
  163. //
  164. func (c *Kinesis) DecreaseStreamRetentionPeriodRequest(input *DecreaseStreamRetentionPeriodInput) (req *request.Request, output *DecreaseStreamRetentionPeriodOutput) {
  165. op := &request.Operation{
  166. Name: opDecreaseStreamRetentionPeriod,
  167. HTTPMethod: "POST",
  168. HTTPPath: "/",
  169. }
  170. if input == nil {
  171. input = &DecreaseStreamRetentionPeriodInput{}
  172. }
  173. req = c.newRequest(op, input, output)
  174. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  175. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  176. output = &DecreaseStreamRetentionPeriodOutput{}
  177. req.Data = output
  178. return
  179. }
  180. // Decreases the Amazon Kinesis stream's retention period, which is the length
  181. // of time data records are accessible after they are added to the stream. The
  182. // minimum value of a stream's retention period is 24 hours.
  183. //
  184. // This operation may result in lost data. For example, if the stream's retention
  185. // period is 48 hours and is decreased to 24 hours, any data already in the
  186. // stream that is older than 24 hours is inaccessible.
  187. func (c *Kinesis) DecreaseStreamRetentionPeriod(input *DecreaseStreamRetentionPeriodInput) (*DecreaseStreamRetentionPeriodOutput, error) {
  188. req, out := c.DecreaseStreamRetentionPeriodRequest(input)
  189. err := req.Send()
  190. return out, err
  191. }
  192. const opDeleteStream = "DeleteStream"
  193. // DeleteStreamRequest generates a "aws/request.Request" representing the
  194. // client's request for the DeleteStream operation. The "output" return
  195. // value can be used to capture response data after the request's "Send" method
  196. // is called.
  197. //
  198. // Creating a request object using this method should be used when you want to inject
  199. // custom logic into the request's lifecycle using a custom handler, or if you want to
  200. // access properties on the request object before or after sending the request. If
  201. // you just want the service response, call the DeleteStream method directly
  202. // instead.
  203. //
  204. // Note: You must call the "Send" method on the returned request object in order
  205. // to execute the request.
  206. //
  207. // // Example sending a request using the DeleteStreamRequest method.
  208. // req, resp := client.DeleteStreamRequest(params)
  209. //
  210. // err := req.Send()
  211. // if err == nil { // resp is now filled
  212. // fmt.Println(resp)
  213. // }
  214. //
  215. func (c *Kinesis) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Request, output *DeleteStreamOutput) {
  216. op := &request.Operation{
  217. Name: opDeleteStream,
  218. HTTPMethod: "POST",
  219. HTTPPath: "/",
  220. }
  221. if input == nil {
  222. input = &DeleteStreamInput{}
  223. }
  224. req = c.newRequest(op, input, output)
  225. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  226. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  227. output = &DeleteStreamOutput{}
  228. req.Data = output
  229. return
  230. }
  231. // Deletes an Amazon Kinesis stream and all its shards and data. You must shut
  232. // down any applications that are operating on the stream before you delete
  233. // the stream. If an application attempts to operate on a deleted stream, it
  234. // will receive the exception ResourceNotFoundException.
  235. //
  236. // If the stream is in the ACTIVE state, you can delete it. After a DeleteStream
  237. // request, the specified stream is in the DELETING state until Amazon Kinesis
  238. // completes the deletion.
  239. //
  240. // Note: Amazon Kinesis might continue to accept data read and write operations,
  241. // such as PutRecord, PutRecords, and GetRecords, on a stream in the DELETING
  242. // state until the stream deletion is complete.
  243. //
  244. // When you delete a stream, any shards in that stream are also deleted, and
  245. // any tags are dissociated from the stream.
  246. //
  247. // You can use the DescribeStream operation to check the state of the stream,
  248. // which is returned in StreamStatus.
  249. //
  250. // DeleteStream has a limit of 5 transactions per second per account.
  251. func (c *Kinesis) DeleteStream(input *DeleteStreamInput) (*DeleteStreamOutput, error) {
  252. req, out := c.DeleteStreamRequest(input)
  253. err := req.Send()
  254. return out, err
  255. }
  256. const opDescribeStream = "DescribeStream"
  257. // DescribeStreamRequest generates a "aws/request.Request" representing the
  258. // client's request for the DescribeStream operation. The "output" return
  259. // value can be used to capture response data after the request's "Send" method
  260. // is called.
  261. //
  262. // Creating a request object using this method should be used when you want to inject
  263. // custom logic into the request's lifecycle using a custom handler, or if you want to
  264. // access properties on the request object before or after sending the request. If
  265. // you just want the service response, call the DescribeStream method directly
  266. // instead.
  267. //
  268. // Note: You must call the "Send" method on the returned request object in order
  269. // to execute the request.
  270. //
  271. // // Example sending a request using the DescribeStreamRequest method.
  272. // req, resp := client.DescribeStreamRequest(params)
  273. //
  274. // err := req.Send()
  275. // if err == nil { // resp is now filled
  276. // fmt.Println(resp)
  277. // }
  278. //
  279. func (c *Kinesis) DescribeStreamRequest(input *DescribeStreamInput) (req *request.Request, output *DescribeStreamOutput) {
  280. op := &request.Operation{
  281. Name: opDescribeStream,
  282. HTTPMethod: "POST",
  283. HTTPPath: "/",
  284. Paginator: &request.Paginator{
  285. InputTokens: []string{"ExclusiveStartShardId"},
  286. OutputTokens: []string{"StreamDescription.Shards[-1].ShardId"},
  287. LimitToken: "Limit",
  288. TruncationToken: "StreamDescription.HasMoreShards",
  289. },
  290. }
  291. if input == nil {
  292. input = &DescribeStreamInput{}
  293. }
  294. req = c.newRequest(op, input, output)
  295. output = &DescribeStreamOutput{}
  296. req.Data = output
  297. return
  298. }
  299. // Describes the specified Amazon Kinesis stream.
  300. //
  301. // The information about the stream includes its current status, its Amazon
  302. // Resource Name (ARN), and an array of shard objects. For each shard object,
  303. // there is information about the hash key and sequence number ranges that the
  304. // shard spans, and the IDs of any earlier shards that played in a role in creating
  305. // the shard. A sequence number is the identifier associated with every record
  306. // ingested in the stream. The sequence number is assigned when a record is
  307. // put into the stream.
  308. //
  309. // You can limit the number of returned shards using the Limit parameter. The
  310. // number of shards in a stream may be too large to return from a single call
  311. // to DescribeStream. You can detect this by using the HasMoreShards flag in
  312. // the returned output. HasMoreShards is set to true when there is more data
  313. // available.
  314. //
  315. // DescribeStream is a paginated operation. If there are more shards available,
  316. // you can request them using the shard ID of the last shard returned. Specify
  317. // this ID in the ExclusiveStartShardId parameter in a subsequent request to
  318. // DescribeStream.
  319. //
  320. // There are no guarantees about the chronological order shards returned in
  321. // DescribeStream results. If you want to process shards in chronological order,
  322. // use ParentShardId to track lineage to the oldest shard.
  323. //
  324. // DescribeStream has a limit of 10 transactions per second per account.
  325. func (c *Kinesis) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) {
  326. req, out := c.DescribeStreamRequest(input)
  327. err := req.Send()
  328. return out, err
  329. }
  330. // DescribeStreamPages iterates over the pages of a DescribeStream operation,
  331. // calling the "fn" function with the response data for each page. To stop
  332. // iterating, return false from the fn function.
  333. //
  334. // See DescribeStream method for more information on how to use this operation.
  335. //
  336. // Note: This operation can generate multiple requests to a service.
  337. //
  338. // // Example iterating over at most 3 pages of a DescribeStream operation.
  339. // pageNum := 0
  340. // err := client.DescribeStreamPages(params,
  341. // func(page *DescribeStreamOutput, lastPage bool) bool {
  342. // pageNum++
  343. // fmt.Println(page)
  344. // return pageNum <= 3
  345. // })
  346. //
  347. func (c *Kinesis) DescribeStreamPages(input *DescribeStreamInput, fn func(p *DescribeStreamOutput, lastPage bool) (shouldContinue bool)) error {
  348. page, _ := c.DescribeStreamRequest(input)
  349. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  350. return page.EachPage(func(p interface{}, lastPage bool) bool {
  351. return fn(p.(*DescribeStreamOutput), lastPage)
  352. })
  353. }
  354. const opDisableEnhancedMonitoring = "DisableEnhancedMonitoring"
  355. // DisableEnhancedMonitoringRequest generates a "aws/request.Request" representing the
  356. // client's request for the DisableEnhancedMonitoring operation. The "output" return
  357. // value can be used to capture response data after the request's "Send" method
  358. // is called.
  359. //
  360. // Creating a request object using this method should be used when you want to inject
  361. // custom logic into the request's lifecycle using a custom handler, or if you want to
  362. // access properties on the request object before or after sending the request. If
  363. // you just want the service response, call the DisableEnhancedMonitoring method directly
  364. // instead.
  365. //
  366. // Note: You must call the "Send" method on the returned request object in order
  367. // to execute the request.
  368. //
  369. // // Example sending a request using the DisableEnhancedMonitoringRequest method.
  370. // req, resp := client.DisableEnhancedMonitoringRequest(params)
  371. //
  372. // err := req.Send()
  373. // if err == nil { // resp is now filled
  374. // fmt.Println(resp)
  375. // }
  376. //
  377. func (c *Kinesis) DisableEnhancedMonitoringRequest(input *DisableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) {
  378. op := &request.Operation{
  379. Name: opDisableEnhancedMonitoring,
  380. HTTPMethod: "POST",
  381. HTTPPath: "/",
  382. }
  383. if input == nil {
  384. input = &DisableEnhancedMonitoringInput{}
  385. }
  386. req = c.newRequest(op, input, output)
  387. output = &EnhancedMonitoringOutput{}
  388. req.Data = output
  389. return
  390. }
  391. // Disables enhanced monitoring.
  392. func (c *Kinesis) DisableEnhancedMonitoring(input *DisableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) {
  393. req, out := c.DisableEnhancedMonitoringRequest(input)
  394. err := req.Send()
  395. return out, err
  396. }
  397. const opEnableEnhancedMonitoring = "EnableEnhancedMonitoring"
  398. // EnableEnhancedMonitoringRequest generates a "aws/request.Request" representing the
  399. // client's request for the EnableEnhancedMonitoring operation. The "output" return
  400. // value can be used to capture response data after the request's "Send" method
  401. // is called.
  402. //
  403. // Creating a request object using this method should be used when you want to inject
  404. // custom logic into the request's lifecycle using a custom handler, or if you want to
  405. // access properties on the request object before or after sending the request. If
  406. // you just want the service response, call the EnableEnhancedMonitoring method directly
  407. // instead.
  408. //
  409. // Note: You must call the "Send" method on the returned request object in order
  410. // to execute the request.
  411. //
  412. // // Example sending a request using the EnableEnhancedMonitoringRequest method.
  413. // req, resp := client.EnableEnhancedMonitoringRequest(params)
  414. //
  415. // err := req.Send()
  416. // if err == nil { // resp is now filled
  417. // fmt.Println(resp)
  418. // }
  419. //
  420. func (c *Kinesis) EnableEnhancedMonitoringRequest(input *EnableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) {
  421. op := &request.Operation{
  422. Name: opEnableEnhancedMonitoring,
  423. HTTPMethod: "POST",
  424. HTTPPath: "/",
  425. }
  426. if input == nil {
  427. input = &EnableEnhancedMonitoringInput{}
  428. }
  429. req = c.newRequest(op, input, output)
  430. output = &EnhancedMonitoringOutput{}
  431. req.Data = output
  432. return
  433. }
  434. // Enables enhanced Amazon Kinesis stream monitoring for shard-level metrics.
  435. func (c *Kinesis) EnableEnhancedMonitoring(input *EnableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) {
  436. req, out := c.EnableEnhancedMonitoringRequest(input)
  437. err := req.Send()
  438. return out, err
  439. }
  440. const opGetRecords = "GetRecords"
  441. // GetRecordsRequest generates a "aws/request.Request" representing the
  442. // client's request for the GetRecords operation. The "output" return
  443. // value can be used to capture response data after the request's "Send" method
  444. // is called.
  445. //
  446. // Creating a request object using this method should be used when you want to inject
  447. // custom logic into the request's lifecycle using a custom handler, or if you want to
  448. // access properties on the request object before or after sending the request. If
  449. // you just want the service response, call the GetRecords method directly
  450. // instead.
  451. //
  452. // Note: You must call the "Send" method on the returned request object in order
  453. // to execute the request.
  454. //
  455. // // Example sending a request using the GetRecordsRequest method.
  456. // req, resp := client.GetRecordsRequest(params)
  457. //
  458. // err := req.Send()
  459. // if err == nil { // resp is now filled
  460. // fmt.Println(resp)
  461. // }
  462. //
  463. func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Request, output *GetRecordsOutput) {
  464. op := &request.Operation{
  465. Name: opGetRecords,
  466. HTTPMethod: "POST",
  467. HTTPPath: "/",
  468. }
  469. if input == nil {
  470. input = &GetRecordsInput{}
  471. }
  472. req = c.newRequest(op, input, output)
  473. output = &GetRecordsOutput{}
  474. req.Data = output
  475. return
  476. }
  477. // Gets data records from an Amazon Kinesis stream's shard.
  478. //
  479. // Specify a shard iterator using the ShardIterator parameter. The shard iterator
  480. // specifies the position in the shard from which you want to start reading
  481. // data records sequentially. If there are no records available in the portion
  482. // of the shard that the iterator points to, GetRecords returns an empty list.
  483. // Note that it might take multiple calls to get to a portion of the shard that
  484. // contains records.
  485. //
  486. // You can scale by provisioning multiple shards per stream while considering
  487. // service limits (for more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  488. // in the Amazon Kinesis Streams Developer Guide). Your application should have
  489. // one thread per shard, each reading continuously from its stream. To read
  490. // from a stream continually, call GetRecords in a loop. Use GetShardIterator
  491. // to get the shard iterator to specify in the first GetRecords call. GetRecords
  492. // returns a new shard iterator in NextShardIterator. Specify the shard iterator
  493. // returned in NextShardIterator in subsequent calls to GetRecords. Note that
  494. // if the shard has been closed, the shard iterator can't return more data and
  495. // GetRecords returns null in NextShardIterator. You can terminate the loop
  496. // when the shard is closed, or when the shard iterator reaches the record with
  497. // the sequence number or other attribute that marks it as the last record to
  498. // process.
  499. //
  500. // Each data record can be up to 1 MB in size, and each shard can read up to
  501. // 2 MB per second. You can ensure that your calls don't exceed the maximum
  502. // supported size or throughput by using the Limit parameter to specify the
  503. // maximum number of records that GetRecords can return. Consider your average
  504. // record size when determining this limit.
  505. //
  506. // The size of the data returned by GetRecords varies depending on the utilization
  507. // of the shard. The maximum size of data that GetRecords can return is 10 MB.
  508. // If a call returns this amount of data, subsequent calls made within the next
  509. // 5 seconds throw ProvisionedThroughputExceededException. If there is insufficient
  510. // provisioned throughput on the shard, subsequent calls made within the next
  511. // 1 second throw ProvisionedThroughputExceededException. Note that GetRecords
  512. // won't return any data when it throws an exception. For this reason, we recommend
  513. // that you wait one second between calls to GetRecords; however, it's possible
  514. // that the application will get exceptions for longer than 1 second.
  515. //
  516. // To detect whether the application is falling behind in processing, you can
  517. // use the MillisBehindLatest response attribute. You can also monitor the stream
  518. // using CloudWatch metrics and other mechanisms (see Monitoring (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html)
  519. // in the Amazon Kinesis Streams Developer Guide).
  520. //
  521. // Each Amazon Kinesis record includes a value, ApproximateArrivalTimestamp,
  522. // that is set when a stream successfully receives and stores a record. This
  523. // is commonly referred to as a server-side timestamp, whereas a client-side
  524. // timestamp is set when a data producer creates or sends the record to a stream
  525. // (a data producer is any data source putting data records into a stream, for
  526. // example with PutRecords). The timestamp has millisecond precision. There
  527. // are no guarantees about the timestamp accuracy, or that the timestamp is
  528. // always increasing. For example, records in a shard or across a stream might
  529. // have timestamps that are out of order.
  530. func (c *Kinesis) GetRecords(input *GetRecordsInput) (*GetRecordsOutput, error) {
  531. req, out := c.GetRecordsRequest(input)
  532. err := req.Send()
  533. return out, err
  534. }
  535. const opGetShardIterator = "GetShardIterator"
  536. // GetShardIteratorRequest generates a "aws/request.Request" representing the
  537. // client's request for the GetShardIterator operation. The "output" return
  538. // value can be used to capture response data after the request's "Send" method
  539. // is called.
  540. //
  541. // Creating a request object using this method should be used when you want to inject
  542. // custom logic into the request's lifecycle using a custom handler, or if you want to
  543. // access properties on the request object before or after sending the request. If
  544. // you just want the service response, call the GetShardIterator method directly
  545. // instead.
  546. //
  547. // Note: You must call the "Send" method on the returned request object in order
  548. // to execute the request.
  549. //
  550. // // Example sending a request using the GetShardIteratorRequest method.
  551. // req, resp := client.GetShardIteratorRequest(params)
  552. //
  553. // err := req.Send()
  554. // if err == nil { // resp is now filled
  555. // fmt.Println(resp)
  556. // }
  557. //
  558. func (c *Kinesis) GetShardIteratorRequest(input *GetShardIteratorInput) (req *request.Request, output *GetShardIteratorOutput) {
  559. op := &request.Operation{
  560. Name: opGetShardIterator,
  561. HTTPMethod: "POST",
  562. HTTPPath: "/",
  563. }
  564. if input == nil {
  565. input = &GetShardIteratorInput{}
  566. }
  567. req = c.newRequest(op, input, output)
  568. output = &GetShardIteratorOutput{}
  569. req.Data = output
  570. return
  571. }
  572. // Gets an Amazon Kinesis shard iterator. A shard iterator expires five minutes
  573. // after it is returned to the requester.
  574. //
  575. // A shard iterator specifies the shard position from which to start reading
  576. // data records sequentially. The position is specified using the sequence number
  577. // of a data record in a shard. A sequence number is the identifier associated
  578. // with every record ingested in the stream, and is assigned when a record is
  579. // put into the stream. Each stream has one or more shards.
  580. //
  581. // You must specify the shard iterator type. For example, you can set the ShardIteratorType
  582. // parameter to read exactly from the position denoted by a specific sequence
  583. // number by using the AT_SEQUENCE_NUMBER shard iterator type, or right after
  584. // the sequence number by using the AFTER_SEQUENCE_NUMBER shard iterator type,
  585. // using sequence numbers returned by earlier calls to PutRecord, PutRecords,
  586. // GetRecords, or DescribeStream. In the request, you can specify the shard
  587. // iterator type AT_TIMESTAMP to read records from an arbitrary point in time,
  588. // TRIM_HORIZON to cause ShardIterator to point to the last untrimmed record
  589. // in the shard in the system (the oldest data record in the shard), or LATEST
  590. // so that you always read the most recent data in the shard.
  591. //
  592. // When you read repeatedly from a stream, use a GetShardIterator request to
  593. // get the first shard iterator for use in your first GetRecords request and
  594. // for subsequent reads use the shard iterator returned by the GetRecords request
  595. // in NextShardIterator. A new shard iterator is returned by every GetRecords
  596. // request in NextShardIterator, which you use in the ShardIterator parameter
  597. // of the next GetRecords request.
  598. //
  599. // If a GetShardIterator request is made too often, you receive a ProvisionedThroughputExceededException.
  600. // For more information about throughput limits, see GetRecords, and Streams
  601. // Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  602. // in the Amazon Kinesis Streams Developer Guide.
  603. //
  604. // If the shard is closed, GetShardIterator returns a valid iterator for the
  605. // last sequence number of the shard. Note that a shard can be closed as a result
  606. // of using SplitShard or MergeShards.
  607. //
  608. // GetShardIterator has a limit of 5 transactions per second per account per
  609. // open shard.
  610. func (c *Kinesis) GetShardIterator(input *GetShardIteratorInput) (*GetShardIteratorOutput, error) {
  611. req, out := c.GetShardIteratorRequest(input)
  612. err := req.Send()
  613. return out, err
  614. }
  615. const opIncreaseStreamRetentionPeriod = "IncreaseStreamRetentionPeriod"
  616. // IncreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the
  617. // client's request for the IncreaseStreamRetentionPeriod operation. The "output" return
  618. // value can be used to capture response data after the request's "Send" method
  619. // is called.
  620. //
  621. // Creating a request object using this method should be used when you want to inject
  622. // custom logic into the request's lifecycle using a custom handler, or if you want to
  623. // access properties on the request object before or after sending the request. If
  624. // you just want the service response, call the IncreaseStreamRetentionPeriod method directly
  625. // instead.
  626. //
  627. // Note: You must call the "Send" method on the returned request object in order
  628. // to execute the request.
  629. //
  630. // // Example sending a request using the IncreaseStreamRetentionPeriodRequest method.
  631. // req, resp := client.IncreaseStreamRetentionPeriodRequest(params)
  632. //
  633. // err := req.Send()
  634. // if err == nil { // resp is now filled
  635. // fmt.Println(resp)
  636. // }
  637. //
  638. func (c *Kinesis) IncreaseStreamRetentionPeriodRequest(input *IncreaseStreamRetentionPeriodInput) (req *request.Request, output *IncreaseStreamRetentionPeriodOutput) {
  639. op := &request.Operation{
  640. Name: opIncreaseStreamRetentionPeriod,
  641. HTTPMethod: "POST",
  642. HTTPPath: "/",
  643. }
  644. if input == nil {
  645. input = &IncreaseStreamRetentionPeriodInput{}
  646. }
  647. req = c.newRequest(op, input, output)
  648. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  649. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  650. output = &IncreaseStreamRetentionPeriodOutput{}
  651. req.Data = output
  652. return
  653. }
  654. // Increases the Amazon Kinesis stream's retention period, which is the length
  655. // of time data records are accessible after they are added to the stream. The
  656. // maximum value of a stream's retention period is 168 hours (7 days).
  657. //
  658. // Upon choosing a longer stream retention period, this operation will increase
  659. // the time period records are accessible that have not yet expired. However,
  660. // it will not make previous data that has expired (older than the stream's
  661. // previous retention period) accessible after the operation has been called.
  662. // For example, if a stream's retention period is set to 24 hours and is increased
  663. // to 168 hours, any data that is older than 24 hours will remain inaccessible
  664. // to consumer applications.
  665. func (c *Kinesis) IncreaseStreamRetentionPeriod(input *IncreaseStreamRetentionPeriodInput) (*IncreaseStreamRetentionPeriodOutput, error) {
  666. req, out := c.IncreaseStreamRetentionPeriodRequest(input)
  667. err := req.Send()
  668. return out, err
  669. }
  670. const opListStreams = "ListStreams"
  671. // ListStreamsRequest generates a "aws/request.Request" representing the
  672. // client's request for the ListStreams operation. The "output" return
  673. // value can be used to capture response data after the request's "Send" method
  674. // is called.
  675. //
  676. // Creating a request object using this method should be used when you want to inject
  677. // custom logic into the request's lifecycle using a custom handler, or if you want to
  678. // access properties on the request object before or after sending the request. If
  679. // you just want the service response, call the ListStreams method directly
  680. // instead.
  681. //
  682. // Note: You must call the "Send" method on the returned request object in order
  683. // to execute the request.
  684. //
  685. // // Example sending a request using the ListStreamsRequest method.
  686. // req, resp := client.ListStreamsRequest(params)
  687. //
  688. // err := req.Send()
  689. // if err == nil { // resp is now filled
  690. // fmt.Println(resp)
  691. // }
  692. //
  693. func (c *Kinesis) ListStreamsRequest(input *ListStreamsInput) (req *request.Request, output *ListStreamsOutput) {
  694. op := &request.Operation{
  695. Name: opListStreams,
  696. HTTPMethod: "POST",
  697. HTTPPath: "/",
  698. Paginator: &request.Paginator{
  699. InputTokens: []string{"ExclusiveStartStreamName"},
  700. OutputTokens: []string{"StreamNames[-1]"},
  701. LimitToken: "Limit",
  702. TruncationToken: "HasMoreStreams",
  703. },
  704. }
  705. if input == nil {
  706. input = &ListStreamsInput{}
  707. }
  708. req = c.newRequest(op, input, output)
  709. output = &ListStreamsOutput{}
  710. req.Data = output
  711. return
  712. }
  713. // Lists your Amazon Kinesis streams.
  714. //
  715. // The number of streams may be too large to return from a single call to ListStreams.
  716. // You can limit the number of returned streams using the Limit parameter. If
  717. // you do not specify a value for the Limit parameter, Amazon Kinesis uses the
  718. // default limit, which is currently 10.
  719. //
  720. // You can detect if there are more streams available to list by using the
  721. // HasMoreStreams flag from the returned output. If there are more streams available,
  722. // you can request more streams by using the name of the last stream returned
  723. // by the ListStreams request in the ExclusiveStartStreamName parameter in a
  724. // subsequent request to ListStreams. The group of stream names returned by
  725. // the subsequent request is then added to the list. You can continue this process
  726. // until all the stream names have been collected in the list.
  727. //
  728. // ListStreams has a limit of 5 transactions per second per account.
  729. func (c *Kinesis) ListStreams(input *ListStreamsInput) (*ListStreamsOutput, error) {
  730. req, out := c.ListStreamsRequest(input)
  731. err := req.Send()
  732. return out, err
  733. }
  734. // ListStreamsPages iterates over the pages of a ListStreams operation,
  735. // calling the "fn" function with the response data for each page. To stop
  736. // iterating, return false from the fn function.
  737. //
  738. // See ListStreams method for more information on how to use this operation.
  739. //
  740. // Note: This operation can generate multiple requests to a service.
  741. //
  742. // // Example iterating over at most 3 pages of a ListStreams operation.
  743. // pageNum := 0
  744. // err := client.ListStreamsPages(params,
  745. // func(page *ListStreamsOutput, lastPage bool) bool {
  746. // pageNum++
  747. // fmt.Println(page)
  748. // return pageNum <= 3
  749. // })
  750. //
  751. func (c *Kinesis) ListStreamsPages(input *ListStreamsInput, fn func(p *ListStreamsOutput, lastPage bool) (shouldContinue bool)) error {
  752. page, _ := c.ListStreamsRequest(input)
  753. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  754. return page.EachPage(func(p interface{}, lastPage bool) bool {
  755. return fn(p.(*ListStreamsOutput), lastPage)
  756. })
  757. }
  758. const opListTagsForStream = "ListTagsForStream"
  759. // ListTagsForStreamRequest generates a "aws/request.Request" representing the
  760. // client's request for the ListTagsForStream operation. The "output" return
  761. // value can be used to capture response data after the request's "Send" method
  762. // is called.
  763. //
  764. // Creating a request object using this method should be used when you want to inject
  765. // custom logic into the request's lifecycle using a custom handler, or if you want to
  766. // access properties on the request object before or after sending the request. If
  767. // you just want the service response, call the ListTagsForStream method directly
  768. // instead.
  769. //
  770. // Note: You must call the "Send" method on the returned request object in order
  771. // to execute the request.
  772. //
  773. // // Example sending a request using the ListTagsForStreamRequest method.
  774. // req, resp := client.ListTagsForStreamRequest(params)
  775. //
  776. // err := req.Send()
  777. // if err == nil { // resp is now filled
  778. // fmt.Println(resp)
  779. // }
  780. //
  781. func (c *Kinesis) ListTagsForStreamRequest(input *ListTagsForStreamInput) (req *request.Request, output *ListTagsForStreamOutput) {
  782. op := &request.Operation{
  783. Name: opListTagsForStream,
  784. HTTPMethod: "POST",
  785. HTTPPath: "/",
  786. }
  787. if input == nil {
  788. input = &ListTagsForStreamInput{}
  789. }
  790. req = c.newRequest(op, input, output)
  791. output = &ListTagsForStreamOutput{}
  792. req.Data = output
  793. return
  794. }
  795. // Lists the tags for the specified Amazon Kinesis stream.
  796. func (c *Kinesis) ListTagsForStream(input *ListTagsForStreamInput) (*ListTagsForStreamOutput, error) {
  797. req, out := c.ListTagsForStreamRequest(input)
  798. err := req.Send()
  799. return out, err
  800. }
  801. const opMergeShards = "MergeShards"
  802. // MergeShardsRequest generates a "aws/request.Request" representing the
  803. // client's request for the MergeShards operation. The "output" return
  804. // value can be used to capture response data after the request's "Send" method
  805. // is called.
  806. //
  807. // Creating a request object using this method should be used when you want to inject
  808. // custom logic into the request's lifecycle using a custom handler, or if you want to
  809. // access properties on the request object before or after sending the request. If
  810. // you just want the service response, call the MergeShards method directly
  811. // instead.
  812. //
  813. // Note: You must call the "Send" method on the returned request object in order
  814. // to execute the request.
  815. //
  816. // // Example sending a request using the MergeShardsRequest method.
  817. // req, resp := client.MergeShardsRequest(params)
  818. //
  819. // err := req.Send()
  820. // if err == nil { // resp is now filled
  821. // fmt.Println(resp)
  822. // }
  823. //
  824. func (c *Kinesis) MergeShardsRequest(input *MergeShardsInput) (req *request.Request, output *MergeShardsOutput) {
  825. op := &request.Operation{
  826. Name: opMergeShards,
  827. HTTPMethod: "POST",
  828. HTTPPath: "/",
  829. }
  830. if input == nil {
  831. input = &MergeShardsInput{}
  832. }
  833. req = c.newRequest(op, input, output)
  834. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  835. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  836. output = &MergeShardsOutput{}
  837. req.Data = output
  838. return
  839. }
  840. // Merges two adjacent shards in an Amazon Kinesis stream and combines them
  841. // into a single shard to reduce the stream's capacity to ingest and transport
  842. // data. Two shards are considered adjacent if the union of the hash key ranges
  843. // for the two shards form a contiguous set with no gaps. For example, if you
  844. // have two shards, one with a hash key range of 276...381 and the other with
  845. // a hash key range of 382...454, then you could merge these two shards into
  846. // a single shard that would have a hash key range of 276...454. After the merge,
  847. // the single child shard receives data for all hash key values covered by the
  848. // two parent shards.
  849. //
  850. // MergeShards is called when there is a need to reduce the overall capacity
  851. // of a stream because of excess capacity that is not being used. You must specify
  852. // the shard to be merged and the adjacent shard for a stream. For more information
  853. // about merging shards, see Merge Two Shards (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html)
  854. // in the Amazon Kinesis Streams Developer Guide.
  855. //
  856. // If the stream is in the ACTIVE state, you can call MergeShards. If a stream
  857. // is in the CREATING, UPDATING, or DELETING state, MergeShards returns a ResourceInUseException.
  858. // If the specified stream does not exist, MergeShards returns a ResourceNotFoundException.
  859. //
  860. // You can use DescribeStream to check the state of the stream, which is returned
  861. // in StreamStatus.
  862. //
  863. // MergeShards is an asynchronous operation. Upon receiving a MergeShards request,
  864. // Amazon Kinesis immediately returns a response and sets the StreamStatus to
  865. // UPDATING. After the operation is completed, Amazon Kinesis sets the StreamStatus
  866. // to ACTIVE. Read and write operations continue to work while the stream is
  867. // in the UPDATING state.
  868. //
  869. // You use DescribeStream to determine the shard IDs that are specified in
  870. // the MergeShards request.
  871. //
  872. // If you try to operate on too many streams in parallel using CreateStream,
  873. // DeleteStream, MergeShards or SplitShard, you will receive a LimitExceededException.
  874. //
  875. // MergeShards has limit of 5 transactions per second per account.
  876. func (c *Kinesis) MergeShards(input *MergeShardsInput) (*MergeShardsOutput, error) {
  877. req, out := c.MergeShardsRequest(input)
  878. err := req.Send()
  879. return out, err
  880. }
  881. const opPutRecord = "PutRecord"
  882. // PutRecordRequest generates a "aws/request.Request" representing the
  883. // client's request for the PutRecord operation. The "output" return
  884. // value can be used to capture response data after the request's "Send" method
  885. // is called.
  886. //
  887. // Creating a request object using this method should be used when you want to inject
  888. // custom logic into the request's lifecycle using a custom handler, or if you want to
  889. // access properties on the request object before or after sending the request. If
  890. // you just want the service response, call the PutRecord method directly
  891. // instead.
  892. //
  893. // Note: You must call the "Send" method on the returned request object in order
  894. // to execute the request.
  895. //
  896. // // Example sending a request using the PutRecordRequest method.
  897. // req, resp := client.PutRecordRequest(params)
  898. //
  899. // err := req.Send()
  900. // if err == nil { // resp is now filled
  901. // fmt.Println(resp)
  902. // }
  903. //
  904. func (c *Kinesis) PutRecordRequest(input *PutRecordInput) (req *request.Request, output *PutRecordOutput) {
  905. op := &request.Operation{
  906. Name: opPutRecord,
  907. HTTPMethod: "POST",
  908. HTTPPath: "/",
  909. }
  910. if input == nil {
  911. input = &PutRecordInput{}
  912. }
  913. req = c.newRequest(op, input, output)
  914. output = &PutRecordOutput{}
  915. req.Data = output
  916. return
  917. }
  918. // Writes a single data record into an Amazon Kinesis stream. Call PutRecord
  919. // to send data into the stream for real-time ingestion and subsequent processing,
  920. // one record at a time. Each shard can support writes up to 1,000 records per
  921. // second, up to a maximum data write total of 1 MB per second.
  922. //
  923. // You must specify the name of the stream that captures, stores, and transports
  924. // the data; a partition key; and the data blob itself.
  925. //
  926. // The data blob can be any type of data; for example, a segment from a log
  927. // file, geographic/location data, website clickstream data, and so on.
  928. //
  929. // The partition key is used by Amazon Kinesis to distribute data across shards.
  930. // Amazon Kinesis segregates the data records that belong to a stream into multiple
  931. // shards, using the partition key associated with each data record to determine
  932. // which shard a given data record belongs to.
  933. //
  934. // Partition keys are Unicode strings, with a maximum length limit of 256 characters
  935. // for each key. An MD5 hash function is used to map partition keys to 128-bit
  936. // integer values and to map associated data records to shards using the hash
  937. // key ranges of the shards. You can override hashing the partition key to determine
  938. // the shard by explicitly specifying a hash value using the ExplicitHashKey
  939. // parameter. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
  940. // in the Amazon Kinesis Streams Developer Guide.
  941. //
  942. // PutRecord returns the shard ID of where the data record was placed and the
  943. // sequence number that was assigned to the data record.
  944. //
  945. // Sequence numbers increase over time and are specific to a shard within a
  946. // stream, not across all shards within a stream. To guarantee strictly increasing
  947. // ordering, write serially to a shard and use the SequenceNumberForOrdering
  948. // parameter. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
  949. // in the Amazon Kinesis Streams Developer Guide.
  950. //
  951. // If a PutRecord request cannot be processed because of insufficient provisioned
  952. // throughput on the shard involved in the request, PutRecord throws ProvisionedThroughputExceededException.
  953. //
  954. // Data records are accessible for only 24 hours from the time that they are
  955. // added to a stream.
  956. func (c *Kinesis) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) {
  957. req, out := c.PutRecordRequest(input)
  958. err := req.Send()
  959. return out, err
  960. }
  961. const opPutRecords = "PutRecords"
  962. // PutRecordsRequest generates a "aws/request.Request" representing the
  963. // client's request for the PutRecords operation. The "output" return
  964. // value can be used to capture response data after the request's "Send" method
  965. // is called.
  966. //
  967. // Creating a request object using this method should be used when you want to inject
  968. // custom logic into the request's lifecycle using a custom handler, or if you want to
  969. // access properties on the request object before or after sending the request. If
  970. // you just want the service response, call the PutRecords method directly
  971. // instead.
  972. //
  973. // Note: You must call the "Send" method on the returned request object in order
  974. // to execute the request.
  975. //
  976. // // Example sending a request using the PutRecordsRequest method.
  977. // req, resp := client.PutRecordsRequest(params)
  978. //
  979. // err := req.Send()
  980. // if err == nil { // resp is now filled
  981. // fmt.Println(resp)
  982. // }
  983. //
  984. func (c *Kinesis) PutRecordsRequest(input *PutRecordsInput) (req *request.Request, output *PutRecordsOutput) {
  985. op := &request.Operation{
  986. Name: opPutRecords,
  987. HTTPMethod: "POST",
  988. HTTPPath: "/",
  989. }
  990. if input == nil {
  991. input = &PutRecordsInput{}
  992. }
  993. req = c.newRequest(op, input, output)
  994. output = &PutRecordsOutput{}
  995. req.Data = output
  996. return
  997. }
  998. // Writes multiple data records into an Amazon Kinesis stream in a single call
  999. // (also referred to as a PutRecords request). Use this operation to send data
  1000. // into the stream for data ingestion and processing.
  1001. //
  1002. // Each PutRecords request can support up to 500 records. Each record in the
  1003. // request can be as large as 1 MB, up to a limit of 5 MB for the entire request,
  1004. // including partition keys. Each shard can support writes up to 1,000 records
  1005. // per second, up to a maximum data write total of 1 MB per second.
  1006. //
  1007. // You must specify the name of the stream that captures, stores, and transports
  1008. // the data; and an array of request Records, with each record in the array
  1009. // requiring a partition key and data blob. The record size limit applies to
  1010. // the total size of the partition key and data blob.
  1011. //
  1012. // The data blob can be any type of data; for example, a segment from a log
  1013. // file, geographic/location data, website clickstream data, and so on.
  1014. //
  1015. // The partition key is used by Amazon Kinesis as input to a hash function
  1016. // that maps the partition key and associated data to a specific shard. An MD5
  1017. // hash function is used to map partition keys to 128-bit integer values and
  1018. // to map associated data records to shards. As a result of this hashing mechanism,
  1019. // all data records with the same partition key map to the same shard within
  1020. // the stream. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
  1021. // in the Amazon Kinesis Streams Developer Guide.
  1022. //
  1023. // Each record in the Records array may include an optional parameter, ExplicitHashKey,
  1024. // which overrides the partition key to shard mapping. This parameter allows
  1025. // a data producer to determine explicitly the shard where the record is stored.
  1026. // For more information, see Adding Multiple Records with PutRecords (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords)
  1027. // in the Amazon Kinesis Streams Developer Guide.
  1028. //
  1029. // The PutRecords response includes an array of response Records. Each record
  1030. // in the response array directly correlates with a record in the request array
  1031. // using natural ordering, from the top to the bottom of the request and response.
  1032. // The response Records array always includes the same number of records as
  1033. // the request array.
  1034. //
  1035. // The response Records array includes both successfully and unsuccessfully
  1036. // processed records. Amazon Kinesis attempts to process all records in each
  1037. // PutRecords request. A single record failure does not stop the processing
  1038. // of subsequent records.
  1039. //
  1040. // A successfully-processed record includes ShardId and SequenceNumber values.
  1041. // The ShardId parameter identifies the shard in the stream where the record
  1042. // is stored. The SequenceNumber parameter is an identifier assigned to the
  1043. // put record, unique to all records in the stream.
  1044. //
  1045. // An unsuccessfully-processed record includes ErrorCode and ErrorMessage values.
  1046. // ErrorCode reflects the type of error and can be one of the following values:
  1047. // ProvisionedThroughputExceededException or InternalFailure. ErrorMessage provides
  1048. // more detailed information about the ProvisionedThroughputExceededException
  1049. // exception including the account ID, stream name, and shard ID of the record
  1050. // that was throttled. For more information about partially successful responses,
  1051. // see Adding Multiple Records with PutRecords (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords)
  1052. // in the Amazon Kinesis Streams Developer Guide.
  1053. //
  1054. // By default, data records are accessible for only 24 hours from the time
  1055. // that they are added to an Amazon Kinesis stream. This retention period can
  1056. // be modified using the DecreaseStreamRetentionPeriod and IncreaseStreamRetentionPeriod
  1057. // operations.
  1058. func (c *Kinesis) PutRecords(input *PutRecordsInput) (*PutRecordsOutput, error) {
  1059. req, out := c.PutRecordsRequest(input)
  1060. err := req.Send()
  1061. return out, err
  1062. }
  1063. const opRemoveTagsFromStream = "RemoveTagsFromStream"
  1064. // RemoveTagsFromStreamRequest generates a "aws/request.Request" representing the
  1065. // client's request for the RemoveTagsFromStream operation. The "output" return
  1066. // value can be used to capture response data after the request's "Send" method
  1067. // is called.
  1068. //
  1069. // Creating a request object using this method should be used when you want to inject
  1070. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1071. // access properties on the request object before or after sending the request. If
  1072. // you just want the service response, call the RemoveTagsFromStream method directly
  1073. // instead.
  1074. //
  1075. // Note: You must call the "Send" method on the returned request object in order
  1076. // to execute the request.
  1077. //
  1078. // // Example sending a request using the RemoveTagsFromStreamRequest method.
  1079. // req, resp := client.RemoveTagsFromStreamRequest(params)
  1080. //
  1081. // err := req.Send()
  1082. // if err == nil { // resp is now filled
  1083. // fmt.Println(resp)
  1084. // }
  1085. //
  1086. func (c *Kinesis) RemoveTagsFromStreamRequest(input *RemoveTagsFromStreamInput) (req *request.Request, output *RemoveTagsFromStreamOutput) {
  1087. op := &request.Operation{
  1088. Name: opRemoveTagsFromStream,
  1089. HTTPMethod: "POST",
  1090. HTTPPath: "/",
  1091. }
  1092. if input == nil {
  1093. input = &RemoveTagsFromStreamInput{}
  1094. }
  1095. req = c.newRequest(op, input, output)
  1096. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1097. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1098. output = &RemoveTagsFromStreamOutput{}
  1099. req.Data = output
  1100. return
  1101. }
  1102. // Removes tags from the specified Amazon Kinesis stream. Removed tags are deleted
  1103. // and cannot be recovered after this operation successfully completes.
  1104. //
  1105. // If you specify a tag that does not exist, it is ignored.
  1106. func (c *Kinesis) RemoveTagsFromStream(input *RemoveTagsFromStreamInput) (*RemoveTagsFromStreamOutput, error) {
  1107. req, out := c.RemoveTagsFromStreamRequest(input)
  1108. err := req.Send()
  1109. return out, err
  1110. }
  1111. const opSplitShard = "SplitShard"
  1112. // SplitShardRequest generates a "aws/request.Request" representing the
  1113. // client's request for the SplitShard operation. The "output" return
  1114. // value can be used to capture response data after the request's "Send" method
  1115. // is called.
  1116. //
  1117. // Creating a request object using this method should be used when you want to inject
  1118. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1119. // access properties on the request object before or after sending the request. If
  1120. // you just want the service response, call the SplitShard method directly
  1121. // instead.
  1122. //
  1123. // Note: You must call the "Send" method on the returned request object in order
  1124. // to execute the request.
  1125. //
  1126. // // Example sending a request using the SplitShardRequest method.
  1127. // req, resp := client.SplitShardRequest(params)
  1128. //
  1129. // err := req.Send()
  1130. // if err == nil { // resp is now filled
  1131. // fmt.Println(resp)
  1132. // }
  1133. //
  1134. func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *request.Request, output *SplitShardOutput) {
  1135. op := &request.Operation{
  1136. Name: opSplitShard,
  1137. HTTPMethod: "POST",
  1138. HTTPPath: "/",
  1139. }
  1140. if input == nil {
  1141. input = &SplitShardInput{}
  1142. }
  1143. req = c.newRequest(op, input, output)
  1144. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1145. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1146. output = &SplitShardOutput{}
  1147. req.Data = output
  1148. return
  1149. }
  1150. // Splits a shard into two new shards in the Amazon Kinesis stream to increase
  1151. // the stream's capacity to ingest and transport data. SplitShard is called
  1152. // when there is a need to increase the overall capacity of a stream because
  1153. // of an expected increase in the volume of data records being ingested.
  1154. //
  1155. // You can also use SplitShard when a shard appears to be approaching its maximum
  1156. // utilization; for example, the producers sending data into the specific shard
  1157. // are suddenly sending more than previously anticipated. You can also call
  1158. // SplitShard to increase stream capacity, so that more Amazon Kinesis applications
  1159. // can simultaneously read data from the stream for real-time processing.
  1160. //
  1161. // You must specify the shard to be split and the new hash key, which is the
  1162. // position in the shard where the shard gets split in two. In many cases, the
  1163. // new hash key might simply be the average of the beginning and ending hash
  1164. // key, but it can be any hash key value in the range being mapped into the
  1165. // shard. For more information about splitting shards, see Split a Shard (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html)
  1166. // in the Amazon Kinesis Streams Developer Guide.
  1167. //
  1168. // You can use DescribeStream to determine the shard ID and hash key values
  1169. // for the ShardToSplit and NewStartingHashKey parameters that are specified
  1170. // in the SplitShard request.
  1171. //
  1172. // SplitShard is an asynchronous operation. Upon receiving a SplitShard request,
  1173. // Amazon Kinesis immediately returns a response and sets the stream status
  1174. // to UPDATING. After the operation is completed, Amazon Kinesis sets the stream
  1175. // status to ACTIVE. Read and write operations continue to work while the stream
  1176. // is in the UPDATING state.
  1177. //
  1178. // You can use DescribeStream to check the status of the stream, which is returned
  1179. // in StreamStatus. If the stream is in the ACTIVE state, you can call SplitShard.
  1180. // If a stream is in CREATING or UPDATING or DELETING states, DescribeStream
  1181. // returns a ResourceInUseException.
  1182. //
  1183. // If the specified stream does not exist, DescribeStream returns a ResourceNotFoundException.
  1184. // If you try to create more shards than are authorized for your account, you
  1185. // receive a LimitExceededException.
  1186. //
  1187. // For the default shard limit for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  1188. // in the Amazon Kinesis Streams Developer Guide. If you need to increase this
  1189. // limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html).
  1190. //
  1191. // If you try to operate on too many streams simultaneously using CreateStream,
  1192. // DeleteStream, MergeShards, and/or SplitShard, you receive a LimitExceededException.
  1193. //
  1194. // SplitShard has limit of 5 transactions per second per account.
  1195. func (c *Kinesis) SplitShard(input *SplitShardInput) (*SplitShardOutput, error) {
  1196. req, out := c.SplitShardRequest(input)
  1197. err := req.Send()
  1198. return out, err
  1199. }
  1200. // Represents the input for AddTagsToStream.
  1201. type AddTagsToStreamInput struct {
  1202. _ struct{} `type:"structure"`
  1203. // The name of the stream.
  1204. StreamName *string `min:"1" type:"string" required:"true"`
  1205. // The set of key-value pairs to use to create the tags.
  1206. Tags map[string]*string `min:"1" type:"map" required:"true"`
  1207. }
  1208. // String returns the string representation
  1209. func (s AddTagsToStreamInput) String() string {
  1210. return awsutil.Prettify(s)
  1211. }
  1212. // GoString returns the string representation
  1213. func (s AddTagsToStreamInput) GoString() string {
  1214. return s.String()
  1215. }
  1216. // Validate inspects the fields of the type to determine if they are valid.
  1217. func (s *AddTagsToStreamInput) Validate() error {
  1218. invalidParams := request.ErrInvalidParams{Context: "AddTagsToStreamInput"}
  1219. if s.StreamName == nil {
  1220. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1221. }
  1222. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1223. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1224. }
  1225. if s.Tags == nil {
  1226. invalidParams.Add(request.NewErrParamRequired("Tags"))
  1227. }
  1228. if s.Tags != nil && len(s.Tags) < 1 {
  1229. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  1230. }
  1231. if invalidParams.Len() > 0 {
  1232. return invalidParams
  1233. }
  1234. return nil
  1235. }
  1236. type AddTagsToStreamOutput struct {
  1237. _ struct{} `type:"structure"`
  1238. }
  1239. // String returns the string representation
  1240. func (s AddTagsToStreamOutput) String() string {
  1241. return awsutil.Prettify(s)
  1242. }
  1243. // GoString returns the string representation
  1244. func (s AddTagsToStreamOutput) GoString() string {
  1245. return s.String()
  1246. }
  1247. // Represents the input for CreateStream.
  1248. type CreateStreamInput struct {
  1249. _ struct{} `type:"structure"`
  1250. // The number of shards that the stream will use. The throughput of the stream
  1251. // is a function of the number of shards; more shards are required for greater
  1252. // provisioned throughput.
  1253. //
  1254. // DefaultShardLimit;
  1255. ShardCount *int64 `min:"1" type:"integer" required:"true"`
  1256. // A name to identify the stream. The stream name is scoped to the AWS account
  1257. // used by the application that creates the stream. It is also scoped by region.
  1258. // That is, two streams in two different AWS accounts can have the same name,
  1259. // and two streams in the same AWS account but in two different regions can
  1260. // have the same name.
  1261. StreamName *string `min:"1" type:"string" required:"true"`
  1262. }
  1263. // String returns the string representation
  1264. func (s CreateStreamInput) String() string {
  1265. return awsutil.Prettify(s)
  1266. }
  1267. // GoString returns the string representation
  1268. func (s CreateStreamInput) GoString() string {
  1269. return s.String()
  1270. }
  1271. // Validate inspects the fields of the type to determine if they are valid.
  1272. func (s *CreateStreamInput) Validate() error {
  1273. invalidParams := request.ErrInvalidParams{Context: "CreateStreamInput"}
  1274. if s.ShardCount == nil {
  1275. invalidParams.Add(request.NewErrParamRequired("ShardCount"))
  1276. }
  1277. if s.ShardCount != nil && *s.ShardCount < 1 {
  1278. invalidParams.Add(request.NewErrParamMinValue("ShardCount", 1))
  1279. }
  1280. if s.StreamName == nil {
  1281. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1282. }
  1283. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1284. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1285. }
  1286. if invalidParams.Len() > 0 {
  1287. return invalidParams
  1288. }
  1289. return nil
  1290. }
  1291. type CreateStreamOutput struct {
  1292. _ struct{} `type:"structure"`
  1293. }
  1294. // String returns the string representation
  1295. func (s CreateStreamOutput) String() string {
  1296. return awsutil.Prettify(s)
  1297. }
  1298. // GoString returns the string representation
  1299. func (s CreateStreamOutput) GoString() string {
  1300. return s.String()
  1301. }
  1302. // Represents the input for DecreaseStreamRetentionPeriod.
  1303. type DecreaseStreamRetentionPeriodInput struct {
  1304. _ struct{} `type:"structure"`
  1305. // The new retention period of the stream, in hours. Must be less than the current
  1306. // retention period.
  1307. RetentionPeriodHours *int64 `min:"24" type:"integer" required:"true"`
  1308. // The name of the stream to modify.
  1309. StreamName *string `min:"1" type:"string" required:"true"`
  1310. }
  1311. // String returns the string representation
  1312. func (s DecreaseStreamRetentionPeriodInput) String() string {
  1313. return awsutil.Prettify(s)
  1314. }
  1315. // GoString returns the string representation
  1316. func (s DecreaseStreamRetentionPeriodInput) GoString() string {
  1317. return s.String()
  1318. }
  1319. // Validate inspects the fields of the type to determine if they are valid.
  1320. func (s *DecreaseStreamRetentionPeriodInput) Validate() error {
  1321. invalidParams := request.ErrInvalidParams{Context: "DecreaseStreamRetentionPeriodInput"}
  1322. if s.RetentionPeriodHours == nil {
  1323. invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours"))
  1324. }
  1325. if s.RetentionPeriodHours != nil && *s.RetentionPeriodHours < 24 {
  1326. invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodHours", 24))
  1327. }
  1328. if s.StreamName == nil {
  1329. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1330. }
  1331. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1332. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1333. }
  1334. if invalidParams.Len() > 0 {
  1335. return invalidParams
  1336. }
  1337. return nil
  1338. }
  1339. type DecreaseStreamRetentionPeriodOutput struct {
  1340. _ struct{} `type:"structure"`
  1341. }
  1342. // String returns the string representation
  1343. func (s DecreaseStreamRetentionPeriodOutput) String() string {
  1344. return awsutil.Prettify(s)
  1345. }
  1346. // GoString returns the string representation
  1347. func (s DecreaseStreamRetentionPeriodOutput) GoString() string {
  1348. return s.String()
  1349. }
  1350. // Represents the input for DeleteStream.
  1351. type DeleteStreamInput struct {
  1352. _ struct{} `type:"structure"`
  1353. // The name of the stream to delete.
  1354. StreamName *string `min:"1" type:"string" required:"true"`
  1355. }
  1356. // String returns the string representation
  1357. func (s DeleteStreamInput) String() string {
  1358. return awsutil.Prettify(s)
  1359. }
  1360. // GoString returns the string representation
  1361. func (s DeleteStreamInput) GoString() string {
  1362. return s.String()
  1363. }
  1364. // Validate inspects the fields of the type to determine if they are valid.
  1365. func (s *DeleteStreamInput) Validate() error {
  1366. invalidParams := request.ErrInvalidParams{Context: "DeleteStreamInput"}
  1367. if s.StreamName == nil {
  1368. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1369. }
  1370. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1371. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1372. }
  1373. if invalidParams.Len() > 0 {
  1374. return invalidParams
  1375. }
  1376. return nil
  1377. }
  1378. type DeleteStreamOutput struct {
  1379. _ struct{} `type:"structure"`
  1380. }
  1381. // String returns the string representation
  1382. func (s DeleteStreamOutput) String() string {
  1383. return awsutil.Prettify(s)
  1384. }
  1385. // GoString returns the string representation
  1386. func (s DeleteStreamOutput) GoString() string {
  1387. return s.String()
  1388. }
  1389. // Represents the input for DescribeStream.
  1390. type DescribeStreamInput struct {
  1391. _ struct{} `type:"structure"`
  1392. // The shard ID of the shard to start with.
  1393. ExclusiveStartShardId *string `min:"1" type:"string"`
  1394. // The maximum number of shards to return.
  1395. Limit *int64 `min:"1" type:"integer"`
  1396. // The name of the stream to describe.
  1397. StreamName *string `min:"1" type:"string" required:"true"`
  1398. }
  1399. // String returns the string representation
  1400. func (s DescribeStreamInput) String() string {
  1401. return awsutil.Prettify(s)
  1402. }
  1403. // GoString returns the string representation
  1404. func (s DescribeStreamInput) GoString() string {
  1405. return s.String()
  1406. }
  1407. // Validate inspects the fields of the type to determine if they are valid.
  1408. func (s *DescribeStreamInput) Validate() error {
  1409. invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"}
  1410. if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 1 {
  1411. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 1))
  1412. }
  1413. if s.Limit != nil && *s.Limit < 1 {
  1414. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  1415. }
  1416. if s.StreamName == nil {
  1417. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1418. }
  1419. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1420. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1421. }
  1422. if invalidParams.Len() > 0 {
  1423. return invalidParams
  1424. }
  1425. return nil
  1426. }
  1427. // Represents the output for DescribeStream.
  1428. type DescribeStreamOutput struct {
  1429. _ struct{} `type:"structure"`
  1430. // The current status of the stream, the stream ARN, an array of shard objects
  1431. // that comprise the stream, and states whether there are more shards available.
  1432. StreamDescription *StreamDescription `type:"structure" required:"true"`
  1433. }
  1434. // String returns the string representation
  1435. func (s DescribeStreamOutput) String() string {
  1436. return awsutil.Prettify(s)
  1437. }
  1438. // GoString returns the string representation
  1439. func (s DescribeStreamOutput) GoString() string {
  1440. return s.String()
  1441. }
  1442. // Represents the input for DisableEnhancedMonitoring.
  1443. type DisableEnhancedMonitoringInput struct {
  1444. _ struct{} `type:"structure"`
  1445. // List of shard-level metrics to disable.
  1446. //
  1447. // The following are the valid shard-level metrics. The value "ALL" disables
  1448. // every metric.
  1449. //
  1450. // IncomingBytes IncomingRecords OutgoingBytes OutgoingRecords WriteProvisionedThroughputExceeded
  1451. // ReadProvisionedThroughputExceeded IteratorAgeMilliseconds ALL For
  1452. // more information, see Monitoring the Amazon Kinesis Streams Service with
  1453. // Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
  1454. // in the Amazon Kinesis Streams Developer Guide.
  1455. ShardLevelMetrics []*string `min:"1" type:"list" required:"true"`
  1456. // The name of the Amazon Kinesis stream for which to disable enhanced monitoring.
  1457. StreamName *string `min:"1" type:"string" required:"true"`
  1458. }
  1459. // String returns the string representation
  1460. func (s DisableEnhancedMonitoringInput) String() string {
  1461. return awsutil.Prettify(s)
  1462. }
  1463. // GoString returns the string representation
  1464. func (s DisableEnhancedMonitoringInput) GoString() string {
  1465. return s.String()
  1466. }
  1467. // Validate inspects the fields of the type to determine if they are valid.
  1468. func (s *DisableEnhancedMonitoringInput) Validate() error {
  1469. invalidParams := request.ErrInvalidParams{Context: "DisableEnhancedMonitoringInput"}
  1470. if s.ShardLevelMetrics == nil {
  1471. invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics"))
  1472. }
  1473. if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 {
  1474. invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1))
  1475. }
  1476. if s.StreamName == nil {
  1477. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1478. }
  1479. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1480. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1481. }
  1482. if invalidParams.Len() > 0 {
  1483. return invalidParams
  1484. }
  1485. return nil
  1486. }
  1487. // Represents the input for EnableEnhancedMonitoring.
  1488. type EnableEnhancedMonitoringInput struct {
  1489. _ struct{} `type:"structure"`
  1490. // List of shard-level metrics to enable.
  1491. //
  1492. // The following are the valid shard-level metrics. The value "ALL" enables
  1493. // every metric.
  1494. //
  1495. // IncomingBytes IncomingRecords OutgoingBytes OutgoingRecords WriteProvisionedThroughputExceeded
  1496. // ReadProvisionedThroughputExceeded IteratorAgeMilliseconds ALL For
  1497. // more information, see Monitoring the Amazon Kinesis Streams Service with
  1498. // Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
  1499. // in the Amazon Kinesis Streams Developer Guide.
  1500. ShardLevelMetrics []*string `min:"1" type:"list" required:"true"`
  1501. // The name of the stream for which to enable enhanced monitoring.
  1502. StreamName *string `min:"1" type:"string" required:"true"`
  1503. }
  1504. // String returns the string representation
  1505. func (s EnableEnhancedMonitoringInput) String() string {
  1506. return awsutil.Prettify(s)
  1507. }
  1508. // GoString returns the string representation
  1509. func (s EnableEnhancedMonitoringInput) GoString() string {
  1510. return s.String()
  1511. }
  1512. // Validate inspects the fields of the type to determine if they are valid.
  1513. func (s *EnableEnhancedMonitoringInput) Validate() error {
  1514. invalidParams := request.ErrInvalidParams{Context: "EnableEnhancedMonitoringInput"}
  1515. if s.ShardLevelMetrics == nil {
  1516. invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics"))
  1517. }
  1518. if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 {
  1519. invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1))
  1520. }
  1521. if s.StreamName == nil {
  1522. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1523. }
  1524. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1525. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1526. }
  1527. if invalidParams.Len() > 0 {
  1528. return invalidParams
  1529. }
  1530. return nil
  1531. }
  1532. // Represents enhanced metrics types.
  1533. type EnhancedMetrics struct {
  1534. _ struct{} `type:"structure"`
  1535. // List of shard-level metrics.
  1536. //
  1537. // The following are the valid shard-level metrics. The value "ALL" enhances
  1538. // every metric.
  1539. //
  1540. // IncomingBytes IncomingRecords OutgoingBytes OutgoingRecords WriteProvisionedThroughputExceeded
  1541. // ReadProvisionedThroughputExceeded IteratorAgeMilliseconds ALL For
  1542. // more information, see Monitoring the Amazon Kinesis Streams Service with
  1543. // Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
  1544. // in the Amazon Kinesis Streams Developer Guide.
  1545. ShardLevelMetrics []*string `min:"1" type:"list"`
  1546. }
  1547. // String returns the string representation
  1548. func (s EnhancedMetrics) String() string {
  1549. return awsutil.Prettify(s)
  1550. }
  1551. // GoString returns the string representation
  1552. func (s EnhancedMetrics) GoString() string {
  1553. return s.String()
  1554. }
  1555. // Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring.
  1556. type EnhancedMonitoringOutput struct {
  1557. _ struct{} `type:"structure"`
  1558. // Represents the current state of the metrics that are in the enhanced state
  1559. // before the operation.
  1560. CurrentShardLevelMetrics []*string `min:"1" type:"list"`
  1561. // Represents the list of all the metrics that would be in the enhanced state
  1562. // after the operation.
  1563. DesiredShardLevelMetrics []*string `min:"1" type:"list"`
  1564. // The name of the Amazon Kinesis stream.
  1565. StreamName *string `min:"1" type:"string"`
  1566. }
  1567. // String returns the string representation
  1568. func (s EnhancedMonitoringOutput) String() string {
  1569. return awsutil.Prettify(s)
  1570. }
  1571. // GoString returns the string representation
  1572. func (s EnhancedMonitoringOutput) GoString() string {
  1573. return s.String()
  1574. }
  1575. // Represents the input for GetRecords.
  1576. type GetRecordsInput struct {
  1577. _ struct{} `type:"structure"`
  1578. // The maximum number of records to return. Specify a value of up to 10,000.
  1579. // If you specify a value that is greater than 10,000, GetRecords throws InvalidArgumentException.
  1580. Limit *int64 `min:"1" type:"integer"`
  1581. // The position in the shard from which you want to start sequentially reading
  1582. // data records. A shard iterator specifies this position using the sequence
  1583. // number of a data record in the shard.
  1584. ShardIterator *string `min:"1" type:"string" required:"true"`
  1585. }
  1586. // String returns the string representation
  1587. func (s GetRecordsInput) String() string {
  1588. return awsutil.Prettify(s)
  1589. }
  1590. // GoString returns the string representation
  1591. func (s GetRecordsInput) GoString() string {
  1592. return s.String()
  1593. }
  1594. // Validate inspects the fields of the type to determine if they are valid.
  1595. func (s *GetRecordsInput) Validate() error {
  1596. invalidParams := request.ErrInvalidParams{Context: "GetRecordsInput"}
  1597. if s.Limit != nil && *s.Limit < 1 {
  1598. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  1599. }
  1600. if s.ShardIterator == nil {
  1601. invalidParams.Add(request.NewErrParamRequired("ShardIterator"))
  1602. }
  1603. if s.ShardIterator != nil && len(*s.ShardIterator) < 1 {
  1604. invalidParams.Add(request.NewErrParamMinLen("ShardIterator", 1))
  1605. }
  1606. if invalidParams.Len() > 0 {
  1607. return invalidParams
  1608. }
  1609. return nil
  1610. }
  1611. // Represents the output for GetRecords.
  1612. type GetRecordsOutput struct {
  1613. _ struct{} `type:"structure"`
  1614. // The number of milliseconds the GetRecords response is from the tip of the
  1615. // stream, indicating how far behind current time the consumer is. A value of
  1616. // zero indicates record processing is caught up, and there are no new records
  1617. // to process at this moment.
  1618. MillisBehindLatest *int64 `type:"long"`
  1619. // The next position in the shard from which to start sequentially reading data
  1620. // records. If set to null, the shard has been closed and the requested iterator
  1621. // will not return any more data.
  1622. NextShardIterator *string `min:"1" type:"string"`
  1623. // The data records retrieved from the shard.
  1624. Records []*Record `type:"list" required:"true"`
  1625. }
  1626. // String returns the string representation
  1627. func (s GetRecordsOutput) String() string {
  1628. return awsutil.Prettify(s)
  1629. }
  1630. // GoString returns the string representation
  1631. func (s GetRecordsOutput) GoString() string {
  1632. return s.String()
  1633. }
  1634. // Represents the input for GetShardIterator.
  1635. type GetShardIteratorInput struct {
  1636. _ struct{} `type:"structure"`
  1637. // The shard ID of the Amazon Kinesis shard to get the iterator for.
  1638. ShardId *string `min:"1" type:"string" required:"true"`
  1639. // Determines how the shard iterator is used to start reading data records from
  1640. // the shard.
  1641. //
  1642. // The following are the valid Amazon Kinesis shard iterator types:
  1643. //
  1644. // AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific
  1645. // sequence number, provided in the value StartingSequenceNumber. AFTER_SEQUENCE_NUMBER
  1646. // - Start reading right after the position denoted by a specific sequence number,
  1647. // provided in the value StartingSequenceNumber. AT_TIMESTAMP - Start reading
  1648. // from the position denoted by a specific timestamp, provided in the value
  1649. // Timestamp. TRIM_HORIZON - Start reading at the last untrimmed record in the
  1650. // shard in the system, which is the oldest data record in the shard. LATEST
  1651. // - Start reading just after the most recent record in the shard, so that you
  1652. // always read the most recent data in the shard.
  1653. ShardIteratorType *string `type:"string" required:"true" enum:"ShardIteratorType"`
  1654. // The sequence number of the data record in the shard from which to start reading.
  1655. // Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.
  1656. StartingSequenceNumber *string `type:"string"`
  1657. // The name of the Amazon Kinesis stream.
  1658. StreamName *string `min:"1" type:"string" required:"true"`
  1659. // The timestamp of the data record from which to start reading. Used with shard
  1660. // iterator type AT_TIMESTAMP. A timestamp is the Unix epoch date with precision
  1661. // in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or 1459799926.480.
  1662. // If a record with this exact timestamp does not exist, the iterator returned
  1663. // is for the next (later) record. If the timestamp is older than the current
  1664. // trim horizon, the iterator returned is for the oldest untrimmed data record
  1665. // (TRIM_HORIZON).
  1666. Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  1667. }
  1668. // String returns the string representation
  1669. func (s GetShardIteratorInput) String() string {
  1670. return awsutil.Prettify(s)
  1671. }
  1672. // GoString returns the string representation
  1673. func (s GetShardIteratorInput) GoString() string {
  1674. return s.String()
  1675. }
  1676. // Validate inspects the fields of the type to determine if they are valid.
  1677. func (s *GetShardIteratorInput) Validate() error {
  1678. invalidParams := request.ErrInvalidParams{Context: "GetShardIteratorInput"}
  1679. if s.ShardId == nil {
  1680. invalidParams.Add(request.NewErrParamRequired("ShardId"))
  1681. }
  1682. if s.ShardId != nil && len(*s.ShardId) < 1 {
  1683. invalidParams.Add(request.NewErrParamMinLen("ShardId", 1))
  1684. }
  1685. if s.ShardIteratorType == nil {
  1686. invalidParams.Add(request.NewErrParamRequired("ShardIteratorType"))
  1687. }
  1688. if s.StreamName == nil {
  1689. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1690. }
  1691. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1692. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1693. }
  1694. if invalidParams.Len() > 0 {
  1695. return invalidParams
  1696. }
  1697. return nil
  1698. }
  1699. // Represents the output for GetShardIterator.
  1700. type GetShardIteratorOutput struct {
  1701. _ struct{} `type:"structure"`
  1702. // The position in the shard from which to start reading data records sequentially.
  1703. // A shard iterator specifies this position using the sequence number of a data
  1704. // record in a shard.
  1705. ShardIterator *string `min:"1" type:"string"`
  1706. }
  1707. // String returns the string representation
  1708. func (s GetShardIteratorOutput) String() string {
  1709. return awsutil.Prettify(s)
  1710. }
  1711. // GoString returns the string representation
  1712. func (s GetShardIteratorOutput) GoString() string {
  1713. return s.String()
  1714. }
  1715. // The range of possible hash key values for the shard, which is a set of ordered
  1716. // contiguous positive integers.
  1717. type HashKeyRange struct {
  1718. _ struct{} `type:"structure"`
  1719. // The ending hash key of the hash key range.
  1720. EndingHashKey *string `type:"string" required:"true"`
  1721. // The starting hash key of the hash key range.
  1722. StartingHashKey *string `type:"string" required:"true"`
  1723. }
  1724. // String returns the string representation
  1725. func (s HashKeyRange) String() string {
  1726. return awsutil.Prettify(s)
  1727. }
  1728. // GoString returns the string representation
  1729. func (s HashKeyRange) GoString() string {
  1730. return s.String()
  1731. }
  1732. // Represents the input for IncreaseStreamRetentionPeriod.
  1733. type IncreaseStreamRetentionPeriodInput struct {
  1734. _ struct{} `type:"structure"`
  1735. // The new retention period of the stream, in hours. Must be more than the current
  1736. // retention period.
  1737. RetentionPeriodHours *int64 `min:"24" type:"integer" required:"true"`
  1738. // The name of the stream to modify.
  1739. StreamName *string `min:"1" type:"string" required:"true"`
  1740. }
  1741. // String returns the string representation
  1742. func (s IncreaseStreamRetentionPeriodInput) String() string {
  1743. return awsutil.Prettify(s)
  1744. }
  1745. // GoString returns the string representation
  1746. func (s IncreaseStreamRetentionPeriodInput) GoString() string {
  1747. return s.String()
  1748. }
  1749. // Validate inspects the fields of the type to determine if they are valid.
  1750. func (s *IncreaseStreamRetentionPeriodInput) Validate() error {
  1751. invalidParams := request.ErrInvalidParams{Context: "IncreaseStreamRetentionPeriodInput"}
  1752. if s.RetentionPeriodHours == nil {
  1753. invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours"))
  1754. }
  1755. if s.RetentionPeriodHours != nil && *s.RetentionPeriodHours < 24 {
  1756. invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodHours", 24))
  1757. }
  1758. if s.StreamName == nil {
  1759. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1760. }
  1761. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1762. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1763. }
  1764. if invalidParams.Len() > 0 {
  1765. return invalidParams
  1766. }
  1767. return nil
  1768. }
  1769. type IncreaseStreamRetentionPeriodOutput struct {
  1770. _ struct{} `type:"structure"`
  1771. }
  1772. // String returns the string representation
  1773. func (s IncreaseStreamRetentionPeriodOutput) String() string {
  1774. return awsutil.Prettify(s)
  1775. }
  1776. // GoString returns the string representation
  1777. func (s IncreaseStreamRetentionPeriodOutput) GoString() string {
  1778. return s.String()
  1779. }
  1780. // Represents the input for ListStreams.
  1781. type ListStreamsInput struct {
  1782. _ struct{} `type:"structure"`
  1783. // The name of the stream to start the list with.
  1784. ExclusiveStartStreamName *string `min:"1" type:"string"`
  1785. // The maximum number of streams to list.
  1786. Limit *int64 `min:"1" type:"integer"`
  1787. }
  1788. // String returns the string representation
  1789. func (s ListStreamsInput) String() string {
  1790. return awsutil.Prettify(s)
  1791. }
  1792. // GoString returns the string representation
  1793. func (s ListStreamsInput) GoString() string {
  1794. return s.String()
  1795. }
  1796. // Validate inspects the fields of the type to determine if they are valid.
  1797. func (s *ListStreamsInput) Validate() error {
  1798. invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"}
  1799. if s.ExclusiveStartStreamName != nil && len(*s.ExclusiveStartStreamName) < 1 {
  1800. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartStreamName", 1))
  1801. }
  1802. if s.Limit != nil && *s.Limit < 1 {
  1803. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  1804. }
  1805. if invalidParams.Len() > 0 {
  1806. return invalidParams
  1807. }
  1808. return nil
  1809. }
  1810. // Represents the output for ListStreams.
  1811. type ListStreamsOutput struct {
  1812. _ struct{} `type:"structure"`
  1813. // If set to true, there are more streams available to list.
  1814. HasMoreStreams *bool `type:"boolean" required:"true"`
  1815. // The names of the streams that are associated with the AWS account making
  1816. // the ListStreams request.
  1817. StreamNames []*string `type:"list" required:"true"`
  1818. }
  1819. // String returns the string representation
  1820. func (s ListStreamsOutput) String() string {
  1821. return awsutil.Prettify(s)
  1822. }
  1823. // GoString returns the string representation
  1824. func (s ListStreamsOutput) GoString() string {
  1825. return s.String()
  1826. }
  1827. // Represents the input for ListTagsForStream.
  1828. type ListTagsForStreamInput struct {
  1829. _ struct{} `type:"structure"`
  1830. // The key to use as the starting point for the list of tags. If this parameter
  1831. // is set, ListTagsForStream gets all tags that occur after ExclusiveStartTagKey.
  1832. ExclusiveStartTagKey *string `min:"1" type:"string"`
  1833. // The number of tags to return. If this number is less than the total number
  1834. // of tags associated with the stream, HasMoreTags is set to true. To list additional
  1835. // tags, set ExclusiveStartTagKey to the last key in the response.
  1836. Limit *int64 `min:"1" type:"integer"`
  1837. // The name of the stream.
  1838. StreamName *string `min:"1" type:"string" required:"true"`
  1839. }
  1840. // String returns the string representation
  1841. func (s ListTagsForStreamInput) String() string {
  1842. return awsutil.Prettify(s)
  1843. }
  1844. // GoString returns the string representation
  1845. func (s ListTagsForStreamInput) GoString() string {
  1846. return s.String()
  1847. }
  1848. // Validate inspects the fields of the type to determine if they are valid.
  1849. func (s *ListTagsForStreamInput) Validate() error {
  1850. invalidParams := request.ErrInvalidParams{Context: "ListTagsForStreamInput"}
  1851. if s.ExclusiveStartTagKey != nil && len(*s.ExclusiveStartTagKey) < 1 {
  1852. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTagKey", 1))
  1853. }
  1854. if s.Limit != nil && *s.Limit < 1 {
  1855. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  1856. }
  1857. if s.StreamName == nil {
  1858. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1859. }
  1860. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1861. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1862. }
  1863. if invalidParams.Len() > 0 {
  1864. return invalidParams
  1865. }
  1866. return nil
  1867. }
  1868. // Represents the output for ListTagsForStream.
  1869. type ListTagsForStreamOutput struct {
  1870. _ struct{} `type:"structure"`
  1871. // If set to true, more tags are available. To request additional tags, set
  1872. // ExclusiveStartTagKey to the key of the last tag returned.
  1873. HasMoreTags *bool `type:"boolean" required:"true"`
  1874. // A list of tags associated with StreamName, starting with the first tag after
  1875. // ExclusiveStartTagKey and up to the specified Limit.
  1876. Tags []*Tag `type:"list" required:"true"`
  1877. }
  1878. // String returns the string representation
  1879. func (s ListTagsForStreamOutput) String() string {
  1880. return awsutil.Prettify(s)
  1881. }
  1882. // GoString returns the string representation
  1883. func (s ListTagsForStreamOutput) GoString() string {
  1884. return s.String()
  1885. }
  1886. // Represents the input for MergeShards.
  1887. type MergeShardsInput struct {
  1888. _ struct{} `type:"structure"`
  1889. // The shard ID of the adjacent shard for the merge.
  1890. AdjacentShardToMerge *string `min:"1" type:"string" required:"true"`
  1891. // The shard ID of the shard to combine with the adjacent shard for the merge.
  1892. ShardToMerge *string `min:"1" type:"string" required:"true"`
  1893. // The name of the stream for the merge.
  1894. StreamName *string `min:"1" type:"string" required:"true"`
  1895. }
  1896. // String returns the string representation
  1897. func (s MergeShardsInput) String() string {
  1898. return awsutil.Prettify(s)
  1899. }
  1900. // GoString returns the string representation
  1901. func (s MergeShardsInput) GoString() string {
  1902. return s.String()
  1903. }
  1904. // Validate inspects the fields of the type to determine if they are valid.
  1905. func (s *MergeShardsInput) Validate() error {
  1906. invalidParams := request.ErrInvalidParams{Context: "MergeShardsInput"}
  1907. if s.AdjacentShardToMerge == nil {
  1908. invalidParams.Add(request.NewErrParamRequired("AdjacentShardToMerge"))
  1909. }
  1910. if s.AdjacentShardToMerge != nil && len(*s.AdjacentShardToMerge) < 1 {
  1911. invalidParams.Add(request.NewErrParamMinLen("AdjacentShardToMerge", 1))
  1912. }
  1913. if s.ShardToMerge == nil {
  1914. invalidParams.Add(request.NewErrParamRequired("ShardToMerge"))
  1915. }
  1916. if s.ShardToMerge != nil && len(*s.ShardToMerge) < 1 {
  1917. invalidParams.Add(request.NewErrParamMinLen("ShardToMerge", 1))
  1918. }
  1919. if s.StreamName == nil {
  1920. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1921. }
  1922. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1923. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1924. }
  1925. if invalidParams.Len() > 0 {
  1926. return invalidParams
  1927. }
  1928. return nil
  1929. }
  1930. type MergeShardsOutput struct {
  1931. _ struct{} `type:"structure"`
  1932. }
  1933. // String returns the string representation
  1934. func (s MergeShardsOutput) String() string {
  1935. return awsutil.Prettify(s)
  1936. }
  1937. // GoString returns the string representation
  1938. func (s MergeShardsOutput) GoString() string {
  1939. return s.String()
  1940. }
  1941. // Represents the input for PutRecord.
  1942. type PutRecordInput struct {
  1943. _ struct{} `type:"structure"`
  1944. // The data blob to put into the record, which is base64-encoded when the blob
  1945. // is serialized. When the data blob (the payload before base64-encoding) is
  1946. // added to the partition key size, the total size must not exceed the maximum
  1947. // record size (1 MB).
  1948. //
  1949. // Data is automatically base64 encoded/decoded by the SDK.
  1950. Data []byte `type:"blob" required:"true"`
  1951. // The hash value used to explicitly determine the shard the data record is
  1952. // assigned to by overriding the partition key hash.
  1953. ExplicitHashKey *string `type:"string"`
  1954. // Determines which shard in the stream the data record is assigned to. Partition
  1955. // keys are Unicode strings with a maximum length limit of 256 characters for
  1956. // each key. Amazon Kinesis uses the partition key as input to a hash function
  1957. // that maps the partition key and associated data to a specific shard. Specifically,
  1958. // an MD5 hash function is used to map partition keys to 128-bit integer values
  1959. // and to map associated data records to shards. As a result of this hashing
  1960. // mechanism, all data records with the same partition key map to the same shard
  1961. // within the stream.
  1962. PartitionKey *string `min:"1" type:"string" required:"true"`
  1963. // Guarantees strictly increasing sequence numbers, for puts from the same client
  1964. // and to the same partition key. Usage: set the SequenceNumberForOrdering of
  1965. // record n to the sequence number of record n-1 (as returned in the result
  1966. // when putting record n-1). If this parameter is not set, records will be coarsely
  1967. // ordered based on arrival time.
  1968. SequenceNumberForOrdering *string `type:"string"`
  1969. // The name of the stream to put the data record into.
  1970. StreamName *string `min:"1" type:"string" required:"true"`
  1971. }
  1972. // String returns the string representation
  1973. func (s PutRecordInput) String() string {
  1974. return awsutil.Prettify(s)
  1975. }
  1976. // GoString returns the string representation
  1977. func (s PutRecordInput) GoString() string {
  1978. return s.String()
  1979. }
  1980. // Validate inspects the fields of the type to determine if they are valid.
  1981. func (s *PutRecordInput) Validate() error {
  1982. invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"}
  1983. if s.Data == nil {
  1984. invalidParams.Add(request.NewErrParamRequired("Data"))
  1985. }
  1986. if s.PartitionKey == nil {
  1987. invalidParams.Add(request.NewErrParamRequired("PartitionKey"))
  1988. }
  1989. if s.PartitionKey != nil && len(*s.PartitionKey) < 1 {
  1990. invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1))
  1991. }
  1992. if s.StreamName == nil {
  1993. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  1994. }
  1995. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1996. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1997. }
  1998. if invalidParams.Len() > 0 {
  1999. return invalidParams
  2000. }
  2001. return nil
  2002. }
  2003. // Represents the output for PutRecord.
  2004. type PutRecordOutput struct {
  2005. _ struct{} `type:"structure"`
  2006. // The sequence number identifier that was assigned to the put data record.
  2007. // The sequence number for the record is unique across all records in the stream.
  2008. // A sequence number is the identifier associated with every record put into
  2009. // the stream.
  2010. SequenceNumber *string `type:"string" required:"true"`
  2011. // The shard ID of the shard where the data record was placed.
  2012. ShardId *string `min:"1" type:"string" required:"true"`
  2013. }
  2014. // String returns the string representation
  2015. func (s PutRecordOutput) String() string {
  2016. return awsutil.Prettify(s)
  2017. }
  2018. // GoString returns the string representation
  2019. func (s PutRecordOutput) GoString() string {
  2020. return s.String()
  2021. }
  2022. // A PutRecords request.
  2023. type PutRecordsInput struct {
  2024. _ struct{} `type:"structure"`
  2025. // The records associated with the request.
  2026. Records []*PutRecordsRequestEntry `min:"1" type:"list" required:"true"`
  2027. // The stream name associated with the request.
  2028. StreamName *string `min:"1" type:"string" required:"true"`
  2029. }
  2030. // String returns the string representation
  2031. func (s PutRecordsInput) String() string {
  2032. return awsutil.Prettify(s)
  2033. }
  2034. // GoString returns the string representation
  2035. func (s PutRecordsInput) GoString() string {
  2036. return s.String()
  2037. }
  2038. // Validate inspects the fields of the type to determine if they are valid.
  2039. func (s *PutRecordsInput) Validate() error {
  2040. invalidParams := request.ErrInvalidParams{Context: "PutRecordsInput"}
  2041. if s.Records == nil {
  2042. invalidParams.Add(request.NewErrParamRequired("Records"))
  2043. }
  2044. if s.Records != nil && len(s.Records) < 1 {
  2045. invalidParams.Add(request.NewErrParamMinLen("Records", 1))
  2046. }
  2047. if s.StreamName == nil {
  2048. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  2049. }
  2050. if s.StreamName != nil && len(*s.StreamName) < 1 {
  2051. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  2052. }
  2053. if s.Records != nil {
  2054. for i, v := range s.Records {
  2055. if v == nil {
  2056. continue
  2057. }
  2058. if err := v.Validate(); err != nil {
  2059. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams))
  2060. }
  2061. }
  2062. }
  2063. if invalidParams.Len() > 0 {
  2064. return invalidParams
  2065. }
  2066. return nil
  2067. }
  2068. // PutRecords results.
  2069. type PutRecordsOutput struct {
  2070. _ struct{} `type:"structure"`
  2071. // The number of unsuccessfully processed records in a PutRecords request.
  2072. FailedRecordCount *int64 `min:"1" type:"integer"`
  2073. // An array of successfully and unsuccessfully processed record results, correlated
  2074. // with the request by natural ordering. A record that is successfully added
  2075. // to a stream includes SequenceNumber and ShardId in the result. A record that
  2076. // fails to be added to a stream includes ErrorCode and ErrorMessage in the
  2077. // result.
  2078. Records []*PutRecordsResultEntry `min:"1" type:"list" required:"true"`
  2079. }
  2080. // String returns the string representation
  2081. func (s PutRecordsOutput) String() string {
  2082. return awsutil.Prettify(s)
  2083. }
  2084. // GoString returns the string representation
  2085. func (s PutRecordsOutput) GoString() string {
  2086. return s.String()
  2087. }
  2088. // Represents the output for PutRecords.
  2089. type PutRecordsRequestEntry struct {
  2090. _ struct{} `type:"structure"`
  2091. // The data blob to put into the record, which is base64-encoded when the blob
  2092. // is serialized. When the data blob (the payload before base64-encoding) is
  2093. // added to the partition key size, the total size must not exceed the maximum
  2094. // record size (1 MB).
  2095. //
  2096. // Data is automatically base64 encoded/decoded by the SDK.
  2097. Data []byte `type:"blob" required:"true"`
  2098. // The hash value used to determine explicitly the shard that the data record
  2099. // is assigned to by overriding the partition key hash.
  2100. ExplicitHashKey *string `type:"string"`
  2101. // Determines which shard in the stream the data record is assigned to. Partition
  2102. // keys are Unicode strings with a maximum length limit of 256 characters for
  2103. // each key. Amazon Kinesis uses the partition key as input to a hash function
  2104. // that maps the partition key and associated data to a specific shard. Specifically,
  2105. // an MD5 hash function is used to map partition keys to 128-bit integer values
  2106. // and to map associated data records to shards. As a result of this hashing
  2107. // mechanism, all data records with the same partition key map to the same shard
  2108. // within the stream.
  2109. PartitionKey *string `min:"1" type:"string" required:"true"`
  2110. }
  2111. // String returns the string representation
  2112. func (s PutRecordsRequestEntry) String() string {
  2113. return awsutil.Prettify(s)
  2114. }
  2115. // GoString returns the string representation
  2116. func (s PutRecordsRequestEntry) GoString() string {
  2117. return s.String()
  2118. }
  2119. // Validate inspects the fields of the type to determine if they are valid.
  2120. func (s *PutRecordsRequestEntry) Validate() error {
  2121. invalidParams := request.ErrInvalidParams{Context: "PutRecordsRequestEntry"}
  2122. if s.Data == nil {
  2123. invalidParams.Add(request.NewErrParamRequired("Data"))
  2124. }
  2125. if s.PartitionKey == nil {
  2126. invalidParams.Add(request.NewErrParamRequired("PartitionKey"))
  2127. }
  2128. if s.PartitionKey != nil && len(*s.PartitionKey) < 1 {
  2129. invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1))
  2130. }
  2131. if invalidParams.Len() > 0 {
  2132. return invalidParams
  2133. }
  2134. return nil
  2135. }
  2136. // Represents the result of an individual record from a PutRecords request.
  2137. // A record that is successfully added to a stream includes SequenceNumber and
  2138. // ShardId in the result. A record that fails to be added to the stream includes
  2139. // ErrorCode and ErrorMessage in the result.
  2140. type PutRecordsResultEntry struct {
  2141. _ struct{} `type:"structure"`
  2142. // The error code for an individual record result. ErrorCodes can be either
  2143. // ProvisionedThroughputExceededException or InternalFailure.
  2144. ErrorCode *string `type:"string"`
  2145. // The error message for an individual record result. An ErrorCode value of
  2146. // ProvisionedThroughputExceededException has an error message that includes
  2147. // the account ID, stream name, and shard ID. An ErrorCode value of InternalFailure
  2148. // has the error message "Internal Service Failure".
  2149. ErrorMessage *string `type:"string"`
  2150. // The sequence number for an individual record result.
  2151. SequenceNumber *string `type:"string"`
  2152. // The shard ID for an individual record result.
  2153. ShardId *string `min:"1" type:"string"`
  2154. }
  2155. // String returns the string representation
  2156. func (s PutRecordsResultEntry) String() string {
  2157. return awsutil.Prettify(s)
  2158. }
  2159. // GoString returns the string representation
  2160. func (s PutRecordsResultEntry) GoString() string {
  2161. return s.String()
  2162. }
  2163. // The unit of data of the Amazon Kinesis stream, which is composed of a sequence
  2164. // number, a partition key, and a data blob.
  2165. type Record struct {
  2166. _ struct{} `type:"structure"`
  2167. // The approximate time that the record was inserted into the stream.
  2168. ApproximateArrivalTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  2169. // The data blob. The data in the blob is both opaque and immutable to the Amazon
  2170. // Kinesis service, which does not inspect, interpret, or change the data in
  2171. // the blob in any way. When the data blob (the payload before base64-encoding)
  2172. // is added to the partition key size, the total size must not exceed the maximum
  2173. // record size (1 MB).
  2174. //
  2175. // Data is automatically base64 encoded/decoded by the SDK.
  2176. Data []byte `type:"blob" required:"true"`
  2177. // Identifies which shard in the stream the data record is assigned to.
  2178. PartitionKey *string `min:"1" type:"string" required:"true"`
  2179. // The unique identifier of the record in the stream.
  2180. SequenceNumber *string `type:"string" required:"true"`
  2181. }
  2182. // String returns the string representation
  2183. func (s Record) String() string {
  2184. return awsutil.Prettify(s)
  2185. }
  2186. // GoString returns the string representation
  2187. func (s Record) GoString() string {
  2188. return s.String()
  2189. }
  2190. // Represents the input for RemoveTagsFromStream.
  2191. type RemoveTagsFromStreamInput struct {
  2192. _ struct{} `type:"structure"`
  2193. // The name of the stream.
  2194. StreamName *string `min:"1" type:"string" required:"true"`
  2195. // A list of tag keys. Each corresponding tag is removed from the stream.
  2196. TagKeys []*string `min:"1" type:"list" required:"true"`
  2197. }
  2198. // String returns the string representation
  2199. func (s RemoveTagsFromStreamInput) String() string {
  2200. return awsutil.Prettify(s)
  2201. }
  2202. // GoString returns the string representation
  2203. func (s RemoveTagsFromStreamInput) GoString() string {
  2204. return s.String()
  2205. }
  2206. // Validate inspects the fields of the type to determine if they are valid.
  2207. func (s *RemoveTagsFromStreamInput) Validate() error {
  2208. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromStreamInput"}
  2209. if s.StreamName == nil {
  2210. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  2211. }
  2212. if s.StreamName != nil && len(*s.StreamName) < 1 {
  2213. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  2214. }
  2215. if s.TagKeys == nil {
  2216. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  2217. }
  2218. if s.TagKeys != nil && len(s.TagKeys) < 1 {
  2219. invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
  2220. }
  2221. if invalidParams.Len() > 0 {
  2222. return invalidParams
  2223. }
  2224. return nil
  2225. }
  2226. type RemoveTagsFromStreamOutput struct {
  2227. _ struct{} `type:"structure"`
  2228. }
  2229. // String returns the string representation
  2230. func (s RemoveTagsFromStreamOutput) String() string {
  2231. return awsutil.Prettify(s)
  2232. }
  2233. // GoString returns the string representation
  2234. func (s RemoveTagsFromStreamOutput) GoString() string {
  2235. return s.String()
  2236. }
  2237. // The range of possible sequence numbers for the shard.
  2238. type SequenceNumberRange struct {
  2239. _ struct{} `type:"structure"`
  2240. // The ending sequence number for the range. Shards that are in the OPEN state
  2241. // have an ending sequence number of null.
  2242. EndingSequenceNumber *string `type:"string"`
  2243. // The starting sequence number for the range.
  2244. StartingSequenceNumber *string `type:"string" required:"true"`
  2245. }
  2246. // String returns the string representation
  2247. func (s SequenceNumberRange) String() string {
  2248. return awsutil.Prettify(s)
  2249. }
  2250. // GoString returns the string representation
  2251. func (s SequenceNumberRange) GoString() string {
  2252. return s.String()
  2253. }
  2254. // A uniquely identified group of data records in an Amazon Kinesis stream.
  2255. type Shard struct {
  2256. _ struct{} `type:"structure"`
  2257. // The shard ID of the shard adjacent to the shard's parent.
  2258. AdjacentParentShardId *string `min:"1" type:"string"`
  2259. // The range of possible hash key values for the shard, which is a set of ordered
  2260. // contiguous positive integers.
  2261. HashKeyRange *HashKeyRange `type:"structure" required:"true"`
  2262. // The shard ID of the shard's parent.
  2263. ParentShardId *string `min:"1" type:"string"`
  2264. // The range of possible sequence numbers for the shard.
  2265. SequenceNumberRange *SequenceNumberRange `type:"structure" required:"true"`
  2266. // The unique identifier of the shard within the stream.
  2267. ShardId *string `min:"1" type:"string" required:"true"`
  2268. }
  2269. // String returns the string representation
  2270. func (s Shard) String() string {
  2271. return awsutil.Prettify(s)
  2272. }
  2273. // GoString returns the string representation
  2274. func (s Shard) GoString() string {
  2275. return s.String()
  2276. }
  2277. // Represents the input for SplitShard.
  2278. type SplitShardInput struct {
  2279. _ struct{} `type:"structure"`
  2280. // A hash key value for the starting hash key of one of the child shards created
  2281. // by the split. The hash key range for a given shard constitutes a set of ordered
  2282. // contiguous positive integers. The value for NewStartingHashKey must be in
  2283. // the range of hash keys being mapped into the shard. The NewStartingHashKey
  2284. // hash key value and all higher hash key values in hash key range are distributed
  2285. // to one of the child shards. All the lower hash key values in the range are
  2286. // distributed to the other child shard.
  2287. NewStartingHashKey *string `type:"string" required:"true"`
  2288. // The shard ID of the shard to split.
  2289. ShardToSplit *string `min:"1" type:"string" required:"true"`
  2290. // The name of the stream for the shard split.
  2291. StreamName *string `min:"1" type:"string" required:"true"`
  2292. }
  2293. // String returns the string representation
  2294. func (s SplitShardInput) String() string {
  2295. return awsutil.Prettify(s)
  2296. }
  2297. // GoString returns the string representation
  2298. func (s SplitShardInput) GoString() string {
  2299. return s.String()
  2300. }
  2301. // Validate inspects the fields of the type to determine if they are valid.
  2302. func (s *SplitShardInput) Validate() error {
  2303. invalidParams := request.ErrInvalidParams{Context: "SplitShardInput"}
  2304. if s.NewStartingHashKey == nil {
  2305. invalidParams.Add(request.NewErrParamRequired("NewStartingHashKey"))
  2306. }
  2307. if s.ShardToSplit == nil {
  2308. invalidParams.Add(request.NewErrParamRequired("ShardToSplit"))
  2309. }
  2310. if s.ShardToSplit != nil && len(*s.ShardToSplit) < 1 {
  2311. invalidParams.Add(request.NewErrParamMinLen("ShardToSplit", 1))
  2312. }
  2313. if s.StreamName == nil {
  2314. invalidParams.Add(request.NewErrParamRequired("StreamName"))
  2315. }
  2316. if s.StreamName != nil && len(*s.StreamName) < 1 {
  2317. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  2318. }
  2319. if invalidParams.Len() > 0 {
  2320. return invalidParams
  2321. }
  2322. return nil
  2323. }
  2324. type SplitShardOutput struct {
  2325. _ struct{} `type:"structure"`
  2326. }
  2327. // String returns the string representation
  2328. func (s SplitShardOutput) String() string {
  2329. return awsutil.Prettify(s)
  2330. }
  2331. // GoString returns the string representation
  2332. func (s SplitShardOutput) GoString() string {
  2333. return s.String()
  2334. }
  2335. // Represents the output for DescribeStream.
  2336. type StreamDescription struct {
  2337. _ struct{} `type:"structure"`
  2338. // Represents the current enhanced monitoring settings of the stream.
  2339. EnhancedMonitoring []*EnhancedMetrics `type:"list" required:"true"`
  2340. // If set to true, more shards in the stream are available to describe.
  2341. HasMoreShards *bool `type:"boolean" required:"true"`
  2342. // The current retention period, in hours.
  2343. RetentionPeriodHours *int64 `min:"24" type:"integer" required:"true"`
  2344. // The shards that comprise the stream.
  2345. Shards []*Shard `type:"list" required:"true"`
  2346. // The Amazon Resource Name (ARN) for the stream being described.
  2347. StreamARN *string `type:"string" required:"true"`
  2348. // The name of the stream being described.
  2349. StreamName *string `min:"1" type:"string" required:"true"`
  2350. // The current status of the stream being described. The stream status is one
  2351. // of the following states:
  2352. //
  2353. // CREATING - The stream is being created. Amazon Kinesis immediately returns
  2354. // and sets StreamStatus to CREATING. DELETING - The stream is being deleted.
  2355. // The specified stream is in the DELETING state until Amazon Kinesis completes
  2356. // the deletion. ACTIVE - The stream exists and is ready for read and write
  2357. // operations or deletion. You should perform read and write operations only
  2358. // on an ACTIVE stream. UPDATING - Shards in the stream are being merged or
  2359. // split. Read and write operations continue to work while the stream is in
  2360. // the UPDATING state.
  2361. StreamStatus *string `type:"string" required:"true" enum:"StreamStatus"`
  2362. }
  2363. // String returns the string representation
  2364. func (s StreamDescription) String() string {
  2365. return awsutil.Prettify(s)
  2366. }
  2367. // GoString returns the string representation
  2368. func (s StreamDescription) GoString() string {
  2369. return s.String()
  2370. }
  2371. // Metadata assigned to the stream, consisting of a key-value pair.
  2372. type Tag struct {
  2373. _ struct{} `type:"structure"`
  2374. // A unique identifier for the tag. Maximum length: 128 characters. Valid characters:
  2375. // Unicode letters, digits, white space, _ . / = + - % @
  2376. Key *string `min:"1" type:"string" required:"true"`
  2377. // An optional string, typically used to describe or define the tag. Maximum
  2378. // length: 256 characters. Valid characters: Unicode letters, digits, white
  2379. // space, _ . / = + - % @
  2380. Value *string `type:"string"`
  2381. }
  2382. // String returns the string representation
  2383. func (s Tag) String() string {
  2384. return awsutil.Prettify(s)
  2385. }
  2386. // GoString returns the string representation
  2387. func (s Tag) GoString() string {
  2388. return s.String()
  2389. }
  2390. const (
  2391. // @enum MetricsName
  2392. MetricsNameIncomingBytes = "IncomingBytes"
  2393. // @enum MetricsName
  2394. MetricsNameIncomingRecords = "IncomingRecords"
  2395. // @enum MetricsName
  2396. MetricsNameOutgoingBytes = "OutgoingBytes"
  2397. // @enum MetricsName
  2398. MetricsNameOutgoingRecords = "OutgoingRecords"
  2399. // @enum MetricsName
  2400. MetricsNameWriteProvisionedThroughputExceeded = "WriteProvisionedThroughputExceeded"
  2401. // @enum MetricsName
  2402. MetricsNameReadProvisionedThroughputExceeded = "ReadProvisionedThroughputExceeded"
  2403. // @enum MetricsName
  2404. MetricsNameIteratorAgeMilliseconds = "IteratorAgeMilliseconds"
  2405. // @enum MetricsName
  2406. MetricsNameAll = "ALL"
  2407. )
  2408. const (
  2409. // @enum ShardIteratorType
  2410. ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER"
  2411. // @enum ShardIteratorType
  2412. ShardIteratorTypeAfterSequenceNumber = "AFTER_SEQUENCE_NUMBER"
  2413. // @enum ShardIteratorType
  2414. ShardIteratorTypeTrimHorizon = "TRIM_HORIZON"
  2415. // @enum ShardIteratorType
  2416. ShardIteratorTypeLatest = "LATEST"
  2417. // @enum ShardIteratorType
  2418. ShardIteratorTypeAtTimestamp = "AT_TIMESTAMP"
  2419. )
  2420. const (
  2421. // @enum StreamStatus
  2422. StreamStatusCreating = "CREATING"
  2423. // @enum StreamStatus
  2424. StreamStatusDeleting = "DELETING"
  2425. // @enum StreamStatus
  2426. StreamStatusActive = "ACTIVE"
  2427. // @enum StreamStatus
  2428. StreamStatusUpdating = "UPDATING"
  2429. )