Skip to content

Commit

Permalink
Regenerating dynamodbstreams from latest service definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Aug 16, 2016
1 parent 75712e1 commit b6ec22f
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 44 deletions.
12 changes: 3 additions & 9 deletions amazonka-dynamodb-streams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@

## Description

Amazon DynamoDB Streams
Amazon DynamoDB

This is the Amazon DynamoDB Streams API Reference. This guide describes the low-level API actions for accessing streams and processing stream records. For information about application development with DynamoDB Streams, see the <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide//Streams.html Amazon DynamoDB Developer Guide>.
Amazon DynamoDB Streams provides API actions for accessing streams and processing stream records. To learn more about application development with Streams, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html Capturing Table Activity with DynamoDB Streams> in the Amazon DynamoDB Developer Guide.

Note that this document is intended for use with the following DynamoDB documentation:

- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>

- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/ Amazon DynamoDB API Reference>

The following are short descriptions of each low-level DynamoDB Streams API action, organized by function.
The following are short descriptions of each low-level DynamoDB Streams action:

- /DescribeStream/ - Returns detailed information about a particular stream.

Expand Down
12 changes: 3 additions & 9 deletions amazonka-dynamodb-streams/amazonka-dynamodb-streams.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ build-type: Simple
cabal-version: >= 1.10
extra-source-files: README.md fixture/*.yaml fixture/*.proto
description:
Amazon DynamoDB Streams
Amazon DynamoDB

This is the Amazon DynamoDB Streams API Reference. This guide describes the low-level API actions for accessing streams and processing stream records. For information about application development with DynamoDB Streams, see the <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide//Streams.html Amazon DynamoDB Developer Guide>.
Amazon DynamoDB Streams provides API actions for accessing streams and processing stream records. To learn more about application development with Streams, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html Capturing Table Activity with DynamoDB Streams> in the Amazon DynamoDB Developer Guide.

Note that this document is intended for use with the following DynamoDB documentation:

- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>

- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/ Amazon DynamoDB API Reference>

The following are short descriptions of each low-level DynamoDB Streams API action, organized by function.
The following are short descriptions of each low-level DynamoDB Streams action:

- /DescribeStream/ - Returns detailed information about a particular stream.

Expand Down
13 changes: 4 additions & 9 deletions amazonka-dynamodb-streams/gen/Network/AWS/DynamoDBStreams.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,11 @@
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Amazon DynamoDB Streams
-- Amazon DynamoDB
--
-- This is the Amazon DynamoDB Streams API Reference. This guide describes the low-level API actions for accessing streams and processing stream records. For information about application development with DynamoDB Streams, see the <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide//Streams.html Amazon DynamoDB Developer Guide>.
-- Amazon DynamoDB Streams provides API actions for accessing streams and processing stream records. To learn more about application development with Streams, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html Capturing Table Activity with DynamoDB Streams> in the Amazon DynamoDB Developer Guide.
--
-- Note that this document is intended for use with the following DynamoDB documentation:
--
-- - <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>
--
-- - <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/ Amazon DynamoDB API Reference>
--
-- The following are short descriptions of each low-level DynamoDB Streams API action, organized by function.
-- The following are short descriptions of each low-level DynamoDB Streams action:
--
-- - /DescribeStream/ - Returns detailed information about a particular stream.
--
Expand Down Expand Up @@ -157,6 +151,7 @@ module Network.AWS.DynamoDBStreams
, streamRecord
, srSizeBytes
, srSequenceNumber
, srApproximateCreationDateTime
, srStreamViewType
, srKeys
, srOldImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
--
-- You can call /DescribeStream/ at a maximum rate of 10 times per second.
--
-- Each shard in the stream has a 'SequenceNumberRange' associated with it. If the 'SequenceNumberRange' has a 'StartingSequenceNumber' but no 'EndingSequenceNumber', then the shard is still open (able to receive more stream records). If both 'StartingSequenceNumber' and 'EndingSequenceNumber' are present, the that shared is closed and can no longer receive more data.
-- Each shard in the stream has a 'SequenceNumberRange' associated with it. If the 'SequenceNumberRange' has a 'StartingSequenceNumber' but no 'EndingSequenceNumber', then the shard is still open (able to receive more stream records). If both 'StartingSequenceNumber' and 'EndingSequenceNumber' are present, then that shard is closed and can no longer receive more data.
module Network.AWS.DynamoDBStreams.DescribeStream
(
-- * Creating a Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
--
-- 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.
-- 'GetRecords' can retrieve a maximum of 1 MB of data or 1000 stream records, whichever comes first.
module Network.AWS.DynamoDBStreams.GetRecords
(
-- * Creating a Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ module Network.AWS.DynamoDBStreams.Types
, streamRecord
, srSizeBytes
, srSequenceNumber
, srApproximateCreationDateTime
, srStreamViewType
, srKeys
, srOldImage
Expand Down Expand Up @@ -164,7 +165,9 @@ _InternalServerError = _ServiceError . hasCode "InternalServerError"
-- 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. You might receive a TrimmedDataAccessException if:
--
-- - You request a shard iterator with a sequence number older than the trim point (24 hours).
--
-- - You obtain a shard iterator, but before you use the iterator in a /GetRecords/ request, a stream record in the shard exceeds the 24 hour period and is trimmed. This causes the iterator to access a record that no longer exists.
--
_TrimmedDataAccessException :: AsError a => Getting (First ServiceError) a ServiceError
_TrimmedDataAccessException =
_ServiceError . hasCode "TrimmedDataAccessException"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ instance NFData AttributeValue

-- | Represents /a single element/ of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.
--
-- A /KeySchemaElement/ represents exactly one attribute of the primary key. For example, a hash type primary key would be represented by one /KeySchemaElement/. A hash-and-range type primary key would require one /KeySchemaElement/ for the hash attribute, and another /KeySchemaElement/ for the range attribute.
-- A /KeySchemaElement/ represents exactly one attribute of the primary key. For example, a simple primary key (partition key) would be represented by one /KeySchemaElement/. A composite primary key (partition key and sort key) would require one /KeySchemaElement/ for the partition key, and another /KeySchemaElement/ for the 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.
--
-- /See:/ 'keySchemaElement' smart constructor.
data KeySchemaElement = KeySchemaElement'
Expand Down Expand Up @@ -228,7 +232,9 @@ record =
, _rEventId = Nothing
}

-- | The version number of the stream record format. Currently, this is /1.0/.
-- | 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.
rEventVersion :: Lens' Record (Maybe Text)
rEventVersion = lens _rEventVersion (\ s a -> s{_rEventVersion = a});

Expand All @@ -244,7 +250,7 @@ rAwsRegion = lens _rAwsRegion (\ s a -> s{_rAwsRegion = a});
--
-- - 'INSERT' - a new item was added to the table.
--
-- - 'MODIFY' - one or more of the item\'s attributes were updated.
-- - 'MODIFY' - one or more of an existing item\'s attributes were modified.
--
-- - 'REMOVE' - the item was deleted from the table
--
Expand Down Expand Up @@ -505,7 +511,7 @@ sdStreamLabel = lens _sdStreamLabel (\ s a -> s{_sdStreamLabel = a});
--
-- - 'ENABLING' - Streams is currently being enabled on the DynamoDB table.
--
-- - 'ENABLING' - the stream is enabled.
-- - 'ENABLED' - the stream is enabled.
--
-- - 'DISABLING' - Streams is currently being disabled on the DynamoDB table.
--
Expand All @@ -522,9 +528,9 @@ sdKeySchema = lens _sdKeySchema (\ s a -> s{_sdKeySchema = a}) . mapping _List1;
--
-- - 'KEYS_ONLY' - only the key attributes of items that were modified in the DynamoDB table.
--
-- - 'NEW_IMAGE' - entire item from the table, as it appeared after they were modified.
-- - 'NEW_IMAGE' - entire items from the table, as they appeared after they were modified.
--
-- - 'OLD_IMAGE' - entire item from the table, as it appeared before 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.
--
Expand Down Expand Up @@ -570,12 +576,13 @@ instance NFData StreamDescription
--
-- /See:/ 'streamRecord' smart constructor.
data StreamRecord = StreamRecord'
{ _srSizeBytes :: !(Maybe Nat)
, _srSequenceNumber :: !(Maybe Text)
, _srStreamViewType :: !(Maybe StreamViewType)
, _srKeys :: !(Maybe (Map Text AttributeValue))
, _srOldImage :: !(Maybe (Map Text AttributeValue))
, _srNewImage :: !(Maybe (Map Text AttributeValue))
{ _srSizeBytes :: !(Maybe Nat)
, _srSequenceNumber :: !(Maybe Text)
, _srApproximateCreationDateTime :: !(Maybe POSIX)
, _srStreamViewType :: !(Maybe StreamViewType)
, _srKeys :: !(Maybe (Map Text AttributeValue))
, _srOldImage :: !(Maybe (Map Text AttributeValue))
, _srNewImage :: !(Maybe (Map Text AttributeValue))
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'StreamRecord' with the minimum fields required to make a request.
Expand All @@ -586,6 +593,8 @@ data StreamRecord = StreamRecord'
--
-- * 'srSequenceNumber'
--
-- * 'srApproximateCreationDateTime'
--
-- * 'srStreamViewType'
--
-- * 'srKeys'
Expand All @@ -599,6 +608,7 @@ streamRecord =
StreamRecord'
{ _srSizeBytes = Nothing
, _srSequenceNumber = Nothing
, _srApproximateCreationDateTime = Nothing
, _srStreamViewType = Nothing
, _srKeys = Nothing
, _srOldImage = Nothing
Expand All @@ -613,15 +623,19 @@ srSizeBytes = lens _srSizeBytes (\ s a -> s{_srSizeBytes = a}) . mapping _Nat;
srSequenceNumber :: Lens' StreamRecord (Maybe Text)
srSequenceNumber = lens _srSequenceNumber (\ s a -> s{_srSequenceNumber = a});

-- | The approximate date and time when the stream record was created, in <http://www.epochconverter.com/ UNIX epoch time> format.
srApproximateCreationDateTime :: Lens' StreamRecord (Maybe UTCTime)
srApproximateCreationDateTime = lens _srApproximateCreationDateTime (\ s a -> s{_srApproximateCreationDateTime = a}) . mapping _Time;

-- | 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 appears after it was modified.
-- - '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.
-- - 'NEW_AND_OLD_IMAGES' - both the new and the old item images of the item.
--
srStreamViewType :: Lens' StreamRecord (Maybe StreamViewType)
srStreamViewType = lens _srStreamViewType (\ s a -> s{_srStreamViewType = a});
Expand All @@ -644,7 +658,8 @@ instance FromJSON StreamRecord where
(\ x ->
StreamRecord' <$>
(x .:? "SizeBytes") <*> (x .:? "SequenceNumber") <*>
(x .:? "StreamViewType")
(x .:? "ApproximateCreationDateTime")
<*> (x .:? "StreamViewType")
<*> (x .:? "Keys" .!= mempty)
<*> (x .:? "OldImage" .!= mempty)
<*> (x .:? "NewImage" .!= mempty))
Expand Down

0 comments on commit b6ec22f

Please sign in to comment.