Kinesis class

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

Constructors

Kinesis({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addTagsToStream({required Map<String, String> tags, String? streamARN, String? streamId, String? streamName}) Future<void>
Adds or updates tags for the specified Kinesis data stream. You can assign up to 50 tags to a data stream. If tags have already been assigned to the stream, AddTagsToStream overwrites any existing tags that correspond to the specified tag keys.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createStream({required String streamName, int? maxRecordSizeInKiB, int? shardCount, StreamModeDetails? streamModeDetails, Map<String, String>? tags, int? warmThroughputMiBps}) Future<void>
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.
decreaseStreamRetentionPeriod({required int retentionPeriodHours, String? streamARN, String? streamId, String? streamName}) Future<void>
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. This operation may result in lost data. For example, if the stream's retention period is 48 hours and is decreased to 24 hours, any data already in the stream that is older than 24 hours is inaccessible.
deleteResourcePolicy({required String resourceARN, String? streamId}) Future<void>
Delete a policy for the specified data stream or consumer. Request patterns can be one of the following:
deleteStream({bool? enforceConsumerDeletion, String? streamARN, String? streamId, String? streamName}) Future<void>
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. If the stream is in the ACTIVE state, you can delete it. After a DeleteStream request, the specified stream is in the DELETING state until Kinesis Data Streams completes the deletion.
deregisterStreamConsumer({String? consumerARN, String? consumerName, String? streamARN, String? streamId}) Future<void>
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.
describeAccountSettings() Future<DescribeAccountSettingsOutput>
Describes the account-level settings for Amazon Kinesis Data Streams. This operation returns information about the minimum throughput billing commitments and other account-level configurations.
describeLimits() Future<DescribeLimitsOutput>
Describes the shard limits and usage for the account.
describeStream({String? exclusiveStartShardId, int? limit, String? streamARN, String? streamId, String? streamName}) Future<DescribeStreamOutput>
Describes the specified Kinesis data stream. The information returned includes the stream name, Amazon Resource Name (ARN), creation time, enhanced metric configuration, and shard map. The shard map is an array of shard objects. For each shard object, there is the hash key and sequence number ranges that the shard spans, and the IDs of any earlier shards that played in a role in creating the shard. Every record ingested in the stream is identified by a sequence number, which is assigned when the record is put into the stream.
describeStreamConsumer({String? consumerARN, String? consumerName, String? streamARN, String? streamId}) Future<DescribeStreamConsumerOutput>
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.
describeStreamSummary({String? streamARN, String? streamId, String? streamName}) Future<DescribeStreamSummaryOutput>
Provides a summarized description of the specified Kinesis data stream without the shard list. The information returned includes the stream name, Amazon Resource Name (ARN), status, record retention period, approximate creation time, monitoring, encryption details, and open shard count.
disableEnhancedMonitoring({required List<MetricsName> shardLevelMetrics, String? streamARN, String? streamId, String? streamName}) Future<EnhancedMonitoringOutput>
Disables enhanced monitoring.
enableEnhancedMonitoring({required List<MetricsName> shardLevelMetrics, String? streamARN, String? streamId, String? streamName}) Future<EnhancedMonitoringOutput>
Enables enhanced Kinesis data stream monitoring for shard-level metrics.
getRecords({required String shardIterator, int? limit, String? streamARN, String? streamId}) Future<GetRecordsOutput>
Gets data records from a Kinesis data stream's shard. Specify a shard iterator using the ShardIterator parameter. The shard iterator specifies the position in the shard from which you want to start reading data records sequentially. If there are no records available in the portion of the shard that the iterator points to, GetRecords returns an empty list. It might take multiple calls to get to a portion of the shard that contains records.
getResourcePolicy({required String resourceARN, String? streamId}) Future<GetResourcePolicyOutput>
Returns a policy attached to the specified data stream or consumer. Request patterns can be one of the following:
getShardIterator({required String shardId, required ShardIteratorType shardIteratorType, String? startingSequenceNumber, String? streamARN, String? streamId, String? streamName, DateTime? timestamp}) Future<GetShardIteratorOutput>
Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it is returned to the requester. A shard iterator specifies the shard position from which to start reading data records sequentially. The position is specified using the sequence number of a data record in a shard. A sequence number is the identifier associated with every record ingested in the stream, and is assigned when a record is put into the stream. Each stream has one or more shards.
increaseStreamRetentionPeriod({required int retentionPeriodHours, String? streamARN, String? streamId, String? streamName}) Future<void>
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). If you choose a longer stream retention period, this operation increases the time period during which records that have not yet expired are accessible. However, it does not make previous, expired data (older than the stream's previous retention period) accessible after the operation has been called. For example, if a stream's retention period is set to 24 hours and is increased to 168 hours, any data that is older than 24 hours remains inaccessible to consumer applications.
listShards({String? exclusiveStartShardId, int? maxResults, String? nextToken, ShardFilter? shardFilter, String? streamARN, DateTime? streamCreationTimestamp, String? streamId, String? streamName}) Future<ListShardsOutput>
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. This action does not list expired shards. For information about expired shards, see Data Routing, Data Persistence, and Shard State after a Reshard.
listStreamConsumers({required String streamARN, int? maxResults, String? nextToken, DateTime? streamCreationTimestamp, String? streamId}) Future<ListStreamConsumersOutput>
Lists the consumers registered to receive data from a stream using enhanced fan-out, and provides information about each consumer.
listStreams({String? exclusiveStartStreamName, int? limit, String? nextToken}) Future<ListStreamsOutput>
Lists your Kinesis data streams.
listTagsForResource({required String resourceARN, String? streamId}) Future<ListTagsForResourceOutput>
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.
listTagsForStream({String? exclusiveStartTagKey, int? limit, String? streamARN, String? streamId, String? streamName}) Future<ListTagsForStreamOutput>
Lists the tags for the specified Kinesis data stream. This operation has a limit of five transactions per second per account.
mergeShards({required String adjacentShardToMerge, required String shardToMerge, String? streamARN, String? streamId, String? streamName}) Future<void>
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. MergeShards is called when there is a need to reduce the overall capacity of a stream because of excess capacity that is not being used. You must specify the shard to be merged and the adjacent shard for a stream. For more information about merging shards, see Merge Two Shards in the Amazon Kinesis Data Streams Developer Guide.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putRecord({required Uint8List data, required String partitionKey, String? explicitHashKey, String? sequenceNumberForOrdering, String? streamARN, String? streamId, String? streamName}) Future<PutRecordOutput>
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 10 MiB per second. You must specify the name of the stream that captures, stores, and transports the data; a partition key; and the data blob itself.
putRecords({required List<PutRecordsRequestEntry> records, String? streamARN, String? streamId, String? streamName}) Future<PutRecordsOutput>
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. Each PutRecords request can support up to 500 records. Each record in the request can be as large as 10 MiB, up to a limit of 10 MiB for the entire request, including partition keys. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MB per second.
putResourcePolicy({required String policy, required String resourceARN, String? streamId}) Future<void>
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.
registerStreamConsumer({required String consumerName, required String streamARN, String? streamId, Map<String, String>? tags}) Future<RegisterStreamConsumerOutput>
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.
removeTagsFromStream({required List<String> tagKeys, String? streamARN, String? streamId, String? streamName}) Future<void>
Removes tags from the specified Kinesis data stream. Removed tags are deleted and cannot be recovered after this operation successfully completes. If you specify a tag that does not exist, it is ignored.
splitShard({required String newStartingHashKey, required String shardToSplit, String? streamARN, String? streamId, String? streamName}) Future<void>
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. You can also use SplitShard when a shard appears to be approaching its maximum utilization; for example, the producers sending data into the specific shard are suddenly sending more than previously anticipated. You can also call SplitShard to increase stream capacity, so that more Kinesis Data Streams applications can simultaneously read data from the stream for real-time processing.
startStreamEncryption({required EncryptionType encryptionType, required String keyId, String? streamARN, String? streamId, String? streamName}) Future<void>
Enables or updates server-side encryption using an Amazon Web Services KMS key for a specified stream. Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to UPDATING. After the update is complete, Kinesis Data Streams sets the status of the stream back to ACTIVE. Updating or applying encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is UPDATING. Once the status of the stream is ACTIVE, encryption begins for records written to the stream.
stopStreamEncryption({required EncryptionType encryptionType, required String keyId, String? streamARN, String? streamId, String? streamName}) Future<void>
Disables server-side encryption for a specified stream. Stopping encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to UPDATING. After the update is complete, Kinesis Data Streams sets the status of the stream back to ACTIVE. Stopping encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is UPDATING. Once the status of the stream is ACTIVE, records written to the stream are no longer encrypted by Kinesis Data Streams.
subscribeToShard({required String consumerARN, required String shardId, required StartingPosition startingPosition, String? streamId}) Future<SubscribeToShardOutput>
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.
tagResource({required String resourceARN, required Map<String, String> tags, String? streamId}) Future<void>
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.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceARN, required List<String> tagKeys, String? streamId}) Future<void>
Removes tags from the specified Kinesis resource. Removed tags are deleted and can't be recovered after this operation completes successfully.
updateAccountSettings({required MinimumThroughputBillingCommitmentInput minimumThroughputBillingCommitment}) Future<UpdateAccountSettingsOutput>
Updates the account-level settings for Amazon Kinesis Data Streams.
updateMaxRecordSize({required int maxRecordSizeInKiB, String? streamARN, String? streamId}) Future<void>
This allows you to update the MaxRecordSize of a single record that you can write to, and read from a stream. You can ingest and digest single records up to 10240 KiB.
updateShardCount({required ScalingType scalingType, required int targetShardCount, String? streamARN, String? streamId, String? streamName}) Future<UpdateShardCountOutput>
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. Updating the shard count is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to UPDATING. After the update is complete, Kinesis Data Streams sets the status of the stream back to ACTIVE. Depending on the size of the stream, the scaling action could take a few minutes to complete. You can continue to read and write data to your stream while its status is UPDATING.
updateStreamMode({required String streamARN, required StreamModeDetails streamModeDetails, String? streamId, int? warmThroughputMiBps}) Future<void>
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.
updateStreamWarmThroughput({required int warmThroughputMiBps, String? streamARN, String? streamId, String? streamName}) Future<UpdateStreamWarmThroughputOutput>
Updates the warm throughput configuration for the specified Amazon Kinesis Data Streams on-demand data stream. This operation allows you to proactively scale your on-demand data stream to a specified throughput level, enabling better performance for sudden traffic spikes. Updating the warm throughput is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to UPDATING. After the update is complete, Kinesis Data Streams sets the status of the stream back to ACTIVE. Depending on the size of the stream, the scaling action could take a few minutes to complete. You can continue to read and write data to your stream while its status is UPDATING.

Operators

operator ==(Object other) bool
The equality operator.
inherited