api.go 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package dynamodbstreams provides a client for Amazon DynamoDB Streams.
  3. package dynamodbstreams
  4. import (
  5. "time"
  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 can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // Creating a request object using this method should be used when you want to inject
  17. // custom logic into the request's lifecycle using a custom handler, or if you want to
  18. // access properties on the request object before or after sending the request. If
  19. // you just want the service response, call the DescribeStream method directly
  20. // instead.
  21. //
  22. // Note: You must call the "Send" method on the returned request object in order
  23. // to execute the request.
  24. //
  25. // // Example sending a request using the DescribeStreamRequest method.
  26. // req, resp := client.DescribeStreamRequest(params)
  27. //
  28. // err := req.Send()
  29. // if err == nil { // resp is now filled
  30. // fmt.Println(resp)
  31. // }
  32. //
  33. func (c *DynamoDBStreams) DescribeStreamRequest(input *DescribeStreamInput) (req *request.Request, output *DescribeStreamOutput) {
  34. op := &request.Operation{
  35. Name: opDescribeStream,
  36. HTTPMethod: "POST",
  37. HTTPPath: "/",
  38. }
  39. if input == nil {
  40. input = &DescribeStreamInput{}
  41. }
  42. req = c.newRequest(op, input, output)
  43. output = &DescribeStreamOutput{}
  44. req.Data = output
  45. return
  46. }
  47. // Returns information about a stream, including the current status of the stream,
  48. // its Amazon Resource Name (ARN), the composition of its shards, and its corresponding
  49. // DynamoDB table.
  50. //
  51. // You can call DescribeStream at a maximum rate of 10 times per second.
  52. //
  53. // Each shard in the stream has a SequenceNumberRange associated with it.
  54. // If the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber,
  55. // then the shard is still open (able to receive more stream records). If both
  56. // StartingSequenceNumber and EndingSequenceNumber are present, then that shard
  57. // is closed and can no longer receive more data.
  58. func (c *DynamoDBStreams) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) {
  59. req, out := c.DescribeStreamRequest(input)
  60. err := req.Send()
  61. return out, err
  62. }
  63. const opGetRecords = "GetRecords"
  64. // GetRecordsRequest generates a "aws/request.Request" representing the
  65. // client's request for the GetRecords operation. The "output" return
  66. // value can be used to capture response data after the request's "Send" method
  67. // is called.
  68. //
  69. // Creating a request object using this method should be used when you want to inject
  70. // custom logic into the request's lifecycle using a custom handler, or if you want to
  71. // access properties on the request object before or after sending the request. If
  72. // you just want the service response, call the GetRecords method directly
  73. // instead.
  74. //
  75. // Note: You must call the "Send" method on the returned request object in order
  76. // to execute the request.
  77. //
  78. // // Example sending a request using the GetRecordsRequest method.
  79. // req, resp := client.GetRecordsRequest(params)
  80. //
  81. // err := req.Send()
  82. // if err == nil { // resp is now filled
  83. // fmt.Println(resp)
  84. // }
  85. //
  86. func (c *DynamoDBStreams) GetRecordsRequest(input *GetRecordsInput) (req *request.Request, output *GetRecordsOutput) {
  87. op := &request.Operation{
  88. Name: opGetRecords,
  89. HTTPMethod: "POST",
  90. HTTPPath: "/",
  91. }
  92. if input == nil {
  93. input = &GetRecordsInput{}
  94. }
  95. req = c.newRequest(op, input, output)
  96. output = &GetRecordsOutput{}
  97. req.Data = output
  98. return
  99. }
  100. // Retrieves the stream records from a given shard.
  101. //
  102. // Specify a shard iterator using the ShardIterator parameter. The shard iterator
  103. // specifies the position in the shard from which you want to start reading
  104. // stream records sequentially. If there are no stream records available in
  105. // the portion of the shard that the iterator points to, GetRecords returns
  106. // an empty list. Note that it might take multiple calls to get to a portion
  107. // of the shard that contains stream records.
  108. //
  109. // GetRecords can retrieve a maximum of 1 MB of data or 1000 stream records,
  110. // whichever comes first.
  111. func (c *DynamoDBStreams) GetRecords(input *GetRecordsInput) (*GetRecordsOutput, error) {
  112. req, out := c.GetRecordsRequest(input)
  113. err := req.Send()
  114. return out, err
  115. }
  116. const opGetShardIterator = "GetShardIterator"
  117. // GetShardIteratorRequest generates a "aws/request.Request" representing the
  118. // client's request for the GetShardIterator operation. The "output" return
  119. // value can be used to capture response data after the request's "Send" method
  120. // is called.
  121. //
  122. // Creating a request object using this method should be used when you want to inject
  123. // custom logic into the request's lifecycle using a custom handler, or if you want to
  124. // access properties on the request object before or after sending the request. If
  125. // you just want the service response, call the GetShardIterator method directly
  126. // instead.
  127. //
  128. // Note: You must call the "Send" method on the returned request object in order
  129. // to execute the request.
  130. //
  131. // // Example sending a request using the GetShardIteratorRequest method.
  132. // req, resp := client.GetShardIteratorRequest(params)
  133. //
  134. // err := req.Send()
  135. // if err == nil { // resp is now filled
  136. // fmt.Println(resp)
  137. // }
  138. //
  139. func (c *DynamoDBStreams) GetShardIteratorRequest(input *GetShardIteratorInput) (req *request.Request, output *GetShardIteratorOutput) {
  140. op := &request.Operation{
  141. Name: opGetShardIterator,
  142. HTTPMethod: "POST",
  143. HTTPPath: "/",
  144. }
  145. if input == nil {
  146. input = &GetShardIteratorInput{}
  147. }
  148. req = c.newRequest(op, input, output)
  149. output = &GetShardIteratorOutput{}
  150. req.Data = output
  151. return
  152. }
  153. // Returns a shard iterator. A shard iterator provides information about how
  154. // to retrieve the stream records from within a shard. Use the shard iterator
  155. // in a subsequent GetRecords request to read the stream records from the shard.
  156. //
  157. // A shard iterator expires 15 minutes after it is returned to the requester.
  158. func (c *DynamoDBStreams) GetShardIterator(input *GetShardIteratorInput) (*GetShardIteratorOutput, error) {
  159. req, out := c.GetShardIteratorRequest(input)
  160. err := req.Send()
  161. return out, err
  162. }
  163. const opListStreams = "ListStreams"
  164. // ListStreamsRequest generates a "aws/request.Request" representing the
  165. // client's request for the ListStreams operation. The "output" return
  166. // value can be used to capture response data after the request's "Send" method
  167. // is called.
  168. //
  169. // Creating a request object using this method should be used when you want to inject
  170. // custom logic into the request's lifecycle using a custom handler, or if you want to
  171. // access properties on the request object before or after sending the request. If
  172. // you just want the service response, call the ListStreams method directly
  173. // instead.
  174. //
  175. // Note: You must call the "Send" method on the returned request object in order
  176. // to execute the request.
  177. //
  178. // // Example sending a request using the ListStreamsRequest method.
  179. // req, resp := client.ListStreamsRequest(params)
  180. //
  181. // err := req.Send()
  182. // if err == nil { // resp is now filled
  183. // fmt.Println(resp)
  184. // }
  185. //
  186. func (c *DynamoDBStreams) ListStreamsRequest(input *ListStreamsInput) (req *request.Request, output *ListStreamsOutput) {
  187. op := &request.Operation{
  188. Name: opListStreams,
  189. HTTPMethod: "POST",
  190. HTTPPath: "/",
  191. }
  192. if input == nil {
  193. input = &ListStreamsInput{}
  194. }
  195. req = c.newRequest(op, input, output)
  196. output = &ListStreamsOutput{}
  197. req.Data = output
  198. return
  199. }
  200. // Returns an array of stream ARNs associated with the current account and endpoint.
  201. // If the TableName parameter is present, then ListStreams will return only
  202. // the streams ARNs for that table.
  203. //
  204. // You can call ListStreams at a maximum rate of 5 times per second.
  205. func (c *DynamoDBStreams) ListStreams(input *ListStreamsInput) (*ListStreamsOutput, error) {
  206. req, out := c.ListStreamsRequest(input)
  207. err := req.Send()
  208. return out, err
  209. }
  210. // Represents the input of a DescribeStream operation.
  211. type DescribeStreamInput struct {
  212. _ struct{} `type:"structure"`
  213. // The shard ID of the first item that this operation will evaluate. Use the
  214. // value that was returned for LastEvaluatedShardId in the previous operation.
  215. ExclusiveStartShardId *string `min:"28" type:"string"`
  216. // The maximum number of shard objects to return. The upper limit is 100.
  217. Limit *int64 `min:"1" type:"integer"`
  218. // The Amazon Resource Name (ARN) for the stream.
  219. StreamArn *string `min:"37" type:"string" required:"true"`
  220. }
  221. // String returns the string representation
  222. func (s DescribeStreamInput) String() string {
  223. return awsutil.Prettify(s)
  224. }
  225. // GoString returns the string representation
  226. func (s DescribeStreamInput) GoString() string {
  227. return s.String()
  228. }
  229. // Validate inspects the fields of the type to determine if they are valid.
  230. func (s *DescribeStreamInput) Validate() error {
  231. invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"}
  232. if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 28 {
  233. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 28))
  234. }
  235. if s.Limit != nil && *s.Limit < 1 {
  236. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  237. }
  238. if s.StreamArn == nil {
  239. invalidParams.Add(request.NewErrParamRequired("StreamArn"))
  240. }
  241. if s.StreamArn != nil && len(*s.StreamArn) < 37 {
  242. invalidParams.Add(request.NewErrParamMinLen("StreamArn", 37))
  243. }
  244. if invalidParams.Len() > 0 {
  245. return invalidParams
  246. }
  247. return nil
  248. }
  249. // Represents the output of a DescribeStream operation.
  250. type DescribeStreamOutput struct {
  251. _ struct{} `type:"structure"`
  252. // A complete description of the stream, including its creation date and time,
  253. // the DynamoDB table associated with the stream, the shard IDs within the stream,
  254. // and the beginning and ending sequence numbers of stream records within the
  255. // shards.
  256. StreamDescription *StreamDescription `type:"structure"`
  257. }
  258. // String returns the string representation
  259. func (s DescribeStreamOutput) String() string {
  260. return awsutil.Prettify(s)
  261. }
  262. // GoString returns the string representation
  263. func (s DescribeStreamOutput) GoString() string {
  264. return s.String()
  265. }
  266. // Represents the input of a GetRecords operation.
  267. type GetRecordsInput struct {
  268. _ struct{} `type:"structure"`
  269. // The maximum number of records to return from the shard. The upper limit is
  270. // 1000.
  271. Limit *int64 `min:"1" type:"integer"`
  272. // A shard iterator that was retrieved from a previous GetShardIterator operation.
  273. // This iterator can be used to access the stream records in this shard.
  274. ShardIterator *string `min:"1" type:"string" required:"true"`
  275. }
  276. // String returns the string representation
  277. func (s GetRecordsInput) String() string {
  278. return awsutil.Prettify(s)
  279. }
  280. // GoString returns the string representation
  281. func (s GetRecordsInput) GoString() string {
  282. return s.String()
  283. }
  284. // Validate inspects the fields of the type to determine if they are valid.
  285. func (s *GetRecordsInput) Validate() error {
  286. invalidParams := request.ErrInvalidParams{Context: "GetRecordsInput"}
  287. if s.Limit != nil && *s.Limit < 1 {
  288. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  289. }
  290. if s.ShardIterator == nil {
  291. invalidParams.Add(request.NewErrParamRequired("ShardIterator"))
  292. }
  293. if s.ShardIterator != nil && len(*s.ShardIterator) < 1 {
  294. invalidParams.Add(request.NewErrParamMinLen("ShardIterator", 1))
  295. }
  296. if invalidParams.Len() > 0 {
  297. return invalidParams
  298. }
  299. return nil
  300. }
  301. // Represents the output of a GetRecords operation.
  302. type GetRecordsOutput struct {
  303. _ struct{} `type:"structure"`
  304. // The next position in the shard from which to start sequentially reading stream
  305. // records. If set to null, the shard has been closed and the requested iterator
  306. // will not return any more data.
  307. NextShardIterator *string `min:"1" type:"string"`
  308. // The stream records from the shard, which were retrieved using the shard iterator.
  309. Records []*Record `type:"list"`
  310. }
  311. // String returns the string representation
  312. func (s GetRecordsOutput) String() string {
  313. return awsutil.Prettify(s)
  314. }
  315. // GoString returns the string representation
  316. func (s GetRecordsOutput) GoString() string {
  317. return s.String()
  318. }
  319. // Represents the input of a GetShardIterator operation.
  320. type GetShardIteratorInput struct {
  321. _ struct{} `type:"structure"`
  322. // The sequence number of a stream record in the shard from which to start reading.
  323. SequenceNumber *string `min:"21" type:"string"`
  324. // The identifier of the shard. The iterator will be returned for this shard
  325. // ID.
  326. ShardId *string `min:"28" type:"string" required:"true"`
  327. // Determines how the shard iterator is used to start reading stream records
  328. // from the shard:
  329. //
  330. // AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted
  331. // by a specific sequence number.
  332. //
  333. // AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted
  334. // by a specific sequence number.
  335. //
  336. // TRIM_HORIZON - Start reading at the last (untrimmed) stream record, which
  337. // is the oldest record in the shard. In DynamoDB Streams, there is a 24 hour
  338. // limit on data retention. Stream records whose age exceeds this limit are
  339. // subject to removal (trimming) from the stream.
  340. //
  341. // LATEST - Start reading just after the most recent stream record in the
  342. // shard, so that you always read the most recent data in the shard.
  343. ShardIteratorType *string `type:"string" required:"true" enum:"ShardIteratorType"`
  344. // The Amazon Resource Name (ARN) for the stream.
  345. StreamArn *string `min:"37" type:"string" required:"true"`
  346. }
  347. // String returns the string representation
  348. func (s GetShardIteratorInput) String() string {
  349. return awsutil.Prettify(s)
  350. }
  351. // GoString returns the string representation
  352. func (s GetShardIteratorInput) GoString() string {
  353. return s.String()
  354. }
  355. // Validate inspects the fields of the type to determine if they are valid.
  356. func (s *GetShardIteratorInput) Validate() error {
  357. invalidParams := request.ErrInvalidParams{Context: "GetShardIteratorInput"}
  358. if s.SequenceNumber != nil && len(*s.SequenceNumber) < 21 {
  359. invalidParams.Add(request.NewErrParamMinLen("SequenceNumber", 21))
  360. }
  361. if s.ShardId == nil {
  362. invalidParams.Add(request.NewErrParamRequired("ShardId"))
  363. }
  364. if s.ShardId != nil && len(*s.ShardId) < 28 {
  365. invalidParams.Add(request.NewErrParamMinLen("ShardId", 28))
  366. }
  367. if s.ShardIteratorType == nil {
  368. invalidParams.Add(request.NewErrParamRequired("ShardIteratorType"))
  369. }
  370. if s.StreamArn == nil {
  371. invalidParams.Add(request.NewErrParamRequired("StreamArn"))
  372. }
  373. if s.StreamArn != nil && len(*s.StreamArn) < 37 {
  374. invalidParams.Add(request.NewErrParamMinLen("StreamArn", 37))
  375. }
  376. if invalidParams.Len() > 0 {
  377. return invalidParams
  378. }
  379. return nil
  380. }
  381. // Represents the output of a GetShardIterator operation.
  382. type GetShardIteratorOutput struct {
  383. _ struct{} `type:"structure"`
  384. // The position in the shard from which to start reading stream records sequentially.
  385. // A shard iterator specifies this position using the sequence number of a stream
  386. // record in a shard.
  387. ShardIterator *string `min:"1" type:"string"`
  388. }
  389. // String returns the string representation
  390. func (s GetShardIteratorOutput) String() string {
  391. return awsutil.Prettify(s)
  392. }
  393. // GoString returns the string representation
  394. func (s GetShardIteratorOutput) GoString() string {
  395. return s.String()
  396. }
  397. // Represents the input of a ListStreams operation.
  398. type ListStreamsInput struct {
  399. _ struct{} `type:"structure"`
  400. // The ARN (Amazon Resource Name) of the first item that this operation will
  401. // evaluate. Use the value that was returned for LastEvaluatedStreamArn in the
  402. // previous operation.
  403. ExclusiveStartStreamArn *string `min:"37" type:"string"`
  404. // The maximum number of streams to return. The upper limit is 100.
  405. Limit *int64 `min:"1" type:"integer"`
  406. // If this parameter is provided, then only the streams associated with this
  407. // table name are returned.
  408. TableName *string `min:"3" type:"string"`
  409. }
  410. // String returns the string representation
  411. func (s ListStreamsInput) String() string {
  412. return awsutil.Prettify(s)
  413. }
  414. // GoString returns the string representation
  415. func (s ListStreamsInput) GoString() string {
  416. return s.String()
  417. }
  418. // Validate inspects the fields of the type to determine if they are valid.
  419. func (s *ListStreamsInput) Validate() error {
  420. invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"}
  421. if s.ExclusiveStartStreamArn != nil && len(*s.ExclusiveStartStreamArn) < 37 {
  422. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartStreamArn", 37))
  423. }
  424. if s.Limit != nil && *s.Limit < 1 {
  425. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  426. }
  427. if s.TableName != nil && len(*s.TableName) < 3 {
  428. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  429. }
  430. if invalidParams.Len() > 0 {
  431. return invalidParams
  432. }
  433. return nil
  434. }
  435. // Represents the output of a ListStreams operation.
  436. type ListStreamsOutput struct {
  437. _ struct{} `type:"structure"`
  438. // The stream ARN of the item where the operation stopped, inclusive of the
  439. // previous result set. Use this value to start a new operation, excluding this
  440. // value in the new request.
  441. //
  442. // If LastEvaluatedStreamArn is empty, then the "last page" of results has
  443. // been processed and there is no more data to be retrieved.
  444. //
  445. // If LastEvaluatedStreamArn is not empty, it does not necessarily mean that
  446. // there is more data in the result set. The only way to know when you have
  447. // reached the end of the result set is when LastEvaluatedStreamArn is empty.
  448. LastEvaluatedStreamArn *string `min:"37" type:"string"`
  449. // A list of stream descriptors associated with the current account and endpoint.
  450. Streams []*Stream `type:"list"`
  451. }
  452. // String returns the string representation
  453. func (s ListStreamsOutput) String() string {
  454. return awsutil.Prettify(s)
  455. }
  456. // GoString returns the string representation
  457. func (s ListStreamsOutput) GoString() string {
  458. return s.String()
  459. }
  460. // A description of a unique event within a stream.
  461. type Record struct {
  462. _ struct{} `type:"structure"`
  463. // The region in which the GetRecords request was received.
  464. AwsRegion *string `locationName:"awsRegion" type:"string"`
  465. // The main body of the stream record, containing all of the DynamoDB-specific
  466. // fields.
  467. Dynamodb *StreamRecord `locationName:"dynamodb" type:"structure"`
  468. // A globally unique identifier for the event that was recorded in this stream
  469. // record.
  470. EventID *string `locationName:"eventID" type:"string"`
  471. // The type of data modification that was performed on the DynamoDB table:
  472. //
  473. // INSERT - a new item was added to the table.
  474. //
  475. // MODIFY - one or more of an existing item's attributes were modified.
  476. //
  477. // REMOVE - the item was deleted from the table
  478. EventName *string `locationName:"eventName" type:"string" enum:"OperationType"`
  479. // The AWS service from which the stream record originated. For DynamoDB Streams,
  480. // this is aws:dynamodb.
  481. EventSource *string `locationName:"eventSource" type:"string"`
  482. // The version number of the stream record format. This number is updated whenever
  483. // the structure of Record is modified.
  484. //
  485. // Client applications must not assume that eventVersion will remain at a particular
  486. // value, as this number is subject to change at any time. In general, eventVersion
  487. // will only increase as the low-level DynamoDB Streams API evolves.
  488. EventVersion *string `locationName:"eventVersion" type:"string"`
  489. }
  490. // String returns the string representation
  491. func (s Record) String() string {
  492. return awsutil.Prettify(s)
  493. }
  494. // GoString returns the string representation
  495. func (s Record) GoString() string {
  496. return s.String()
  497. }
  498. // The beginning and ending sequence numbers for the stream records contained
  499. // within a shard.
  500. type SequenceNumberRange struct {
  501. _ struct{} `type:"structure"`
  502. // The last sequence number.
  503. EndingSequenceNumber *string `min:"21" type:"string"`
  504. // The first sequence number.
  505. StartingSequenceNumber *string `min:"21" type:"string"`
  506. }
  507. // String returns the string representation
  508. func (s SequenceNumberRange) String() string {
  509. return awsutil.Prettify(s)
  510. }
  511. // GoString returns the string representation
  512. func (s SequenceNumberRange) GoString() string {
  513. return s.String()
  514. }
  515. // A uniquely identified group of stream records within a stream.
  516. type Shard struct {
  517. _ struct{} `type:"structure"`
  518. // The shard ID of the current shard's parent.
  519. ParentShardId *string `min:"28" type:"string"`
  520. // The range of possible sequence numbers for the shard.
  521. SequenceNumberRange *SequenceNumberRange `type:"structure"`
  522. // The system-generated identifier for this shard.
  523. ShardId *string `min:"28" type:"string"`
  524. }
  525. // String returns the string representation
  526. func (s Shard) String() string {
  527. return awsutil.Prettify(s)
  528. }
  529. // GoString returns the string representation
  530. func (s Shard) GoString() string {
  531. return s.String()
  532. }
  533. // Represents all of the data describing a particular stream.
  534. type Stream struct {
  535. _ struct{} `type:"structure"`
  536. // The Amazon Resource Name (ARN) for the stream.
  537. StreamArn *string `min:"37" type:"string"`
  538. // A timestamp, in ISO 8601 format, for this stream.
  539. //
  540. // Note that LatestStreamLabel is not a unique identifier for the stream, because
  541. // it is possible that a stream from another table might have the same timestamp.
  542. // However, the combination of the following three elements is guaranteed to
  543. // be unique:
  544. //
  545. // the AWS customer ID.
  546. //
  547. // the table name
  548. //
  549. // the StreamLabel
  550. StreamLabel *string `type:"string"`
  551. // The DynamoDB table with which the stream is associated.
  552. TableName *string `min:"3" type:"string"`
  553. }
  554. // String returns the string representation
  555. func (s Stream) String() string {
  556. return awsutil.Prettify(s)
  557. }
  558. // GoString returns the string representation
  559. func (s Stream) GoString() string {
  560. return s.String()
  561. }
  562. // Represents all of the data describing a particular stream.
  563. type StreamDescription struct {
  564. _ struct{} `type:"structure"`
  565. // The date and time when the request to create this stream was issued.
  566. CreationRequestDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  567. // The key attribute(s) of the stream's DynamoDB table.
  568. KeySchema []*dynamodb.KeySchemaElement `min:"1" type:"list"`
  569. // The shard ID of the item where the operation stopped, inclusive of the previous
  570. // result set. Use this value to start a new operation, excluding this value
  571. // in the new request.
  572. //
  573. // If LastEvaluatedShardId is empty, then the "last page" of results has been
  574. // processed and there is currently no more data to be retrieved.
  575. //
  576. // If LastEvaluatedShardId is not empty, it does not necessarily mean that
  577. // there is more data in the result set. The only way to know when you have
  578. // reached the end of the result set is when LastEvaluatedShardId is empty.
  579. LastEvaluatedShardId *string `min:"28" type:"string"`
  580. // The shards that comprise the stream.
  581. Shards []*Shard `type:"list"`
  582. // The Amazon Resource Name (ARN) for the stream.
  583. StreamArn *string `min:"37" type:"string"`
  584. // A timestamp, in ISO 8601 format, for this stream.
  585. //
  586. // Note that LatestStreamLabel is not a unique identifier for the stream, because
  587. // it is possible that a stream from another table might have the same timestamp.
  588. // However, the combination of the following three elements is guaranteed to
  589. // be unique:
  590. //
  591. // the AWS customer ID.
  592. //
  593. // the table name
  594. //
  595. // the StreamLabel
  596. StreamLabel *string `type:"string"`
  597. // Indicates the current status of the stream:
  598. //
  599. // ENABLING - Streams is currently being enabled on the DynamoDB table.
  600. //
  601. // ENABLED - the stream is enabled.
  602. //
  603. // DISABLING - Streams is currently being disabled on the DynamoDB table.
  604. //
  605. // DISABLED - the stream is disabled.
  606. StreamStatus *string `type:"string" enum:"StreamStatus"`
  607. // Indicates the format of the records within this stream:
  608. //
  609. // KEYS_ONLY - only the key attributes of items that were modified in the
  610. // DynamoDB table.
  611. //
  612. // NEW_IMAGE - entire items from the table, as they appeared after they
  613. // were modified.
  614. //
  615. // OLD_IMAGE - entire items from the table, as they appeared before they
  616. // were modified.
  617. //
  618. // NEW_AND_OLD_IMAGES - both the new and the old images of the items from
  619. // the table.
  620. StreamViewType *string `type:"string" enum:"StreamViewType"`
  621. // The DynamoDB table with which the stream is associated.
  622. TableName *string `min:"3" type:"string"`
  623. }
  624. // String returns the string representation
  625. func (s StreamDescription) String() string {
  626. return awsutil.Prettify(s)
  627. }
  628. // GoString returns the string representation
  629. func (s StreamDescription) GoString() string {
  630. return s.String()
  631. }
  632. // A description of a single data modification that was performed on an item
  633. // in a DynamoDB table.
  634. type StreamRecord struct {
  635. _ struct{} `type:"structure"`
  636. // The approximate date and time when the stream record was created, in UNIX
  637. // epoch time (http://www.epochconverter.com/) format.
  638. ApproximateCreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  639. // The primary key attribute(s) for the DynamoDB item that was modified.
  640. Keys map[string]*dynamodb.AttributeValue `type:"map"`
  641. // The item in the DynamoDB table as it appeared after it was modified.
  642. NewImage map[string]*dynamodb.AttributeValue `type:"map"`
  643. // The item in the DynamoDB table as it appeared before it was modified.
  644. OldImage map[string]*dynamodb.AttributeValue `type:"map"`
  645. // The sequence number of the stream record.
  646. SequenceNumber *string `min:"21" type:"string"`
  647. // The size of the stream record, in bytes.
  648. SizeBytes *int64 `min:"1" type:"long"`
  649. // The type of data from the modified DynamoDB item that was captured in this
  650. // stream record:
  651. //
  652. // KEYS_ONLY - only the key attributes of the modified item.
  653. //
  654. // NEW_IMAGE - the entire item, as it appeared after it was modified.
  655. //
  656. // OLD_IMAGE - the entire item, as it appeared before it was modified.
  657. //
  658. // NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
  659. StreamViewType *string `type:"string" enum:"StreamViewType"`
  660. }
  661. // String returns the string representation
  662. func (s StreamRecord) String() string {
  663. return awsutil.Prettify(s)
  664. }
  665. // GoString returns the string representation
  666. func (s StreamRecord) GoString() string {
  667. return s.String()
  668. }
  669. const (
  670. // @enum KeyType
  671. KeyTypeHash = "HASH"
  672. // @enum KeyType
  673. KeyTypeRange = "RANGE"
  674. )
  675. const (
  676. // @enum OperationType
  677. OperationTypeInsert = "INSERT"
  678. // @enum OperationType
  679. OperationTypeModify = "MODIFY"
  680. // @enum OperationType
  681. OperationTypeRemove = "REMOVE"
  682. )
  683. const (
  684. // @enum ShardIteratorType
  685. ShardIteratorTypeTrimHorizon = "TRIM_HORIZON"
  686. // @enum ShardIteratorType
  687. ShardIteratorTypeLatest = "LATEST"
  688. // @enum ShardIteratorType
  689. ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER"
  690. // @enum ShardIteratorType
  691. ShardIteratorTypeAfterSequenceNumber = "AFTER_SEQUENCE_NUMBER"
  692. )
  693. const (
  694. // @enum StreamStatus
  695. StreamStatusEnabling = "ENABLING"
  696. // @enum StreamStatus
  697. StreamStatusEnabled = "ENABLED"
  698. // @enum StreamStatus
  699. StreamStatusDisabling = "DISABLING"
  700. // @enum StreamStatus
  701. StreamStatusDisabled = "DISABLED"
  702. )
  703. const (
  704. // @enum StreamViewType
  705. StreamViewTypeNewImage = "NEW_IMAGE"
  706. // @enum StreamViewType
  707. StreamViewTypeOldImage = "OLD_IMAGE"
  708. // @enum StreamViewType
  709. StreamViewTypeNewAndOldImages = "NEW_AND_OLD_IMAGES"
  710. // @enum StreamViewType
  711. StreamViewTypeKeysOnly = "KEYS_ONLY"
  712. )