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.GetShardIterator

Contents

Description

Returns a shard iterator. A shard iterator provides information about how to retrieve the stream records from within a shard. Use the shard iterator in a subsequent GetRecords request to read the stream records from the shard.

A shard iterator expires 15 minutes after it is returned to the requester.

See: AWS API Reference for GetShardIterator.

Synopsis

Creating a Request

getShardIterator Source

Creates a value of GetShardIterator with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

gsiSequenceNumber :: Lens' GetShardIterator (Maybe Text) Source

The sequence number of a stream record in the shard from which to start reading.

gsiStreamARN :: Lens' GetShardIterator Text Source

The Amazon Resource Name (ARN) for the stream.

gsiShardId :: Lens' GetShardIterator Text Source

The identifier of the shard. The iterator will be returned for this shard ID.

gsiShardIteratorType :: Lens' GetShardIterator ShardIteratorType Source

Determines how the shard iterator is used to start reading stream records from the shard:

  • AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted by a specific sequence number.
  • AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted by a specific sequence number.
  • TRIM_HORIZON - Start reading at the last (untrimmed) stream record, which is the oldest record in the shard. In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records whose age exceeds this limit are subject to removal (trimming) from the stream.
  • LATEST - Start reading just after the most recent stream record in the shard, so that you always read the most recent data in the shard.

Destructuring the Response

getShardIteratorResponse Source

Creates a value of GetShardIteratorResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

gsirsShardIterator :: Lens' GetShardIteratorResponse (Maybe Text) Source

The position in the shard from which to start reading stream records sequentially. A shard iterator specifies this position using the sequence number of a stream record in a shard.