libZSservicesZSamazonka-kinesisZSamazonka-kinesis
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.Kinesis.Lens

Description

 
Synopsis

Operations

PutRecord

putRecord_explicitHashKey :: Lens' PutRecord (Maybe Text) Source #

The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.

putRecord_sequenceNumberForOrdering :: Lens' PutRecord (Maybe Text) Source #

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 result when putting record n-1). If this parameter is not set, records are coarsely ordered based on arrival time.

putRecord_streamName :: Lens' PutRecord Text Source #

The name of the stream to put the data record into.

putRecord_data :: Lens' PutRecord 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 MiB).-- -- 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.

putRecord_partitionKey :: Lens' PutRecord 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 Data Streams 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.

putRecordResponse_encryptionType :: Lens' PutRecordResponse (Maybe EncryptionType) Source #

The encryption type to use on the record. This parameter can be one of the following values:

  • NONE: Do not encrypt the records in the stream.
  • KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key.

putRecordResponse_httpStatus :: Lens' PutRecordResponse Int Source #

The response's http status code.

putRecordResponse_shardId :: Lens' PutRecordResponse Text Source #

The shard ID of the shard where the data record was placed.

putRecordResponse_sequenceNumber :: Lens' PutRecordResponse Text Source #

The sequence number identifier that was assigned to the put data record. The sequence number for the record is unique across all records in the stream. A sequence number is the identifier associated with every record put into the stream.

SubscribeToShard

subscribeToShard_consumerARN :: Lens' SubscribeToShard Text Source #

For this parameter, use the value you obtained when you called RegisterStreamConsumer.

subscribeToShard_shardId :: Lens' SubscribeToShard Text Source #

The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use ListShards.

subscribeToShardResponse_eventStream :: Lens' SubscribeToShardResponse Value Source #

The event stream that your consumer can use to read records from the shard.

DecreaseStreamRetentionPeriod

decreaseStreamRetentionPeriod_retentionPeriodHours :: Lens' DecreaseStreamRetentionPeriod Int Source #

The new retention period of the stream, in hours. Must be less than the current retention period.

MergeShards

mergeShards_streamName :: Lens' MergeShards Text Source #

The name of the stream for the merge.

mergeShards_shardToMerge :: Lens' MergeShards Text Source #

The shard ID of the shard to combine with the adjacent shard for the merge.

mergeShards_adjacentShardToMerge :: Lens' MergeShards Text Source #

The shard ID of the adjacent shard for the merge.

DeregisterStreamConsumer

deregisterStreamConsumer_consumerARN :: Lens' DeregisterStreamConsumer (Maybe Text) Source #

The ARN returned by Kinesis Data Streams when you registered the consumer. If you don't know the ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its ARN.

deregisterStreamConsumer_streamARN :: Lens' DeregisterStreamConsumer (Maybe Text) Source #

The ARN of the Kinesis data stream that the consumer is registered with. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

DescribeStreamSummary

GetShardIterator

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

The sequence number of the data record in the shard from which to start reading. Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.

getShardIterator_timestamp :: Lens' GetShardIterator (Maybe UTCTime) Source #

The time stamp of the data record from which to start reading. Used with shard iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with precision in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or 1459799926.480. If a record with this exact time stamp does not exist, the iterator returned is for the next (later) record. If the time stamp is older than the current trim horizon, the iterator returned is for the oldest untrimmed data record (TRIM_HORIZON).

getShardIterator_streamName :: Lens' GetShardIterator Text Source #

The name of the Amazon Kinesis data stream.

getShardIterator_shardId :: Lens' GetShardIterator Text Source #

The shard ID of the Kinesis Data Streams shard to get the iterator for.

getShardIterator_shardIteratorType :: Lens' GetShardIterator ShardIteratorType Source #

Determines how the shard iterator is used to start reading data records from the shard.

The following are the valid Amazon Kinesis shard iterator types:

  • AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific sequence number, provided in the value StartingSequenceNumber.
  • AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted by a specific sequence number, provided in the value StartingSequenceNumber.
  • AT_TIMESTAMP - Start reading from the position denoted by a specific time stamp, provided in the value Timestamp.
  • TRIM_HORIZON - Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard.
  • LATEST - Start reading just after the most recent 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 data records sequentially. A shard iterator specifies this position using the sequence number of a data record in a shard.

