Copyright | (c) 2013-2017 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Retrieves the stream records from a given shard.
Specify a shard iterator using the ShardIterator
parameter. The shard iterator specifies the position in the shard from which you want to start reading stream records sequentially. If there are no stream records available in the portion of the shard that the iterator points to, GetRecords
returns an empty list. Note that it might take multiple calls to get to a portion of the shard that contains stream records.
- getRecords :: Text -> GetRecords
- data GetRecords
- grLimit :: Lens' GetRecords (Maybe Natural)
- grShardIterator :: Lens' GetRecords Text
- getRecordsResponse :: Int -> GetRecordsResponse
- data GetRecordsResponse
- grrsRecords :: Lens' GetRecordsResponse [Record]
- grrsNextShardIterator :: Lens' GetRecordsResponse (Maybe Text)
- grrsResponseStatus :: Lens' GetRecordsResponse Int
Creating a Request
Creates a value of GetRecords
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
grLimit
- The maximum number of records to return from the shard. The upper limit is 1000.grShardIterator
- A shard iterator that was retrieved from a previous GetShardIterator operation. This iterator can be used to access the stream records in this shard.
data GetRecords Source #
Represents the input of a GetRecords
operation.
See: getRecords
smart constructor.
Request Lenses
grLimit :: Lens' GetRecords (Maybe Natural) Source #
The maximum number of records to return from the shard. The upper limit is 1000.
grShardIterator :: Lens' GetRecords Text Source #
A shard iterator that was retrieved from a previous GetShardIterator operation. This iterator can be used to access the stream records in this shard.
Destructuring the Response
Creates a value of GetRecordsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
grrsRecords
- The stream records from the shard, which were retrieved using the shard iterator.grrsNextShardIterator
- The next position in the shard from which to start sequentially reading stream records. If set tonull
, the shard has been closed and the requested iterator will not return any more data.grrsResponseStatus
- -- | The response status code.
data GetRecordsResponse Source #
Represents the output of a GetRecords
operation.
See: getRecordsResponse
smart constructor.
Response Lenses
grrsRecords :: Lens' GetRecordsResponse [Record] Source #
The stream records from the shard, which were retrieved using the shard iterator.
grrsNextShardIterator :: Lens' GetRecordsResponse (Maybe Text) Source #
The next position in the shard from which to start sequentially reading stream records. If set to null
, the shard has been closed and the requested iterator will not return any more data.
grrsResponseStatus :: Lens' GetRecordsResponse Int Source #
- - | The response status code.