Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@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 can retrieve a maximum of 1 MB of data or 2000 stream records, whichever comes first.
See: AWS API Reference for GetRecords.
- 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)
- grrsStatus :: 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:
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:
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.
grrsStatus :: Lens' GetRecordsResponse Int Source
The response status code.