Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Amazon Kinesis Streams Service API Reference
Amazon Kinesis Streams is a managed service that scales elastically for real time processing of streaming big data.
- kinesis :: Service
- _ExpiredIteratorException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError
- _ProvisionedThroughputExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
- streamExists :: Wait DescribeStream
- streamNotExists :: Wait DescribeStream
- module Network.AWS.Kinesis.PutRecord
- module Network.AWS.Kinesis.DecreaseStreamRetentionPeriod
- module Network.AWS.Kinesis.MergeShards
- module Network.AWS.Kinesis.GetShardIterator
- module Network.AWS.Kinesis.GetRecords
- module Network.AWS.Kinesis.EnableEnhancedMonitoring
- module Network.AWS.Kinesis.DisableEnhancedMonitoring
- module Network.AWS.Kinesis.ListTagsForStream
- module Network.AWS.Kinesis.AddTagsToStream
- module Network.AWS.Kinesis.PutRecords
- module Network.AWS.Kinesis.DeleteStream
- module Network.AWS.Kinesis.RemoveTagsFromStream
- module Network.AWS.Kinesis.ListStreams
- module Network.AWS.Kinesis.CreateStream
- module Network.AWS.Kinesis.SplitShard
- module Network.AWS.Kinesis.IncreaseStreamRetentionPeriod
- module Network.AWS.Kinesis.DescribeStream
- data MetricsName
- data ShardIteratorType
- data StreamStatus
- data EnhancedMetrics
- enhancedMetrics :: EnhancedMetrics
- emShardLevelMetrics :: Lens' EnhancedMetrics (Maybe (NonEmpty MetricsName))
- data EnhancedMonitoringOutput
- enhancedMonitoringOutput :: EnhancedMonitoringOutput
- emoDesiredShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe (NonEmpty MetricsName))
- emoCurrentShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe (NonEmpty MetricsName))
- emoStreamName :: Lens' EnhancedMonitoringOutput (Maybe Text)
- data HashKeyRange
- hashKeyRange :: Text -> Text -> HashKeyRange
- hkrStartingHashKey :: Lens' HashKeyRange Text
- hkrEndingHashKey :: Lens' HashKeyRange Text
- data PutRecordsRequestEntry
- putRecordsRequestEntry :: ByteString -> Text -> PutRecordsRequestEntry
- prreExplicitHashKey :: Lens' PutRecordsRequestEntry (Maybe Text)
- prreData :: Lens' PutRecordsRequestEntry ByteString
- prrePartitionKey :: Lens' PutRecordsRequestEntry Text
- data PutRecordsResultEntry
- putRecordsResultEntry :: PutRecordsResultEntry
- prreSequenceNumber :: Lens' PutRecordsResultEntry (Maybe Text)
- prreErrorCode :: Lens' PutRecordsResultEntry (Maybe Text)
- prreErrorMessage :: Lens' PutRecordsResultEntry (Maybe Text)
- prreShardId :: Lens' PutRecordsResultEntry (Maybe Text)
- data Record
- record :: Text -> ByteString -> Text -> Record
- rApproximateArrivalTimestamp :: Lens' Record (Maybe UTCTime)
- rSequenceNumber :: Lens' Record Text
- rData :: Lens' Record ByteString
- rPartitionKey :: Lens' Record Text
- data SequenceNumberRange
- sequenceNumberRange :: Text -> SequenceNumberRange
- snrEndingSequenceNumber :: Lens' SequenceNumberRange (Maybe Text)
- snrStartingSequenceNumber :: Lens' SequenceNumberRange Text
- data Shard
- shard :: Text -> HashKeyRange -> SequenceNumberRange -> Shard
- sAdjacentParentShardId :: Lens' Shard (Maybe Text)
- sParentShardId :: Lens' Shard (Maybe Text)
- sShardId :: Lens' Shard Text
- sHashKeyRange :: Lens' Shard HashKeyRange
- sSequenceNumberRange :: Lens' Shard SequenceNumberRange
- data StreamDescription
- streamDescription :: Text -> Text -> StreamStatus -> Bool -> Natural -> StreamDescription
- sdStreamName :: Lens' StreamDescription Text
- sdStreamARN :: Lens' StreamDescription Text
- sdStreamStatus :: Lens' StreamDescription StreamStatus
- sdShards :: Lens' StreamDescription [Shard]
- sdHasMoreShards :: Lens' StreamDescription Bool
- sdRetentionPeriodHours :: Lens' StreamDescription Natural
- sdEnhancedMonitoring :: Lens' StreamDescription [EnhancedMetrics]
- data Tag
- tag :: Text -> Tag
- tagValue :: Lens' Tag (Maybe Text)
- tagKey :: Lens' Tag Text
Service Configuration
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by Kinesis
.
ExpiredIteratorException
_ExpiredIteratorException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The provided iterator exceeds the maximum age allowed.
InvalidArgumentException
_InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError Source #
A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.
ProvisionedThroughputExceededException
_ProvisionedThroughputExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The request rate for the stream is too high, or the requested data is too large for the available throughput. Reduce the frequency or size of your requests. For more information, see Streams Limits in the Amazon Kinesis Streams Developer Guide, and Error Retries and Exponential Backoff in AWS in the AWS General Reference.
ResourceNotFoundException
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The requested resource could not be found. The stream might not be
specified correctly, or it might not be in the ACTIVE
state if the
operation requires it.
LimitExceededException
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed (5).
ResourceInUseException
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The resource is not available for this operation. For successful
operation, the resource needs to be in the ACTIVE
state.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
StreamExists
streamExists :: Wait DescribeStream Source #
Polls DescribeStream
every 10 seconds until a
successful state is reached. An error is returned after 18 failed checks.
StreamNotExists
streamNotExists :: Wait DescribeStream Source #
Polls DescribeStream
every 10 seconds until a
successful state is reached. An error is returned after 18 failed checks.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
PutRecord
DecreaseStreamRetentionPeriod
MergeShards
GetShardIterator
GetRecords
EnableEnhancedMonitoring
DisableEnhancedMonitoring
ListTagsForStream
AddTagsToStream
PutRecords
DeleteStream
RemoveTagsFromStream
ListStreams (Paginated)
CreateStream
SplitShard
IncreaseStreamRetentionPeriod
DescribeStream (Paginated)
Types
MetricsName
data MetricsName Source #
All | |
IncomingBytes | |
IncomingRecords | |
IteratorAgeMilliseconds | |
OutgoingBytes | |
OutgoingRecords | |
ReadProvisionedThroughputExceeded | |
WriteProvisionedThroughputExceeded |
ShardIteratorType
data ShardIteratorType Source #
StreamStatus
data StreamStatus Source #
EnhancedMetrics
data EnhancedMetrics Source #
Represents enhanced metrics types.
See: enhancedMetrics
smart constructor.
enhancedMetrics :: EnhancedMetrics Source #
Creates a value of EnhancedMetrics
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
emShardLevelMetrics :: Lens' EnhancedMetrics (Maybe (NonEmpty MetricsName)) Source #
List of shard-level metrics.
The following are the valid shard-level metrics. The value "ALL
"
enhances every metric.
IncomingBytes
IncomingRecords
OutgoingBytes
OutgoingRecords
WriteProvisionedThroughputExceeded
ReadProvisionedThroughputExceeded
IteratorAgeMilliseconds
ALL
For more information, see Monitoring the Amazon Kinesis Streams Service with Amazon CloudWatch in the Amazon Kinesis Streams Developer Guide.
EnhancedMonitoringOutput
data EnhancedMonitoringOutput Source #
Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring.
See: enhancedMonitoringOutput
smart constructor.
enhancedMonitoringOutput :: EnhancedMonitoringOutput Source #
Creates a value of EnhancedMonitoringOutput
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
emoDesiredShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe (NonEmpty MetricsName)) Source #
Represents the list of all the metrics that would be in the enhanced state after the operation.
emoCurrentShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe (NonEmpty MetricsName)) Source #
Represents the current state of the metrics that are in the enhanced state before the operation.
emoStreamName :: Lens' EnhancedMonitoringOutput (Maybe Text) Source #
The name of the Amazon Kinesis stream.
HashKeyRange
data HashKeyRange Source #
The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.
See: hashKeyRange
smart constructor.
Creates a value of HashKeyRange
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
hkrStartingHashKey :: Lens' HashKeyRange Text Source #
The starting hash key of the hash key range.
hkrEndingHashKey :: Lens' HashKeyRange Text Source #
The ending hash key of the hash key range.
PutRecordsRequestEntry
data PutRecordsRequestEntry Source #
Represents the output for PutRecords
.
See: putRecordsRequestEntry
smart constructor.
putRecordsRequestEntry Source #
Creates a value of PutRecordsRequestEntry
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
prreExplicitHashKey :: Lens' PutRecordsRequestEntry (Maybe Text) Source #
The hash value used to determine explicitly the shard that the data record is assigned to by overriding the partition key hash.
prreData :: Lens' PutRecordsRequestEntry ByteString Source #
The data blob to put into the record, which is base64-encoded when the blob is serialized. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).
Note: This Lens
automatically encodes and decodes Base64 data,
despite what the AWS documentation might say.
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.
prrePartitionKey :: Lens' PutRecordsRequestEntry Text Source #
Determines which shard in the stream the data record is assigned to. 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.
PutRecordsResultEntry
data PutRecordsResultEntry Source #
Represents the result of an individual record from a PutRecords
request. A record that is successfully added to a stream includes
SequenceNumber
and ShardId
in the result. A record that fails to be
added to the stream includes ErrorCode
and ErrorMessage
in the
result.
See: putRecordsResultEntry
smart constructor.
putRecordsResultEntry :: PutRecordsResultEntry Source #
Creates a value of PutRecordsResultEntry
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
prreSequenceNumber :: Lens' PutRecordsResultEntry (Maybe Text) Source #
The sequence number for an individual record result.
prreErrorCode :: Lens' PutRecordsResultEntry (Maybe Text) Source #
The error code for an individual record result. ErrorCodes
can be
either ProvisionedThroughputExceededException
or InternalFailure
.
prreShardId :: Lens' PutRecordsResultEntry (Maybe Text) Source #
The shard ID for an individual record result.
Record
The unit of data of the Amazon Kinesis stream, which is composed of a sequence number, a partition key, and a data blob.
See: record
smart constructor.
Creates a value of Record
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
rApproximateArrivalTimestamp :: Lens' Record (Maybe UTCTime) Source #
The approximate time that the record was inserted into the stream.
rData :: Lens' Record ByteString Source #
The data blob. The data in the blob is both opaque and immutable to the Amazon Kinesis service, which does not inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).
Note: This Lens
automatically encodes and decodes Base64 data,
despite what the AWS documentation might say.
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.
rPartitionKey :: Lens' Record Text Source #
Identifies which shard in the stream the data record is assigned to.
SequenceNumberRange
data SequenceNumberRange Source #
The range of possible sequence numbers for the shard.
See: sequenceNumberRange
smart constructor.
Creates a value of SequenceNumberRange
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
snrEndingSequenceNumber :: Lens' SequenceNumberRange (Maybe Text) Source #
The ending sequence number for the range. Shards that are in the OPEN
state have an ending sequence number of null
.
snrStartingSequenceNumber :: Lens' SequenceNumberRange Text Source #
The starting sequence number for the range.
Shard
A uniquely identified group of data records in an Amazon Kinesis stream.
See: shard
smart constructor.
Creates a value of Shard
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sAdjacentParentShardId :: Lens' Shard (Maybe Text) Source #
The shard ID of the shard adjacent to the shard's parent.
sHashKeyRange :: Lens' Shard HashKeyRange Source #
The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.
sSequenceNumberRange :: Lens' Shard SequenceNumberRange Source #
The range of possible sequence numbers for the shard.
StreamDescription
data StreamDescription Source #
Represents the output for DescribeStream.
See: streamDescription
smart constructor.
:: Text | |
-> Text | |
-> StreamStatus | |
-> Bool | |
-> Natural | |
-> StreamDescription |
Creates a value of StreamDescription
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sdStreamName :: Lens' StreamDescription Text Source #
The name of the stream being described.
sdStreamARN :: Lens' StreamDescription Text Source #
The Amazon Resource Name (ARN) for the stream being described.
sdStreamStatus :: Lens' StreamDescription StreamStatus Source #
The current status of the stream being described. The stream status is one of the following states:
CREATING
- The stream is being created. Amazon Kinesis immediately returns and setsStreamStatus
toCREATING
.DELETING
- The stream is being deleted. The specified stream is in theDELETING
state until Amazon Kinesis completes the deletion.ACTIVE
- The stream exists and is ready for read and write operations or deletion. You should perform read and write operations only on anACTIVE
stream.UPDATING
- Shards in the stream are being merged or split. Read and write operations continue to work while the stream is in theUPDATING
state.
sdHasMoreShards :: Lens' StreamDescription Bool Source #
If set to true
, more shards in the stream are available to describe.
sdRetentionPeriodHours :: Lens' StreamDescription Natural Source #
The current retention period, in hours.
sdEnhancedMonitoring :: Lens' StreamDescription [EnhancedMetrics] Source #
Represents the current enhanced monitoring settings of the stream.
Tag
Metadata assigned to the stream, consisting of a key-value pair.
See: tag
smart constructor.