@aws-sdk/client-kinesis 3.36.0 → 3.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist-cjs/Kinesis.js +0 -5
- package/dist-cjs/KinesisClient.js +0 -10
- package/dist-cjs/commands/AddTagsToStreamCommand.js +0 -32
- package/dist-cjs/commands/CreateStreamCommand.js +0 -64
- package/dist-cjs/commands/DecreaseStreamRetentionPeriodCommand.js +0 -29
- package/dist-cjs/commands/DeleteStreamCommand.js +0 -42
- package/dist-cjs/commands/DeregisterStreamConsumerCommand.js +0 -31
- package/dist-cjs/commands/DescribeLimitsCommand.js +0 -27
- package/dist-cjs/commands/DescribeStreamCommand.js +0 -40
- package/dist-cjs/commands/DescribeStreamConsumerCommand.js +0 -31
- package/dist-cjs/commands/DescribeStreamSummaryCommand.js +0 -31
- package/dist-cjs/commands/DisableEnhancedMonitoringCommand.js +0 -24
- package/dist-cjs/commands/EnableEnhancedMonitoringCommand.js +0 -24
- package/dist-cjs/commands/GetRecordsCommand.js +0 -70
- package/dist-cjs/commands/GetShardIteratorCommand.js +0 -57
- package/dist-cjs/commands/IncreaseStreamRetentionPeriodCommand.js +0 -32
- package/dist-cjs/commands/ListShardsCommand.js +0 -32
- package/dist-cjs/commands/ListStreamConsumersCommand.js +0 -26
- package/dist-cjs/commands/ListStreamsCommand.js +0 -39
- package/dist-cjs/commands/ListTagsForStreamCommand.js +0 -25
- package/dist-cjs/commands/MergeShardsCommand.js +0 -59
- package/dist-cjs/commands/PutRecordCommand.js +0 -59
- package/dist-cjs/commands/PutRecordsCommand.js +0 -79
- package/dist-cjs/commands/RegisterStreamConsumerCommand.js +0 -37
- package/dist-cjs/commands/RemoveTagsFromStreamCommand.js +0 -29
- package/dist-cjs/commands/SplitShardCommand.js +0 -65
- package/dist-cjs/commands/StartStreamEncryptionCommand.js +0 -39
- package/dist-cjs/commands/StopStreamEncryptionCommand.js +0 -39
- package/dist-cjs/commands/SubscribeToShardCommand.js +0 -45
- package/dist-cjs/commands/UpdateShardCountCommand.js +0 -67
- package/dist-cjs/commands/index.js +31 -0
- package/dist-cjs/endpoints.js +6 -1
- package/dist-cjs/index.js +5 -34
- package/dist-cjs/models/models_0.js +0 -225
- package/dist-cjs/pagination/ListStreamConsumersPaginator.js +0 -10
- package/dist-cjs/pagination/index.js +5 -0
- package/dist-cjs/protocols/Aws_json1_1.js +0 -5
- package/dist-cjs/runtimeConfig.browser.js +1 -5
- package/dist-cjs/runtimeConfig.js +1 -5
- package/dist-cjs/runtimeConfig.native.js +0 -3
- package/dist-cjs/runtimeConfig.shared.js +0 -3
- package/dist-cjs/waiters/index.js +5 -0
- package/dist-cjs/waiters/waitForStreamExists.js +0 -9
- package/dist-cjs/waiters/waitForStreamNotExists.js +0 -9
- package/dist-es/commands/index.js +28 -0
- package/dist-es/endpoints.js +6 -1
- package/dist-es/index.js +5 -34
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/waiters/index.js +2 -0
- package/dist-types/commands/index.d.ts +28 -0
- package/dist-types/index.d.ts +5 -34
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/Kinesis.d.ts +29 -591
- package/dist-types/ts3.4/KinesisClient.d.ts +25 -94
- package/dist-types/ts3.4/commands/AddTagsToStreamCommand.d.ts +2 -28
- package/dist-types/ts3.4/commands/CreateStreamCommand.d.ts +2 -60
- package/dist-types/ts3.4/commands/DecreaseStreamRetentionPeriodCommand.d.ts +2 -25
- package/dist-types/ts3.4/commands/DeleteStreamCommand.d.ts +2 -38
- package/dist-types/ts3.4/commands/DeregisterStreamConsumerCommand.d.ts +2 -27
- package/dist-types/ts3.4/commands/DescribeLimitsCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/DescribeStreamCommand.d.ts +2 -36
- package/dist-types/ts3.4/commands/DescribeStreamConsumerCommand.d.ts +2 -27
- package/dist-types/ts3.4/commands/DescribeStreamSummaryCommand.d.ts +2 -27
- package/dist-types/ts3.4/commands/DisableEnhancedMonitoringCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/EnableEnhancedMonitoringCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetRecordsCommand.d.ts +2 -66
- package/dist-types/ts3.4/commands/GetShardIteratorCommand.d.ts +2 -53
- package/dist-types/ts3.4/commands/IncreaseStreamRetentionPeriodCommand.d.ts +2 -28
- package/dist-types/ts3.4/commands/ListShardsCommand.d.ts +2 -28
- package/dist-types/ts3.4/commands/ListStreamConsumersCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/ListStreamsCommand.d.ts +2 -35
- package/dist-types/ts3.4/commands/ListTagsForStreamCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/MergeShardsCommand.d.ts +2 -55
- package/dist-types/ts3.4/commands/PutRecordCommand.d.ts +2 -55
- package/dist-types/ts3.4/commands/PutRecordsCommand.d.ts +2 -75
- package/dist-types/ts3.4/commands/RegisterStreamConsumerCommand.d.ts +2 -33
- package/dist-types/ts3.4/commands/RemoveTagsFromStreamCommand.d.ts +2 -25
- package/dist-types/ts3.4/commands/SplitShardCommand.d.ts +2 -61
- package/dist-types/ts3.4/commands/StartStreamEncryptionCommand.d.ts +2 -35
- package/dist-types/ts3.4/commands/StopStreamEncryptionCommand.d.ts +2 -35
- package/dist-types/ts3.4/commands/SubscribeToShardCommand.d.ts +2 -41
- package/dist-types/ts3.4/commands/UpdateShardCountCommand.d.ts +2 -63
- package/dist-types/ts3.4/commands/index.d.ts +28 -0
- package/dist-types/ts3.4/index.d.ts +5 -34
- package/dist-types/ts3.4/models/models_0.d.ts +316 -1659
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/dist-types/ts3.4/waiters/index.d.ts +2 -0
- package/dist-types/ts3.4/waiters/waitForStreamExists.d.ts +2 -9
- package/dist-types/ts3.4/waiters/waitForStreamNotExists.d.ts +2 -9
- package/dist-types/waiters/index.d.ts +2 -0
- package/package.json +36 -36
|
@@ -5,81 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Gets data records from a Kinesis data stream's shard.</p>
|
|
10
|
-
* <p>Specify a shard iterator using the <code>ShardIterator</code> parameter. The shard
|
|
11
|
-
* iterator specifies the position in the shard from which you want to start reading data
|
|
12
|
-
* records sequentially. If there are no records available in the portion of the shard that
|
|
13
|
-
* the iterator points to, <a>GetRecords</a> returns an empty list. It might
|
|
14
|
-
* take multiple calls to get to a portion of the shard that contains records.</p>
|
|
15
|
-
* <p>You can scale by provisioning multiple shards per stream while considering service
|
|
16
|
-
* limits (for more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon Kinesis Data Streams
|
|
17
|
-
* Limits</a> in the <i>Amazon Kinesis Data Streams Developer
|
|
18
|
-
* Guide</i>). Your application should have one thread per shard, each reading
|
|
19
|
-
* continuously from its stream. To read from a stream continually, call <a>GetRecords</a> in a loop. Use <a>GetShardIterator</a> to get the
|
|
20
|
-
* shard iterator to specify in the first <a>GetRecords</a> call. <a>GetRecords</a> returns a new shard iterator in
|
|
21
|
-
* <code>NextShardIterator</code>. Specify the shard iterator returned in
|
|
22
|
-
* <code>NextShardIterator</code> in subsequent calls to <a>GetRecords</a>.
|
|
23
|
-
* If the shard has been closed, the shard iterator can't return more data and <a>GetRecords</a> returns <code>null</code> in <code>NextShardIterator</code>.
|
|
24
|
-
* You can terminate the loop when the shard is closed, or when the shard iterator reaches
|
|
25
|
-
* the record with the sequence number or other attribute that marks it as the last record
|
|
26
|
-
* to process.</p>
|
|
27
|
-
* <p>Each data record can be up to 1 MiB in size, and each shard can read up to 2 MiB
|
|
28
|
-
* per second. You can ensure that your calls don't exceed the maximum supported size or
|
|
29
|
-
* throughput by using the <code>Limit</code> parameter to specify the maximum number of
|
|
30
|
-
* records that <a>GetRecords</a> can return. Consider your average record size
|
|
31
|
-
* when determining this limit. The maximum number of records that can be returned per call
|
|
32
|
-
* is 10,000.</p>
|
|
33
|
-
*
|
|
34
|
-
* <p>The size of the data returned by <a>GetRecords</a> varies depending on
|
|
35
|
-
* the utilization of the shard. The maximum size of data that <a>GetRecords</a>
|
|
36
|
-
* can return is 10 MiB. If a call returns this amount of data, subsequent calls made
|
|
37
|
-
* within the next 5 seconds throw <code>ProvisionedThroughputExceededException</code>. If
|
|
38
|
-
* there is insufficient provisioned throughput on the stream, subsequent calls made within
|
|
39
|
-
* the next 1 second throw <code>ProvisionedThroughputExceededException</code>. <a>GetRecords</a> doesn't return any data when it throws an exception. For this
|
|
40
|
-
* reason, we recommend that you wait 1 second between calls to <a>GetRecords</a>. However, it's possible that the application will get exceptions for longer than 1
|
|
41
|
-
* second.</p>
|
|
42
|
-
* <p>To detect whether the application is falling behind in processing, you can use the
|
|
43
|
-
* <code>MillisBehindLatest</code> response attribute. You can also monitor the stream
|
|
44
|
-
* using CloudWatch metrics and other mechanisms (see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html">Monitoring</a> in the <i>Amazon
|
|
45
|
-
* Kinesis Data Streams Developer Guide</i>).</p>
|
|
46
|
-
* <p>Each Amazon Kinesis record includes a value,
|
|
47
|
-
* <code>ApproximateArrivalTimestamp</code>, that is set when a stream successfully
|
|
48
|
-
* receives and stores a record. This is commonly referred to as a server-side time stamp,
|
|
49
|
-
* whereas a client-side time stamp is set when a data producer creates or sends the record
|
|
50
|
-
* to a stream (a data producer is any data source putting data records into a stream, for
|
|
51
|
-
* example with <a>PutRecords</a>). The time stamp has millisecond precision.
|
|
52
|
-
* There are no guarantees about the time stamp accuracy, or that the time stamp is always
|
|
53
|
-
* increasing. For example, records in a shard or across a stream might have time stamps
|
|
54
|
-
* that are out of order.</p>
|
|
55
|
-
* <p>This operation has a limit of five transactions per second per shard.</p>
|
|
56
|
-
* @example
|
|
57
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
58
|
-
* ```javascript
|
|
59
|
-
* import { KinesisClient, GetRecordsCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
60
|
-
* // const { KinesisClient, GetRecordsCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
61
|
-
* const client = new KinesisClient(config);
|
|
62
|
-
* const command = new GetRecordsCommand(input);
|
|
63
|
-
* const response = await client.send(command);
|
|
64
|
-
* ```
|
|
65
|
-
*
|
|
66
|
-
* @see {@link GetRecordsCommandInput} for command's `input` shape.
|
|
67
|
-
* @see {@link GetRecordsCommandOutput} for command's `response` shape.
|
|
68
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
69
|
-
*
|
|
70
|
-
*/
|
|
71
8
|
class GetRecordsCommand extends smithy_client_1.Command {
|
|
72
|
-
// Start section: command_properties
|
|
73
|
-
// End section: command_properties
|
|
74
9
|
constructor(input) {
|
|
75
|
-
// Start section: command_constructor
|
|
76
10
|
super();
|
|
77
11
|
this.input = input;
|
|
78
|
-
// End section: command_constructor
|
|
79
12
|
}
|
|
80
|
-
/**
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
84
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
85
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,68 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it
|
|
10
|
-
* is returned to the requester.</p>
|
|
11
|
-
* <p>A shard iterator specifies the shard position from which to start reading data
|
|
12
|
-
* records sequentially. The position is specified using the sequence number of a data
|
|
13
|
-
* record in a shard. A sequence number is the identifier associated with every record
|
|
14
|
-
* ingested in the stream, and is assigned when a record is put into the stream. Each
|
|
15
|
-
* stream has one or more shards.</p>
|
|
16
|
-
* <p>You must specify the shard iterator type. For example, you can set the
|
|
17
|
-
* <code>ShardIteratorType</code> parameter to read exactly from the position denoted
|
|
18
|
-
* by a specific sequence number by using the <code>AT_SEQUENCE_NUMBER</code> shard
|
|
19
|
-
* iterator type. Alternatively, the parameter can read right after the sequence number by
|
|
20
|
-
* using the <code>AFTER_SEQUENCE_NUMBER</code> shard iterator type, using sequence numbers
|
|
21
|
-
* returned by earlier calls to <a>PutRecord</a>, <a>PutRecords</a>,
|
|
22
|
-
* <a>GetRecords</a>, or <a>DescribeStream</a>. In the request,
|
|
23
|
-
* you can specify the shard iterator type <code>AT_TIMESTAMP</code> to read records from
|
|
24
|
-
* an arbitrary point in time, <code>TRIM_HORIZON</code> to cause
|
|
25
|
-
* <code>ShardIterator</code> to point to the last untrimmed record in the shard in the
|
|
26
|
-
* system (the oldest data record in the shard), or <code>LATEST</code> so that you always
|
|
27
|
-
* read the most recent data in the shard. </p>
|
|
28
|
-
* <p>When you read repeatedly from a stream, use a <a>GetShardIterator</a>
|
|
29
|
-
* request to get the first shard iterator for use in your first <a>GetRecords</a> request and for subsequent reads use the shard iterator returned by the <a>GetRecords</a> request in <code>NextShardIterator</code>. A new shard
|
|
30
|
-
* iterator is returned by every <a>GetRecords</a> request in
|
|
31
|
-
* <code>NextShardIterator</code>, which you use in the <code>ShardIterator</code>
|
|
32
|
-
* parameter of the next <a>GetRecords</a> request. </p>
|
|
33
|
-
* <p>If a <a>GetShardIterator</a> request is made too often, you receive a
|
|
34
|
-
* <code>ProvisionedThroughputExceededException</code>. For more information about
|
|
35
|
-
* throughput limits, see <a>GetRecords</a>, and <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the
|
|
36
|
-
* <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
|
|
37
|
-
* <p>If the shard is closed, <a>GetShardIterator</a> returns a valid iterator
|
|
38
|
-
* for the last sequence number of the shard. A shard can be closed as a result of using
|
|
39
|
-
* <a>SplitShard</a> or <a>MergeShards</a>.</p>
|
|
40
|
-
* <p>
|
|
41
|
-
* <a>GetShardIterator</a> has a limit of five transactions per second per
|
|
42
|
-
* account per open shard.</p>
|
|
43
|
-
* @example
|
|
44
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
45
|
-
* ```javascript
|
|
46
|
-
* import { KinesisClient, GetShardIteratorCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
47
|
-
* // const { KinesisClient, GetShardIteratorCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
48
|
-
* const client = new KinesisClient(config);
|
|
49
|
-
* const command = new GetShardIteratorCommand(input);
|
|
50
|
-
* const response = await client.send(command);
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
* @see {@link GetShardIteratorCommandInput} for command's `input` shape.
|
|
54
|
-
* @see {@link GetShardIteratorCommandOutput} for command's `response` shape.
|
|
55
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
56
|
-
*
|
|
57
|
-
*/
|
|
58
8
|
class GetShardIteratorCommand extends smithy_client_1.Command {
|
|
59
|
-
// Start section: command_properties
|
|
60
|
-
// End section: command_properties
|
|
61
9
|
constructor(input) {
|
|
62
|
-
// Start section: command_constructor
|
|
63
10
|
super();
|
|
64
11
|
this.input = input;
|
|
65
|
-
// End section: command_constructor
|
|
66
12
|
}
|
|
67
|
-
/**
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
71
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
72
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,43 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Increases the Kinesis data stream's retention period, which is the length of time
|
|
10
|
-
* data records are accessible after they are added to the stream. The maximum value of a
|
|
11
|
-
* stream's retention period is 168 hours (7 days).</p>
|
|
12
|
-
* <p>If you choose a longer stream retention period, this operation increases the time
|
|
13
|
-
* period during which records that have not yet expired are accessible. However, it does
|
|
14
|
-
* not make previous, expired data (older than the stream's previous retention period)
|
|
15
|
-
* accessible after the operation has been called. For example, if a stream's retention
|
|
16
|
-
* period is set to 24 hours and is increased to 168 hours, any data that is older than 24
|
|
17
|
-
* hours remains inaccessible to consumer applications.</p>
|
|
18
|
-
* @example
|
|
19
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
20
|
-
* ```javascript
|
|
21
|
-
* import { KinesisClient, IncreaseStreamRetentionPeriodCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
22
|
-
* // const { KinesisClient, IncreaseStreamRetentionPeriodCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
23
|
-
* const client = new KinesisClient(config);
|
|
24
|
-
* const command = new IncreaseStreamRetentionPeriodCommand(input);
|
|
25
|
-
* const response = await client.send(command);
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @see {@link IncreaseStreamRetentionPeriodCommandInput} for command's `input` shape.
|
|
29
|
-
* @see {@link IncreaseStreamRetentionPeriodCommandOutput} for command's `response` shape.
|
|
30
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
8
|
class IncreaseStreamRetentionPeriodCommand extends smithy_client_1.Command {
|
|
34
|
-
// Start section: command_properties
|
|
35
|
-
// End section: command_properties
|
|
36
9
|
constructor(input) {
|
|
37
|
-
// Start section: command_constructor
|
|
38
10
|
super();
|
|
39
11
|
this.input = input;
|
|
40
|
-
// End section: command_constructor
|
|
41
12
|
}
|
|
42
|
-
/**
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
46
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
47
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,43 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Lists the shards in a stream and provides information about each shard. This
|
|
10
|
-
* operation has a limit of 100 transactions per second per data stream.</p>
|
|
11
|
-
* <important>
|
|
12
|
-
* <p>This API is a new operation that is used by the Amazon Kinesis Client Library
|
|
13
|
-
* (KCL). If you have a fine-grained IAM policy that only allows specific operations,
|
|
14
|
-
* you must update your policy to allow calls to this API. For more information, see
|
|
15
|
-
* <a href="https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html">Controlling Access to Amazon Kinesis Data Streams Resources Using
|
|
16
|
-
* IAM</a>.</p>
|
|
17
|
-
* </important>
|
|
18
|
-
* @example
|
|
19
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
20
|
-
* ```javascript
|
|
21
|
-
* import { KinesisClient, ListShardsCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
22
|
-
* // const { KinesisClient, ListShardsCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
23
|
-
* const client = new KinesisClient(config);
|
|
24
|
-
* const command = new ListShardsCommand(input);
|
|
25
|
-
* const response = await client.send(command);
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @see {@link ListShardsCommandInput} for command's `input` shape.
|
|
29
|
-
* @see {@link ListShardsCommandOutput} for command's `response` shape.
|
|
30
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
8
|
class ListShardsCommand extends smithy_client_1.Command {
|
|
34
|
-
// Start section: command_properties
|
|
35
|
-
// End section: command_properties
|
|
36
9
|
constructor(input) {
|
|
37
|
-
// Start section: command_constructor
|
|
38
10
|
super();
|
|
39
11
|
this.input = input;
|
|
40
|
-
// End section: command_constructor
|
|
41
12
|
}
|
|
42
|
-
/**
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
46
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
47
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,37 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Lists the consumers registered to receive data from a stream using enhanced fan-out,
|
|
10
|
-
* and provides information about each consumer.</p>
|
|
11
|
-
* <p>This operation has a limit of 5 transactions per second per stream.</p>
|
|
12
|
-
* @example
|
|
13
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
14
|
-
* ```javascript
|
|
15
|
-
* import { KinesisClient, ListStreamConsumersCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
16
|
-
* // const { KinesisClient, ListStreamConsumersCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
17
|
-
* const client = new KinesisClient(config);
|
|
18
|
-
* const command = new ListStreamConsumersCommand(input);
|
|
19
|
-
* const response = await client.send(command);
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @see {@link ListStreamConsumersCommandInput} for command's `input` shape.
|
|
23
|
-
* @see {@link ListStreamConsumersCommandOutput} for command's `response` shape.
|
|
24
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
8
|
class ListStreamConsumersCommand extends smithy_client_1.Command {
|
|
28
|
-
// Start section: command_properties
|
|
29
|
-
// End section: command_properties
|
|
30
9
|
constructor(input) {
|
|
31
|
-
// Start section: command_constructor
|
|
32
10
|
super();
|
|
33
11
|
this.input = input;
|
|
34
|
-
// End section: command_constructor
|
|
35
12
|
}
|
|
36
|
-
/**
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
40
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
41
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,50 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Lists your Kinesis data streams.</p>
|
|
10
|
-
* <p>The number of streams may be too large to return from a single call to
|
|
11
|
-
* <code>ListStreams</code>. You can limit the number of returned streams using the
|
|
12
|
-
* <code>Limit</code> parameter. If you do not specify a value for the
|
|
13
|
-
* <code>Limit</code> parameter, Kinesis Data Streams uses the default limit, which is
|
|
14
|
-
* currently 10.</p>
|
|
15
|
-
* <p>You can detect if there are more streams available to list by using the
|
|
16
|
-
* <code>HasMoreStreams</code> flag from the returned output. If there are more streams
|
|
17
|
-
* available, you can request more streams by using the name of the last stream returned by
|
|
18
|
-
* the <code>ListStreams</code> request in the <code>ExclusiveStartStreamName</code>
|
|
19
|
-
* parameter in a subsequent request to <code>ListStreams</code>. The group of stream names
|
|
20
|
-
* returned by the subsequent request is then added to the list. You can continue this
|
|
21
|
-
* process until all the stream names have been collected in the list. </p>
|
|
22
|
-
* <p>
|
|
23
|
-
* <a>ListStreams</a> has a limit of five transactions per second per
|
|
24
|
-
* account.</p>
|
|
25
|
-
* @example
|
|
26
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
27
|
-
* ```javascript
|
|
28
|
-
* import { KinesisClient, ListStreamsCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
29
|
-
* // const { KinesisClient, ListStreamsCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
30
|
-
* const client = new KinesisClient(config);
|
|
31
|
-
* const command = new ListStreamsCommand(input);
|
|
32
|
-
* const response = await client.send(command);
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @see {@link ListStreamsCommandInput} for command's `input` shape.
|
|
36
|
-
* @see {@link ListStreamsCommandOutput} for command's `response` shape.
|
|
37
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
8
|
class ListStreamsCommand extends smithy_client_1.Command {
|
|
41
|
-
// Start section: command_properties
|
|
42
|
-
// End section: command_properties
|
|
43
9
|
constructor(input) {
|
|
44
|
-
// Start section: command_constructor
|
|
45
10
|
super();
|
|
46
11
|
this.input = input;
|
|
47
|
-
// End section: command_constructor
|
|
48
12
|
}
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
52
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
53
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
54
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,36 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Lists the tags for the specified Kinesis data stream. This operation has a limit of
|
|
10
|
-
* five transactions per second per account.</p>
|
|
11
|
-
* @example
|
|
12
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
13
|
-
* ```javascript
|
|
14
|
-
* import { KinesisClient, ListTagsForStreamCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
15
|
-
* // const { KinesisClient, ListTagsForStreamCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
16
|
-
* const client = new KinesisClient(config);
|
|
17
|
-
* const command = new ListTagsForStreamCommand(input);
|
|
18
|
-
* const response = await client.send(command);
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @see {@link ListTagsForStreamCommandInput} for command's `input` shape.
|
|
22
|
-
* @see {@link ListTagsForStreamCommandOutput} for command's `response` shape.
|
|
23
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
8
|
class ListTagsForStreamCommand extends smithy_client_1.Command {
|
|
27
|
-
// Start section: command_properties
|
|
28
|
-
// End section: command_properties
|
|
29
9
|
constructor(input) {
|
|
30
|
-
// Start section: command_constructor
|
|
31
10
|
super();
|
|
32
11
|
this.input = input;
|
|
33
|
-
// End section: command_constructor
|
|
34
12
|
}
|
|
35
|
-
/**
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
39
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
40
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,70 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Merges two adjacent shards in a Kinesis data stream and combines them into a single
|
|
10
|
-
* shard to reduce the stream's capacity to ingest and transport data. Two shards are
|
|
11
|
-
* considered adjacent if the union of the hash key ranges for the two shards form a
|
|
12
|
-
* contiguous set with no gaps. For example, if you have two shards, one with a hash key
|
|
13
|
-
* range of 276...381 and the other with a hash key range of 382...454, then you could
|
|
14
|
-
* merge these two shards into a single shard that would have a hash key range of
|
|
15
|
-
* 276...454. After the merge, the single child shard receives data for all hash key values
|
|
16
|
-
* covered by the two parent shards.</p>
|
|
17
|
-
* <p>
|
|
18
|
-
* <code>MergeShards</code> is called when there is a need to reduce the overall capacity
|
|
19
|
-
* of a stream because of excess capacity that is not being used. You must specify the
|
|
20
|
-
* shard to be merged and the adjacent shard for a stream. For more information about
|
|
21
|
-
* merging shards, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html">Merge Two
|
|
22
|
-
* Shards</a> in the <i>Amazon Kinesis Data Streams Developer
|
|
23
|
-
* Guide</i>.</p>
|
|
24
|
-
* <p>If the stream is in the <code>ACTIVE</code> state, you can call
|
|
25
|
-
* <code>MergeShards</code>. If a stream is in the <code>CREATING</code>,
|
|
26
|
-
* <code>UPDATING</code>, or <code>DELETING</code> state, <code>MergeShards</code>
|
|
27
|
-
* returns a <code>ResourceInUseException</code>. If the specified stream does not exist,
|
|
28
|
-
* <code>MergeShards</code> returns a <code>ResourceNotFoundException</code>. </p>
|
|
29
|
-
* <p>You can use <a>DescribeStream</a> to check the state of the stream,
|
|
30
|
-
* which is returned in <code>StreamStatus</code>.</p>
|
|
31
|
-
* <p>
|
|
32
|
-
* <code>MergeShards</code> is an asynchronous operation. Upon receiving a
|
|
33
|
-
* <code>MergeShards</code> request, Amazon Kinesis Data Streams immediately returns a
|
|
34
|
-
* response and sets the <code>StreamStatus</code> to <code>UPDATING</code>. After the
|
|
35
|
-
* operation is completed, Kinesis Data Streams sets the <code>StreamStatus</code> to
|
|
36
|
-
* <code>ACTIVE</code>. Read and write operations continue to work while the stream is
|
|
37
|
-
* in the <code>UPDATING</code> state. </p>
|
|
38
|
-
* <p>You use <a>DescribeStream</a> to determine the shard IDs that are
|
|
39
|
-
* specified in the <code>MergeShards</code> request. </p>
|
|
40
|
-
* <p>If you try to operate on too many streams in parallel using <a>CreateStream</a>, <a>DeleteStream</a>, <code>MergeShards</code>,
|
|
41
|
-
* or <a>SplitShard</a>, you receive a <code>LimitExceededException</code>. </p>
|
|
42
|
-
* <p>
|
|
43
|
-
* <code>MergeShards</code> has a limit of five transactions per second per
|
|
44
|
-
* account.</p>
|
|
45
|
-
* @example
|
|
46
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
47
|
-
* ```javascript
|
|
48
|
-
* import { KinesisClient, MergeShardsCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
49
|
-
* // const { KinesisClient, MergeShardsCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
50
|
-
* const client = new KinesisClient(config);
|
|
51
|
-
* const command = new MergeShardsCommand(input);
|
|
52
|
-
* const response = await client.send(command);
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @see {@link MergeShardsCommandInput} for command's `input` shape.
|
|
56
|
-
* @see {@link MergeShardsCommandOutput} for command's `response` shape.
|
|
57
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
8
|
class MergeShardsCommand extends smithy_client_1.Command {
|
|
61
|
-
// Start section: command_properties
|
|
62
|
-
// End section: command_properties
|
|
63
9
|
constructor(input) {
|
|
64
|
-
// Start section: command_constructor
|
|
65
10
|
super();
|
|
66
11
|
this.input = input;
|
|
67
|
-
// End section: command_constructor
|
|
68
12
|
}
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
73
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
74
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,70 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Writes a single data record into an Amazon Kinesis data stream. Call
|
|
10
|
-
* <code>PutRecord</code> to send data into the stream for real-time ingestion and
|
|
11
|
-
* subsequent processing, one record at a time. Each shard can support writes up to 1,000
|
|
12
|
-
* records per second, up to a maximum data write total of 1 MiB per second.</p>
|
|
13
|
-
* <p>You must specify the name of the stream that captures, stores, and transports the
|
|
14
|
-
* data; a partition key; and the data blob itself.</p>
|
|
15
|
-
* <p>The data blob can be any type of data; for example, a segment from a log file,
|
|
16
|
-
* geographic/location data, website clickstream data, and so on.</p>
|
|
17
|
-
* <p>The partition key is used by Kinesis Data Streams to distribute data across shards.
|
|
18
|
-
* Kinesis Data Streams segregates the data records that belong to a stream into multiple
|
|
19
|
-
* shards, using the partition key associated with each data record to determine the shard
|
|
20
|
-
* to which a given data record belongs.</p>
|
|
21
|
-
* <p>Partition keys are Unicode strings, with a maximum length limit of 256 characters
|
|
22
|
-
* for each key. An MD5 hash function is used to map partition keys to 128-bit integer
|
|
23
|
-
* values and to map associated data records to shards using the hash key ranges of the
|
|
24
|
-
* shards. You can override hashing the partition key to determine the shard by explicitly
|
|
25
|
-
* specifying a hash value using the <code>ExplicitHashKey</code> parameter. For more
|
|
26
|
-
* information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams
|
|
27
|
-
* Developer Guide</i>.</p>
|
|
28
|
-
* <p>
|
|
29
|
-
* <code>PutRecord</code> returns the shard ID of where the data record was placed and the
|
|
30
|
-
* sequence number that was assigned to the data record.</p>
|
|
31
|
-
* <p>Sequence numbers increase over time and are specific to a shard within a stream,
|
|
32
|
-
* not across all shards within a stream. To guarantee strictly increasing ordering, write
|
|
33
|
-
* serially to a shard and use the <code>SequenceNumberForOrdering</code> parameter. For
|
|
34
|
-
* more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams
|
|
35
|
-
* Developer Guide</i>.</p>
|
|
36
|
-
* <important>
|
|
37
|
-
* <p>After you write a record to a stream, you cannot modify that record or its order
|
|
38
|
-
* within the stream.</p>
|
|
39
|
-
* </important>
|
|
40
|
-
* <p>If a <code>PutRecord</code> request cannot be processed because of insufficient
|
|
41
|
-
* provisioned throughput on the shard involved in the request, <code>PutRecord</code>
|
|
42
|
-
* throws <code>ProvisionedThroughputExceededException</code>. </p>
|
|
43
|
-
* <p>By default, data records are accessible for 24 hours from the time that they are
|
|
44
|
-
* added to a stream. You can use <a>IncreaseStreamRetentionPeriod</a> or <a>DecreaseStreamRetentionPeriod</a> to modify this retention period.</p>
|
|
45
|
-
* @example
|
|
46
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
47
|
-
* ```javascript
|
|
48
|
-
* import { KinesisClient, PutRecordCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
49
|
-
* // const { KinesisClient, PutRecordCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
50
|
-
* const client = new KinesisClient(config);
|
|
51
|
-
* const command = new PutRecordCommand(input);
|
|
52
|
-
* const response = await client.send(command);
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @see {@link PutRecordCommandInput} for command's `input` shape.
|
|
56
|
-
* @see {@link PutRecordCommandOutput} for command's `response` shape.
|
|
57
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
8
|
class PutRecordCommand extends smithy_client_1.Command {
|
|
61
|
-
// Start section: command_properties
|
|
62
|
-
// End section: command_properties
|
|
63
9
|
constructor(input) {
|
|
64
|
-
// Start section: command_constructor
|
|
65
10
|
super();
|
|
66
11
|
this.input = input;
|
|
67
|
-
// End section: command_constructor
|
|
68
12
|
}
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
73
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
74
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,90 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Writes multiple data records into a Kinesis data stream in a single call (also
|
|
10
|
-
* referred to as a <code>PutRecords</code> request). Use this operation to send data into
|
|
11
|
-
* the stream for data ingestion and processing. </p>
|
|
12
|
-
* <p>Each <code>PutRecords</code> request can support up to 500 records. Each record in
|
|
13
|
-
* the request can be as large as 1 MiB, up to a limit of 5 MiB for the entire request,
|
|
14
|
-
* including partition keys. Each shard can support writes up to 1,000 records per second,
|
|
15
|
-
* up to a maximum data write total of 1 MiB per second.</p>
|
|
16
|
-
* <p>You must specify the name of the stream that captures, stores, and transports the
|
|
17
|
-
* data; and an array of request <code>Records</code>, with each record in the array
|
|
18
|
-
* requiring a partition key and data blob. The record size limit applies to the total size
|
|
19
|
-
* of the partition key and data blob.</p>
|
|
20
|
-
* <p>The data blob can be any type of data; for example, a segment from a log file,
|
|
21
|
-
* geographic/location data, website clickstream data, and so on.</p>
|
|
22
|
-
* <p>The partition key is used by Kinesis Data Streams as input to a hash function that
|
|
23
|
-
* maps the partition key and associated data to a specific shard. An MD5 hash function is
|
|
24
|
-
* used to map partition keys to 128-bit integer values and to map associated data records
|
|
25
|
-
* to shards. As a result of this hashing mechanism, all data records with the same
|
|
26
|
-
* partition key map to the same shard within the stream. For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams
|
|
27
|
-
* Developer Guide</i>.</p>
|
|
28
|
-
* <p>Each record in the <code>Records</code> array may include an optional parameter,
|
|
29
|
-
* <code>ExplicitHashKey</code>, which overrides the partition key to shard mapping.
|
|
30
|
-
* This parameter allows a data producer to determine explicitly the shard where the record
|
|
31
|
-
* is stored. For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords">Adding Multiple Records with PutRecords</a> in the <i>Amazon Kinesis
|
|
32
|
-
* Data Streams Developer Guide</i>.</p>
|
|
33
|
-
* <p>The <code>PutRecords</code> response includes an array of response
|
|
34
|
-
* <code>Records</code>. Each record in the response array directly correlates with a
|
|
35
|
-
* record in the request array using natural ordering, from the top to the bottom of the
|
|
36
|
-
* request and response. The response <code>Records</code> array always includes the same
|
|
37
|
-
* number of records as the request array.</p>
|
|
38
|
-
* <p>The response <code>Records</code> array includes both successfully and
|
|
39
|
-
* unsuccessfully processed records. Kinesis Data Streams attempts to process all records
|
|
40
|
-
* in each <code>PutRecords</code> request. A single record failure does not stop the
|
|
41
|
-
* processing of subsequent records. As a result, PutRecords doesn't guarantee the ordering
|
|
42
|
-
* of records. If you need to read records in the same order they are written to the
|
|
43
|
-
* stream, use <a>PutRecord</a> instead of <code>PutRecords</code>, and write to
|
|
44
|
-
* the same shard.</p>
|
|
45
|
-
* <p>A successfully processed record includes <code>ShardId</code> and
|
|
46
|
-
* <code>SequenceNumber</code> values. The <code>ShardId</code> parameter identifies
|
|
47
|
-
* the shard in the stream where the record is stored. The <code>SequenceNumber</code>
|
|
48
|
-
* parameter is an identifier assigned to the put record, unique to all records in the
|
|
49
|
-
* stream.</p>
|
|
50
|
-
* <p>An unsuccessfully processed record includes <code>ErrorCode</code> and
|
|
51
|
-
* <code>ErrorMessage</code> values. <code>ErrorCode</code> reflects the type of error
|
|
52
|
-
* and can be one of the following values:
|
|
53
|
-
* <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>.
|
|
54
|
-
* <code>ErrorMessage</code> provides more detailed information about the
|
|
55
|
-
* <code>ProvisionedThroughputExceededException</code> exception including the account
|
|
56
|
-
* ID, stream name, and shard ID of the record that was throttled. For more information
|
|
57
|
-
* about partially successful responses, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords">Adding Multiple Records with PutRecords</a> in the <i>Amazon Kinesis
|
|
58
|
-
* Data Streams Developer Guide</i>.</p>
|
|
59
|
-
* <important>
|
|
60
|
-
* <p>After you write a record to a stream, you cannot modify that record or its order
|
|
61
|
-
* within the stream.</p>
|
|
62
|
-
* </important>
|
|
63
|
-
* <p>By default, data records are accessible for 24 hours from the time that they are
|
|
64
|
-
* added to a stream. You can use <a>IncreaseStreamRetentionPeriod</a> or <a>DecreaseStreamRetentionPeriod</a> to modify this retention period.</p>
|
|
65
|
-
* @example
|
|
66
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
67
|
-
* ```javascript
|
|
68
|
-
* import { KinesisClient, PutRecordsCommand } from "@aws-sdk/client-kinesis"; // ES Modules import
|
|
69
|
-
* // const { KinesisClient, PutRecordsCommand } = require("@aws-sdk/client-kinesis"); // CommonJS import
|
|
70
|
-
* const client = new KinesisClient(config);
|
|
71
|
-
* const command = new PutRecordsCommand(input);
|
|
72
|
-
* const response = await client.send(command);
|
|
73
|
-
* ```
|
|
74
|
-
*
|
|
75
|
-
* @see {@link PutRecordsCommandInput} for command's `input` shape.
|
|
76
|
-
* @see {@link PutRecordsCommandOutput} for command's `response` shape.
|
|
77
|
-
* @see {@link KinesisClientResolvedConfig | config} for command's `input` shape.
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
8
|
class PutRecordsCommand extends smithy_client_1.Command {
|
|
81
|
-
// Start section: command_properties
|
|
82
|
-
// End section: command_properties
|
|
83
9
|
constructor(input) {
|
|
84
|
-
// Start section: command_constructor
|
|
85
10
|
super();
|
|
86
11
|
this.input = input;
|
|
87
|
-
// End section: command_constructor
|
|
88
12
|
}
|
|
89
|
-
/**
|
|
90
|
-
* @internal
|
|
91
|
-
*/
|
|
92
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
93
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
94
15
|
const stack = clientStack.concat(this.middlewareStack);
|