libZSservicesZSamazonka-dynamodb-streamsZSamazonka-dynamodb-streams
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.DynamoDBStreams.Lens

Description

 
Synopsis

Operations

GetShardIterator

getShardIterator_sequenceNumber :: Lens' GetShardIterator (Maybe Text) Source #

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

getShardIterator_streamArn :: Lens' GetShardIterator Text Source #

The Amazon Resource Name (ARN) for the stream.

getShardIterator_shardId :: Lens' GetShardIterator Text Source #

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

getShardIterator_shardIteratorType :: 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.

getShardIteratorResponse_shardIterator :: 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.

GetRecords

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.

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.

ListStreams

listStreams_exclusiveStartStreamArn :: Lens' ListStreams (Maybe Text) Source #

The ARN (Amazon Resource Name) of the first item that this operation will evaluate. Use the value that was returned for LastEvaluatedStreamArn in the previous operation.

listStreams_limit :: Lens' ListStreams (Maybe Natural) Source #

The maximum number of streams to return. The upper limit is 100.

listStreams_tableName :: Lens' ListStreams (Maybe Text) Source #

If this parameter is provided, then only the streams associated with this table name are returned.

listStreamsResponse_lastEvaluatedStreamArn :: Lens' ListStreamsResponse (Maybe Text) Source #

The stream ARN of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedStreamArn is empty, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedStreamArn is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedStreamArn is empty.

listStreamsResponse_streams :: Lens' ListStreamsResponse (Maybe [Stream]) Source #

A list of stream descriptors associated with the current account and endpoint.

DescribeStream

describeStream_exclusiveStartShardId :: Lens' DescribeStream (Maybe Text) Source #

The shard ID of the first item that this operation will evaluate. Use the value that was returned for LastEvaluatedShardId in the previous operation.

describeStream_limit :: Lens' DescribeStream (Maybe Natural) Source #

The maximum number of shard objects to return. The upper limit is 100.

describeStream_streamArn :: Lens' DescribeStream Text Source #

The Amazon Resource Name (ARN) for the stream.

describeStreamResponse_streamDescription :: Lens' DescribeStreamResponse (Maybe StreamDescription) Source #

A complete description of the stream, including its creation date and time, the DynamoDB table associated with the stream, the shard IDs within the stream, and the beginning and ending sequence numbers of stream records within the shards.

Types

AttributeValue

attributeValue_l :: Lens' AttributeValue (Maybe [AttributeValue]) Source #

An attribute of type List. For example:

"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]

attributeValue_ns :: Lens' AttributeValue (Maybe [Text]) Source #

An attribute of type Number Set. For example:

"NS": ["42.2", "-19", "7.5", "3.14"]

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.

attributeValue_m :: Lens' AttributeValue (Maybe (HashMap Text AttributeValue)) Source #

An attribute of type Map. For example:

"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}

attributeValue_null :: Lens' AttributeValue (Maybe Bool) Source #

An attribute of type Null. For example:

"NULL": true

attributeValue_n :: Lens' AttributeValue (Maybe Text) Source #

An attribute of type Number. For example:

"N": "123.45"

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.

attributeValue_bs :: Lens' AttributeValue (Maybe [ByteString]) Source #

An attribute of type Binary Set. For example:

"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

attributeValue_b :: Lens' AttributeValue (Maybe ByteString) Source #

An attribute of type Binary. For example:

"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

attributeValue_ss :: Lens' AttributeValue (Maybe [Text]) Source #

An attribute of type String Set. For example:

"SS": ["Giraffe", "Hippo" ,"Zebra"]

attributeValue_s :: Lens' AttributeValue (Maybe Text) Source #

An attribute of type String. For example:

"S": "Hello"

attributeValue_bool :: Lens' AttributeValue (Maybe Bool) Source #

An attribute of type Boolean. For example:

"BOOL": true

Identity

identity_principalId :: Lens' Identity (Maybe Text) Source #

A unique identifier for the entity that made the call. For Time To Live, the principalId is "dynamodb.amazonaws.com".

identity_type :: Lens' Identity (Maybe Text) Source #

The type of the identity. For Time To Live, the type is "Service".

KeySchemaElement

keySchemaElement_keyType :: Lens' KeySchemaElement KeyType Source #

The role that this key attribute will assume:

  • HASH - partition key
  • RANGE - sort key

The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

Record

record_userIdentity :: Lens' Record (Maybe Identity) Source #

Items that are deleted by the Time to Live process after expiration have the following fields:

  • Records[].userIdentity.type

    "Service"

  • Records[].userIdentity.principalId

    "dynamodb.amazonaws.com"

record_eventVersion :: Lens' Record (Maybe Text) Source #

The version number of the stream record format. This number is updated whenever the structure of Record is modified.

Client applications must not assume that eventVersion will remain at a particular value, as this number is subject to change at any time. In general, eventVersion will only increase as the low-level DynamoDB Streams API evolves.

record_dynamodb :: Lens' Record (Maybe StreamRecord) Source #

The main body of the stream record, containing all of the DynamoDB-specific fields.

record_awsRegion :: Lens' Record (Maybe Text) Source #

The region in which the GetRecords request was received.

record_eventName :: Lens' Record (Maybe OperationType) Source #

