Copyright | (c) 2013-2021 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 |
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 1000 stream
records, whichever comes first.
Synopsis
- data GetRecords = GetRecords' {
- limit :: Maybe Natural
- shardIterator :: Text
- newGetRecords :: Text -> GetRecords
- getRecords_limit :: Lens' GetRecords (Maybe Natural)
- getRecords_shardIterator :: Lens' GetRecords Text
- data GetRecordsResponse = GetRecordsResponse' {
- records :: Maybe [Record]
- nextShardIterator :: Maybe Text
- httpStatus :: Int
- newGetRecordsResponse :: Int -> GetRecordsResponse
- getRecordsResponse_records :: Lens' GetRecordsResponse (Maybe [Record])
- getRecordsResponse_nextShardIterator :: Lens' GetRecordsResponse (Maybe Text)
- getRecordsResponse_httpStatus :: Lens' GetRecordsResponse Int
Creating a Request
data GetRecords Source #
Represents the input of a GetRecords
operation.
See: newGetRecords
smart constructor.
GetRecords' | |
|
Instances
Create a value of GetRecords
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:limit:GetRecords'
, getRecords_limit
- The maximum number of records to return from the shard. The upper limit
is 1000.
$sel:shardIterator:GetRecords'
, getRecords_shardIterator
- A shard iterator that was retrieved from a previous GetShardIterator
operation. This iterator can be used to access the stream records in
this shard.
Request Lenses
getRecords_limit :: Lens' GetRecords (Maybe Natural) Source #
The maximum number of records to return from the shard. The upper limit is 1000.
getRecords_shardIterator :: 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
data GetRecordsResponse Source #
Represents the output of a GetRecords
operation.
See: newGetRecordsResponse
smart constructor.
GetRecordsResponse' | |
|
Instances
newGetRecordsResponse Source #
Create a value of GetRecordsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:records:GetRecordsResponse'
, getRecordsResponse_records
- The stream records from the shard, which were retrieved using the shard
iterator.
$sel:nextShardIterator:GetRecordsResponse'
, getRecordsResponse_nextShardIterator
- 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.
$sel:httpStatus:GetRecordsResponse'
, getRecordsResponse_httpStatus
- The response's http status code.
Response Lenses
getRecordsResponse_records :: Lens' GetRecordsResponse (Maybe [Record]) Source #
The stream records from the shard, which were retrieved using the shard iterator.
getRecordsResponse_nextShardIterator :: 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.
getRecordsResponse_httpStatus :: Lens' GetRecordsResponse Int Source #
The response's http status code.