Smaws_Client_Kinesis.Types
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_details = {
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 = {
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.
*)stream_ar_n : stream_ar_n;
Specifies the ARN of the data stream whose capacity mode you want to update.
*)}
type nonrec resource_not_found_exception = {
message : error_message 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 = {
message : error_message 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 = {
message : error_message 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 = {
message : error_message 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 = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)target_shard_count : positive_integer_object option;
The updated number of shards.
*)current_shard_count : positive_integer_object option;
The current number of shards.
*)stream_name : stream_name option;
The name of the stream.
*)}
type nonrec update_shard_count_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)scaling_type : scaling_type;
The scaling type. Uniform scaling creates shards of equal size.
*)target_shard_count : positive_integer_object;
The new number of shards. This value has the following default limits. By default, you cannot do the following:
stream_name : stream_name option;
The name of the stream.
*)}
Specifies that you do not have the permissions required to perform this operation.
type nonrec tag_key_list = tag_key list
type nonrec untag_resource_input = {
resource_ar_n : resource_ar_n;
The Amazon Resource Name (ARN) of the Kinesis resource from which to remove tags.
*)tag_keys : tag_key_list;
A list of tag key-value pairs. Existing tags of the resource whose keys are members of this list will be removed from the Kinesis resource.
*)}
type nonrec tag_resource_input = {
resource_ar_n : resource_ar_n;
The Amazon Resource Name (ARN) of the Kinesis resource to which to add tags.
*)}
type nonrec tag = {
value : tag_value option;
An optional string, typically used to describe or define the tag. Maximum length: 256 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % @
*)key : tag_key;
A unique identifier for the tag. Maximum length: 128 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % @
*)}
Metadata assigned to the stream or consumer, consisting of a key-value pair.
type nonrec tag_list = tag list
type nonrec record = {
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.partition_key : partition_key;
Identifies which shard in the stream the data record is assigned to.
*)data : data;
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).
*)approximate_arrival_timestamp : timestamp option;
The approximate time that the record was inserted into the stream.
*)sequence_number : sequence_number;
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 record_list = record list
type nonrec shard_id_list = shard_id list
type nonrec hash_key_range = {
ending_hash_key : hash_key;
The ending hash key of the hash key range.
*)starting_hash_key : hash_key;
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 = {
hash_key_range : hash_key_range;
parent_shards : shard_id_list;
The current shard that is the parent of the existing child shard.
*)shard_id : shard_id;
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 child_shard_list = child_shard list
type nonrec subscribe_to_shard_event = {
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.
*)millis_behind_latest : millis_behind_latest;
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.
*)continuation_sequence_number : sequence_number;
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.
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 = {
message : error_message 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 = {
message : error_message 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 = {
message : error_message 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 = {
message : error_message 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 = {
message : error_message 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 = {
message : error_message 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.
The processing of the request failed because of an unknown error, exception, or failure.
type nonrec subscribe_to_shard_event_stream =
| InternalFailureException of internal_failure_exception
The processing of the request failed because of an unknown error, exception, or failure.
*)| KMSThrottlingException of kms_throttling_exception
| KMSOptInRequired of kms_opt_in_required
| KMSNotFoundException of kms_not_found_exception
| KMSAccessDeniedException of kms_access_denied_exception
| KMSInvalidStateException of kms_invalid_state_exception
| KMSDisabledException of kms_disabled_exception
| ResourceInUseException of resource_in_use_exception
| ResourceNotFoundException of resource_not_found_exception
| 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 = {
event_stream : subscribe_to_shard_event_stream;
The event stream that your consumer can use to read records from the shard.
*)}
type nonrec starting_position = {
timestamp : timestamp 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
).
sequence_number : sequence_number 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
.
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 = {
starting_position : starting_position;
The starting position in the data stream from which to start streaming.
*)shard_id : shard_id;
The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use ListShards
.
consumer_ar_n : consumer_ar_n;
For this parameter, use the value you obtained when you called RegisterStreamConsumer
.
}
type nonrec stream_summary = {
stream_creation_timestamp : timestamp option;
The timestamp at which the stream was created.
*)stream_mode_details : stream_mode_details option;
stream_status : stream_status;
The status of the stream.
*)stream_ar_n : stream_ar_n;
The ARN of the stream.
*)stream_name : stream_name;
The name of a stream.
*)}
The summary of a stream.
type nonrec stream_summary_list = stream_summary list
type nonrec stream_name_list = stream_name list
type nonrec metrics_name_list = metrics_name list
type nonrec enhanced_metrics = {
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 enhanced_monitoring_list = enhanced_metrics list
type nonrec stream_description_summary = {
consumer_count : consumer_count_object option;
The number of enhanced fan-out consumers registered with the stream.
*)open_shard_count : shard_count_object;
The number of open shards in the stream.
*)key_id : key_id 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
.
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
12345678-1234-1234-1234-123456789012
alias/MyAliasName
alias/aws/kinesis
encryption_type : encryption_type option;
The encryption type used. This value is one of the following:
KMS
NONE
enhanced_monitoring : enhanced_monitoring_list;
Represents the current enhanced monitoring settings of the stream.
*)stream_creation_timestamp : timestamp;
The approximate time that the stream was created.
*)retention_period_hours : retention_period_hours;
The current retention period, in hours.
*)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.
*)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.stream_ar_n : stream_ar_n;
The Amazon Resource Name (ARN) for the stream being described.
*)stream_name : stream_name;
The name of the stream being described.
*)}
Represents the output for DescribeStreamSummary
type nonrec sequence_number_range = {
ending_sequence_number : sequence_number option;
The ending sequence number for the range. Shards that are in the OPEN state have an ending sequence number of null
.
starting_sequence_number : sequence_number;
The starting sequence number for the range.
*)}
The range of possible sequence numbers for the shard.
type nonrec shard = {
sequence_number_range : sequence_number_range;
The range of possible sequence numbers for the shard.
*)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.
*)adjacent_parent_shard_id : shard_id option;
The shard ID of the shard adjacent to the shard's parent.
*)parent_shard_id : shard_id option;
The shard ID of the shard's parent.
*)shard_id : shard_id;
The unique identifier of the shard within the stream.
*)}
A uniquely identified group of data records in a Kinesis data stream.
type nonrec shard_list = shard list
type nonrec stream_description = {
key_id : key_id 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
.
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
12345678-1234-1234-1234-123456789012
alias/MyAliasName
alias/aws/kinesis
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.enhanced_monitoring : enhanced_monitoring_list;
Represents the current enhanced monitoring settings of the stream.
*)stream_creation_timestamp : timestamp;
The approximate time that the stream was created.
*)retention_period_hours : retention_period_hours;
The current retention period, in hours. Minimum value of 24. Maximum value of 168.
*)has_more_shards : boolean_object;
If set to true
, more shards in the stream are available to describe.
shards : shard_list;
The shards that comprise the stream.
*)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.
*)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.stream_ar_n : stream_ar_n;
The Amazon Resource Name (ARN) for the stream being described.
*)stream_name : stream_name;
The name of the stream being described.
*)}
Represents the output for DescribeStream
.
type nonrec stop_stream_encryption_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)key_id : key_id;
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
.
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
12345678-1234-1234-1234-123456789012
alias/MyAliasName
alias/aws/kinesis
encryption_type : encryption_type;
The encryption type. The only valid value is KMS
.
stream_name : stream_name option;
The name of the stream on which to stop encrypting records.
*)}
type nonrec start_stream_encryption_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)key_id : key_id;
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
.
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
12345678-1234-1234-1234-123456789012
alias/MyAliasName
alias/aws/kinesis
encryption_type : encryption_type;
The encryption type to use. The only valid value is KMS
.
stream_name : stream_name option;
The name of the stream for which to start encrypting records.
*)}
type nonrec split_shard_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)new_starting_hash_key : hash_key;
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.
shard_to_split : shard_id;
The shard ID of the shard to split.
*)stream_name : stream_name option;
The name of the stream for the shard split.
*)}
Represents the input for SplitShard
.
type nonrec shard_filter = {
timestamp : timestamp 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.
shard_id : shard_id 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.
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 consumer = {
consumer_creation_timestamp : timestamp;
consumer_status : consumer_status;
A consumer can't read data while in the CREATING
or DELETING
states.
consumer_ar_n : consumer_ar_n;
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_name : consumer_name;
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 = {
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 = {
consumer_name : consumer_name;
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.
*)stream_ar_n : stream_ar_n;
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 = {
policy : policy;
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.
*)resource_ar_n : resource_ar_n;
The Amazon Resource Name (ARN) of the data stream or consumer.
*)}
type nonrec put_records_result_entry = {
error_message : error_message 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"
.
error_code : error_code option;
The error code for an individual record result. ErrorCodes
can be either ProvisionedThroughputExceededException
or InternalFailure
.
shard_id : shard_id option;
The shard ID for an individual record result.
*)sequence_number : sequence_number 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_result_entry_list = put_records_result_entry list
type nonrec put_records_request_entry = {
partition_key : partition_key;
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.
*)explicit_hash_key : hash_key option;
The hash value used to determine explicitly the shard that the data record is assigned to by overriding the partition key hash.
*)data : data;
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_request_entry_list = put_records_request_entry list
type nonrec put_records_output = {
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.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.
failed_record_count : positive_integer_object option;
The number of unsuccessfully processed records in a PutRecords
request.
}
PutRecords
results.
type nonrec put_records_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)stream_name : stream_name option;
The stream name associated with the request.
*)records : put_records_request_entry_list;
The records associated with the request.
*)}
A PutRecords
request.
type nonrec provisioned_throughput_exceeded_exception = {
message : error_message 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 = {
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.sequence_number : sequence_number;
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.
*)shard_id : shard_id;
The shard ID of the shard where the data record was placed.
*)}
Represents the output for PutRecord
.
type nonrec put_record_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)sequence_number_for_ordering : sequence_number 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.
explicit_hash_key : hash_key option;
The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.
*)partition_key : partition_key;
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.
*)data : data;
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).
*)stream_name : stream_name option;
The name of the stream to put the data record into.
*)}
Represents the input for PutRecord
.
type nonrec merge_shards_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)adjacent_shard_to_merge : shard_id;
The shard ID of the adjacent shard for the merge.
*)shard_to_merge : shard_id;
The shard ID of the shard to combine with the adjacent shard for the merge.
*)stream_name : stream_name option;
The name of the stream for the merge.
*)}
Represents the input for MergeShards
.
type nonrec list_streams_output = {
stream_summaries : stream_summary_list option;
next_token : next_token option;
has_more_streams : boolean_object;
If set to true
, there are more streams available to list.
stream_names : stream_name_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 = {
next_token : next_token option;
exclusive_start_stream_name : stream_name option;
The name of the stream to start the list with.
*)limit : list_streams_input_limit 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
.
The pagination token passed to the operation is expired.
type nonrec consumer_list = consumer list
type nonrec list_stream_consumers_output = {
next_token : next_token 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
.
consumers : consumer_list option;
An array of JSON objects. Each object represents one registered consumer.
*)}
type nonrec list_stream_consumers_input = {
stream_creation_timestamp : timestamp 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.
*)max_results : list_stream_consumers_input_limit 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.
next_token : next_token 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
.
stream_ar_n : stream_ar_n;
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 = {
next_token : next_token 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
.
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 = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)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.
stream_creation_timestamp : timestamp 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.
max_results : list_shards_input_limit 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.
exclusive_start_shard_id : shard_id 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
.
next_token : next_token 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
.
stream_name : stream_name 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 = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)retention_period_hours : retention_period_hours;
The new retention period of the stream, in hours. Must be more than the current retention period.
*)stream_name : stream_name option;
The name of the stream to modify.
*)}
Represents the input for IncreaseStreamRetentionPeriod
.
type nonrec get_shard_iterator_output = {
shard_iterator : shard_iterator 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 = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)timestamp : timestamp 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).
starting_sequence_number : sequence_number 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.
*)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:
StartingSequenceNumber
.StartingSequenceNumber
.Timestamp
.shard_id : shard_id;
The shard ID of the Kinesis Data Streams shard to get the iterator for.
*)stream_name : stream_name option;
The name of the Amazon Kinesis data stream.
*)}
Represents the input for GetShardIterator
.
type nonrec get_resource_policy_output = {
policy : policy;
Details of the resource policy. This is formatted as a JSON string.
*)}
type nonrec get_resource_policy_input = {
resource_ar_n : resource_ar_n;
The Amazon Resource Name (ARN) of the data stream or consumer.
*)}
type nonrec expired_iterator_exception = {
message : error_message option;
A message that provides information about the error.
*)}
The provided iterator exceeds the maximum age allowed.
type nonrec get_records_output = {
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.
millis_behind_latest : millis_behind_latest 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.
next_shard_iterator : shard_iterator 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.
records : record_list;
The data records retrieved from the shard.
*)}
Represents the output for GetRecords
.
type nonrec get_records_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)limit : get_records_input_limit 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.
shard_iterator : shard_iterator;
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 = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)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.
*)current_shard_level_metrics : metrics_name_list option;
Represents the current state of the metrics that are in the enhanced state before the operation.
*)stream_name : stream_name option;
The name of the Kinesis data stream.
*)}
Represents the output for EnableEnhancedMonitoring
and DisableEnhancedMonitoring
.
type nonrec enable_enhanced_monitoring_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)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.
*)stream_name : stream_name option;
The name of the stream for which to enable enhanced monitoring.
*)}
Represents the input for EnableEnhancedMonitoring
.
type nonrec disable_enhanced_monitoring_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)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.
*)stream_name : stream_name 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 = {
stream_description_summary : stream_description_summary;
A StreamDescriptionSummary
containing information about the stream.
}
type nonrec describe_stream_summary_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)stream_name : stream_name option;
The name of the stream to describe.
*)}
type nonrec consumer_description = {
stream_ar_n : stream_ar_n;
The ARN of the stream with which you registered the consumer.
*)consumer_creation_timestamp : timestamp;
consumer_status : consumer_status;
A consumer can't read data while in the CREATING
or DELETING
states.
consumer_ar_n : consumer_ar_n;
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_name : consumer_name;
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 = {
consumer_description : consumer_description;
An object that represents the details of the consumer.
*)}
type nonrec describe_stream_consumer_input = {
consumer_ar_n : consumer_ar_n option;
The ARN returned by Kinesis Data Streams when you registered the consumer.
*)consumer_name : consumer_name option;
The name that you gave to the consumer.
*)stream_ar_n : stream_ar_n 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 = {
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 = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)exclusive_start_shard_id : shard_id 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.
limit : describe_stream_input_limit 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.
*)stream_name : stream_name option;
The name of the stream to describe.
*)}
Represents the input for DescribeStream
.
type nonrec describe_limits_output = {
on_demand_stream_count_limit : on_demand_stream_count_limit_object;
The maximum number of data streams with the on-demand capacity mode.
*)on_demand_stream_count : on_demand_stream_count_object;
Indicates the number of data streams with the on-demand capacity mode.
*)open_shard_count : shard_count_object;
The number of open shards.
*)shard_limit : shard_count_object;
The maximum number of shards.
*)}
type nonrec deregister_stream_consumer_input = {
consumer_ar_n : consumer_ar_n 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.
*)consumer_name : consumer_name option;
The name that you gave to the consumer.
*)stream_ar_n : stream_ar_n 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 = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)enforce_consumer_deletion : boolean_object 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
.
stream_name : stream_name option;
The name of the stream to delete.
*)}
Represents the input for DeleteStream
.
type nonrec delete_resource_policy_input = {
resource_ar_n : resource_ar_n;
The Amazon Resource Name (ARN) of the data stream or consumer.
*)}
type nonrec decrease_stream_retention_period_input = {
stream_ar_n : stream_ar_n option;
The ARN of the stream.
*)retention_period_hours : retention_period_hours;
The new retention period of the stream, in hours. Must be less than the current retention period.
*)stream_name : stream_name option;
The name of the stream to modify.
*)}
Represents the input for DecreaseStreamRetentionPeriod
.
type nonrec create_stream_input = {
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.
*)shard_count : positive_integer_object 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.
*)stream_name : stream_name;
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
.