api.go 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package dynamodbstreams
  3. import (
  4. "time"
  5. "github.com/aws/aws-sdk-go/aws"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/service/dynamodb"
  9. )
  10. const opDescribeStream = "DescribeStream"
  11. // DescribeStreamRequest generates a "aws/request.Request" representing the
  12. // client's request for the DescribeStream operation. The "output" return
  13. // value will be populated with the request's response once the request completes
  14. // successfully.
  15. //
  16. // Use "Send" method on the returned Request to send the API call to the service.
  17. // the "output" return value is not valid until after Send returns without error.
  18. //
  19. // See DescribeStream for more information on using the DescribeStream
  20. // API call, and error handling.
  21. //
  22. // This method is useful when you want to inject custom logic or configuration
  23. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  24. //
  25. //
  26. // // Example sending a request using the DescribeStreamRequest method.
  27. // req, resp := client.DescribeStreamRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. //
  34. // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/DescribeStream
  35. func (c *DynamoDBStreams) DescribeStreamRequest(input *DescribeStreamInput) (req *request.Request, output *DescribeStreamOutput) {
  36. op := &request.Operation{
  37. Name: opDescribeStream,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &DescribeStreamInput{}
  43. }
  44. output = &DescribeStreamOutput{}
  45. req = c.newRequest(op, input, output)
  46. return
  47. }
  48. // DescribeStream API operation for Amazon DynamoDB Streams.
  49. //
  50. // Returns information about a stream, including the current status of the stream,
  51. // its Amazon Resource Name (ARN), the composition of its shards, and its corresponding
  52. // DynamoDB table.
  53. //
  54. // You can call DescribeStream at a maximum rate of 10 times per second.
  55. //
  56. // Each shard in the stream has a SequenceNumberRange associated with it. If
  57. // the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber,
  58. // then the shard is still open (able to receive more stream records). If both
  59. // StartingSequenceNumber and EndingSequenceNumber are present, then that shard
  60. // is closed and can no longer receive more data.
  61. //
  62. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  63. // with awserr.Error's Code and Message methods to get detailed information about
  64. // the error.
  65. //
  66. // See the AWS API reference guide for Amazon DynamoDB Streams's
  67. // API operation DescribeStream for usage and error information.
  68. //
  69. // Returned Error Codes:
  70. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  71. // The operation tried to access a nonexistent stream.
  72. //
  73. // * ErrCodeInternalServerError "InternalServerError"
  74. // An error occurred on the server side.
  75. //
  76. // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/DescribeStream
  77. func (c *DynamoDBStreams) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) {
  78. req, out := c.DescribeStreamRequest(input)
  79. return out, req.Send()
  80. }
  81. // DescribeStreamWithContext is the same as DescribeStream with the addition of
  82. // the ability to pass a context and additional request options.
  83. //
  84. // See DescribeStream for details on how to use this API operation.
  85. //
  86. // The context must be non-nil and will be used for request cancellation. If
  87. // the context is nil a panic will occur. In the future the SDK may create
  88. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  89. // for more information on using Contexts.
  90. func (c *DynamoDBStreams) DescribeStreamWithContext(ctx aws.Context, input *DescribeStreamInput, opts ...request.Option) (*DescribeStreamOutput, error) {
  91. req, out := c.DescribeStreamRequest(input)
  92. req.SetContext(ctx)
  93. req.ApplyOptions(opts...)
  94. return out, req.Send()
  95. }
  96. const opGetRecords = "GetRecords"
  97. // GetRecordsRequest generates a "aws/request.Request" representing the
  98. // client's request for the GetRecords operation. The "output" return
  99. // value will be populated with the request's response once the request completes
  100. // successfully.
  101. //
  102. // Use "Send" method on the returned Request to send the API call to the service.
  103. // the "output" return value is not valid until after Send returns without error.
  104. //
  105. // See GetRecords for more information on using the GetRecords
  106. // API call, and error handling.
  107. //
  108. // This method is useful when you want to inject custom logic or configuration
  109. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  110. //
  111. //
  112. // // Example sending a request using the GetRecordsRequest method.
  113. // req, resp := client.GetRecordsRequest(params)
  114. //
  115. // err := req.Send()
  116. // if err == nil { // resp is now filled
  117. // fmt.Println(resp)
  118. // }
  119. //
  120. // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetRecords
  121. func (c *DynamoDBStreams) GetRecordsRequest(input *GetRecordsInput) (req *request.Request, output *GetRecordsOutput) {
  122. op := &request.Operation{
  123. Name: opGetRecords,
  124. HTTPMethod: "POST",
  125. HTTPPath: "/",
  126. }
  127. if input == nil {
  128. input = &GetRecordsInput{}
  129. }
  130. output = &GetRecordsOutput{}
  131. req = c.newRequest(op, input, output)
  132. return
  133. }
  134. // GetRecords API operation for Amazon DynamoDB Streams.
  135. //
  136. // Retrieves the stream records from a given shard.
  137. //
  138. // Specify a shard iterator using the ShardIterator parameter. The shard iterator
  139. // specifies the position in the shard from which you want to start reading
  140. // stream records sequentially. If there are no stream records available in
  141. // the portion of the shard that the iterator points to, GetRecords returns
  142. // an empty list. Note that it might take multiple calls to get to a portion
  143. // of the shard that contains stream records.
  144. //
  145. // GetRecords can retrieve a maximum of 1 MB of data or 1000 stream records,
  146. // whichever comes first.
  147. //
  148. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  149. // with awserr.Error's Code and Message methods to get detailed information about
  150. // the error.
  151. //
  152. // See the AWS API reference guide for Amazon DynamoDB Streams's
  153. // API operation GetRecords for usage and error information.
  154. //
  155. // Returned Error Codes:
  156. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  157. // The operation tried to access a nonexistent stream.
  158. //
  159. // * ErrCodeLimitExceededException "LimitExceededException"
  160. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  161. // requests that receive this exception. Your request is eventually successful,
  162. // unless your retry queue is too large to finish. Reduce the frequency of requests
  163. // and use exponential backoff. For more information, go to Error Retries and
  164. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#APIRetries)
  165. // in the Amazon DynamoDB Developer Guide.
  166. //
  167. // * ErrCodeInternalServerError "InternalServerError"
  168. // An error occurred on the server side.
  169. //
  170. // * ErrCodeExpiredIteratorException "ExpiredIteratorException"
  171. // The shard iterator has expired and can no longer be used to retrieve stream
  172. // records. A shard iterator expires 15 minutes after it is retrieved using
  173. // the GetShardIterator action.
  174. //
  175. // * ErrCodeTrimmedDataAccessException "TrimmedDataAccessException"
  176. // The operation attempted to read past the oldest stream record in a shard.
  177. //
  178. // In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records
  179. // whose age exceeds this limit are subject to removal (trimming) from the stream.
  180. // You might receive a TrimmedDataAccessException if:
  181. //
  182. // * You request a shard iterator with a sequence number older than the trim
  183. // point (24 hours).
  184. //
  185. // * You obtain a shard iterator, but before you use the iterator in a GetRecords
  186. // request, a stream record in the shard exceeds the 24 hour period and is
  187. // trimmed. This causes the iterator to access a record that no longer exists.
  188. //
  189. // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetRecords
  190. func (c *DynamoDBStreams) GetRecords(input *GetRecordsInput) (*GetRecordsOutput, error) {
  191. req, out := c.GetRecordsRequest(input)
  192. return out, req.Send()
  193. }
  194. // GetRecordsWithContext is the same as GetRecords with the addition of
  195. // the ability to pass a context and additional request options.
  196. //
  197. // See GetRecords for details on how to use this API operation.
  198. //
  199. // The context must be non-nil and will be used for request cancellation. If
  200. // the context is nil a panic will occur. In the future the SDK may create
  201. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  202. // for more information on using Contexts.
  203. func (c *DynamoDBStreams) GetRecordsWithContext(ctx aws.Context, input *GetRecordsInput, opts ...request.Option) (*GetRecordsOutput, error) {
  204. req, out := c.GetRecordsRequest(input)
  205. req.SetContext(ctx)
  206. req.ApplyOptions(opts...)
  207. return out, req.Send()
  208. }
  209. const opGetShardIterator = "GetShardIterator"
  210. // GetShardIteratorRequest generates a "aws/request.Request" representing the
  211. // client's request for the GetShardIterator operation. The "output" return
  212. // value will be populated with the request's response once the request completes
  213. // successfully.
  214. //
  215. // Use "Send" method on the returned Request to send the API call to the service.
  216. // the "output" return value is not valid until after Send returns without error.
  217. //
  218. // See GetShardIterator for more information on using the GetShardIterator
  219. // API call, and error handling.
  220. //
  221. // This method is useful when you want to inject custom logic or configuration
  222. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  223. //
  224. //
  225. // // Example sending a request using the GetShardIteratorRequest method.
  226. // req, resp := client.GetShardIteratorRequest(params)
  227. //
  228. // err := req.Send()
  229. // if err == nil { // resp is now filled
  230. // fmt.Println(resp)
  231. // }
  232. //
  233. // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetShardIterator
  234. func (c *DynamoDBStreams) GetShardIteratorRequest(input *GetShardIteratorInput) (req *request.Request, output *GetShardIteratorOutput) {
  235. op := &request.Operation{
  236. Name: opGetShardIterator,
  237. HTTPMethod: "POST",
  238. HTTPPath: "/",
  239. }
  240. if input == nil {
  241. input = &GetShardIteratorInput{}
  242. }
  243. output = &GetShardIteratorOutput{}
  244. req = c.newRequest(op, input, output)
  245. return
  246. }
  247. // GetShardIterator API operation for Amazon DynamoDB Streams.
  248. //
  249. // Returns a shard iterator. A shard iterator provides information about how
  250. // to retrieve the stream records from within a shard. Use the shard iterator
  251. // in a subsequent GetRecords request to read the stream records from the shard.
  252. //
  253. // A shard iterator expires 15 minutes after it is returned to the requester.
  254. //
  255. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  256. // with awserr.Error's Code and Message methods to get detailed information about
  257. // the error.
  258. //
  259. // See the AWS API reference guide for Amazon DynamoDB Streams's
  260. // API operation GetShardIterator for usage and error information.
  261. //
  262. // Returned Error Codes:
  263. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  264. // The operation tried to access a nonexistent stream.
  265. //
  266. // * ErrCodeInternalServerError "InternalServerError"
  267. // An error occurred on the server side.
  268. //
  269. // * ErrCodeTrimmedDataAccessException "TrimmedDataAccessException"
  270. // The operation attempted to read past the oldest stream record in a shard.
  271. //
  272. // In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records
  273. // whose age exceeds this limit are subject to removal (trimming) from the stream.
  274. // You might receive a TrimmedDataAccessException if:
  275. //
  276. // * You request a shard iterator with a sequence number older than the trim
  277. // point (24 hours).
  278. //
  279. // * You obtain a shard iterator, but before you use the iterator in a GetRecords
  280. // request, a stream record in the shard exceeds the 24 hour period and is
  281. // trimmed. This causes the iterator to access a record that no longer exists.
  282. //
  283. // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetShardIterator
  284. func (c *DynamoDBStreams) GetShardIterator(input *GetShardIteratorInput) (*GetShardIteratorOutput, error) {
  285. req, out := c.GetShardIteratorRequest(input)
  286. return out, req.Send()
  287. }
  288. // GetShardIteratorWithContext is the same as GetShardIterator with the addition of
  289. // the ability to pass a context and additional request options.
  290. //
  291. // See GetShardIterator for details on how to use this API operation.
  292. //
  293. // The context must be non-nil and will be used for request cancellation. If
  294. // the context is nil a panic will occur. In the future the SDK may create
  295. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  296. // for more information on using Contexts.
  297. func (c *DynamoDBStreams) GetShardIteratorWithContext(ctx aws.Context, input *GetShardIteratorInput, opts ...request.Option) (*GetShardIteratorOutput, error) {
  298. req, out := c.GetShardIteratorRequest(input)
  299. req.SetContext(ctx)
  300. req.ApplyOptions(opts...)
  301. return out, req.Send()
  302. }
  303. const opListStreams = "ListStreams"
  304. // ListStreamsRequest generates a "aws/request.Request" representing the
  305. // client's request for the ListStreams operation. The "output" return
  306. // value will be populated with the request's response once the request completes
  307. // successfully.
  308. //
  309. // Use "Send" method on the returned Request to send the API call to the service.
  310. // the "output" return value is not valid until after Send returns without error.
  311. //
  312. // See ListStreams for more information on using the ListStreams
  313. // API call, and error handling.
  314. //
  315. // This method is useful when you want to inject custom logic or configuration
  316. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  317. //
  318. //
  319. // // Example sending a request using the ListStreamsRequest method.
  320. // req, resp := client.ListStreamsRequest(params)
  321. //
  322. // err := req.Send()
  323. // if err == nil { // resp is now filled
  324. // fmt.Println(resp)
  325. // }
  326. //
  327. // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/ListStreams
  328. func (c *DynamoDBStreams) ListStreamsRequest(input *ListStreamsInput) (req *request.Request, output *ListStreamsOutput) {
  329. op := &request.Operation{
  330. Name: opListStreams,
  331. HTTPMethod: "POST",
  332. HTTPPath: "/",
  333. }
  334. if input == nil {
  335. input = &ListStreamsInput{}
  336. }
  337. output = &ListStreamsOutput{}
  338. req = c.newRequest(op, input, output)
  339. return
  340. }
  341. // ListStreams API operation for Amazon DynamoDB Streams.
  342. //
  343. // Returns an array of stream ARNs associated with the current account and endpoint.
  344. // If the TableName parameter is present, then ListStreams will return only
  345. // the streams ARNs for that table.
  346. //
  347. // You can call ListStreams at a maximum rate of 5 times per second.
  348. //
  349. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  350. // with awserr.Error's Code and Message methods to get detailed information about
  351. // the error.
  352. //
  353. // See the AWS API reference guide for Amazon DynamoDB Streams's
  354. // API operation ListStreams for usage and error information.
  355. //
  356. // Returned Error Codes:
  357. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  358. // The operation tried to access a nonexistent stream.
  359. //
  360. // * ErrCodeInternalServerError "InternalServerError"
  361. // An error occurred on the server side.
  362. //
  363. // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/ListStreams
  364. func (c *DynamoDBStreams) ListStreams(input *ListStreamsInput) (*ListStreamsOutput, error) {
  365. req, out := c.ListStreamsRequest(input)
  366. return out, req.Send()
  367. }
  368. // ListStreamsWithContext is the same as ListStreams with the addition of
  369. // the ability to pass a context and additional request options.
  370. //
  371. // See ListStreams for details on how to use this API operation.
  372. //
  373. // The context must be non-nil and will be used for request cancellation. If
  374. // the context is nil a panic will occur. In the future the SDK may create
  375. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  376. // for more information on using Contexts.
  377. func (c *DynamoDBStreams) ListStreamsWithContext(ctx aws.Context, input *ListStreamsInput, opts ...request.Option) (*ListStreamsOutput, error) {
  378. req, out := c.ListStreamsRequest(input)
  379. req.SetContext(ctx)
  380. req.ApplyOptions(opts...)
  381. return out, req.Send()
  382. }
  383. // Represents the input of a DescribeStream operation.
  384. type DescribeStreamInput struct {
  385. _ struct{} `type:"structure"`
  386. // The shard ID of the first item that this operation will evaluate. Use the
  387. // value that was returned for LastEvaluatedShardId in the previous operation.
  388. ExclusiveStartShardId *string `min:"28" type:"string"`
  389. // The maximum number of shard objects to return. The upper limit is 100.
  390. Limit *int64 `min:"1" type:"integer"`
  391. // The Amazon Resource Name (ARN) for the stream.
  392. //
  393. // StreamArn is a required field
  394. StreamArn *string `min:"37" type:"string" required:"true"`
  395. }
  396. // String returns the string representation
  397. func (s DescribeStreamInput) String() string {
  398. return awsutil.Prettify(s)
  399. }
  400. // GoString returns the string representation
  401. func (s DescribeStreamInput) GoString() string {
  402. return s.String()
  403. }
  404. // Validate inspects the fields of the type to determine if they are valid.
  405. func (s *DescribeStreamInput) Validate() error {
  406. invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"}
  407. if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 28 {
  408. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 28))
  409. }
  410. if s.Limit != nil && *s.Limit < 1 {
  411. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  412. }
  413. if s.StreamArn == nil {
  414. invalidParams.Add(request.NewErrParamRequired("StreamArn"))
  415. }
  416. if s.StreamArn != nil && len(*s.StreamArn) < 37 {
  417. invalidParams.Add(request.NewErrParamMinLen("StreamArn", 37))
  418. }
  419. if invalidParams.Len() > 0 {
  420. return invalidParams
  421. }
  422. return nil
  423. }
  424. // SetExclusiveStartShardId sets the ExclusiveStartShardId field's value.
  425. func (s *DescribeStreamInput) SetExclusiveStartShardId(v string) *DescribeStreamInput {
  426. s.ExclusiveStartShardId = &v
  427. return s
  428. }
  429. // SetLimit sets the Limit field's value.
  430. func (s *DescribeStreamInput) SetLimit(v int64) *DescribeStreamInput {
  431. s.Limit = &v
  432. return s
  433. }
  434. // SetStreamArn sets the StreamArn field's value.
  435. func (s *DescribeStreamInput) SetStreamArn(v string) *DescribeStreamInput {
  436. s.StreamArn = &v
  437. return s
  438. }
  439. // Represents the output of a DescribeStream operation.
  440. type DescribeStreamOutput struct {
  441. _ struct{} `type:"structure"`
  442. // A complete description of the stream, including its creation date and time,
  443. // the DynamoDB table associated with the stream, the shard IDs within the stream,
  444. // and the beginning and ending sequence numbers of stream records within the
  445. // shards.
  446. StreamDescription *StreamDescription `type:"structure"`
  447. }
  448. // String returns the string representation
  449. func (s DescribeStreamOutput) String() string {
  450. return awsutil.Prettify(s)
  451. }
  452. // GoString returns the string representation
  453. func (s DescribeStreamOutput) GoString() string {
  454. return s.String()
  455. }
  456. // SetStreamDescription sets the StreamDescription field's value.
  457. func (s *DescribeStreamOutput) SetStreamDescription(v *StreamDescription) *DescribeStreamOutput {
  458. s.StreamDescription = v
  459. return s
  460. }
  461. // Represents the input of a GetRecords operation.
  462. type GetRecordsInput struct {
  463. _ struct{} `type:"structure"`
  464. // The maximum number of records to return from the shard. The upper limit is
  465. // 1000.
  466. Limit *int64 `min:"1" type:"integer"`
  467. // A shard iterator that was retrieved from a previous GetShardIterator operation.
  468. // This iterator can be used to access the stream records in this shard.
  469. //
  470. // ShardIterator is a required field
  471. ShardIterator *string `min:"1" type:"string" required:"true"`
  472. }
  473. // String returns the string representation
  474. func (s GetRecordsInput) String() string {
  475. return awsutil.Prettify(s)
  476. }
  477. // GoString returns the string representation
  478. func (s GetRecordsInput) GoString() string {
  479. return s.String()
  480. }
  481. // Validate inspects the fields of the type to determine if they are valid.
  482. func (s *GetRecordsInput) Validate() error {
  483. invalidParams := request.ErrInvalidParams{Context: "GetRecordsInput"}
  484. if s.Limit != nil && *s.Limit < 1 {
  485. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  486. }
  487. if s.ShardIterator == nil {
  488. invalidParams.Add(request.NewErrParamRequired("ShardIterator"))
  489. }
  490. if s.ShardIterator != nil && len(*s.ShardIterator) < 1 {
  491. invalidParams.Add(request.NewErrParamMinLen("ShardIterator", 1))
  492. }
  493. if invalidParams.Len() > 0 {
  494. return invalidParams
  495. }
  496. return nil
  497. }
  498. // SetLimit sets the Limit field's value.
  499. func (s *GetRecordsInput) SetLimit(v int64) *GetRecordsInput {
  500. s.Limit = &v
  501. return s
  502. }
  503. // SetShardIterator sets the ShardIterator field's value.
  504. func (s *GetRecordsInput) SetShardIterator(v string) *GetRecordsInput {
  505. s.ShardIterator = &v
  506. return s
  507. }
  508. // Represents the output of a GetRecords operation.
  509. type GetRecordsOutput struct {
  510. _ struct{} `type:"structure"`
  511. // The next position in the shard from which to start sequentially reading stream
  512. // records. If set to null, the shard has been closed and the requested iterator
  513. // will not return any more data.
  514. NextShardIterator *string `min:"1" type:"string"`
  515. // The stream records from the shard, which were retrieved using the shard iterator.
  516. Records []*Record `type:"list"`
  517. }
  518. // String returns the string representation
  519. func (s GetRecordsOutput) String() string {
  520. return awsutil.Prettify(s)
  521. }
  522. // GoString returns the string representation
  523. func (s GetRecordsOutput) GoString() string {
  524. return s.String()
  525. }
  526. // SetNextShardIterator sets the NextShardIterator field's value.
  527. func (s *GetRecordsOutput) SetNextShardIterator(v string) *GetRecordsOutput {
  528. s.NextShardIterator = &v
  529. return s
  530. }
  531. // SetRecords sets the Records field's value.
  532. func (s *GetRecordsOutput) SetRecords(v []*Record) *GetRecordsOutput {
  533. s.Records = v
  534. return s
  535. }
  536. // Represents the input of a GetShardIterator operation.
  537. type GetShardIteratorInput struct {
  538. _ struct{} `type:"structure"`
  539. // The sequence number of a stream record in the shard from which to start reading.
  540. SequenceNumber *string `min:"21" type:"string"`
  541. // The identifier of the shard. The iterator will be returned for this shard
  542. // ID.
  543. //
  544. // ShardId is a required field
  545. ShardId *string `min:"28" type:"string" required:"true"`
  546. // Determines how the shard iterator is used to start reading stream records
  547. // from the shard:
  548. //
  549. // * AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted
  550. // by a specific sequence number.
  551. //
  552. // * AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted
  553. // by a specific sequence number.
  554. //
  555. // * TRIM_HORIZON - Start reading at the last (untrimmed) stream record,
  556. // which is the oldest record in the shard. In DynamoDB Streams, there is
  557. // a 24 hour limit on data retention. Stream records whose age exceeds this
  558. // limit are subject to removal (trimming) from the stream.
  559. //
  560. // * LATEST - Start reading just after the most recent stream record in the
  561. // shard, so that you always read the most recent data in the shard.
  562. //
  563. // ShardIteratorType is a required field
  564. ShardIteratorType *string `type:"string" required:"true" enum:"ShardIteratorType"`
  565. // The Amazon Resource Name (ARN) for the stream.
  566. //
  567. // StreamArn is a required field
  568. StreamArn *string `min:"37" type:"string" required:"true"`
  569. }
  570. // String returns the string representation
  571. func (s GetShardIteratorInput) String() string {
  572. return awsutil.Prettify(s)
  573. }
  574. // GoString returns the string representation
  575. func (s GetShardIteratorInput) GoString() string {
  576. return s.String()
  577. }
  578. // Validate inspects the fields of the type to determine if they are valid.
  579. func (s *GetShardIteratorInput) Validate() error {
  580. invalidParams := request.ErrInvalidParams{Context: "GetShardIteratorInput"}
  581. if s.SequenceNumber != nil && len(*s.SequenceNumber) < 21 {
  582. invalidParams.Add(request.NewErrParamMinLen("SequenceNumber", 21))
  583. }
  584. if s.ShardId == nil {
  585. invalidParams.Add(request.NewErrParamRequired("ShardId"))
  586. }
  587. if s.ShardId != nil && len(*s.ShardId) < 28 {
  588. invalidParams.Add(request.NewErrParamMinLen("ShardId", 28))
  589. }
  590. if s.ShardIteratorType == nil {
  591. invalidParams.Add(request.NewErrParamRequired("ShardIteratorType"))
  592. }
  593. if s.StreamArn == nil {
  594. invalidParams.Add(request.NewErrParamRequired("StreamArn"))
  595. }
  596. if s.StreamArn != nil && len(*s.StreamArn) < 37 {
  597. invalidParams.Add(request.NewErrParamMinLen("StreamArn", 37))
  598. }
  599. if invalidParams.Len() > 0 {
  600. return invalidParams
  601. }
  602. return nil
  603. }
  604. // SetSequenceNumber sets the SequenceNumber field's value.
  605. func (s *GetShardIteratorInput) SetSequenceNumber(v string) *GetShardIteratorInput {
  606. s.SequenceNumber = &v
  607. return s
  608. }
  609. // SetShardId sets the ShardId field's value.
  610. func (s *GetShardIteratorInput) SetShardId(v string) *GetShardIteratorInput {
  611. s.ShardId = &v
  612. return s
  613. }
  614. // SetShardIteratorType sets the ShardIteratorType field's value.
  615. func (s *GetShardIteratorInput) SetShardIteratorType(v string) *GetShardIteratorInput {
  616. s.ShardIteratorType = &v
  617. return s
  618. }
  619. // SetStreamArn sets the StreamArn field's value.
  620. func (s *GetShardIteratorInput) SetStreamArn(v string) *GetShardIteratorInput {
  621. s.StreamArn = &v
  622. return s
  623. }
  624. // Represents the output of a GetShardIterator operation.
  625. type GetShardIteratorOutput struct {
  626. _ struct{} `type:"structure"`
  627. // The position in the shard from which to start reading stream records sequentially.
  628. // A shard iterator specifies this position using the sequence number of a stream
  629. // record in a shard.
  630. ShardIterator *string `min:"1" type:"string"`
  631. }
  632. // String returns the string representation
  633. func (s GetShardIteratorOutput) String() string {
  634. return awsutil.Prettify(s)
  635. }
  636. // GoString returns the string representation
  637. func (s GetShardIteratorOutput) GoString() string {
  638. return s.String()
  639. }
  640. // SetShardIterator sets the ShardIterator field's value.
  641. func (s *GetShardIteratorOutput) SetShardIterator(v string) *GetShardIteratorOutput {
  642. s.ShardIterator = &v
  643. return s
  644. }
  645. // Contains details about the type of identity that made the request.
  646. type Identity struct {
  647. _ struct{} `type:"structure"`
  648. // A unique identifier for the entity that made the call. For Time To Live,
  649. // the principalId is "dynamodb.amazonaws.com".
  650. PrincipalId *string `type:"string"`
  651. // The type of the identity. For Time To Live, the type is "Service".
  652. Type *string `type:"string"`
  653. }
  654. // String returns the string representation
  655. func (s Identity) String() string {
  656. return awsutil.Prettify(s)
  657. }
  658. // GoString returns the string representation
  659. func (s Identity) GoString() string {
  660. return s.String()
  661. }
  662. // SetPrincipalId sets the PrincipalId field's value.
  663. func (s *Identity) SetPrincipalId(v string) *Identity {
  664. s.PrincipalId = &v
  665. return s
  666. }
  667. // SetType sets the Type field's value.
  668. func (s *Identity) SetType(v string) *Identity {
  669. s.Type = &v
  670. return s
  671. }
  672. // Represents the input of a ListStreams operation.
  673. type ListStreamsInput struct {
  674. _ struct{} `type:"structure"`
  675. // The ARN (Amazon Resource Name) of the first item that this operation will
  676. // evaluate. Use the value that was returned for LastEvaluatedStreamArn in the
  677. // previous operation.
  678. ExclusiveStartStreamArn *string `min:"37" type:"string"`
  679. // The maximum number of streams to return. The upper limit is 100.
  680. Limit *int64 `min:"1" type:"integer"`
  681. // If this parameter is provided, then only the streams associated with this
  682. // table name are returned.
  683. TableName *string `min:"3" type:"string"`
  684. }
  685. // String returns the string representation
  686. func (s ListStreamsInput) String() string {
  687. return awsutil.Prettify(s)
  688. }
  689. // GoString returns the string representation
  690. func (s ListStreamsInput) GoString() string {
  691. return s.String()
  692. }
  693. // Validate inspects the fields of the type to determine if they are valid.
  694. func (s *ListStreamsInput) Validate() error {
  695. invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"}
  696. if s.ExclusiveStartStreamArn != nil && len(*s.ExclusiveStartStreamArn) < 37 {
  697. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartStreamArn", 37))
  698. }
  699. if s.Limit != nil && *s.Limit < 1 {
  700. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  701. }
  702. if s.TableName != nil && len(*s.TableName) < 3 {
  703. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  704. }
  705. if invalidParams.Len() > 0 {
  706. return invalidParams
  707. }
  708. return nil
  709. }
  710. // SetExclusiveStartStreamArn sets the ExclusiveStartStreamArn field's value.
  711. func (s *ListStreamsInput) SetExclusiveStartStreamArn(v string) *ListStreamsInput {
  712. s.ExclusiveStartStreamArn = &v
  713. return s
  714. }
  715. // SetLimit sets the Limit field's value.
  716. func (s *ListStreamsInput) SetLimit(v int64) *ListStreamsInput {
  717. s.Limit = &v
  718. return s
  719. }
  720. // SetTableName sets the TableName field's value.
  721. func (s *ListStreamsInput) SetTableName(v string) *ListStreamsInput {
  722. s.TableName = &v
  723. return s
  724. }
  725. // Represents the output of a ListStreams operation.
  726. type ListStreamsOutput struct {
  727. _ struct{} `type:"structure"`
  728. // The stream ARN of the item where the operation stopped, inclusive of the
  729. // previous result set. Use this value to start a new operation, excluding this
  730. // value in the new request.
  731. //
  732. // If LastEvaluatedStreamArn is empty, then the "last page" of results has been
  733. // processed and there is no more data to be retrieved.
  734. //
  735. // If LastEvaluatedStreamArn is not empty, it does not necessarily mean that
  736. // there is more data in the result set. The only way to know when you have
  737. // reached the end of the result set is when LastEvaluatedStreamArn is empty.
  738. LastEvaluatedStreamArn *string `min:"37" type:"string"`
  739. // A list of stream descriptors associated with the current account and endpoint.
  740. Streams []*Stream `type:"list"`
  741. }
  742. // String returns the string representation
  743. func (s ListStreamsOutput) String() string {
  744. return awsutil.Prettify(s)
  745. }
  746. // GoString returns the string representation
  747. func (s ListStreamsOutput) GoString() string {
  748. return s.String()
  749. }
  750. // SetLastEvaluatedStreamArn sets the LastEvaluatedStreamArn field's value.
  751. func (s *ListStreamsOutput) SetLastEvaluatedStreamArn(v string) *ListStreamsOutput {
  752. s.LastEvaluatedStreamArn = &v
  753. return s
  754. }
  755. // SetStreams sets the Streams field's value.
  756. func (s *ListStreamsOutput) SetStreams(v []*Stream) *ListStreamsOutput {
  757. s.Streams = v
  758. return s
  759. }
  760. // A description of a unique event within a stream.
  761. type Record struct {
  762. _ struct{} `type:"structure"`
  763. // The region in which the GetRecords request was received.
  764. AwsRegion *string `locationName:"awsRegion" type:"string"`
  765. // The main body of the stream record, containing all of the DynamoDB-specific
  766. // fields.
  767. Dynamodb *StreamRecord `locationName:"dynamodb" type:"structure"`
  768. // A globally unique identifier for the event that was recorded in this stream
  769. // record.
  770. EventID *string `locationName:"eventID" type:"string"`
  771. // The type of data modification that was performed on the DynamoDB table:
  772. //
  773. // * INSERT - a new item was added to the table.
  774. //
  775. // * MODIFY - one or more of an existing item's attributes were modified.
  776. //
  777. // * REMOVE - the item was deleted from the table
  778. EventName *string `locationName:"eventName" type:"string" enum:"OperationType"`
  779. // The AWS service from which the stream record originated. For DynamoDB Streams,
  780. // this is aws:dynamodb.
  781. EventSource *string `locationName:"eventSource" type:"string"`
  782. // The version number of the stream record format. This number is updated whenever
  783. // the structure of Record is modified.
  784. //
  785. // Client applications must not assume that eventVersion will remain at a particular
  786. // value, as this number is subject to change at any time. In general, eventVersion
  787. // will only increase as the low-level DynamoDB Streams API evolves.
  788. EventVersion *string `locationName:"eventVersion" type:"string"`
  789. // Items that are deleted by the Time to Live process after expiration have
  790. // the following fields:
  791. //
  792. // * Records[].userIdentity.type
  793. //
  794. // "Service"
  795. //
  796. // * Records[].userIdentity.principalId
  797. //
  798. // "dynamodb.amazonaws.com"
  799. UserIdentity *Identity `locationName:"userIdentity" type:"structure"`
  800. }
  801. // String returns the string representation
  802. func (s Record) String() string {
  803. return awsutil.Prettify(s)
  804. }
  805. // GoString returns the string representation
  806. func (s Record) GoString() string {
  807. return s.String()
  808. }
  809. // SetAwsRegion sets the AwsRegion field's value.
  810. func (s *Record) SetAwsRegion(v string) *Record {
  811. s.AwsRegion = &v
  812. return s
  813. }
  814. // SetDynamodb sets the Dynamodb field's value.
  815. func (s *Record) SetDynamodb(v *StreamRecord) *Record {
  816. s.Dynamodb = v
  817. return s
  818. }
  819. // SetEventID sets the EventID field's value.
  820. func (s *Record) SetEventID(v string) *Record {
  821. s.EventID = &v
  822. return s
  823. }
  824. // SetEventName sets the EventName field's value.
  825. func (s *Record) SetEventName(v string) *Record {
  826. s.EventName = &v
  827. return s
  828. }
  829. // SetEventSource sets the EventSource field's value.
  830. func (s *Record) SetEventSource(v string) *Record {
  831. s.EventSource = &v
  832. return s
  833. }
  834. // SetEventVersion sets the EventVersion field's value.
  835. func (s *Record) SetEventVersion(v string) *Record {
  836. s.EventVersion = &v
  837. return s
  838. }
  839. // SetUserIdentity sets the UserIdentity field's value.
  840. func (s *Record) SetUserIdentity(v *Identity) *Record {
  841. s.UserIdentity = v
  842. return s
  843. }
  844. // The beginning and ending sequence numbers for the stream records contained
  845. // within a shard.
  846. type SequenceNumberRange struct {
  847. _ struct{} `type:"structure"`
  848. // The last sequence number.
  849. EndingSequenceNumber *string `min:"21" type:"string"`
  850. // The first sequence number.
  851. StartingSequenceNumber *string `min:"21" type:"string"`
  852. }
  853. // String returns the string representation
  854. func (s SequenceNumberRange) String() string {
  855. return awsutil.Prettify(s)
  856. }
  857. // GoString returns the string representation
  858. func (s SequenceNumberRange) GoString() string {
  859. return s.String()
  860. }
  861. // SetEndingSequenceNumber sets the EndingSequenceNumber field's value.
  862. func (s *SequenceNumberRange) SetEndingSequenceNumber(v string) *SequenceNumberRange {
  863. s.EndingSequenceNumber = &v
  864. return s
  865. }
  866. // SetStartingSequenceNumber sets the StartingSequenceNumber field's value.
  867. func (s *SequenceNumberRange) SetStartingSequenceNumber(v string) *SequenceNumberRange {
  868. s.StartingSequenceNumber = &v
  869. return s
  870. }
  871. // A uniquely identified group of stream records within a stream.
  872. type Shard struct {
  873. _ struct{} `type:"structure"`
  874. // The shard ID of the current shard's parent.
  875. ParentShardId *string `min:"28" type:"string"`
  876. // The range of possible sequence numbers for the shard.
  877. SequenceNumberRange *SequenceNumberRange `type:"structure"`
  878. // The system-generated identifier for this shard.
  879. ShardId *string `min:"28" type:"string"`
  880. }
  881. // String returns the string representation
  882. func (s Shard) String() string {
  883. return awsutil.Prettify(s)
  884. }
  885. // GoString returns the string representation
  886. func (s Shard) GoString() string {
  887. return s.String()
  888. }
  889. // SetParentShardId sets the ParentShardId field's value.
  890. func (s *Shard) SetParentShardId(v string) *Shard {
  891. s.ParentShardId = &v
  892. return s
  893. }
  894. // SetSequenceNumberRange sets the SequenceNumberRange field's value.
  895. func (s *Shard) SetSequenceNumberRange(v *SequenceNumberRange) *Shard {
  896. s.SequenceNumberRange = v
  897. return s
  898. }
  899. // SetShardId sets the ShardId field's value.
  900. func (s *Shard) SetShardId(v string) *Shard {
  901. s.ShardId = &v
  902. return s
  903. }
  904. // Represents all of the data describing a particular stream.
  905. type Stream struct {
  906. _ struct{} `type:"structure"`
  907. // The Amazon Resource Name (ARN) for the stream.
  908. StreamArn *string `min:"37" type:"string"`
  909. // A timestamp, in ISO 8601 format, for this stream.
  910. //
  911. // Note that LatestStreamLabel is not a unique identifier for the stream, because
  912. // it is possible that a stream from another table might have the same timestamp.
  913. // However, the combination of the following three elements is guaranteed to
  914. // be unique:
  915. //
  916. // * the AWS customer ID.
  917. //
  918. // * the table name
  919. //
  920. // * the StreamLabel
  921. StreamLabel *string `type:"string"`
  922. // The DynamoDB table with which the stream is associated.
  923. TableName *string `min:"3" type:"string"`
  924. }
  925. // String returns the string representation
  926. func (s Stream) String() string {
  927. return awsutil.Prettify(s)
  928. }
  929. // GoString returns the string representation
  930. func (s Stream) GoString() string {
  931. return s.String()
  932. }
  933. // SetStreamArn sets the StreamArn field's value.
  934. func (s *Stream) SetStreamArn(v string) *Stream {
  935. s.StreamArn = &v
  936. return s
  937. }
  938. // SetStreamLabel sets the StreamLabel field's value.
  939. func (s *Stream) SetStreamLabel(v string) *Stream {
  940. s.StreamLabel = &v
  941. return s
  942. }
  943. // SetTableName sets the TableName field's value.
  944. func (s *Stream) SetTableName(v string) *Stream {
  945. s.TableName = &v
  946. return s
  947. }
  948. // Represents all of the data describing a particular stream.
  949. type StreamDescription struct {
  950. _ struct{} `type:"structure"`
  951. // The date and time when the request to create this stream was issued.
  952. CreationRequestDateTime *time.Time `type:"timestamp"`
  953. // The key attribute(s) of the stream's DynamoDB table.
  954. KeySchema []*dynamodb.KeySchemaElement `min:"1" type:"list"`
  955. // The shard ID of the item where the operation stopped, inclusive of the previous
  956. // result set. Use this value to start a new operation, excluding this value
  957. // in the new request.
  958. //
  959. // If LastEvaluatedShardId is empty, then the "last page" of results has been
  960. // processed and there is currently no more data to be retrieved.
  961. //
  962. // If LastEvaluatedShardId is not empty, it does not necessarily mean that there
  963. // is more data in the result set. The only way to know when you have reached
  964. // the end of the result set is when LastEvaluatedShardId is empty.
  965. LastEvaluatedShardId *string `min:"28" type:"string"`
  966. // The shards that comprise the stream.
  967. Shards []*Shard `type:"list"`
  968. // The Amazon Resource Name (ARN) for the stream.
  969. StreamArn *string `min:"37" type:"string"`
  970. // A timestamp, in ISO 8601 format, for this stream.
  971. //
  972. // Note that LatestStreamLabel is not a unique identifier for the stream, because
  973. // it is possible that a stream from another table might have the same timestamp.
  974. // However, the combination of the following three elements is guaranteed to
  975. // be unique:
  976. //
  977. // * the AWS customer ID.
  978. //
  979. // * the table name
  980. //
  981. // * the StreamLabel
  982. StreamLabel *string `type:"string"`
  983. // Indicates the current status of the stream:
  984. //
  985. // * ENABLING - Streams is currently being enabled on the DynamoDB table.
  986. //
  987. // * ENABLED - the stream is enabled.
  988. //
  989. // * DISABLING - Streams is currently being disabled on the DynamoDB table.
  990. //
  991. // * DISABLED - the stream is disabled.
  992. StreamStatus *string `type:"string" enum:"StreamStatus"`
  993. // Indicates the format of the records within this stream:
  994. //
  995. // * KEYS_ONLY - only the key attributes of items that were modified in the
  996. // DynamoDB table.
  997. //
  998. // * NEW_IMAGE - entire items from the table, as they appeared after they
  999. // were modified.
  1000. //
  1001. // * OLD_IMAGE - entire items from the table, as they appeared before they
  1002. // were modified.
  1003. //
  1004. // * NEW_AND_OLD_IMAGES - both the new and the old images of the items from
  1005. // the table.
  1006. StreamViewType *string `type:"string" enum:"StreamViewType"`
  1007. // The DynamoDB table with which the stream is associated.
  1008. TableName *string `min:"3" type:"string"`
  1009. }
  1010. // String returns the string representation
  1011. func (s StreamDescription) String() string {
  1012. return awsutil.Prettify(s)
  1013. }
  1014. // GoString returns the string representation
  1015. func (s StreamDescription) GoString() string {
  1016. return s.String()
  1017. }
  1018. // SetCreationRequestDateTime sets the CreationRequestDateTime field's value.
  1019. func (s *StreamDescription) SetCreationRequestDateTime(v time.Time) *StreamDescription {
  1020. s.CreationRequestDateTime = &v
  1021. return s
  1022. }
  1023. // SetKeySchema sets the KeySchema field's value.
  1024. func (s *StreamDescription) SetKeySchema(v []*dynamodb.KeySchemaElement) *StreamDescription {
  1025. s.KeySchema = v
  1026. return s
  1027. }
  1028. // SetLastEvaluatedShardId sets the LastEvaluatedShardId field's value.
  1029. func (s *StreamDescription) SetLastEvaluatedShardId(v string) *StreamDescription {
  1030. s.LastEvaluatedShardId = &v
  1031. return s
  1032. }
  1033. // SetShards sets the Shards field's value.
  1034. func (s *StreamDescription) SetShards(v []*Shard) *StreamDescription {
  1035. s.Shards = v
  1036. return s
  1037. }
  1038. // SetStreamArn sets the StreamArn field's value.
  1039. func (s *StreamDescription) SetStreamArn(v string) *StreamDescription {
  1040. s.StreamArn = &v
  1041. return s
  1042. }
  1043. // SetStreamLabel sets the StreamLabel field's value.
  1044. func (s *StreamDescription) SetStreamLabel(v string) *StreamDescription {
  1045. s.StreamLabel = &v
  1046. return s
  1047. }
  1048. // SetStreamStatus sets the StreamStatus field's value.
  1049. func (s *StreamDescription) SetStreamStatus(v string) *StreamDescription {
  1050. s.StreamStatus = &v
  1051. return s
  1052. }
  1053. // SetStreamViewType sets the StreamViewType field's value.
  1054. func (s *StreamDescription) SetStreamViewType(v string) *StreamDescription {
  1055. s.StreamViewType = &v
  1056. return s
  1057. }
  1058. // SetTableName sets the TableName field's value.
  1059. func (s *StreamDescription) SetTableName(v string) *StreamDescription {
  1060. s.TableName = &v
  1061. return s
  1062. }
  1063. // A description of a single data modification that was performed on an item
  1064. // in a DynamoDB table.
  1065. type StreamRecord struct {
  1066. _ struct{} `type:"structure"`
  1067. // The approximate date and time when the stream record was created, in UNIX
  1068. // epoch time (http://www.epochconverter.com/) format.
  1069. ApproximateCreationDateTime *time.Time `type:"timestamp"`
  1070. // The primary key attribute(s) for the DynamoDB item that was modified.
  1071. Keys map[string]*dynamodb.AttributeValue `type:"map"`
  1072. // The item in the DynamoDB table as it appeared after it was modified.
  1073. NewImage map[string]*dynamodb.AttributeValue `type:"map"`
  1074. // The item in the DynamoDB table as it appeared before it was modified.
  1075. OldImage map[string]*dynamodb.AttributeValue `type:"map"`
  1076. // The sequence number of the stream record.
  1077. SequenceNumber *string `min:"21" type:"string"`
  1078. // The size of the stream record, in bytes.
  1079. SizeBytes *int64 `min:"1" type:"long"`
  1080. // The type of data from the modified DynamoDB item that was captured in this
  1081. // stream record:
  1082. //
  1083. // * KEYS_ONLY - only the key attributes of the modified item.
  1084. //
  1085. // * NEW_IMAGE - the entire item, as it appeared after it was modified.
  1086. //
  1087. // * OLD_IMAGE - the entire item, as it appeared before it was modified.
  1088. //
  1089. // * NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
  1090. StreamViewType *string `type:"string" enum:"StreamViewType"`
  1091. }
  1092. // String returns the string representation
  1093. func (s StreamRecord) String() string {
  1094. return awsutil.Prettify(s)
  1095. }
  1096. // GoString returns the string representation
  1097. func (s StreamRecord) GoString() string {
  1098. return s.String()
  1099. }
  1100. // SetApproximateCreationDateTime sets the ApproximateCreationDateTime field's value.
  1101. func (s *StreamRecord) SetApproximateCreationDateTime(v time.Time) *StreamRecord {
  1102. s.ApproximateCreationDateTime = &v
  1103. return s
  1104. }
  1105. // SetKeys sets the Keys field's value.
  1106. func (s *StreamRecord) SetKeys(v map[string]*dynamodb.AttributeValue) *StreamRecord {
  1107. s.Keys = v
  1108. return s
  1109. }
  1110. // SetNewImage sets the NewImage field's value.
  1111. func (s *StreamRecord) SetNewImage(v map[string]*dynamodb.AttributeValue) *StreamRecord {
  1112. s.NewImage = v
  1113. return s
  1114. }
  1115. // SetOldImage sets the OldImage field's value.
  1116. func (s *StreamRecord) SetOldImage(v map[string]*dynamodb.AttributeValue) *StreamRecord {
  1117. s.OldImage = v
  1118. return s
  1119. }
  1120. // SetSequenceNumber sets the SequenceNumber field's value.
  1121. func (s *StreamRecord) SetSequenceNumber(v string) *StreamRecord {
  1122. s.SequenceNumber = &v
  1123. return s
  1124. }
  1125. // SetSizeBytes sets the SizeBytes field's value.
  1126. func (s *StreamRecord) SetSizeBytes(v int64) *StreamRecord {
  1127. s.SizeBytes = &v
  1128. return s
  1129. }
  1130. // SetStreamViewType sets the StreamViewType field's value.
  1131. func (s *StreamRecord) SetStreamViewType(v string) *StreamRecord {
  1132. s.StreamViewType = &v
  1133. return s
  1134. }
  1135. const (
  1136. // KeyTypeHash is a KeyType enum value
  1137. KeyTypeHash = "HASH"
  1138. // KeyTypeRange is a KeyType enum value
  1139. KeyTypeRange = "RANGE"
  1140. )
  1141. const (
  1142. // OperationTypeInsert is a OperationType enum value
  1143. OperationTypeInsert = "INSERT"
  1144. // OperationTypeModify is a OperationType enum value
  1145. OperationTypeModify = "MODIFY"
  1146. // OperationTypeRemove is a OperationType enum value
  1147. OperationTypeRemove = "REMOVE"
  1148. )
  1149. const (
  1150. // ShardIteratorTypeTrimHorizon is a ShardIteratorType enum value
  1151. ShardIteratorTypeTrimHorizon = "TRIM_HORIZON"
  1152. // ShardIteratorTypeLatest is a ShardIteratorType enum value
  1153. ShardIteratorTypeLatest = "LATEST"
  1154. // ShardIteratorTypeAtSequenceNumber is a ShardIteratorType enum value
  1155. ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER"
  1156. // ShardIteratorTypeAfterSequenceNumber is a ShardIteratorType enum value
  1157. ShardIteratorTypeAfterSequenceNumber = "AFTER_SEQUENCE_NUMBER"
  1158. )
  1159. const (
  1160. // StreamStatusEnabling is a StreamStatus enum value
  1161. StreamStatusEnabling = "ENABLING"
  1162. // StreamStatusEnabled is a StreamStatus enum value
  1163. StreamStatusEnabled = "ENABLED"
  1164. // StreamStatusDisabling is a StreamStatus enum value
  1165. StreamStatusDisabling = "DISABLING"
  1166. // StreamStatusDisabled is a StreamStatus enum value
  1167. StreamStatusDisabled = "DISABLED"
  1168. )
  1169. const (
  1170. // StreamViewTypeNewImage is a StreamViewType enum value
  1171. StreamViewTypeNewImage = "NEW_IMAGE"
  1172. // StreamViewTypeOldImage is a StreamViewType enum value
  1173. StreamViewTypeOldImage = "OLD_IMAGE"
  1174. // StreamViewTypeNewAndOldImages is a StreamViewType enum value
  1175. StreamViewTypeNewAndOldImages = "NEW_AND_OLD_IMAGES"
  1176. // StreamViewTypeKeysOnly is a StreamViewType enum value
  1177. StreamViewTypeKeysOnly = "KEYS_ONLY"
  1178. )