AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Interface for accessing Kinesis
Amazon Kinesis Data Streams Service API ReferenceAmazon Kinesis Data Streams is a managed service that scales elastically for real-time processing of streaming big data.
Namespace: Amazon.Kinesis
Assembly: AWSSDK.Kinesis.dll
Version: 3.x.y.z
public interface IAmazonKinesis IAmazonService, IDisposable
The IAmazonKinesis type exposes the following members
Name | Type | Description | |
---|---|---|---|
Paginators | Amazon.Kinesis.Model.IKinesisPaginatorFactory |
Paginators for the service |
Name | Description | |
---|---|---|
AddTagsToStream(AddTagsToStreamRequest) |
Adds or updates tags for the specified Kinesis data stream. You can assign up to 50
tags to a data stream.
When invoking this API, you must use either the
If tags have already been assigned to the stream, AddTagsToStream has a limit of five transactions per second per account. |
|
AddTagsToStreamAsync(AddTagsToStreamRequest, CancellationToken) |
Adds or updates tags for the specified Kinesis data stream. You can assign up to 50
tags to a data stream.
When invoking this API, you must use either the
If tags have already been assigned to the stream, AddTagsToStream has a limit of five transactions per second per account. |
|
CreateStream(CreateStreamRequest) |
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. You can create your data stream using either on-demand or provisioned capacity mode. Data streams with an on-demand mode require no capacity planning and automatically scale to handle gigabytes of write and read throughput per minute. With the on-demand mode, Kinesis Data Streams automatically manages the shards in order to provide the necessary throughput. For the data streams with a provisioned mode, you must specify the number of shards for the data stream. Each shard can support reads up to five transactions per second, up to a maximum data read total of 2 MiB per second. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per second. If the amount of data input increases or decreases, you can add or remove shards. The stream name identifies the stream. The name is scoped to the Amazon Web Services account used by the application. It is also scoped by Amazon Web Services Region. That is, two streams in two different accounts can have the same name, and two streams in the same account, but in two different Regions, can have the same name.
You receive a
For the default shard limit for an Amazon Web Services account, see Amazon Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer Guide. To increase this limit, contact Amazon Web Services Support.
You can use DescribeStreamSummary to check the stream status, which is returned
in CreateStream has a limit of five transactions per second per account. |
|
CreateStreamAsync(CreateStreamRequest, CancellationToken) |
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. You can create your data stream using either on-demand or provisioned capacity mode. Data streams with an on-demand mode require no capacity planning and automatically scale to handle gigabytes of write and read throughput per minute. With the on-demand mode, Kinesis Data Streams automatically manages the shards in order to provide the necessary throughput. For the data streams with a provisioned mode, you must specify the number of shards for the data stream. Each shard can support reads up to five transactions per second, up to a maximum data read total of 2 MiB per second. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per second. If the amount of data input increases or decreases, you can add or remove shards. The stream name identifies the stream. The name is scoped to the Amazon Web Services account used by the application. It is also scoped by Amazon Web Services Region. That is, two streams in two different accounts can have the same name, and two streams in the same account, but in two different Regions, can have the same name.
You receive a
For the default shard limit for an Amazon Web Services account, see Amazon Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer Guide. To increase this limit, contact Amazon Web Services Support.
You can use DescribeStreamSummary to check the stream status, which is returned
in CreateStream has a limit of five transactions per second per account. |
|
DecreaseStreamRetentionPeriod(string, int) |
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.
When invoking this API, you must use either the 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. |
|
DecreaseStreamRetentionPeriod(DecreaseStreamRetentionPeriodRequest) |
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.
When invoking this API, you must use either the 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. |
|
DecreaseStreamRetentionPeriodAsync(string, int, CancellationToken) |
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.
When invoking this API, you must use either the 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. |
|
DecreaseStreamRetentionPeriodAsync(DecreaseStreamRetentionPeriodRequest, CancellationToken) |
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.
When invoking this API, you must use either the 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(DeleteResourcePolicyRequest) |
Delete a policy for the specified data stream or consumer. Request patterns can be one of the following:
|
|
DeleteResourcePolicyAsync(DeleteResourcePolicyRequest, CancellationToken) |
Delete a policy for the specified data stream or consumer. Request patterns can be one of the following:
|
|
DeleteStream(DeleteStreamRequest) |
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
When invoking this API, you must use either the
If the stream is in the
Note: Kinesis Data Streams might continue to accept data read and write operations,
such as PutRecord, PutRecords, and GetRecords, on a stream in
the When you delete a stream, any shards in that stream are also deleted, and any tags are dissociated from the stream.
You can use the DescribeStreamSummary operation to check the state of the stream,
which is returned in DeleteStream has a limit of five transactions per second per account. |
|
DeleteStreamAsync(DeleteStreamRequest, CancellationToken) |
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
When invoking this API, you must use either the
If the stream is in the
Note: Kinesis Data Streams might continue to accept data read and write operations,
such as PutRecord, PutRecords, and GetRecords, on a stream in
the When you delete a stream, any shards in that stream are also deleted, and any tags are dissociated from the stream.
You can use the DescribeStreamSummary operation to check the state of the stream,
which is returned in DeleteStream has a limit of five transactions per second per account. |
|
DeregisterStreamConsumer(DeregisterStreamConsumerRequest) |
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. This operation has a limit of five transactions per second per stream. |
|
DeregisterStreamConsumerAsync(DeregisterStreamConsumerRequest, CancellationToken) |
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. This operation has a limit of five transactions per second per stream. |
|
DescribeLimits(DescribeLimitsRequest) |
Describes the shard limits and usage for the account. If you update your account limits, the old limits might be returned for a few minutes. This operation has a limit of one transaction per second per account. |
|
DescribeLimitsAsync(DescribeLimitsRequest, CancellationToken) |
Describes the shard limits and usage for the account. If you update your account limits, the old limits might be returned for a few minutes. This operation has a limit of one transaction per second per account. |
|
DescribeStream(DescribeStreamRequest) |
Describes the specified Kinesis data stream.
This API has been revised. It's highly recommended that you use the DescribeStreamSummary
API to get a summarized description of the specified Kinesis data stream and the ListShards
API to list the shards in a specified data stream and obtain information about each
shard.
When invoking this API, you must use either the 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. You can limit the number of shards returned by each call. For more information, see Retrieving Shards from a Stream in the Amazon Kinesis Data Streams Developer Guide. There are no guarantees about the chronological order shards returned. To process shards in chronological order, use the ID of the parent shard to track the lineage to the oldest shard. This operation has a limit of 10 transactions per second per account. |
|
DescribeStreamAsync(DescribeStreamRequest, CancellationToken) |
Describes the specified Kinesis data stream.
This API has been revised. It's highly recommended that you use the DescribeStreamSummary
API to get a summarized description of the specified Kinesis data stream and the ListShards
API to list the shards in a specified data stream and obtain information about each
shard.
When invoking this API, you must use either the 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. You can limit the number of shards returned by each call. For more information, see Retrieving Shards from a Stream in the Amazon Kinesis Data Streams Developer Guide. There are no guarantees about the chronological order shards returned. To process shards in chronological order, use the ID of the parent shard to track the lineage to the oldest shard. This operation has a limit of 10 transactions per second per account. |
|
DescribeStreamConsumer(DescribeStreamConsumerRequest) |
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. This operation has a limit of 20 transactions per second per stream.
When making a cross-account call with |
|
DescribeStreamConsumerAsync(DescribeStreamConsumerRequest, CancellationToken) |
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. This operation has a limit of 20 transactions per second per stream.
When making a cross-account call with |
|
DescribeStreamSummary(DescribeStreamSummaryRequest) |
Provides a summarized description of the specified Kinesis data stream without the
shard list.
When invoking this API, you must use either the 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. DescribeStreamSummary has a limit of 20 transactions per second per account. |
|
DescribeStreamSummaryAsync(DescribeStreamSummaryRequest, CancellationToken) |
Provides a summarized description of the specified Kinesis data stream without the
shard list.
When invoking this API, you must use either the 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. DescribeStreamSummary has a limit of 20 transactions per second per account. |
|
DetermineServiceOperationEndpoint(AmazonWebServiceRequest) |
Returns the endpoint that will be used for a particular request. |
|
DisableEnhancedMonitoring(DisableEnhancedMonitoringRequest) |
Disables enhanced monitoring.
When invoking this API, you must use either the |
|
DisableEnhancedMonitoringAsync(DisableEnhancedMonitoringRequest, CancellationToken) |
Disables enhanced monitoring.
When invoking this API, you must use either the |
|
EnableEnhancedMonitoring(EnableEnhancedMonitoringRequest) |
Enables enhanced Kinesis data stream monitoring for shard-level metrics.
When invoking this API, you must use either the |
|
EnableEnhancedMonitoringAsync(EnableEnhancedMonitoringRequest, CancellationToken) |
Enables enhanced Kinesis data stream monitoring for shard-level metrics.
When invoking this API, you must use either the |
|
GetRecords(GetRecordsRequest) |
Gets data records from a Kinesis data stream's shard.
When invoking this API, you must use either the
Specify a shard iterator using the
You can scale by provisioning multiple shards per stream while considering service
limits (for more information, see Amazon
Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer Guide).
Your application should have one thread per shard, each reading continuously from
its stream. To read from a stream continually, call GetRecords in a loop. Use
GetShardIterator to get the shard iterator to specify in the first GetRecords
call. GetRecords returns a new shard iterator in
Each data record can be up to 1 MiB in size, and each shard can read up to 2 MiB per
second. You can ensure that your calls don't exceed the maximum supported size or
throughput by using the
The size of the data returned by GetRecords varies depending on the utilization
of the shard. It is recommended that consumer applications retrieve records via the
To detect whether the application is falling behind in processing, you can use the
Each Amazon Kinesis record includes a value, This operation has a limit of five transactions per second per shard. |
|
GetRecordsAsync(GetRecordsRequest, CancellationToken) |
Gets data records from a Kinesis data stream's shard.
When invoking this API, you must use either the
Specify a shard iterator using the
You can scale by provisioning multiple shards per stream while considering service
limits (for more information, see Amazon
Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer Guide).
Your application should have one thread per shard, each reading continuously from
its stream. To read from a stream continually, call GetRecords in a loop. Use
GetShardIterator to get the shard iterator to specify in the first GetRecords
call. GetRecords returns a new shard iterator in
Each data record can be up to 1 MiB in size, and each shard can read up to 2 MiB per
second. You can ensure that your calls don't exceed the maximum supported size or
throughput by using the
The size of the data returned by GetRecords varies depending on the utilization
of the shard. It is recommended that consumer applications retrieve records via the
To detect whether the application is falling behind in processing, you can use the
Each Amazon Kinesis record includes a value, This operation has a limit of five transactions per second per shard. |
|
GetResourcePolicy(GetResourcePolicyRequest) |
Returns a policy attached to the specified data stream or consumer. Request patterns can be one of the following:
|
|
GetResourcePolicyAsync(GetResourcePolicyRequest, CancellationToken) |
Returns a policy attached to the specified data stream or consumer. Request patterns can be one of the following:
|
|
GetShardIterator(GetShardIteratorRequest) |
Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it
is returned to the requester.
When invoking this API, you must use either the 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.
You must specify the shard iterator type. For example, you can set the
When you read repeatedly from a stream, use a GetShardIterator request to get
the first shard iterator for use in your first GetRecords request and for subsequent
reads use the shard iterator returned by the GetRecords request in
If a GetShardIterator request is made too often, you receive a If the shard is closed, GetShardIterator returns a valid iterator for the last sequence number of the shard. A shard can be closed as a result of using SplitShard or MergeShards. GetShardIterator has a limit of five transactions per second per account per open shard. |
|
GetShardIteratorAsync(GetShardIteratorRequest, CancellationToken) |
Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it
is returned to the requester.
When invoking this API, you must use either the 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.
You must specify the shard iterator type. For example, you can set the
When you read repeatedly from a stream, use a GetShardIterator request to get
the first shard iterator for use in your first GetRecords request and for subsequent
reads use the shard iterator returned by the GetRecords request in
If a GetShardIterator request is made too often, you receive a If the shard is closed, GetShardIterator returns a valid iterator for the last sequence number of the shard. A shard can be closed as a result of using SplitShard or MergeShards. GetShardIterator has a limit of five transactions per second per account per open shard. |
|
IncreaseStreamRetentionPeriod(string, int) |
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).
When invoking this API, you must use either the 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. |
|
IncreaseStreamRetentionPeriod(IncreaseStreamRetentionPeriodRequest) |
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).
When invoking this API, you must use either the 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. |
|
IncreaseStreamRetentionPeriodAsync(string, int, CancellationToken) |
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).
When invoking this API, you must use either the 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. |
|
IncreaseStreamRetentionPeriodAsync(IncreaseStreamRetentionPeriodRequest, CancellationToken) |
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).
When invoking this API, you must use either the 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(ListShardsRequest) |
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.
When invoking this API, you must use either the This action does not list expired shards. For information about expired shards, see Data Routing, Data Persistence, and Shard State after a Reshard. This API is a new operation that is used by the Amazon Kinesis Client Library (KCL). If you have a fine-grained IAM policy that only allows specific operations, you must update your policy to allow calls to this API. For more information, see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM. |
|
ListShardsAsync(ListShardsRequest, CancellationToken) |
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.
When invoking this API, you must use either the This action does not list expired shards. For information about expired shards, see Data Routing, Data Persistence, and Shard State after a Reshard. This API is a new operation that is used by the Amazon Kinesis Client Library (KCL). If you have a fine-grained IAM policy that only allows specific operations, you must update your policy to allow calls to this API. For more information, see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM. |
|
ListStreamConsumers(ListStreamConsumersRequest) |
Lists the consumers registered to receive data from a stream using enhanced fan-out, and provides information about each consumer. This operation has a limit of 5 transactions per second per stream. |
|
ListStreamConsumersAsync(ListStreamConsumersRequest, CancellationToken) |
Lists the consumers registered to receive data from a stream using enhanced fan-out, and provides information about each consumer. This operation has a limit of 5 transactions per second per stream. |
|
ListStreams() |
Lists your Kinesis data streams.
The number of streams may be too large to return from a single call to
You can detect if there are more streams available to list by using the ListStreams has a limit of five transactions per second per account. |
|
ListStreams(ListStreamsRequest) |
Lists your Kinesis data streams.
The number of streams may be too large to return from a single call to
You can detect if there are more streams available to list by using the ListStreams has a limit of five transactions per second per account. |
|
ListStreamsAsync(CancellationToken) |
Lists your Kinesis data streams.
The number of streams may be too large to return from a single call to
You can detect if there are more streams available to list by using the ListStreams has a limit of five transactions per second per account. |
|
ListStreamsAsync(ListStreamsRequest, CancellationToken) |
Lists your Kinesis data streams.
The number of streams may be too large to return from a single call to
You can detect if there are more streams available to list by using the ListStreams has a limit of five transactions per second per account. |
|
ListTagsForStream(ListTagsForStreamRequest) |
Lists the tags for the specified Kinesis data stream. This operation has a limit of
five transactions per second per account.
When invoking this API, you must use either the |
|
ListTagsForStreamAsync(ListTagsForStreamRequest, CancellationToken) |
Lists the tags for the specified Kinesis data stream. This operation has a limit of
five transactions per second per account.
When invoking this API, you must use either the |
|
MergeShards(MergeShardsRequest) |
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.
When invoking this API, you must use either the
If the stream is in the
You can use DescribeStreamSummary to check the state of the stream, which is
returned in
You use DescribeStreamSummary and the ListShards APIs to determine the
shard IDs that are specified in the
If you try to operate on too many streams in parallel using CreateStream, DeleteStream,
|
|
MergeShardsAsync(MergeShardsRequest, CancellationToken) |
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.
When invoking this API, you must use either the
If the stream is in the
You can use DescribeStreamSummary to check the state of the stream, which is
returned in
You use DescribeStreamSummary and the ListShards APIs to determine the
shard IDs that are specified in the
If you try to operate on too many streams in parallel using CreateStream, DeleteStream,
|
|
PutRecord(PutRecordRequest) |
Writes a single data record into an Amazon Kinesis data stream. Call
When invoking this API, you must use either the You must specify the name of the stream that captures, stores, and transports the data; a partition key; and the data blob itself. The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on. The partition key is used by Kinesis Data Streams to distribute data across shards. Kinesis Data Streams segregates the data records that belong to a stream into multiple shards, using the partition key associated with each data record to determine the shard to which a given data record belongs.
Partition keys are Unicode strings, with a maximum length limit of 256 characters
for each key. An MD5 hash function is used to map partition keys to 128-bit integer
values and to map associated data records to shards using the hash key ranges of the
shards. You can override hashing the partition key to determine the shard by explicitly
specifying a hash value using the
Sequence numbers increase over time and are specific to a shard within a stream, not
across all shards within a stream. To guarantee strictly increasing ordering, write
serially to a shard and use the After you write a record to a stream, you cannot modify that record or its order within the stream.
If a By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod to modify this retention period. |
|
PutRecordAsync(PutRecordRequest, CancellationToken) |
Writes a single data record into an Amazon Kinesis data stream. Call
When invoking this API, you must use either the You must specify the name of the stream that captures, stores, and transports the data; a partition key; and the data blob itself. The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on. The partition key is used by Kinesis Data Streams to distribute data across shards. Kinesis Data Streams segregates the data records that belong to a stream into multiple shards, using the partition key associated with each data record to determine the shard to which a given data record belongs.
Partition keys are Unicode strings, with a maximum length limit of 256 characters
for each key. An MD5 hash function is used to map partition keys to 128-bit integer
values and to map associated data records to shards using the hash key ranges of the
shards. You can override hashing the partition key to determine the shard by explicitly
specifying a hash value using the
Sequence numbers increase over time and are specific to a shard within a stream, not
across all shards within a stream. To guarantee strictly increasing ordering, write
serially to a shard and use the After you write a record to a stream, you cannot modify that record or its order within the stream.
If a By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod to modify this retention period. |
|
PutRecords(PutRecordsRequest) |
Writes multiple data records into a Kinesis data stream in a single call (also referred
to as a
When invoking this API, you must use either the
Each
You must specify the name of the stream that captures, stores, and transports the
data; and an array of request The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on. The partition key is used by Kinesis Data Streams as input to a hash function that maps the partition key and associated data to a specific shard. 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. For more information, see Adding Data to a Stream in the Amazon Kinesis Data Streams Developer Guide.
Each record in the
The
The response
A successfully processed record includes
An unsuccessfully processed record includes After you write a record to a stream, you cannot modify that record or its order within the stream. By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod to modify this retention period. |
|
PutRecordsAsync(PutRecordsRequest, CancellationToken) |
Writes multiple data records into a Kinesis data stream in a single call (also referred
to as a
When invoking this API, you must use either the
Each
You must specify the name of the stream that captures, stores, and transports the
data; and an array of request The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on. The partition key is used by Kinesis Data Streams as input to a hash function that maps the partition key and associated data to a specific shard. 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. For more information, see Adding Data to a Stream in the Amazon Kinesis Data Streams Developer Guide.
Each record in the
The
The response
A successfully processed record includes
An unsuccessfully processed record includes After you write a record to a stream, you cannot modify that record or its order within the stream. By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod to modify this retention period. |
|
PutResourcePolicy(PutResourcePolicyRequest) |
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 Request patterns can be one of the following:
For more information, see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM. |
|
PutResourcePolicyAsync(PutResourcePolicyRequest, CancellationToken) |
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 Request patterns can be one of the following:
For more information, see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM. |
|
RegisterStreamConsumer(RegisterStreamConsumerRequest) |
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. You can register up to 20 consumers per stream. A given consumer can only be registered with one stream at a time. For an example of how to use this operations, see Enhanced Fan-Out Using the Kinesis Data Streams API.
The use of this operation has a limit of five transactions per second per account.
Also, only 5 consumers can be created simultaneously. In other words, you cannot have
more than 5 consumers in a |
|
RegisterStreamConsumerAsync(RegisterStreamConsumerRequest, CancellationToken) |
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. You can register up to 20 consumers per stream. A given consumer can only be registered with one stream at a time. For an example of how to use this operations, see Enhanced Fan-Out Using the Kinesis Data Streams API.
The use of this operation has a limit of five transactions per second per account.
Also, only 5 consumers can be created simultaneously. In other words, you cannot have
more than 5 consumers in a |
|
RemoveTagsFromStream(RemoveTagsFromStreamRequest) |
Removes tags from the specified Kinesis data stream. Removed tags are deleted and
cannot be recovered after this operation successfully completes.
When invoking this API, you must use either the If you specify a tag that does not exist, it is ignored. RemoveTagsFromStream has a limit of five transactions per second per account. |
|
RemoveTagsFromStreamAsync(RemoveTagsFromStreamRequest, CancellationToken) |
Removes tags from the specified Kinesis data stream. Removed tags are deleted and
cannot be recovered after this operation successfully completes.
When invoking this API, you must use either the If you specify a tag that does not exist, it is ignored. RemoveTagsFromStream has a limit of five transactions per second per account. |
|
SplitShard(SplitShardRequest) |
Splits a shard into two new shards in the Kinesis data stream, to increase the stream's
capacity to ingest and transport data.
When invoking this API, you must use either the
You can also use You must specify the shard to be split and the new hash key, which is the position in the shard where the shard gets split in two. In many cases, the new hash key might be the average of the beginning and ending hash key, but it can be any hash key value in the range being mapped into the shard. For more information, see Split a Shard in the Amazon Kinesis Data Streams Developer Guide.
You can use DescribeStreamSummary and the ListShards APIs to determine
the shard ID and hash key values for the
You can use DescribeStreamSummary to check the status of the stream, which
is returned in
If the specified stream does not exist, DescribeStreamSummary returns a For the default shard limit for an Amazon Web Services account, see Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer Guide. To increase this limit, contact Amazon Web Services Support.
If you try to operate on too many streams simultaneously using CreateStream,
DeleteStream, MergeShards, and/or SplitShard, you receive a
|
|
SplitShardAsync(SplitShardRequest, CancellationToken) |
Splits a shard into two new shards in the Kinesis data stream, to increase the stream's
capacity to ingest and transport data.
When invoking this API, you must use either the
You can also use You must specify the shard to be split and the new hash key, which is the position in the shard where the shard gets split in two. In many cases, the new hash key might be the average of the beginning and ending hash key, but it can be any hash key value in the range being mapped into the shard. For more information, see Split a Shard in the Amazon Kinesis Data Streams Developer Guide.
You can use DescribeStreamSummary and the ListShards APIs to determine
the shard ID and hash key values for the
You can use DescribeStreamSummary to check the status of the stream, which
is returned in
If the specified stream does not exist, DescribeStreamSummary returns a For the default shard limit for an Amazon Web Services account, see Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer Guide. To increase this limit, contact Amazon Web Services Support.
If you try to operate on too many streams simultaneously using CreateStream,
DeleteStream, MergeShards, and/or SplitShard, you receive a
|
|
StartStreamEncryption(StartStreamEncryptionRequest) |
Enables or updates server-side encryption using an Amazon Web Services KMS key for
a specified stream.
When invoking this API, you must use either the
Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis
Data Streams returns immediately and sets the status of the stream to API Limits: You can successfully apply a new Amazon Web Services KMS key for server-side encryption 25 times in a rolling 24-hour period.
Note: It can take up to 5 seconds after the stream is in an |
|
StartStreamEncryptionAsync(StartStreamEncryptionRequest, CancellationToken) |
Enables or updates server-side encryption using an Amazon Web Services KMS key for
a specified stream.
When invoking this API, you must use either the
Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis
Data Streams returns immediately and sets the status of the stream to API Limits: You can successfully apply a new Amazon Web Services KMS key for server-side encryption 25 times in a rolling 24-hour period.
Note: It can take up to 5 seconds after the stream is in an |
|
StopStreamEncryption(StopStreamEncryptionRequest) |
Disables server-side encryption for a specified stream.
When invoking this API, you must use either the
Stopping encryption is an asynchronous operation. Upon receiving the request, Kinesis
Data Streams returns immediately and sets the status of the stream to API Limits: You can successfully disable server-side encryption 25 times in a rolling 24-hour period.
Note: It can take up to 5 seconds after the stream is in an |
|
StopStreamEncryptionAsync(StopStreamEncryptionRequest, CancellationToken) |
Disables server-side encryption for a specified stream.
When invoking this API, you must use either the
Stopping encryption is an asynchronous operation. Upon receiving the request, Kinesis
Data Streams returns immediately and sets the status of the stream to API Limits: You can successfully disable server-side encryption 25 times in a rolling 24-hour period.
Note: It can take up to 5 seconds after the stream is in an |
|
UpdateShardCount(UpdateShardCountRequest) |
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.
When invoking this API, you must use either the
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 To update the shard count, Kinesis Data Streams performs splits or merges on individual shards. This can cause short-lived shards to be created, in addition to the final shards. These short-lived shards count towards your total shard limit for your account in the Region. When using this operation, we recommend that you specify a target shard count that is a multiple of 25% (25%, 50%, 75%, 100%). You can specify any target value within your shard limit. However, if you specify a target that isn't a multiple of 25%, the scaling action might take longer to complete. This operation has the following default limits. By default, you cannot do the following:
For the default limits for an Amazon Web Services account, see Streams Limits in the Amazon Kinesis Data Streams Developer Guide. To request an increase in the call rate limit, the shard limit for this API, or your overall shard limit, use the limits form. |
|
UpdateShardCountAsync(UpdateShardCountRequest, CancellationToken) |
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.
When invoking this API, you must use either the
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 To update the shard count, Kinesis Data Streams performs splits or merges on individual shards. This can cause short-lived shards to be created, in addition to the final shards. These short-lived shards count towards your total shard limit for your account in the Region. When using this operation, we recommend that you specify a target shard count that is a multiple of 25% (25%, 50%, 75%, 100%). You can specify any target value within your shard limit. However, if you specify a target that isn't a multiple of 25%, the scaling action might take longer to complete. This operation has the following default limits. By default, you cannot do the following:
For the default limits for an Amazon Web Services account, see Streams Limits in the Amazon Kinesis Data Streams Developer Guide. To request an increase in the call rate limit, the shard limit for this API, or your overall shard limit, use the limits form. |
|
UpdateStreamMode(UpdateStreamModeRequest) |
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. |
|
UpdateStreamModeAsync(UpdateStreamModeRequest, CancellationToken) |
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. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5