GetRecords

getRecords_limit :: Lens' GetRecords (Maybe Natural) Source #

The maximum number of records to return. Specify a value of up to 10,000. If you specify a value that is greater than 10,000, GetRecords throws InvalidArgumentException. The default value is 10,000.

getRecords_shardIterator :: Lens' GetRecords Text Source #

The position in the shard from which you want to start sequentially reading data records. A shard iterator specifies this position using the sequence number of a data record in the shard.

getRecordsResponse_nextShardIterator :: Lens' GetRecordsResponse (Maybe Text) Source #

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 does not return any more data.

getRecordsResponse_millisBehindLatest :: Lens' GetRecordsResponse (Maybe Natural) Source #

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 that record processing is caught up, and there are no new records to process at this moment.

getRecordsResponse_records :: Lens' GetRecordsResponse [Record] Source #

The data records retrieved from the shard.

StopStreamEncryption

stopStreamEncryption_streamName :: Lens' StopStreamEncryption Text Source #

The name of the stream on which to stop encrypting records.

stopStreamEncryption_encryptionType :: Lens' StopStreamEncryption EncryptionType Source #

The encryption type. The only valid value is KMS.

stopStreamEncryption_keyId :: Lens' StopStreamEncryption Text Source #

The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis.

  • Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  • Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  • Globally unique key ID example: 12345678-1234-1234-1234-123456789012
  • Alias name example: alias/MyAliasName
  • Master key owned by Kinesis Data Streams: alias/aws/kinesis

EnableEnhancedMonitoring

enableEnhancedMonitoring_streamName :: Lens' EnableEnhancedMonitoring Text Source #

The name of the stream for which to enable enhanced monitoring.

enableEnhancedMonitoring_shardLevelMetrics :: Lens' EnableEnhancedMonitoring [MetricsName] Source #

List of shard-level metrics to enable.

The following are the valid shard-level metrics. The value "ALL" enables every metric.

  • IncomingBytes
  • IncomingRecords
  • OutgoingBytes
  • OutgoingRecords
  • WriteProvisionedThroughputExceeded
  • ReadProvisionedThroughputExceeded
  • IteratorAgeMilliseconds
  • ALL

For more information, see Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch in the Amazon Kinesis Data Streams Developer Guide.

enhancedMonitoringOutput_desiredShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe [MetricsName]) Source #

Represents the list of all the metrics that would be in the enhanced state after the operation.

enhancedMonitoringOutput_currentShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe [MetricsName]) Source #

Represents the current state of the metrics that are in the enhanced state before the operation.

DescribeLimits

RegisterStreamConsumer

registerStreamConsumer_streamARN :: Lens' RegisterStreamConsumer Text Source #

The ARN of the Kinesis data stream that you want to register the consumer with. For more info, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

registerStreamConsumer_consumerName :: Lens' RegisterStreamConsumer Text Source #

For a given Kinesis data stream, each consumer must have a unique name. However, consumer names don't have to be unique across data streams.

registerStreamConsumerResponse_consumer :: Lens' RegisterStreamConsumerResponse Consumer Source #

An object that represents the details of the consumer you registered. When you register a consumer, it gets an ARN that is generated by Kinesis Data Streams.

DisableEnhancedMonitoring

disableEnhancedMonitoring_streamName :: Lens' DisableEnhancedMonitoring Text Source #

The name of the Kinesis data stream for which to disable enhanced monitoring.

disableEnhancedMonitoring_shardLevelMetrics :: Lens' DisableEnhancedMonitoring [MetricsName] Source #

List of shard-level metrics to disable.

The following are the valid shard-level metrics. The value "ALL" disables every metric.

  • IncomingBytes
  • IncomingRecords
  • OutgoingBytes
  • OutgoingRecords
  • WriteProvisionedThroughputExceeded
  • ReadProvisionedThroughputExceeded
  • IteratorAgeMilliseconds
  • ALL

For more information, see Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch in the Amazon Kinesis Data Streams Developer Guide.

enhancedMonitoringOutput_desiredShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe [MetricsName]) Source #

Represents the list of all the metrics that would be in the enhanced state after the operation.

enhancedMonitoringOutput_currentShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe [MetricsName]) Source #

Represents the current state of the metrics that are in the enhanced state before the operation.

UpdateShardCount

updateShardCount_targetShardCount :: Lens' UpdateShardCount Natural Source #

The new number of shards. This value has the following default limits. By default, you cannot do the following:

  • Set this value to more than double your current shard count for a stream.
  • Set this value below half your current shard count for a stream.
  • Set this value to more than 500 shards in a stream (the default limit for shard count per stream is 500 per account per region), unless you request a limit increase.
  • Scale a stream with more than 500 shards down unless you set this value to less than 500 shards.

updateShardCount_scalingType :: Lens' UpdateShardCount ScalingType Source #

The scaling type. Uniform scaling creates shards of equal size.

ListTagsForStream

listTagsForStream_limit :: Lens' ListTagsForStream (Maybe Natural) Source #

The number of tags to return. If this number is less than the total number of tags associated with the stream, HasMoreTags is set to true. To list additional tags, set ExclusiveStartTagKey to the last key in the response.

listTagsForStream_exclusiveStartTagKey :: Lens' ListTagsForStream (Maybe Text) Source #

The key to use as the starting point for the list of tags. If this parameter is set, ListTagsForStream gets all tags that occur after ExclusiveStartTagKey.

listTagsForStreamResponse_tags :: Lens' ListTagsForStreamResponse [Tag] Source #

A list of tags associated with StreamName, starting with the first tag after ExclusiveStartTagKey and up to the specified Limit.

listTagsForStreamResponse_hasMoreTags :: Lens' ListTagsForStreamResponse Bool Source #

If set to true, more tags are available. To request additional tags, set ExclusiveStartTagKey to the key of the last tag returned.

DescribeStreamConsumer

describeStreamConsumer_consumerARN :: Lens' DescribeStreamConsumer (Maybe Text) Source #

The ARN returned by Kinesis Data Streams when you registered the consumer.

describeStreamConsumer_streamARN :: Lens' DescribeStreamConsumer (Maybe Text) Source #

The ARN of the Kinesis data stream that the consumer is registered with. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

AddTagsToStream

addTagsToStream_tags :: Lens' AddTagsToStream (HashMap Text Text) Source #

A set of up to 10 key-value pairs to use to create the tags.

PutRecords

putRecords_records :: Lens' PutRecords (NonEmpty PutRecordsRequestEntry) Source #

The records associated with the request.

putRecords_streamName :: Lens' PutRecords Text Source #

The stream name associated with the request.

putRecordsResponse_encryptionType :: Lens' PutRecordsResponse (Maybe EncryptionType) Source #

The encryption type used on the records. This parameter can be one of the following values:

  • NONE: Do not encrypt the records.
  • KMS: Use server-side encryption on the records using a customer-managed AWS KMS key.

putRecordsResponse_failedRecordCount :: Lens' PutRecordsResponse (Maybe Natural) Source #

The number of unsuccessfully processed records in a PutRecords request.

putRecordsResponse_records :: Lens' PutRecordsResponse (NonEmpty PutRecordsResultEntry) Source #

An array of successfully and unsuccessfully processed record results, correlated with the request by natural ordering. A record that is successfully added to a stream includes SequenceNumber and ShardId in the result. A record that fails to be added to a stream includes ErrorCode and ErrorMessage in the result.

ListShards

listShards_nextToken :: Lens' ListShards (Maybe Text) Source #

When the number of shards in the data stream is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of shards in the data stream, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListShards to list the next set of shards.

Don't specify StreamName or StreamCreationTimestamp if you specify NextToken because the latter unambiguously identifies the stream.

You can optionally specify a value for the MaxResults parameter when you specify NextToken. If you specify a MaxResults value that is less than the number of shards that the operation returns if you don't specify MaxResults, the response will contain a new NextToken value. You can use the new NextToken value in a subsequent call to the ListShards operation.

Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to ListShards, you have 300 seconds to use that value. If you specify an expired token in a call to ListShards, you get ExpiredNextTokenException.

listShards_exclusiveStartShardId :: Lens' ListShards (Maybe Text) Source #

Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately follows ExclusiveStartShardId.

If you don't specify this parameter, the default behavior is for ListShards to list the shards starting with the first one in the stream.

You cannot specify this parameter if you specify NextToken.

listShards_streamCreationTimestamp :: Lens' ListShards (Maybe UTCTime) Source #

Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the shards for.

You cannot specify this parameter if you specify the NextToken parameter.

listShards_streamName :: Lens' ListShards (Maybe Text) Source #

The name of the data stream whose shards you want to list.

You cannot specify this parameter if you specify the NextToken parameter.

listShards_maxResults :: Lens' ListShards (Maybe Natural) Source #

The maximum number of shards to return in a single call to ListShards. The minimum value you can specify for this parameter is 1, and the maximum is 10,000, which is also the default.

When the number of shards to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListShards to list the next set of shards.

listShardsResponse_nextToken :: Lens' ListShardsResponse (Maybe Text) Source #

When the number of shards in the data stream is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of shards in the data stream, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListShards to list the next set of shards. For more information about the use of this pagination token when calling the ListShards operation, see ListShardsInput$NextToken.

Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to ListShards, you have 300 seconds to use that value. If you specify an expired token in a call to ListShards, you get ExpiredNextTokenException.

listShardsResponse_shards :: Lens' ListShardsResponse (Maybe [Shard]) Source #

An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and ending hash keys and the starting and ending sequence numbers for the shard.

DeleteStream

deleteStream_enforceConsumerDeletion :: Lens' DeleteStream (Maybe Bool) Source #

If this parameter is unset (null) or if you set it to false, and the stream has registered consumers, the call to DeleteStream fails with a ResourceInUseException.

deleteStream_streamName :: Lens' DeleteStream Text Source #

The name of the stream to delete.

RemoveTagsFromStream

removeTagsFromStream_tagKeys :: Lens' RemoveTagsFromStream (NonEmpty Text) Source #

A list of tag keys. Each corresponding tag is removed from the stream.

ListStreams

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

The maximum number of streams to list.

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

The name of the stream to start the list with.

listStreamsResponse_streamNames :: Lens' ListStreamsResponse [Text] Source #

The names of the streams that are associated with the AWS account making the ListStreams request.

listStreamsResponse_hasMoreStreams :: Lens' ListStreamsResponse Bool Source #

If set to true, there are more streams available to list.

CreateStream

createStream_streamName :: Lens' CreateStream Text Source #

A name to identify the stream. The stream name is scoped to the AWS account used by the application that creates the stream. It is also scoped by AWS Region. That is, two streams in two different AWS accounts can have the same name. Two streams in the same AWS account but in two different Regions can also have the same name.

createStream_shardCount :: Lens' CreateStream Natural Source #

The number of shards that the stream will use. The throughput of the stream is a function of the number of shards; more shards are required for greater provisioned throughput.

StartStreamEncryption

startStreamEncryption_streamName :: Lens' StartStreamEncryption Text Source #

The name of the stream for which to start encrypting records.

startStreamEncryption_encryptionType :: Lens' StartStreamEncryption EncryptionType Source #

The encryption type to use. The only valid value is KMS.

startStreamEncryption_keyId :: Lens' StartStreamEncryption Text Source #

The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis.

  • Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  • Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  • Globally unique key ID example: 12345678-1234-1234-1234-123456789012
  • Alias name example: alias/MyAliasName
  • Master key owned by Kinesis Data Streams: alias/aws/kinesis

ListStreamConsumers

listStreamConsumers_nextToken :: Lens' ListStreamConsumers (Maybe Text) Source #

When the number of consumers that are registered with the data stream is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of consumers that are registered with the data stream, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListStreamConsumers to list the next set of registered consumers.

Don't specify StreamName or StreamCreationTimestamp if you specify NextToken because the latter unambiguously identifies the stream.

You can optionally specify a value for the MaxResults parameter when you specify NextToken. If you specify a MaxResults value that is less than the number of consumers that the operation returns if you don't specify MaxResults, the response will contain a new NextToken value. You can use the new NextToken value in a subsequent call to the ListStreamConsumers operation to list the next set of consumers.

Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to ListStreamConsumers, you have 300 seconds to use that value. If you specify an expired token in a call to ListStreamConsumers, you get ExpiredNextTokenException.

listStreamConsumers_streamCreationTimestamp :: Lens' ListStreamConsumers (Maybe UTCTime) Source #

Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the consumers for.

You can't specify this parameter if you specify the NextToken parameter.

listStreamConsumers_maxResults :: Lens' ListStreamConsumers (Maybe Natural) Source #

The maximum number of consumers that you want a single call of ListStreamConsumers to return.

listStreamConsumers_streamARN :: Lens' ListStreamConsumers Text Source #

The ARN of the Kinesis data stream for which you want to list the registered consumers. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

listStreamConsumersResponse_nextToken :: Lens' ListStreamConsumersResponse (Maybe Text) Source #

When the number of consumers that are registered with the data stream is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of registered consumers, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListStreamConsumers to list the next set of registered consumers. For more information about the use of this pagination token when calling the ListStreamConsumers operation, see ListStreamConsumersInput$NextToken.

Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to ListStreamConsumers, you have 300 seconds to use that value. If you specify an expired token in a call to ListStreamConsumers, you get ExpiredNextTokenException.

listStreamConsumersResponse_consumers :: Lens' ListStreamConsumersResponse (Maybe [Consumer]) Source #

An array of JSON objects. Each object represents one registered consumer.

SplitShard

splitShard_streamName :: Lens' SplitShard Text Source #

The name of the stream for the shard split.

splitShard_shardToSplit :: Lens' SplitShard Text Source #

The shard ID of the shard to split.

splitShard_newStartingHashKey :: Lens' SplitShard Text Source #

A hash key value for the starting hash key of one of the child shards created by the split. The hash key range for a given shard constitutes a set of ordered contiguous positive integers. The value for NewStartingHashKey must be in the range of hash keys being mapped into the shard. The NewStartingHashKey hash key value and all higher hash key values in hash key range are distributed to one of the child shards. All the lower hash key values in the range are distributed to the other child shard.

IncreaseStreamRetentionPeriod

increaseStreamRetentionPeriod_retentionPeriodHours :: Lens' IncreaseStreamRetentionPeriod Int Source #

The new retention period of the stream, in hours. Must be more than the current retention period.

DescribeStream

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

The shard ID of the shard to start with.

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

The maximum number of shards to return in a single call. The default value is 100. If you specify a value greater than 100, at most 100 shards are returned.

describeStream_streamName :: Lens' DescribeStream Text Source #

The name of the stream to describe.

describeStreamResponse_streamDescription :: Lens' DescribeStreamResponse StreamDescription Source #

The current status of the stream, the stream Amazon Resource Name (ARN), an array of shard objects that comprise the stream, and whether there are more shards available.

Types

ChildShard

Consumer

consumer_consumerName :: Lens' Consumer Text Source #

The name of the consumer is something you choose when you register the consumer.

consumer_consumerARN :: Lens' Consumer Text Source #

When you register a consumer, Kinesis Data Streams generates an ARN for it. You need this ARN to be able to call SubscribeToShard.

If you delete a consumer and then create a new one with the same name, it won't have the same ARN. That's because consumer ARNs contain the creation timestamp. This is important to keep in mind if you have IAM policies that reference consumer ARNs.

consumer_consumerStatus :: Lens' Consumer ConsumerStatus Source #

A consumer can't read data while in the CREATING or DELETING states.

ConsumerDescription

consumerDescription_consumerName :: Lens' ConsumerDescription Text Source #

The name of the consumer is something you choose when you register the consumer.

consumerDescription_consumerARN :: Lens' ConsumerDescription Text Source #

When you register a consumer, Kinesis Data Streams generates an ARN for it. You need this ARN to be able to call SubscribeToShard.

If you delete a consumer and then create a new one with the same name, it won't have the same ARN. That's because consumer ARNs contain the creation timestamp. This is important to keep in mind if you have IAM policies that reference consumer ARNs.

consumerDescription_consumerStatus :: Lens' ConsumerDescription ConsumerStatus Source #

A consumer can't read data while in the CREATING or DELETING states.

consumerDescription_streamARN :: Lens' ConsumerDescription Text Source #

The ARN of the stream with which you registered the consumer.

EnhancedMetrics

enhancedMetrics_shardLevelMetrics :: Lens' EnhancedMetrics (Maybe [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 Data Streams Service with Amazon CloudWatch in the Amazon Kinesis Data Streams Developer Guide.

EnhancedMonitoringOutput

enhancedMonitoringOutput_desiredShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe [MetricsName]) Source #

Represents the list of all the metrics that would be in the enhanced state after the operation.

enhancedMonitoringOutput_currentShardLevelMetrics :: Lens' EnhancedMonitoringOutput (Maybe [MetricsName]) Source #

Represents the current state of the metrics that are in the enhanced state before the operation.

HashKeyRange

hashKeyRange_startingHashKey :: Lens' HashKeyRange Text Source #

The starting hash key of the hash key range.

hashKeyRange_endingHashKey :: Lens' HashKeyRange Text Source #

The ending hash key of the hash key range.

PutRecordsRequestEntry

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

putRecordsRequestEntry_data :: 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 MiB).-- -- 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.

putRecordsRequestEntry_partitionKey :: 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 Data Streams 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

putRecordsResultEntry_sequenceNumber :: Lens' PutRecordsResultEntry (Maybe Text) Source #

The sequence number for an individual record result.

putRecordsResultEntry_errorCode :: Lens' PutRecordsResultEntry (Maybe Text) Source #

The error code for an individual record result. ErrorCodes can be either ProvisionedThroughputExceededException or InternalFailure.

putRecordsResultEntry_errorMessage :: 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".

putRecordsResultEntry_shardId :: Lens' PutRecordsResultEntry (Maybe Text) Source #

The shard ID for an individual record result.

Record

record_encryptionType :: Lens' Record (Maybe EncryptionType) Source #

The encryption type used on the record. This parameter can be one of the following values:

  • NONE: Do not encrypt the records in the stream.
  • KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key.

record_approximateArrivalTimestamp :: Lens' Record (Maybe UTCTime) Source #

The approximate time that the record was inserted into the stream.

record_sequenceNumber :: Lens' Record Text Source #

The unique identifier of the record within its shard.

record_data :: Lens' Record ByteString Source #

The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, 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 MiB).-- -- 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.

record_partitionKey :: Lens' Record Text Source #

Identifies which shard in the stream the data record is assigned to.

SequenceNumberRange

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

Shard

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

The shard ID of the shard adjacent to the shard's parent.

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

The shard ID of the shard's parent.

shard_shardId :: Lens' Shard Text Source #

The unique identifier of the shard within the stream.

shard_hashKeyRange :: Lens' Shard HashKeyRange Source #

The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.

shard_sequenceNumberRange :: Lens' Shard SequenceNumberRange Source #

The range of possible sequence numbers for the shard.

ShardFilter

StartingPosition

startingPosition_sequenceNumber :: Lens' StartingPosition (Maybe Text) Source #

The sequence number of the data record in the shard from which to start streaming. To specify a sequence number, set StartingPosition to AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

startingPosition_timestamp :: Lens' StartingPosition (Maybe UTCTime) Source #

The time stamp of the data record from which to start reading. To specify a time stamp, set StartingPosition to Type AT_TIMESTAMP. A time stamp is the Unix epoch date with precision in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or 1459799926.480. If a record with this exact time stamp does not exist, records will be streamed from the next (later) record. If the time stamp is older than the current trim horizon, records will be streamed from the oldest untrimmed data record (TRIM_HORIZON).

startingPosition_type :: Lens' StartingPosition ShardIteratorType Source #

You can set the starting position to one of the following values:

AT_SEQUENCE_NUMBER: Start streaming from the position denoted by the sequence number specified in the SequenceNumber field.

AFTER_SEQUENCE_NUMBER: Start streaming right after the position denoted by the sequence number specified in the SequenceNumber field.

AT_TIMESTAMP: Start streaming from the position denoted by the time stamp specified in the Timestamp field.

TRIM_HORIZON: Start streaming at the last untrimmed record in the shard, which is the oldest data record in the shard.

LATEST: Start streaming just after the most recent record in the shard, so that you always read the most recent data in the shard.

StreamDescription

streamDescription_encryptionType :: Lens' StreamDescription (Maybe EncryptionType) Source #

The server-side encryption type used on the stream. This parameter can be one of the following values:

  • NONE: Do not encrypt the records in the stream.
  • KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key.

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

The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis.

  • Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  • Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  • Globally unique key ID example: 12345678-1234-1234-1234-123456789012
  • Alias name example: alias/MyAliasName
  • Master key owned by Kinesis Data Streams: alias/aws/kinesis

streamDescription_streamName :: Lens' StreamDescription Text Source #

The name of the stream being described.

streamDescription_streamARN :: Lens' StreamDescription Text Source #

The Amazon Resource Name (ARN) for the stream being described.

streamDescription_streamStatus :: 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. Kinesis Data Streams immediately returns and sets StreamStatus to CREATING.
  • DELETING - The stream is being deleted. The specified stream is in the DELETING state until Kinesis Data Streams 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.

streamDescription_shards :: Lens' StreamDescription [Shard] Source #

The shards that comprise the stream.

streamDescription_hasMoreShards :: Lens' StreamDescription Bool Source #

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

streamDescription_retentionPeriodHours :: Lens' StreamDescription Int Source #

The current retention period, in hours. Minimum value of 24. Maximum value of 168.

streamDescription_streamCreationTimestamp :: Lens' StreamDescription UTCTime Source #

The approximate time that the stream was created.

streamDescription_enhancedMonitoring :: Lens' StreamDescription [EnhancedMetrics] Source #

Represents the current enhanced monitoring settings of the stream.

StreamDescriptionSummary

streamDescriptionSummary_encryptionType :: Lens' StreamDescriptionSummary (Maybe EncryptionType) Source #

The encryption type used. This value is one of the following:

  • KMS
  • NONE

streamDescriptionSummary_keyId :: Lens' StreamDescriptionSummary (Maybe Text) Source #

The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis.

  • Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  • Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  • Globally unique key ID example: 12345678-1234-1234-1234-123456789012
  • Alias name example: alias/MyAliasName
  • Master key owned by Kinesis Data Streams: alias/aws/kinesis

streamDescriptionSummary_consumerCount :: Lens' StreamDescriptionSummary (Maybe Natural) Source #

The number of enhanced fan-out consumers registered with the stream.

streamDescriptionSummary_streamARN :: Lens' StreamDescriptionSummary Text Source #

The Amazon Resource Name (ARN) for the stream being described.

streamDescriptionSummary_streamStatus :: Lens' StreamDescriptionSummary 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. Kinesis Data Streams immediately returns and sets StreamStatus to CREATING.
  • DELETING - The stream is being deleted. The specified stream is in the DELETING state until Kinesis Data Streams 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.

streamDescriptionSummary_enhancedMonitoring :: Lens' StreamDescriptionSummary [EnhancedMetrics] Source #

Represents the current enhanced monitoring settings of the stream.

SubscribeToShardEvent

subscribeToShardEvent_continuationSequenceNumber :: Lens' SubscribeToShardEvent Text Source #

Use this as SequenceNumber in the next call to SubscribeToShard, with StartingPosition set to AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use ContinuationSequenceNumber for checkpointing because it captures your shard progress even when no data is written to the shard.

subscribeToShardEvent_millisBehindLatest :: Lens' SubscribeToShardEvent Natural Source #

The number of milliseconds the read records are from the tip of the stream, indicating how far behind current time the consumer is. A value of zero indicates that record processing is caught up, and there are no new records to process at this moment.

Tag

tag_value :: 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, _ . / = + - % @

tag_key :: Lens' Tag Text Source #

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