api.go 124 KB

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