amazonka-dynamodb-streams-1.2.0.1: Amazon DynamoDB Streams SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.DynamoDBStreams.GetRecords

Contents

Description

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.

Synopsis

Creating a Request

getRecords Source

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:

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

getRecordsResponse Source

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:

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.