The type of data modification that was performed on the DynamoDB table:

  • INSERT - a new item was added to the table.
  • MODIFY - one or more of an existing item's attributes were modified.
  • REMOVE - the item was deleted from the table

record_eventSource :: Lens' Record (Maybe Text) Source #

The AWS service from which the stream record originated. For DynamoDB Streams, this is aws:dynamodb.

record_eventID :: Lens' Record (Maybe Text) Source #

A globally unique identifier for the event that was recorded in this stream record.

SequenceNumberRange

sequenceNumberRange_startingSequenceNumber :: Lens' SequenceNumberRange (Maybe Text) Source #

The first sequence number for the stream records contained within a shard. String contains numeric characters only.

sequenceNumberRange_endingSequenceNumber :: Lens' SequenceNumberRange (Maybe Text) Source #

The last sequence number for the stream records contained within a shard. String contains numeric characters only.

Shard

shard_parentShardId :: Lens' Shard (Maybe Text) Source #

The shard ID of the current shard's parent.

shard_sequenceNumberRange :: Lens' Shard (Maybe SequenceNumberRange) Source #

The range of possible sequence numbers for the shard.

shard_shardId :: Lens' Shard (Maybe Text) Source #

The system-generated identifier for this shard.

Stream

stream_streamLabel :: Lens' Stream (Maybe Text) Source #

A timestamp, in ISO 8601 format, for this stream.

Note that LatestStreamLabel is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:

  • the AWS customer ID.
  • the table name
  • the StreamLabel

stream_streamArn :: Lens' Stream (Maybe Text) Source #

The Amazon Resource Name (ARN) for the stream.

stream_tableName :: Lens' Stream (Maybe Text) Source #

The DynamoDB table with which the stream is associated.

StreamDescription

streamDescription_lastEvaluatedShardId :: Lens' StreamDescription (Maybe Text) Source #

The shard ID of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedShardId is empty, then the "last page" of results has been processed and there is currently no more data to be retrieved.

If LastEvaluatedShardId is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedShardId is empty.

streamDescription_streamLabel :: Lens' StreamDescription (Maybe Text) Source #

A timestamp, in ISO 8601 format, for this stream.

Note that LatestStreamLabel is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:

  • the AWS customer ID.
  • the table name
  • the StreamLabel

streamDescription_streamStatus :: Lens' StreamDescription (Maybe StreamStatus) Source #

Indicates the current status of the stream:

  • ENABLING - Streams is currently being enabled on the DynamoDB table.
  • ENABLED - the stream is enabled.
  • DISABLING - Streams is currently being disabled on the DynamoDB table.
  • DISABLED - the stream is disabled.

streamDescription_keySchema :: Lens' StreamDescription (Maybe (NonEmpty KeySchemaElement)) Source #

The key attribute(s) of the stream's DynamoDB table.

streamDescription_streamViewType :: Lens' StreamDescription (Maybe StreamViewType) Source #

Indicates the format of the records within this stream:

  • KEYS_ONLY - only the key attributes of items that were modified in the DynamoDB table.
  • NEW_IMAGE - entire items from the table, as they appeared after they were modified.
  • OLD_IMAGE - entire items from the table, as they appeared before they were modified.
  • NEW_AND_OLD_IMAGES - both the new and the old images of the items from the table.

streamDescription_streamArn :: Lens' StreamDescription (Maybe Text) Source #

The Amazon Resource Name (ARN) for the stream.

streamDescription_shards :: Lens' StreamDescription (Maybe [Shard]) Source #

The shards that comprise the stream.

streamDescription_tableName :: Lens' StreamDescription (Maybe Text) Source #

The DynamoDB table with which the stream is associated.

streamDescription_creationRequestDateTime :: Lens' StreamDescription (Maybe UTCTime) Source #

The date and time when the request to create this stream was issued.

StreamRecord

streamRecord_sizeBytes :: Lens' StreamRecord (Maybe Natural) Source #

The size of the stream record, in bytes.

streamRecord_sequenceNumber :: Lens' StreamRecord (Maybe Text) Source #

The sequence number of the stream record.

streamRecord_approximateCreationDateTime :: Lens' StreamRecord (Maybe UTCTime) Source #

The approximate date and time when the stream record was created, in UNIX epoch time format.

streamRecord_streamViewType :: Lens' StreamRecord (Maybe StreamViewType) Source #

The type of data from the modified DynamoDB item that was captured in this stream record:

  • KEYS_ONLY - only the key attributes of the modified item.
  • NEW_IMAGE - the entire item, as it appeared after it was modified.
  • OLD_IMAGE - the entire item, as it appeared before it was modified.
  • NEW_AND_OLD_IMAGES - both the new and the old item images of the item.

streamRecord_keys :: Lens' StreamRecord (Maybe (HashMap Text AttributeValue)) Source #

The primary key attribute(s) for the DynamoDB item that was modified.

streamRecord_oldImage :: Lens' StreamRecord (Maybe (HashMap Text AttributeValue)) Source #

The item in the DynamoDB table as it appeared before it was modified.

streamRecord_newImage :: Lens' StreamRecord (Maybe (HashMap Text AttributeValue)) Source #

The item in the DynamoDB table as it appeared after it was modified.