KinesisClient

Amazon Kinesis Data Streams Service API Reference

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

Properties

Link copied to clipboard
abstract override val config: KinesisClient.Config

KinesisClient's configuration

Functions

Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard
abstract suspend fun deleteStream(input: DeleteStreamRequest = DeleteStreamRequest { }): DeleteStreamResponse

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.

Link copied to clipboard
abstract suspend fun deregisterStreamConsumer(input: DeregisterStreamConsumerRequest = DeregisterStreamConsumerRequest { }): DeregisterStreamConsumerResponse

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.

Link copied to clipboard
abstract suspend fun describeLimits(input: DescribeLimitsRequest = DescribeLimitsRequest { }): DescribeLimitsResponse

Describes the shard limits and usage for the account.

Link copied to clipboard
abstract suspend fun describeStream(input: DescribeStreamRequest = DescribeStreamRequest { }): DescribeStreamResponse

Describes the specified Kinesis data stream.

Link copied to clipboard
abstract suspend fun describeStreamConsumer(input: DescribeStreamConsumerRequest = DescribeStreamConsumerRequest { }): DescribeStreamConsumerResponse

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.

Link copied to clipboard
abstract suspend fun describeStreamSummary(input: DescribeStreamSummaryRequest = DescribeStreamSummaryRequest { }): DescribeStreamSummaryResponse

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

Link copied to clipboard

Disables enhanced monitoring.

Link copied to clipboard

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

Link copied to clipboard
abstract suspend fun getRecords(input: GetRecordsRequest): GetRecordsResponse

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
abstract suspend fun listShards(input: ListShardsRequest = ListShardsRequest { }): ListShardsResponse

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.

Link copied to clipboard

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

Link copied to clipboard
abstract suspend fun listStreams(input: ListStreamsRequest = ListStreamsRequest { }): ListStreamsResponse

Lists your Kinesis data streams.

Link copied to clipboard

List all tags added to the specified Kinesis resource. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.

Link copied to clipboard
abstract suspend fun listTagsForStream(input: ListTagsForStreamRequest = ListTagsForStreamRequest { }): ListTagsForStreamResponse

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

Link copied to clipboard
abstract suspend fun mergeShards(input: MergeShardsRequest): MergeShardsResponse

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.

Link copied to clipboard
abstract suspend fun putRecord(input: PutRecordRequest): PutRecordResponse

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.

Link copied to clipboard
abstract suspend fun putRecords(input: PutRecordsRequest): PutRecordsResponse

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard
abstract suspend fun splitShard(input: SplitShardRequest): SplitShardResponse

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.

Link copied to clipboard

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

Link copied to clipboard

Disables server-side encryption for a specified stream.

Link copied to clipboard
abstract suspend fun <T> subscribeToShard(input: SubscribeToShardRequest, block: suspend (SubscribeToShardResponse) -> T): T

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.

Link copied to clipboard
abstract suspend fun tagResource(input: TagResourceRequest): TagResourceResponse

Adds or updates tags for the specified Kinesis resource. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. You can assign up to 50 tags to a Kinesis resource.

Link copied to clipboard

Removes tags from the specified Kinesis resource. Removed tags are deleted and can't be recovered after this operation completes successfully.

Link copied to clipboard

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.

Link copied to clipboard

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.

Inherited functions

Link copied to clipboard

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

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

Describes the shard limits and usage for the account.

Link copied to clipboard

Describes the specified Kinesis data stream.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

Disables enhanced monitoring.

Link copied to clipboard

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

Link copied to clipboard
inline suspend fun KinesisClient.getRecords(crossinline block: GetRecordsRequest.Builder.() -> Unit): GetRecordsResponse

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
inline suspend fun KinesisClient.listShards(crossinline block: ListShardsRequest.Builder.() -> Unit): ListShardsResponse

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.

Link copied to clipboard

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

Link copied to clipboard
inline suspend fun KinesisClient.listStreams(crossinline block: ListStreamsRequest.Builder.() -> Unit): ListStreamsResponse

Lists your Kinesis data streams.

Link copied to clipboard
Link copied to clipboard

List all tags added to the specified Kinesis resource. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.

Link copied to clipboard

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

Link copied to clipboard
inline suspend fun KinesisClient.mergeShards(crossinline block: MergeShardsRequest.Builder.() -> Unit): MergeShardsResponse

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.

Link copied to clipboard
inline suspend fun KinesisClient.putRecord(crossinline block: PutRecordRequest.Builder.() -> Unit): PutRecordResponse

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.

Link copied to clipboard
inline suspend fun KinesisClient.putRecords(crossinline block: PutRecordsRequest.Builder.() -> Unit): PutRecordsResponse

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard
inline suspend fun KinesisClient.splitShard(crossinline block: SplitShardRequest.Builder.() -> Unit): SplitShardResponse

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.

Link copied to clipboard

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

Link copied to clipboard

Disables server-side encryption for a specified stream.

Link copied to clipboard
inline suspend fun KinesisClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse

Adds or updates tags for the specified Kinesis resource. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. You can assign up to 50 tags to a Kinesis resource.

Link copied to clipboard

Removes tags from the specified Kinesis resource. Removed tags are deleted and can't be recovered after this operation completes successfully.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.