amazonka-kinesis 0.3.4 → 0.3.5
raw patch · 9 files changed
+62/−49 lines, 9 filesdep ~amazonka-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: amazonka-core
API changes (from Hackage documentation)
+ Network.AWS.Kinesis.GetRecords: grrMillisBehindLatest :: Lens' GetRecordsResponse (Maybe Natural)
Files
- amazonka-kinesis.cabal +2/−2
- gen/Network/AWS/Kinesis/CreateStream.hs +3/−6
- gen/Network/AWS/Kinesis/GetRecords.hs +26/−11
- gen/Network/AWS/Kinesis/GetShardIterator.hs +1/−1
- gen/Network/AWS/Kinesis/MergeShards.hs +1/−1
- gen/Network/AWS/Kinesis/PutRecord.hs +15/−14
- gen/Network/AWS/Kinesis/PutRecords.hs +4/−3
- gen/Network/AWS/Kinesis/SplitShard.hs +3/−4
- gen/Network/AWS/Kinesis/Types.hs +7/−7
amazonka-kinesis.cabal view
@@ -1,5 +1,5 @@ name: amazonka-kinesis-version: 0.3.4+version: 0.3.5 synopsis: Amazon Kinesis SDK. homepage: https://github.com/brendanhay/amazonka license: OtherLicense@@ -55,5 +55,5 @@ other-modules: build-depends:- amazonka-core == 0.3.4.*+ amazonka-core == 0.3.5.* , base >= 4.7 && < 5
gen/Network/AWS/Kinesis/CreateStream.hs view
@@ -48,9 +48,8 @@ -- you try to do one of the following: -- -- Have more than five streams in the 'CREATING' state at any point in time. Create more shards than are authorized for your account.--- The default limit for an AWS account is 10 shards per stream. If you need--- to create a stream with more than 10 shards, <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html contact AWS Support> to increase--- the limit on your account.+-- For the default shard limit for an AWS account, see <http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html Amazon Kinesis Limits>.+-- If you need to increase this limit, <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html contact AWS Support> -- -- You can use 'DescribeStream' to check the stream status, which is returned in 'StreamStatus'. --@@ -104,9 +103,7 @@ -- is a function of the number of shards; more shards are required for greater -- provisioned throughput. ----- Note: The default limit for an AWS account is 10 shards per stream. If you--- need to create a stream with more than 10 shards, <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html contact AWS Support> to--- increase the limit on your account.+-- DefaultShardLimit; csShardCount :: Lens' CreateStream Natural csShardCount = lens _csShardCount (\s a -> s { _csShardCount = a }) . _Nat
gen/Network/AWS/Kinesis/GetRecords.hs view
@@ -51,8 +51,8 @@ -- -- The size of the data returned by 'GetRecords' will vary depending on the -- utilization of the shard. The maximum size of data that 'GetRecords' can return--- is 10 MB. If a call returns 10 MB of data, subsequent calls made within the--- next 5 seconds throw 'ProvisionedThroughputExceededException'. If there is+-- is 10 MB. If a call returns this amount of data, subsequent calls made within+-- the next 5 seconds throw 'ProvisionedThroughputExceededException'. If there is -- insufficient provisioned throughput on the shard, subsequent calls made -- within the next 1 second throw 'ProvisionedThroughputExceededException'. Note -- that 'GetRecords' won't return any data when it throws an exception. For this@@ -60,10 +60,10 @@ -- however, it's possible that the application will get exceptions for longer -- than 1 second. ----- To detect whether the application is falling behind in processing, add a--- timestamp to your records and note how long it takes to process them. You can--- also monitor how much data is in a stream using the CloudWatch metrics for--- write operations ('PutRecord' and 'PutRecords'). For more information, see <http://docs.aws.amazon.com/kinesis/latest/dev/monitoring_with_cloudwatch.html Monitoring Amazon Kinesis with Amazon CloudWatch> in the /Amazon Kinesis Developer Guide/.+-- To detect whether the application is falling behind in processing, you can+-- use the 'MillisBehindLatest' response attribute. You can also monitor the+-- amount of data in a stream using the CloudWatch metrics. For more+-- information, see <http://docs.aws.amazon.com/kinesis/latest/dev/monitoring_with_cloudwatch.html Monitoring Amazon Kinesis with Amazon CloudWatch> in the /Amazon Kinesis Developer Guide/. -- -- <http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html> module Network.AWS.Kinesis.GetRecords@@ -81,6 +81,7 @@ -- ** Response constructor , getRecordsResponse -- ** Response lenses+ , grrMillisBehindLatest , grrNextShardIterator , grrRecords ) where@@ -123,24 +124,37 @@ grShardIterator = lens _grShardIterator (\s a -> s { _grShardIterator = a }) data GetRecordsResponse = GetRecordsResponse- { _grrNextShardIterator :: Maybe Text- , _grrRecords :: List "Records" Record+ { _grrMillisBehindLatest :: Maybe Nat+ , _grrNextShardIterator :: Maybe Text+ , _grrRecords :: List "Records" Record } deriving (Eq, Read, Show) -- | 'GetRecordsResponse' constructor. -- -- The fields accessible through corresponding lenses are: --+-- * 'grrMillisBehindLatest' @::@ 'Maybe' 'Natural'+-- -- * 'grrNextShardIterator' @::@ 'Maybe' 'Text' -- -- * 'grrRecords' @::@ ['Record'] -- getRecordsResponse :: GetRecordsResponse getRecordsResponse = GetRecordsResponse- { _grrRecords = mempty- , _grrNextShardIterator = Nothing+ { _grrRecords = mempty+ , _grrNextShardIterator = Nothing+ , _grrMillisBehindLatest = Nothing } +-- | The number of milliseconds the 'GetRecords' response is from the tip of the+-- stream, indicating how far behind current time the consumer is. A value of+-- zero indicates record processing is caught up, and there are no new records+-- to process at this moment.+grrMillisBehindLatest :: Lens' GetRecordsResponse (Maybe Natural)+grrMillisBehindLatest =+ lens _grrMillisBehindLatest (\s a -> s { _grrMillisBehindLatest = a })+ . mapping _Nat+ -- | The next position in the shard from which to start sequentially reading data -- records. If set to 'null', the shard has been closed and the requested iterator -- will not return any more data.@@ -175,5 +189,6 @@ instance FromJSON GetRecordsResponse where parseJSON = withObject "GetRecordsResponse" $ \o -> GetRecordsResponse- <$> o .:? "NextShardIterator"+ <$> o .:? "MillisBehindLatest"+ <*> o .:? "NextShardIterator" <*> o .:? "Records" .!= mempty
gen/Network/AWS/Kinesis/GetShardIterator.hs view
@@ -42,7 +42,7 @@ -- the shard. -- -- When you repeatedly read from an Amazon Kinesis stream use a 'GetShardIterator'--- request to get the first shard iterator to to use in your first 'GetRecords'+-- request to get the first shard iterator for use in your first 'GetRecords' -- request and then use the shard iterator returned by the 'GetRecords' request in 'NextShardIterator' for subsequent reads. A new shard iterator is returned by -- every 'GetRecords' request in 'NextShardIterator', which you use in the 'ShardIterator' parameter of the next 'GetRecords' request. --
gen/Network/AWS/Kinesis/MergeShards.hs view
@@ -34,7 +34,7 @@ -- 'MergeShards' is called when there is a need to reduce the overall capacity of -- a stream because of excess capacity that is not being used. You must specify -- the shard to be merged and the adjacent shard for a stream. For more--- information about merging shards, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-api-java.html#kinesis-using-api-java-resharding-merge Merge Two Shards> in the /Amazon KinesisDeveloper Guide/.+-- information about merging shards, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html Merge Two Shards> in the /Amazon KinesisDeveloper Guide/. -- -- If the stream is in the 'ACTIVE' state, you can call 'MergeShards'. If a stream -- is in the 'CREATING', 'UPDATING', or 'DELETING' state, 'MergeShards' returns a 'ResourceInUseException'. If the specified stream does not exist, 'MergeShards' returns a 'ResourceNotFoundException'.
gen/Network/AWS/Kinesis/PutRecord.hs view
@@ -40,18 +40,18 @@ -- data record to determine which shard a given data record belongs to. -- -- Partition keys are Unicode strings, with a maximum length limit of 256--- bytes. An MD5 hash function is used to map partition keys to 128-bit integer--- values and to map associated data records to shards using the hash key ranges--- of the shards. You can override hashing the partition key to determine the--- shard by explicitly specifying a hash value using the 'ExplicitHashKey'--- parameter. For more information, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-api-java.html#kinesis-using-api-defn-partition-key Partition Key> in the /Amazon KinesisDeveloper Guide/.+-- characters for each key. An MD5 hash function is used to map partition keys+-- to 128-bit integer values and to map associated data records to shards using+-- the hash key ranges of the shards. You can override hashing the partition key+-- to determine the shard by explicitly specifying a hash value using the 'ExplicitHashKey' parameter. For more information, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html Adding Data to a Stream> in the /AmazonKinesis Developer Guide/. -- -- 'PutRecord' returns the shard ID of where the data record was placed and the -- sequence number that was assigned to the data record. -- -- Sequence numbers generally increase over time. To guarantee strictly -- increasing ordering, use the 'SequenceNumberForOrdering' parameter. For more--- information, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-api-java.html#kinesis-using-api-defn-sequence-number Sequence Number> in the /Amazon Kinesis Developer Guide/.+-- information, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html Adding Data to a Stream> in the /Amazon Kinesis Developer Guide/+-- . -- -- If a 'PutRecord' request cannot be processed because of insufficient -- provisioned throughput on the shard involved in the request, 'PutRecord' throws 'ProvisionedThroughputExceededException'.@@ -135,19 +135,20 @@ lens _prExplicitHashKey (\s a -> s { _prExplicitHashKey = a }) -- | Determines which shard in the stream the data record is assigned to.--- Partition keys are Unicode strings with a maximum length limit of 256 bytes.--- Amazon Kinesis uses the partition key as input to a hash function that maps--- the partition key and associated data to a specific shard. Specifically, an--- MD5 hash function is used to map partition keys to 128-bit integer values and--- to map associated data records to shards. As a result of this hashing--- mechanism, all data records with the same partition key will map to the same--- shard within the stream.+-- Partition keys are Unicode strings with a maximum length limit of 256+-- characters for each key. Amazon Kinesis uses the partition key as input to a+-- hash function that maps the partition key and associated data to a specific+-- shard. Specifically, an MD5 hash function is used to map partition keys to+-- 128-bit integer values and to map associated data records to shards. As a+-- result of this hashing mechanism, all data records with the same partition+-- key will map to the same shard within the stream. prPartitionKey :: Lens' PutRecord Text prPartitionKey = lens _prPartitionKey (\s a -> s { _prPartitionKey = a }) -- | Guarantees strictly increasing sequence numbers, for puts from the same -- client and to the same partition key. Usage: set the 'SequenceNumberForOrdering'--- of record /n/ to the sequence number of record /n-1/ (as returned in the 'PutRecordResult' when putting record /n-1/). If this parameter is not set, records will be+-- of record /n/ to the sequence number of record /n-1/ (as returned in the result+-- when putting record /n-1/). If this parameter is not set, records will be -- coarsely ordered based on arrival time. prSequenceNumberForOrdering :: Lens' PutRecord (Maybe Text) prSequenceNumberForOrdering =
gen/Network/AWS/Kinesis/PutRecords.hs view
@@ -41,11 +41,11 @@ -- function is used to map partition keys to 128-bit integer values and to map -- associated data records to shards. As a result of this hashing mechanism, all -- data records with the same partition key map to the same shard within the--- stream. For more information, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-api-java.html#kinesis-using-api-defn-partition-key Partition Key> in the /Amazon KinesisDeveloper Guide/.+-- stream. For more information, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html Adding Data to a Stream> in the /AmazonKinesis Developer Guide/. -- -- Each record in the 'Records' array may include an optional parameter, 'ExplicitHashKey', which overrides the partition key to shard mapping. This parameter allows a -- data producer to determine explicitly the shard where the record is stored.--- For more information, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-api-java.html#kinesis-using-api-putrecords Adding Multiple Records with PutRecords> in the /Amazon Kinesis Developer Guide/.+-- For more information, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords Adding Multiple Records with PutRecords> in the /Amazon Kinesis Developer Guide/. -- -- The 'PutRecords' response includes an array of response 'Records'. Each record -- in the response array directly correlates with a record in the request array@@ -65,7 +65,8 @@ -- An unsuccessfully-processed record includes 'ErrorCode' and 'ErrorMessage' -- values. 'ErrorCode' reflects the type of error and can be one of the following -- values: 'ProvisionedThroughputExceededException' or 'InternalFailure'. 'ErrorMessage' provides more detailed information about the 'ProvisionedThroughputExceededException' exception including the account ID, stream name, and shard ID of the record--- that was throttled.+-- that was throttled. For more information about partially successful+-- responses, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords Adding Multiple Records with PutRecords> in the /Amazon KinesisDeveloper Guide/. -- -- Data records are accessible for only 24 hours from the time that they are -- added to an Amazon Kinesis stream.
gen/Network/AWS/Kinesis/SplitShard.hs view
@@ -38,7 +38,7 @@ -- position in the shard where the shard gets split in two. In many cases, the -- new hash key might simply be the average of the beginning and ending hash -- key, but it can be any hash key value in the range being mapped into the--- shard. For more information about splitting shards, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-api-java.html#kinesis-using-api-java-resharding-split Split a Shard> in the /Amazon Kinesis Developer Guide/.+-- shard. For more information about splitting shards, see <http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html Split a Shard> in the /Amazon Kinesis Developer Guide/. -- -- You can use 'DescribeStream' to determine the shard ID and hash key values for -- the 'ShardToSplit' and 'NewStartingHashKey' parameters that are specified in the 'SplitShard' request.@@ -56,9 +56,8 @@ -- If the specified stream does not exist, 'DescribeStream' returns a 'ResourceNotFoundException'. If you try to create more shards than are authorized for your account, you -- receive a 'LimitExceededException'. ----- The default limit for an AWS account is 10 shards per stream. If you need to--- create a stream with more than 10 shards, <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html contact AWS Support> to increase the--- limit on your account.+-- For the default shard limit for an AWS account, see <http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html Amazon Kinesis Limits>.+-- If you need to increase this limit, <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html contact AWS Support> -- -- If you try to operate on too many streams in parallel using 'CreateStream', 'DeleteStream', 'MergeShards' or 'SplitShard', you receive a 'LimitExceededException'. --
gen/Network/AWS/Kinesis/Types.hs view
@@ -437,13 +437,13 @@ lens _prreExplicitHashKey (\s a -> s { _prreExplicitHashKey = a }) -- | Determines which shard in the stream the data record is assigned to.--- Partition keys are Unicode strings with a maximum length limit of 256 bytes.--- Amazon Kinesis uses the partition key as input to a hash function that maps--- the partition key and associated data to a specific shard. Specifically, an--- MD5 hash function is used to map partition keys to 128-bit integer values and--- to map associated data records to shards. As a result of this hashing--- mechanism, all data records with the same partition key map to the same shard--- within the stream.+-- Partition keys are Unicode strings with a maximum length limit of 256+-- characters for each key. Amazon Kinesis uses the partition key as input to a+-- hash function that maps the partition key and associated data to a specific+-- shard. Specifically, an MD5 hash function is used to map partition keys to+-- 128-bit integer values and to map associated data records to shards. As a+-- result of this hashing mechanism, all data records with the same partition+-- key map to the same shard within the stream. prrePartitionKey :: Lens' PutRecordsRequestEntry Text prrePartitionKey = lens _prrePartitionKey (\s a -> s { _prrePartitionKey = a })