amazonka-kinesis-1.2.0.2: Amazon Kinesis 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.Kinesis

Contents

Description

Amazon Kinesis Service API Reference

Amazon Kinesis is a managed service that scales elastically for real time processing of streaming big data.

See: AWS API Reference

Synopsis

Service Configuration

kinesis :: Service Source

API version '2013-12-02' of the Amazon Kinesis SDK 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 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 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. It might not be specified correctly, or it might not be in the ACTIVE state.

ResourceInUseException

_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError Source

The resource is not available for this operation. For example, you attempted to split a shard but the stream is not in the ACTIVE state.

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

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.

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

MergeShards

GetRecords

GetShardIterator

ListTagsForStream

AddTagsToStream

PutRecords

DeleteStream

RemoveTagsFromStream

ListStreams (Paginated)

CreateStream

SplitShard

DescribeStream (Paginated)

Types

ShardIteratorType

StreamStatus

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.

hashKeyRange Source

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

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. The maximum size of the data blob (the payload before base64-encoding) is 50 kilobytes (KB)

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 your Amazon Kinesis stream includes SequenceNumber and ShardId in the result. A record that fails to be added to your Amazon Kinesis 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.

prreErrorMessage :: Lens' PutRecordsResultEntry (Maybe Text) Source

The error message for an individual record result. An ErrorCode value of ProvisionedThroughputExceededException has an error message that includes the account ID, stream name, and shard ID. An ErrorCode value of InternalFailure has the error message '"Internal Service Failure"'.

prreShardId :: Lens' PutRecordsResultEntry (Maybe Text) Source

The shard ID for an individual record result.

Record

data Record Source

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.

record Source

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:

rSequenceNumber :: Lens' Record Text Source

The unique identifier for the record in the Amazon Kinesis 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. The maximum size of the data blob (the payload before base64-encoding) is 50 kilobytes (KB)

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

sequenceNumberRange Source

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

data Shard Source

A uniquely identified group of data records in an Amazon Kinesis stream.

See: shard smart constructor.

shard Source

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.

sParentShardId :: Lens' Shard (Maybe Text) Source

The shard Id of the shard's parent.

sShardId :: Lens' Shard Text Source

The unique identifier of the shard within the Amazon Kinesis stream.

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

streamDescription Source

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 sets StreamStatus to CREATING.
  • DELETING - The stream is being deleted. The specified stream is in the DELETING 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 an ACTIVE stream.
  • UPDATING - Shards in the stream are being merged or split. Read and write operations continue to work while the stream is in the UPDATING state.

sdShards :: Lens' StreamDescription [Shard] Source

The shards that comprise the stream.

sdHasMoreShards :: Lens' StreamDescription Bool Source

If set to true, more shards in the stream are available to describe.

Tag

data Tag Source

Metadata assigned to the stream, consisting of a key-value pair.

See: tag smart constructor.

tag Source

Arguments

:: Text

tagKey

-> Tag 

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

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

tagValue :: Lens' Tag (Maybe Text) Source

An optional string, typically used to describe or define the tag. Maximum length: 256 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % '

tagKey :: Lens' Tag Text Source

A unique identifier for the tag. Maximum length: 128 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % '