Module Smaws_Client_Kinesis

Kinesis client library built on EIO.

Types

type nonrec validation_exception = {
  1. message : string option;
}

Specifies that you tried to invoke this API for a data stream with the on-demand capacity mode. This API is only supported for data streams with the provisioned capacity mode.

type nonrec stream_mode =
  1. | ON_DEMAND
  2. | PROVISIONED
type nonrec stream_mode_details = {
  1. stream_mode : stream_mode;
    (*

    Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

    *)
}

Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

type nonrec update_stream_mode_input = {
  1. stream_mode_details : stream_mode_details;
    (*

    Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

    *)
  2. stream_ar_n : string;
    (*

    Specifies the ARN of the data stream whose capacity mode you want to update.

    *)
}
type nonrec resource_not_found_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The requested resource could not be found. The stream might not be specified correctly.

type nonrec resource_in_use_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The resource is not available for this operation. For successful operation, the resource must be in the ACTIVE state.

type nonrec limit_exceeded_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.

type nonrec invalid_argument_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.

type nonrec update_shard_count_output = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. target_shard_count : int option;
    (*

    The updated number of shards.

    *)
  3. current_shard_count : int option;
    (*

    The current number of shards.

    *)
  4. stream_name : string option;
    (*

    The name of the stream.

    *)
}
type nonrec scaling_type =
  1. | UNIFORM_SCALING
type nonrec update_shard_count_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. scaling_type : scaling_type;
    (*

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

    *)
  3. target_shard_count : int;
    (*

    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 10000 shards in a stream (the default limit for shard count per stream is 10000 per account per region), unless you request a limit increase.
    • Scale a stream with more than 10000 shards down unless you set this value to less than 10000 shards.
    *)
  4. stream_name : string option;
    (*

    The name of the stream.

    *)
}
type nonrec access_denied_exception = {
  1. message : string option;
}

Specifies that you do not have the permissions required to perform this operation.

type nonrec tag_map = (string * string) list
type nonrec tag = {
  1. value : string option;
    (*

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

    *)
  2. key : string;
    (*

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

    *)
}

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

type nonrec encryption_type =
  1. | KMS
  2. | NONE
type nonrec record = {
  1. encryption_type : encryption_type option;
    (*

    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 Amazon Web Services KMS key.
    *)
  2. partition_key : string;
    (*

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

    *)
  3. data : bytes;
    (*

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

    *)
  4. approximate_arrival_timestamp : Smaws_Lib.CoreTypes.Timestamp.t option;
    (*

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

    *)
  5. sequence_number : string;
    (*

    The unique identifier of the record within its shard.

    *)
}

The unit of data of the Kinesis data stream, which is composed of a sequence number, a partition key, and a data blob.

type nonrec hash_key_range = {
  1. ending_hash_key : string;
    (*

    The ending hash key of the hash key range.

    *)
  2. starting_hash_key : string;
    (*

    The starting hash key of the hash key range.

    *)
}

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

type nonrec child_shard = {
  1. hash_key_range : hash_key_range;
  2. parent_shards : string list;
    (*

    The current shard that is the parent of the existing child shard.

    *)
  3. shard_id : string;
    (*

    The shard ID of the existing child shard of the current shard.

    *)
}

Output parameter of the GetRecords API. The existing child shard of the current shard.

type nonrec subscribe_to_shard_event = {
  1. child_shards : child_shard list option;
    (*

    The list of the child shards of the current shard, returned only at the end of the current shard.

    *)
  2. millis_behind_latest : int;
    (*

    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.

    *)
  3. continuation_sequence_number : string;
    (*

    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.

    *)
  4. records : record list;
}

After you call SubscribeToShard, Kinesis Data Streams sends events of this type over an HTTP/2 connection to your consumer.

type nonrec kms_disabled_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The request was rejected because the specified customer master key (CMK) isn't enabled.

type nonrec kms_invalid_state_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The request was rejected because the state of the specified resource isn't valid for this request. For more information, see How Key State Affects Use of a Customer Master Key in the Amazon Web Services Key Management Service Developer Guide.

type nonrec kms_access_denied_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The ciphertext references a key that doesn't exist or that you don't have access to.

type nonrec kms_not_found_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The request was rejected because the specified entity or resource can't be found.

type nonrec kms_opt_in_required = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The Amazon Web Services access key ID needs a subscription for the service.

type nonrec kms_throttling_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The request was denied due to request throttling. For more information about throttling, see Limits in the Amazon Web Services Key Management Service Developer Guide.

type nonrec internal_failure_exception = {
  1. message : string option;
}

The processing of the request failed because of an unknown error, exception, or failure.

type nonrec subscribe_to_shard_event_stream =
  1. | InternalFailureException of internal_failure_exception
    (*

    The processing of the request failed because of an unknown error, exception, or failure.

    *)
  2. | KMSThrottlingException of kms_throttling_exception
  3. | KMSOptInRequired of kms_opt_in_required
  4. | KMSNotFoundException of kms_not_found_exception
  5. | KMSAccessDeniedException of kms_access_denied_exception
  6. | KMSInvalidStateException of kms_invalid_state_exception
  7. | KMSDisabledException of kms_disabled_exception
  8. | ResourceInUseException of resource_in_use_exception
  9. | ResourceNotFoundException of resource_not_found_exception
  10. | SubscribeToShardEvent of subscribe_to_shard_event
    (*

    After you call SubscribeToShard, Kinesis Data Streams sends events of this type to your consumer. For an example of how to handle these events, see Enhanced Fan-Out Using the Kinesis Data Streams API.

    *)

This is a tagged union for all of the types of events an enhanced fan-out consumer can receive over HTTP/2 after a call to SubscribeToShard.

type nonrec subscribe_to_shard_output = {
  1. event_stream : subscribe_to_shard_event_stream;
    (*

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

    *)
}
type nonrec shard_iterator_type =
  1. | AT_TIMESTAMP
  2. | LATEST
  3. | TRIM_HORIZON
  4. | AFTER_SEQUENCE_NUMBER
  5. | AT_SEQUENCE_NUMBER
type nonrec starting_position = {
  1. timestamp_ : Smaws_Lib.CoreTypes.Timestamp.t option;
    (*

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

    *)
  2. sequence_number : string option;
    (*

    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.

    *)
  3. type_ : shard_iterator_type;
    (*

    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.

    *)
}

The starting position in the data stream from which to start streaming.

type nonrec subscribe_to_shard_input = {
  1. starting_position : starting_position;
    (*

    The starting position in the data stream from which to start streaming.

    *)
  2. shard_id : string;
    (*

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

    *)
  3. consumer_ar_n : string;
    (*

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

    *)
}
type nonrec stream_status =
  1. | UPDATING
  2. | ACTIVE
  3. | DELETING
  4. | CREATING
type nonrec stream_summary = {
  1. stream_creation_timestamp : Smaws_Lib.CoreTypes.Timestamp.t option;
    (*

    The timestamp at which the stream was created.

    *)
  2. stream_mode_details : stream_mode_details option;
  3. stream_status : stream_status;
    (*

    The status of the stream.

    *)
  4. stream_ar_n : string;
    (*

    The ARN of the stream.

    *)
  5. stream_name : string;
    (*

    The name of a stream.

    *)
}

The summary of a stream.

type nonrec metrics_name =
  1. | ALL
  2. | ITERATOR_AGE_MILLISECONDS
  3. | READ_PROVISIONED_THROUGHPUT_EXCEEDED
  4. | WRITE_PROVISIONED_THROUGHPUT_EXCEEDED
  5. | OUTGOING_RECORDS
  6. | OUTGOING_BYTES
  7. | INCOMING_RECORDS
  8. | INCOMING_BYTES
type nonrec enhanced_metrics = {
  1. shard_level_metrics : metrics_name list option;
    (*

    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.

    *)
}

Represents enhanced metrics types.

type nonrec stream_description_summary = {
  1. consumer_count : int option;
    (*

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

    *)
  2. open_shard_count : int;
    (*

    The number of open shards in the stream.

    *)
  3. key_id : string option;
    (*

    The GUID for the customer-managed Amazon Web Services 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
    *)
  4. encryption_type : encryption_type option;
    (*

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

    • KMS
    • NONE
    *)
  5. enhanced_monitoring : enhanced_metrics list;
    (*

    Represents the current enhanced monitoring settings of the stream.

    *)
  6. stream_creation_timestamp : Smaws_Lib.CoreTypes.Timestamp.t;
    (*

    The approximate time that the stream was created.

    *)
  7. retention_period_hours : int;
    (*

    The current retention period, in hours.

    *)
  8. stream_mode_details : stream_mode_details option;
    (*

    Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand ycapacity mode and a provisioned capacity mode for your data streams.

    *)
  9. stream_status : stream_status;
    (*

    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.
    *)
  10. stream_ar_n : string;
    (*

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

    *)
  11. stream_name : string;
    (*

    The name of the stream being described.

    *)
}

Represents the output for DescribeStreamSummary

type nonrec sequence_number_range = {
  1. ending_sequence_number : string option;
    (*

    The ending sequence number for the range. Shards that are in the OPEN state have an ending sequence number of null.

    *)
  2. starting_sequence_number : string;
    (*

    The starting sequence number for the range.

    *)
}

The range of possible sequence numbers for the shard.

type nonrec shard = {
  1. sequence_number_range : sequence_number_range;
    (*

    The range of possible sequence numbers for the shard.

    *)
  2. hash_key_range : hash_key_range;
    (*

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

    *)
  3. adjacent_parent_shard_id : string option;
    (*

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

    *)
  4. parent_shard_id : string option;
    (*

    The shard ID of the shard's parent.

    *)
  5. shard_id : string;
    (*

    The unique identifier of the shard within the stream.

    *)
}

A uniquely identified group of data records in a Kinesis data stream.

type nonrec stream_description = {
  1. key_id : string option;
    (*

    The GUID for the customer-managed Amazon Web Services 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
    *)
  2. encryption_type : encryption_type option;
    (*

    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 Amazon Web Services KMS key.
    *)
  3. enhanced_monitoring : enhanced_metrics list;
    (*

    Represents the current enhanced monitoring settings of the stream.

    *)
  4. stream_creation_timestamp : Smaws_Lib.CoreTypes.Timestamp.t;
    (*

    The approximate time that the stream was created.

    *)
  5. retention_period_hours : int;
    (*

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

    *)
  6. has_more_shards : bool;
    (*

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

    *)
  7. shards : shard list;
    (*

    The shards that comprise the stream.

    *)
  8. stream_mode_details : stream_mode_details option;
    (*

    Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

    *)
  9. stream_status : stream_status;
    (*

    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.
    *)
  10. stream_ar_n : string;
    (*

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

    *)
  11. stream_name : string;
    (*

    The name of the stream being described.

    *)
}

Represents the output for DescribeStream.

type nonrec stop_stream_encryption_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. key_id : string;
    (*

    The GUID for the customer-managed Amazon Web Services 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
    *)
  3. encryption_type : encryption_type;
    (*

    The encryption type. The only valid value is KMS.

    *)
  4. stream_name : string option;
    (*

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

    *)
}
type nonrec start_stream_encryption_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. key_id : string;
    (*

    The GUID for the customer-managed Amazon Web Services 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
    *)
  3. encryption_type : encryption_type;
    (*

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

    *)
  4. stream_name : string option;
    (*

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

    *)
}
type nonrec split_shard_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. new_starting_hash_key : string;
    (*

    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.

    *)
  3. shard_to_split : string;
    (*

    The shard ID of the shard to split.

    *)
  4. stream_name : string option;
    (*

    The name of the stream for the shard split.

    *)
}

Represents the input for SplitShard.

type nonrec shard_filter_type =
  1. | FROM_TIMESTAMP
  2. | AT_TIMESTAMP
  3. | AT_LATEST
  4. | FROM_TRIM_HORIZON
  5. | AT_TRIM_HORIZON
  6. | AFTER_SHARD_ID
type nonrec shard_filter = {
  1. timestamp_ : Smaws_Lib.CoreTypes.Timestamp.t option;
    (*

    The timestamps specified in the ShardFilter parameter. A timestamp is a Unix epoch date with precision in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or 1459799926.480. This property can only be used if FROM_TIMESTAMP or AT_TIMESTAMP shard types are specified.

    *)
  2. shard_id : string option;
    (*

    The exclusive start shardID speified in the ShardFilter parameter. This property can only be used if the AFTER_SHARD_ID shard type is specified.

    *)
  3. type_ : shard_filter_type;
    (*

    The shard type specified in the ShardFilter parameter. This is a required property of the ShardFilter parameter.

    You can specify the following valid values:

    • AFTER_SHARD_ID - the response includes all the shards, starting with the shard whose ID immediately follows the ShardId that you provided.
    • AT_TRIM_HORIZON - the response includes all the shards that were open at TRIM_HORIZON.
    • FROM_TRIM_HORIZON - (default), the response includes all the shards within the retention period of the data stream (trim to tip).
    • AT_LATEST - the response includes only the currently open shards of the data stream.
    • AT_TIMESTAMP - the response includes all shards whose start timestamp is less than or equal to the given timestamp and end timestamp is greater than or equal to the given timestamp or still open.
    • FROM_TIMESTAMP - the response incldues all closed shards whose end timestamp is greater than or equal to the given timestamp and also all open shards. Corrected to TRIM_HORIZON of the data stream if FROM_TIMESTAMP is less than the TRIM_HORIZON value.
    *)
}

The request parameter used to filter out the response of the ListShards API.

type nonrec remove_tags_from_stream_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. tag_keys : string list;
    (*

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

    *)
  3. stream_name : string option;
    (*

    The name of the stream.

    *)
}

Represents the input for RemoveTagsFromStream.

type nonrec consumer_status =
  1. | ACTIVE
  2. | DELETING
  3. | CREATING
type nonrec consumer = {
  1. consumer_creation_timestamp : Smaws_Lib.CoreTypes.Timestamp.t;
  2. consumer_status : consumer_status;
    (*

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

    *)
  3. consumer_ar_n : string;
    (*

    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.

    *)
  4. consumer_name : string;
    (*

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

    *)
}

An object that represents the details of the consumer you registered. This type of object is returned by RegisterStreamConsumer.

type nonrec register_stream_consumer_output = {
  1. consumer : consumer;
    (*

    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.

    *)
}
type nonrec register_stream_consumer_input = {
  1. consumer_name : string;
    (*

    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.

    *)
  2. stream_ar_n : string;
    (*

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

    *)
}
type nonrec put_resource_policy_input = {
  1. policy : string;
    (*

    Details of the resource policy. It must include the identity of the principal and the actions allowed on this resource. This is formatted as a JSON string.

    *)
  2. resource_ar_n : string;
    (*

    The Amazon Resource Name (ARN) of the data stream or consumer.

    *)
}
type nonrec put_records_result_entry = {
  1. error_message : string option;
    (*

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

    *)
  2. error_code : string option;
    (*

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

    *)
  3. shard_id : string option;
    (*

    The shard ID for an individual record result.

    *)
  4. sequence_number : string option;
    (*

    The sequence number for an individual record result.

    *)
}

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.

type nonrec put_records_request_entry = {
  1. partition_key : string;
    (*

    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.

    *)
  2. explicit_hash_key : string option;
    (*

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

    *)
  3. data : bytes;
    (*

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

    *)
}

Represents the output for PutRecords.

type nonrec put_records_output = {
  1. encryption_type : encryption_type option;
    (*

    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 Amazon Web Services KMS key.
    *)
  2. records : put_records_result_entry list;
    (*

    An array of successfully and unsuccessfully processed record results. 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.

    *)
  3. failed_record_count : int option;
    (*

    The number of unsuccessfully processed records in a PutRecords request.

    *)
}

PutRecords results.

type nonrec put_records_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. stream_name : string option;
    (*

    The stream name associated with the request.

    *)
  3. records : put_records_request_entry list;
    (*

    The records associated with the request.

    *)
}

A PutRecords request.

type nonrec provisioned_throughput_exceeded_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

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 Data Streams Developer Guide, and Error Retries and Exponential Backoff in Amazon Web Services in the Amazon Web Services General Reference.

type nonrec put_record_output = {
  1. encryption_type : encryption_type option;
    (*

    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 Amazon Web Services KMS key.
    *)
  2. sequence_number : string;
    (*

    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.

    *)
  3. shard_id : string;
    (*

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

    *)
}

Represents the output for PutRecord.

type nonrec put_record_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. sequence_number_for_ordering : string option;
    (*

    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.

    *)
  3. explicit_hash_key : string option;
    (*

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

    *)
  4. partition_key : string;
    (*

    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.

    *)
  5. data : bytes;
    (*

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

    *)
  6. stream_name : string option;
    (*

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

    *)
}

Represents the input for PutRecord.

type nonrec merge_shards_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. adjacent_shard_to_merge : string;
    (*

    The shard ID of the adjacent shard for the merge.

    *)
  3. shard_to_merge : string;
    (*

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

    *)
  4. stream_name : string option;
    (*

    The name of the stream for the merge.

    *)
}

Represents the input for MergeShards.

type nonrec list_tags_for_stream_output = {
  1. has_more_tags : bool;
    (*

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

    *)
  2. tags : tag list;
    (*

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

    *)
}

Represents the output for ListTagsForStream.

type nonrec list_tags_for_stream_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. limit : int option;
    (*

    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.

    *)
  3. exclusive_start_tag_key : string option;
    (*

    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.

    *)
  4. stream_name : string option;
    (*

    The name of the stream.

    *)
}

Represents the input for ListTagsForStream.

type nonrec list_streams_output = {
  1. stream_summaries : stream_summary list option;
  2. next_token : string option;
  3. has_more_streams : bool;
    (*

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

    *)
  4. stream_names : string list;
    (*

    The names of the streams that are associated with the Amazon Web Services account making the ListStreams request.

    *)
}

Represents the output for ListStreams.

type nonrec list_streams_input = {
  1. next_token : string option;
  2. exclusive_start_stream_name : string option;
    (*

    The name of the stream to start the list with.

    *)
  3. limit : int option;
    (*

    The maximum number of streams to list. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.

    *)
}

Represents the input for ListStreams.

type nonrec expired_next_token_exception = {
  1. message : string option;
}

The pagination token passed to the operation is expired.

type nonrec list_stream_consumers_output = {
  1. next_token : string option;
    (*

    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.

    *)
  2. consumers : consumer list option;
    (*

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

    *)
}
type nonrec list_stream_consumers_input = {
  1. stream_creation_timestamp : Smaws_Lib.CoreTypes.Timestamp.t option;
    (*

    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.

    *)
  2. max_results : int option;
    (*

    The maximum number of consumers that you want a single call of ListStreamConsumers to return. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.

    *)
  3. next_token : string option;
    (*

    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.

    *)
  4. stream_ar_n : string;
    (*

    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 Amazon Web Services Service Namespaces.

    *)
}
type nonrec list_shards_output = {
  1. next_token : string option;
    (*

    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.

    *)
  2. shards : shard list option;
    (*

    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.

    *)
}
type nonrec list_shards_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. shard_filter : shard_filter option;
    (*

    Enables you to filter out the response of the ListShards API. You can only specify one filter at a time.

    If you use the ShardFilter parameter when invoking the ListShards API, the Type is the required property and must be specified. If you specify the AT_TRIM_HORIZON, FROM_TRIM_HORIZON, or AT_LATEST types, you do not need to specify either the ShardId or the Timestamp optional properties.

    If you specify the AFTER_SHARD_ID type, you must also provide the value for the optional ShardId property. The ShardId property is identical in fuctionality to the ExclusiveStartShardId parameter of the ListShards API. When ShardId property is specified, the response includes the shards starting with the shard whose ID immediately follows the ShardId that you provided.

    If you specify the AT_TIMESTAMP or FROM_TIMESTAMP_ID type, you must also provide the value for the optional Timestamp property. If you specify the AT_TIMESTAMP type, then all shards that were open at the provided timestamp are returned. If you specify the FROM_TIMESTAMP type, then all shards starting from the provided timestamp to TIP are returned.

    *)
  3. stream_creation_timestamp : Smaws_Lib.CoreTypes.Timestamp.t option;
    (*

    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.

    *)
  4. max_results : int option;
    (*

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

    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.

    *)
  5. exclusive_start_shard_id : string option;
    (*

    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.

    *)
  6. next_token : string option;
    (*

    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.

    *)
  7. stream_name : string option;
    (*

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

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

    *)
}
type nonrec increase_stream_retention_period_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. retention_period_hours : int;
    (*

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

    *)
  3. stream_name : string option;
    (*

    The name of the stream to modify.

    *)
}

Represents the input for IncreaseStreamRetentionPeriod.

type nonrec get_shard_iterator_output = {
  1. shard_iterator : string option;
    (*

    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.

    *)
}

Represents the output for GetShardIterator.

type nonrec get_shard_iterator_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. timestamp_ : Smaws_Lib.CoreTypes.Timestamp.t option;
    (*

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

    *)
  3. starting_sequence_number : string option;
    (*

    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.

    *)
  4. shard_iterator_type : shard_iterator_type;
    (*

    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.
    *)
  5. shard_id : string;
    (*

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

    *)
  6. stream_name : string option;
    (*

    The name of the Amazon Kinesis data stream.

    *)
}

Represents the input for GetShardIterator.

type nonrec get_resource_policy_output = {
  1. policy : string;
    (*

    Details of the resource policy. This is formatted as a JSON string.

    *)
}
type nonrec get_resource_policy_input = {
  1. resource_ar_n : string;
    (*

    The Amazon Resource Name (ARN) of the data stream or consumer.

    *)
}
type nonrec expired_iterator_exception = {
  1. message : string option;
    (*

    A message that provides information about the error.

    *)
}

The provided iterator exceeds the maximum age allowed.

type nonrec get_records_output = {
  1. child_shards : child_shard list option;
    (*

    The list of the current shard's child shards, returned in the GetRecords API's response only when the end of the current shard is reached.

    *)
  2. millis_behind_latest : int option;
    (*

    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.

    *)
  3. next_shard_iterator : string option;
    (*

    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.

    *)
  4. records : record list;
    (*

    The data records retrieved from the shard.

    *)
}

Represents the output for GetRecords.

type nonrec get_records_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. limit : int option;
    (*

    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.

    *)
  3. shard_iterator : string;
    (*

    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.

    *)
}

Represents the input for GetRecords.

type nonrec enhanced_monitoring_output = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. desired_shard_level_metrics : metrics_name list option;
    (*

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

    *)
  3. current_shard_level_metrics : metrics_name list option;
    (*

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

    *)
  4. stream_name : string option;
    (*

    The name of the Kinesis data stream.

    *)
}

Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring.

type nonrec enable_enhanced_monitoring_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. shard_level_metrics : metrics_name list;
    (*

    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.

    *)
  3. stream_name : string option;
    (*

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

    *)
}

Represents the input for EnableEnhancedMonitoring.

type nonrec disable_enhanced_monitoring_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. shard_level_metrics : metrics_name list;
    (*

    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.

    *)
  3. stream_name : string option;
    (*

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

    *)
}

Represents the input for DisableEnhancedMonitoring.

type nonrec describe_stream_summary_output = {
  1. stream_description_summary : stream_description_summary;
    (*

    A StreamDescriptionSummary containing information about the stream.

    *)
}
type nonrec describe_stream_summary_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. stream_name : string option;
    (*

    The name of the stream to describe.

    *)
}
type nonrec consumer_description = {
  1. stream_ar_n : string;
    (*

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

    *)
  2. consumer_creation_timestamp : Smaws_Lib.CoreTypes.Timestamp.t;
  3. consumer_status : consumer_status;
    (*

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

    *)
  4. consumer_ar_n : string;
    (*

    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.

    *)
  5. consumer_name : string;
    (*

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

    *)
}

An object that represents the details of a registered consumer. This type of object is returned by DescribeStreamConsumer.

type nonrec describe_stream_consumer_output = {
  1. consumer_description : consumer_description;
    (*

    An object that represents the details of the consumer.

    *)
}
type nonrec describe_stream_consumer_input = {
  1. consumer_ar_n : string option;
    (*

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

    *)
  2. consumer_name : string option;
    (*

    The name that you gave to the consumer.

    *)
  3. stream_ar_n : string option;
    (*

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

    *)
}
type nonrec describe_stream_output = {
  1. stream_description : stream_description;
    (*

    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.

    *)
}

Represents the output for DescribeStream.

type nonrec describe_stream_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. exclusive_start_shard_id : string option;
    (*

    The shard ID of the shard to start with.

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

    If you don't specify this parameter, the default behavior for DescribeStream is to describe the stream starting with the first shard in the stream.

    *)
  3. limit : int option;
    (*

    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 results are returned.

    *)
  4. stream_name : string option;
    (*

    The name of the stream to describe.

    *)
}

Represents the input for DescribeStream.

type nonrec describe_limits_output = {
  1. on_demand_stream_count_limit : int;
    (*

    The maximum number of data streams with the on-demand capacity mode.

    *)
  2. on_demand_stream_count : int;
    (*

    Indicates the number of data streams with the on-demand capacity mode.

    *)
  3. open_shard_count : int;
    (*

    The number of open shards.

    *)
  4. shard_limit : int;
    (*

    The maximum number of shards.

    *)
}
type nonrec deregister_stream_consumer_input = {
  1. consumer_ar_n : string option;
    (*

    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.

    *)
  2. consumer_name : string option;
    (*

    The name that you gave to the consumer.

    *)
  3. stream_ar_n : string option;
    (*

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

    *)
}
type nonrec delete_stream_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. enforce_consumer_deletion : bool option;
    (*

    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.

    *)
  3. stream_name : string option;
    (*

    The name of the stream to delete.

    *)
}

Represents the input for DeleteStream.

type nonrec delete_resource_policy_input = {
  1. resource_ar_n : string;
    (*

    The Amazon Resource Name (ARN) of the data stream or consumer.

    *)
}
type nonrec decrease_stream_retention_period_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. retention_period_hours : int;
    (*

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

    *)
  3. stream_name : string option;
    (*

    The name of the stream to modify.

    *)
}

Represents the input for DecreaseStreamRetentionPeriod.

type nonrec create_stream_input = {
  1. stream_mode_details : stream_mode_details option;
    (*

    Indicates the capacity mode of the data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.

    *)
  2. shard_count : int option;
    (*

    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.

    *)
  3. stream_name : string;
    (*

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

    *)
}

Represents the input for CreateStream.

type nonrec add_tags_to_stream_input = {
  1. stream_ar_n : string option;
    (*

    The ARN of the stream.

    *)
  2. tags : tag_map;
    (*

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

    *)
  3. stream_name : string option;
    (*

    The name of the stream.

    *)
}

Represents the input for AddTagsToStream.

Builders

val make_stream_mode_details : stream_mode:stream_mode -> unit -> stream_mode_details
val make_update_stream_mode_input : stream_mode_details:stream_mode_details -> stream_ar_n:string -> unit -> update_stream_mode_input
val make_update_shard_count_output : ?stream_ar_n:string -> ?target_shard_count:int -> ?current_shard_count:int -> ?stream_name:string -> unit -> update_shard_count_output
val make_update_shard_count_input : ?stream_ar_n:string -> ?stream_name:string -> scaling_type:scaling_type -> target_shard_count:int -> unit -> update_shard_count_input
val make_tag : ?value:string -> key:string -> unit -> tag
val make_record : ?encryption_type:encryption_type -> ?approximate_arrival_timestamp:Smaws_Lib.CoreTypes.Timestamp.t -> partition_key:string -> data:bytes -> sequence_number:string -> unit -> record
val make_hash_key_range : ending_hash_key:string -> starting_hash_key:string -> unit -> hash_key_range
val make_child_shard : hash_key_range:hash_key_range -> parent_shards:string list -> shard_id:string -> unit -> child_shard
val make_subscribe_to_shard_event : ?child_shards:child_shard list -> millis_behind_latest:int -> continuation_sequence_number:string -> records:record list -> unit -> subscribe_to_shard_event
val make_subscribe_to_shard_output : event_stream:subscribe_to_shard_event_stream -> unit -> subscribe_to_shard_output
val make_starting_position : ?timestamp_:Smaws_Lib.CoreTypes.Timestamp.t -> ?sequence_number:string -> type_:shard_iterator_type -> unit -> starting_position
val make_subscribe_to_shard_input : starting_position:starting_position -> shard_id:string -> consumer_ar_n:string -> unit -> subscribe_to_shard_input
val make_stream_summary : ?stream_creation_timestamp:Smaws_Lib.CoreTypes.Timestamp.t -> ?stream_mode_details:stream_mode_details -> stream_status:stream_status -> stream_ar_n:string -> stream_name:string -> unit -> stream_summary
val make_enhanced_metrics : ?shard_level_metrics:metrics_name list -> unit -> enhanced_metrics
val make_stream_description_summary : ?consumer_count:int -> ?key_id:string -> ?encryption_type:encryption_type -> ?stream_mode_details:stream_mode_details -> open_shard_count:int -> enhanced_monitoring:enhanced_metrics list -> stream_creation_timestamp:Smaws_Lib.CoreTypes.Timestamp.t -> retention_period_hours:int -> stream_status:stream_status -> stream_ar_n:string -> stream_name:string -> unit -> stream_description_summary
val make_sequence_number_range : ?ending_sequence_number:string -> starting_sequence_number:string -> unit -> sequence_number_range
val make_shard : ?adjacent_parent_shard_id:string -> ?parent_shard_id:string -> sequence_number_range:sequence_number_range -> hash_key_range:hash_key_range -> shard_id:string -> unit -> shard
val make_stream_description : ?key_id:string -> ?encryption_type:encryption_type -> ?stream_mode_details:stream_mode_details -> enhanced_monitoring:enhanced_metrics list -> stream_creation_timestamp:Smaws_Lib.CoreTypes.Timestamp.t -> retention_period_hours:int -> has_more_shards:bool -> shards:shard list -> stream_status:stream_status -> stream_ar_n:string -> stream_name:string -> unit -> stream_description
val make_stop_stream_encryption_input : ?stream_ar_n:string -> ?stream_name:string -> key_id:string -> encryption_type:encryption_type -> unit -> stop_stream_encryption_input
val make_start_stream_encryption_input : ?stream_ar_n:string -> ?stream_name:string -> key_id:string -> encryption_type:encryption_type -> unit -> start_stream_encryption_input
val make_split_shard_input : ?stream_ar_n:string -> ?stream_name:string -> new_starting_hash_key:string -> shard_to_split:string -> unit -> split_shard_input
val make_shard_filter : ?timestamp_:Smaws_Lib.CoreTypes.Timestamp.t -> ?shard_id:string -> type_:shard_filter_type -> unit -> shard_filter
val make_remove_tags_from_stream_input : ?stream_ar_n:string -> ?stream_name:string -> tag_keys:string list -> unit -> remove_tags_from_stream_input
val make_consumer : consumer_creation_timestamp:Smaws_Lib.CoreTypes.Timestamp.t -> consumer_status:consumer_status -> consumer_ar_n:string -> consumer_name:string -> unit -> consumer
val make_register_stream_consumer_output : consumer:consumer -> unit -> register_stream_consumer_output
val make_register_stream_consumer_input : consumer_name:string -> stream_ar_n:string -> unit -> register_stream_consumer_input
val make_put_resource_policy_input : policy:string -> resource_ar_n:string -> unit -> put_resource_policy_input
val make_put_records_result_entry : ?error_message:string -> ?error_code:string -> ?shard_id:string -> ?sequence_number:string -> unit -> put_records_result_entry
val make_put_records_request_entry : ?explicit_hash_key:string -> partition_key:string -> data:bytes -> unit -> put_records_request_entry
val make_put_records_output : ?encryption_type:encryption_type -> ?failed_record_count:int -> records:put_records_result_entry list -> unit -> put_records_output
val make_put_records_input : ?stream_ar_n:string -> ?stream_name:string -> records:put_records_request_entry list -> unit -> put_records_input
val make_put_record_output : ?encryption_type:encryption_type -> sequence_number:string -> shard_id:string -> unit -> put_record_output
val make_put_record_input : ?stream_ar_n:string -> ?sequence_number_for_ordering:string -> ?explicit_hash_key:string -> ?stream_name:string -> partition_key:string -> data:bytes -> unit -> put_record_input
val make_merge_shards_input : ?stream_ar_n:string -> ?stream_name:string -> adjacent_shard_to_merge:string -> shard_to_merge:string -> unit -> merge_shards_input
val make_list_tags_for_stream_output : has_more_tags:bool -> tags:tag list -> unit -> list_tags_for_stream_output
val make_list_tags_for_stream_input : ?stream_ar_n:string -> ?limit:int -> ?exclusive_start_tag_key:string -> ?stream_name:string -> unit -> list_tags_for_stream_input
val make_list_streams_output : ?stream_summaries:stream_summary list -> ?next_token:string -> has_more_streams:bool -> stream_names:string list -> unit -> list_streams_output
val make_list_streams_input : ?next_token:string -> ?exclusive_start_stream_name:string -> ?limit:int -> unit -> list_streams_input
val make_list_stream_consumers_output : ?next_token:string -> ?consumers:consumer list -> unit -> list_stream_consumers_output
val make_list_stream_consumers_input : ?stream_creation_timestamp:Smaws_Lib.CoreTypes.Timestamp.t -> ?max_results:int -> ?next_token:string -> stream_ar_n:string -> unit -> list_stream_consumers_input
val make_list_shards_output : ?next_token:string -> ?shards:shard list -> unit -> list_shards_output
val make_list_shards_input : ?stream_ar_n:string -> ?shard_filter:shard_filter -> ?stream_creation_timestamp:Smaws_Lib.CoreTypes.Timestamp.t -> ?max_results:int -> ?exclusive_start_shard_id:string -> ?next_token:string -> ?stream_name:string -> unit -> list_shards_input
val make_increase_stream_retention_period_input : ?stream_ar_n:string -> ?stream_name:string -> retention_period_hours:int -> unit -> increase_stream_retention_period_input
val make_get_shard_iterator_output : ?shard_iterator:string -> unit -> get_shard_iterator_output
val make_get_shard_iterator_input : ?stream_ar_n:string -> ?timestamp_:Smaws_Lib.CoreTypes.Timestamp.t -> ?starting_sequence_number:string -> ?stream_name:string -> shard_iterator_type:shard_iterator_type -> shard_id:string -> unit -> get_shard_iterator_input
val make_get_resource_policy_output : policy:string -> unit -> get_resource_policy_output
val make_get_resource_policy_input : resource_ar_n:string -> unit -> get_resource_policy_input
val make_get_records_output : ?child_shards:child_shard list -> ?millis_behind_latest:int -> ?next_shard_iterator:string -> records:record list -> unit -> get_records_output
val make_get_records_input : ?stream_ar_n:string -> ?limit:int -> shard_iterator:string -> unit -> get_records_input
val make_enhanced_monitoring_output : ?stream_ar_n:string -> ?desired_shard_level_metrics:metrics_name list -> ?current_shard_level_metrics:metrics_name list -> ?stream_name:string -> unit -> enhanced_monitoring_output
val make_enable_enhanced_monitoring_input : ?stream_ar_n:string -> ?stream_name:string -> shard_level_metrics:metrics_name list -> unit -> enable_enhanced_monitoring_input
val make_disable_enhanced_monitoring_input : ?stream_ar_n:string -> ?stream_name:string -> shard_level_metrics:metrics_name list -> unit -> disable_enhanced_monitoring_input
val make_describe_stream_summary_output : stream_description_summary:stream_description_summary -> unit -> describe_stream_summary_output
val make_describe_stream_summary_input : ?stream_ar_n:string -> ?stream_name:string -> unit -> describe_stream_summary_input
val make_consumer_description : stream_ar_n:string -> consumer_creation_timestamp:Smaws_Lib.CoreTypes.Timestamp.t -> consumer_status:consumer_status -> consumer_ar_n:string -> consumer_name:string -> unit -> consumer_description
val make_describe_stream_consumer_output : consumer_description:consumer_description -> unit -> describe_stream_consumer_output
val make_describe_stream_consumer_input : ?consumer_ar_n:string -> ?consumer_name:string -> ?stream_ar_n:string -> unit -> describe_stream_consumer_input
val make_describe_stream_output : stream_description:stream_description -> unit -> describe_stream_output
val make_describe_stream_input : ?stream_ar_n:string -> ?exclusive_start_shard_id:string -> ?limit:int -> ?stream_name:string -> unit -> describe_stream_input
val make_describe_limits_output : on_demand_stream_count_limit:int -> on_demand_stream_count:int -> open_shard_count:int -> shard_limit:int -> unit -> describe_limits_output
val make_describe_limits_input : unit -> unit
val make_deregister_stream_consumer_input : ?consumer_ar_n:string -> ?consumer_name:string -> ?stream_ar_n:string -> unit -> deregister_stream_consumer_input
val make_delete_stream_input : ?stream_ar_n:string -> ?enforce_consumer_deletion:bool -> ?stream_name:string -> unit -> delete_stream_input
val make_delete_resource_policy_input : resource_ar_n:string -> unit -> delete_resource_policy_input
val make_decrease_stream_retention_period_input : ?stream_ar_n:string -> ?stream_name:string -> retention_period_hours:int -> unit -> decrease_stream_retention_period_input
val make_create_stream_input : ?stream_mode_details:stream_mode_details -> ?shard_count:int -> stream_name:string -> unit -> create_stream_input
val make_add_tags_to_stream_input : ?stream_ar_n:string -> ?stream_name:string -> tags:tag_map -> unit -> add_tags_to_stream_input

Operations

module AddTagsToStream : sig ... end

Adds or updates tags for the specified Kinesis data stream. You can assign up to 50 tags to a data stream.

module CreateStream : sig ... end

Creates a Kinesis data stream. A stream captures and transports data records that are continuously emitted from different data sources or producers. Scale-out within a stream is explicitly supported by means of shards, which are uniquely identified groups of data records in a stream.

module DecreaseStreamRetentionPeriod : sig ... end

Decreases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The minimum value of a stream's retention period is 24 hours.

module DeleteResourcePolicy : sig ... end

Delete a policy for the specified data stream or consumer. Request patterns can be one of the following:

module DeleteStream : sig ... end

Deletes a Kinesis data stream and all its shards and data. You must shut down any applications that are operating on the stream before you delete the stream. If an application attempts to operate on a deleted stream, it receives the exception ResourceNotFoundException.

module DeregisterStreamConsumer : sig ... end

To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or 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 name and ARN.

module DescribeLimits : sig ... end

Describes the shard limits and usage for the account.

module DescribeStream : sig ... end

Describes the specified Kinesis data stream.

module DescribeStreamConsumer : sig ... end

To get the description of a registered consumer, provide the ARN of the consumer. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to describe, 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.

module DescribeStreamSummary : sig ... end

Provides a summarized description of the specified Kinesis data stream without the shard list.

module DisableEnhancedMonitoring : sig ... end

Disables enhanced monitoring.

module EnableEnhancedMonitoring : sig ... end

Enables enhanced Kinesis data stream monitoring for shard-level metrics.

module GetRecords : sig ... end

Gets data records from a Kinesis data stream's shard.

module GetResourcePolicy : sig ... end

Returns a policy attached to the specified data stream or consumer. Request patterns can be one of the following:

module GetShardIterator : sig ... end

Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it is returned to the requester.

module IncreaseStreamRetentionPeriod : sig ... end

Increases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The maximum value of a stream's retention period is 8760 hours (365 days).

module ListShards : sig ... end

Lists the shards in a stream and provides information about each shard. This operation has a limit of 1000 transactions per second per data stream.

module ListStreamConsumers : sig ... end

Lists the consumers registered to receive data from a stream using enhanced fan-out, and provides information about each consumer.

module ListStreams : sig ... end

Lists your Kinesis data streams.

module ListTagsForStream : sig ... end

Lists the tags for the specified Kinesis data stream. This operation has a limit of five transactions per second per account.

module MergeShards : sig ... end

Merges two adjacent shards in a Kinesis data stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. This API is only supported for the data streams with the provisioned capacity mode. Two shards are considered adjacent if the union of the hash key ranges for the two shards form a contiguous set with no gaps. For example, if you have two shards, one with a hash key range of 276...381 and the other with a hash key range of 382...454, then you could merge these two shards into a single shard that would have a hash key range of 276...454. After the merge, the single child shard receives data for all hash key values covered by the two parent shards.

module PutRecord : sig ... end

Writes a single data record into an Amazon Kinesis data stream. Call PutRecord to send data into the stream for real-time ingestion and subsequent processing, one record at a time. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per second.

module PutRecords : sig ... end

Writes multiple data records into a Kinesis data stream in a single call (also referred to as a PutRecords request). Use this operation to send data into the stream for data ingestion and processing.

module PutResourcePolicy : sig ... end

Attaches a resource-based policy to a data stream or registered consumer. If you are using an identity other than the root user of the Amazon Web Services account that owns the resource, the calling identity must have the PutResourcePolicy permissions on the specified Kinesis Data Streams resource and belong to the owner's account in order to use this operation. If you don't have PutResourcePolicy permissions, Amazon Kinesis Data Streams returns a 403 Access Denied error. If you receive a ResourceNotFoundException, check to see if you passed a valid stream or consumer resource.

module RegisterStreamConsumer : sig ... end

Registers a consumer with a Kinesis data stream. When you use this operation, the consumer you register can then call SubscribeToShard to receive data from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every shard you subscribe to. This rate is unaffected by the total number of consumers that read from the same stream.

module RemoveTagsFromStream : sig ... end

Removes tags from the specified Kinesis data stream. Removed tags are deleted and cannot be recovered after this operation successfully completes.

module SplitShard : sig ... end

Splits a shard into two new shards in the Kinesis data stream, to increase the stream's capacity to ingest and transport data. SplitShard is called when there is a need to increase the overall capacity of a stream because of an expected increase in the volume of data records being ingested. This API is only supported for the data streams with the provisioned capacity mode.

module StartStreamEncryption : sig ... end

Enables or updates server-side encryption using an Amazon Web Services KMS key for a specified stream.

module StopStreamEncryption : sig ... end

Disables server-side encryption for a specified stream.

module SubscribeToShard : sig ... end

This operation establishes an HTTP/2 connection between the consumer you specify in the ConsumerARN parameter and the shard you specify in the ShardId parameter. After the connection is successfully established, Kinesis Data Streams pushes records from the shard to the consumer over this connection. Before you call this operation, call RegisterStreamConsumer to register the consumer with Kinesis Data Streams.

module UpdateShardCount : sig ... end

Updates the shard count of the specified stream to the specified number of shards. This API is only supported for the data streams with the provisioned capacity mode.

module UpdateStreamMode : sig ... end

Updates the capacity mode of the data stream. Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data stream.