Skip to content

Commit ec3f672

Browse files
author
awstools
committed
feat(client-kinesis): Adds support for MinimumThroughputBillingCommitment with new UpdateAccountSettings API. Adds support to configure warm throughput for on-demand streams in new UpdateStreamWarmThroughput API and existing CreateStream API and UpdateStreamMode API.
1 parent ed7ac2a commit ec3f672

File tree

13 files changed

+1247
-43
lines changed

13 files changed

+1247
-43
lines changed

clients/client-kinesis/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,14 @@ DeregisterStreamConsumer
253253

254254
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis/command/DeregisterStreamConsumerCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/DeregisterStreamConsumerCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/DeregisterStreamConsumerCommandOutput/)
255255

256+
</details>
257+
<details>
258+
<summary>
259+
DescribeAccountSettings
260+
</summary>
261+
262+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis/command/DescribeAccountSettingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/DescribeAccountSettingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/DescribeAccountSettingsCommandOutput/)
263+
256264
</details>
257265
<details>
258266
<summary>
@@ -469,6 +477,14 @@ UntagResource
469477

470478
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/UntagResourceCommandOutput/)
471479

480+
</details>
481+
<details>
482+
<summary>
483+
UpdateAccountSettings
484+
</summary>
485+
486+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis/command/UpdateAccountSettingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/UpdateAccountSettingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/UpdateAccountSettingsCommandOutput/)
487+
472488
</details>
473489
<details>
474490
<summary>
@@ -494,3 +510,11 @@ UpdateStreamMode
494510
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis/command/UpdateStreamModeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/UpdateStreamModeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/UpdateStreamModeCommandOutput/)
495511

496512
</details>
513+
<details>
514+
<summary>
515+
UpdateStreamWarmThroughput
516+
</summary>
517+
518+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis/command/UpdateStreamWarmThroughputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/UpdateStreamWarmThroughputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kinesis/Interface/UpdateStreamWarmThroughputCommandOutput/)
519+
520+
</details>

clients/client-kinesis/src/Kinesis.ts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ import {
3232
DeregisterStreamConsumerCommandInput,
3333
DeregisterStreamConsumerCommandOutput,
3434
} from "./commands/DeregisterStreamConsumerCommand";
35+
import {
36+
DescribeAccountSettingsCommand,
37+
DescribeAccountSettingsCommandInput,
38+
DescribeAccountSettingsCommandOutput,
39+
} from "./commands/DescribeAccountSettingsCommand";
3540
import {
3641
DescribeLimitsCommand,
3742
DescribeLimitsCommandInput,
@@ -135,6 +140,11 @@ import {
135140
UntagResourceCommandInput,
136141
UntagResourceCommandOutput,
137142
} from "./commands/UntagResourceCommand";
143+
import {
144+
UpdateAccountSettingsCommand,
145+
UpdateAccountSettingsCommandInput,
146+
UpdateAccountSettingsCommandOutput,
147+
} from "./commands/UpdateAccountSettingsCommand";
138148
import {
139149
UpdateMaxRecordSizeCommand,
140150
UpdateMaxRecordSizeCommandInput,
@@ -150,6 +160,11 @@ import {
150160
UpdateStreamModeCommandInput,
151161
UpdateStreamModeCommandOutput,
152162
} from "./commands/UpdateStreamModeCommand";
163+
import {
164+
UpdateStreamWarmThroughputCommand,
165+
UpdateStreamWarmThroughputCommandInput,
166+
UpdateStreamWarmThroughputCommandOutput,
167+
} from "./commands/UpdateStreamWarmThroughputCommand";
153168
import { KinesisClient, KinesisClientConfig } from "./KinesisClient";
154169

155170
const commands = {
@@ -159,6 +174,7 @@ const commands = {
159174
DeleteResourcePolicyCommand,
160175
DeleteStreamCommand,
161176
DeregisterStreamConsumerCommand,
177+
DescribeAccountSettingsCommand,
162178
DescribeLimitsCommand,
163179
DescribeStreamCommand,
164180
DescribeStreamConsumerCommand,
@@ -186,9 +202,11 @@ const commands = {
186202
SubscribeToShardCommand,
187203
TagResourceCommand,
188204
UntagResourceCommand,
205+
UpdateAccountSettingsCommand,
189206
UpdateMaxRecordSizeCommand,
190207
UpdateShardCountCommand,
191208
UpdateStreamModeCommand,
209+
UpdateStreamWarmThroughputCommand,
192210
};
193211

194212
export interface Kinesis {
@@ -281,6 +299,24 @@ export interface Kinesis {
281299
cb: (err: any, data?: DeregisterStreamConsumerCommandOutput) => void
282300
): void;
283301

302+
/**
303+
* @see {@link DescribeAccountSettingsCommand}
304+
*/
305+
describeAccountSettings(): Promise<DescribeAccountSettingsCommandOutput>;
306+
describeAccountSettings(
307+
args: DescribeAccountSettingsCommandInput,
308+
options?: __HttpHandlerOptions
309+
): Promise<DescribeAccountSettingsCommandOutput>;
310+
describeAccountSettings(
311+
args: DescribeAccountSettingsCommandInput,
312+
cb: (err: any, data?: DescribeAccountSettingsCommandOutput) => void
313+
): void;
314+
describeAccountSettings(
315+
args: DescribeAccountSettingsCommandInput,
316+
options: __HttpHandlerOptions,
317+
cb: (err: any, data?: DescribeAccountSettingsCommandOutput) => void
318+
): void;
319+
284320
/**
285321
* @see {@link DescribeLimitsCommand}
286322
*/
@@ -687,6 +723,23 @@ export interface Kinesis {
687723
cb: (err: any, data?: UntagResourceCommandOutput) => void
688724
): void;
689725

726+
/**
727+
* @see {@link UpdateAccountSettingsCommand}
728+
*/
729+
updateAccountSettings(
730+
args: UpdateAccountSettingsCommandInput,
731+
options?: __HttpHandlerOptions
732+
): Promise<UpdateAccountSettingsCommandOutput>;
733+
updateAccountSettings(
734+
args: UpdateAccountSettingsCommandInput,
735+
cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void
736+
): void;
737+
updateAccountSettings(
738+
args: UpdateAccountSettingsCommandInput,
739+
options: __HttpHandlerOptions,
740+
cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void
741+
): void;
742+
690743
/**
691744
* @see {@link UpdateMaxRecordSizeCommand}
692745
*/
@@ -737,6 +790,23 @@ export interface Kinesis {
737790
options: __HttpHandlerOptions,
738791
cb: (err: any, data?: UpdateStreamModeCommandOutput) => void
739792
): void;
793+
794+
/**
795+
* @see {@link UpdateStreamWarmThroughputCommand}
796+
*/
797+
updateStreamWarmThroughput(
798+
args: UpdateStreamWarmThroughputCommandInput,
799+
options?: __HttpHandlerOptions
800+
): Promise<UpdateStreamWarmThroughputCommandOutput>;
801+
updateStreamWarmThroughput(
802+
args: UpdateStreamWarmThroughputCommandInput,
803+
cb: (err: any, data?: UpdateStreamWarmThroughputCommandOutput) => void
804+
): void;
805+
updateStreamWarmThroughput(
806+
args: UpdateStreamWarmThroughputCommandInput,
807+
options: __HttpHandlerOptions,
808+
cb: (err: any, data?: UpdateStreamWarmThroughputCommandOutput) => void
809+
): void;
740810
}
741811

742812
/**

clients/client-kinesis/src/KinesisClient.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ import {
7474
DeregisterStreamConsumerCommandInput,
7575
DeregisterStreamConsumerCommandOutput,
7676
} from "./commands/DeregisterStreamConsumerCommand";
77+
import {
78+
DescribeAccountSettingsCommandInput,
79+
DescribeAccountSettingsCommandOutput,
80+
} from "./commands/DescribeAccountSettingsCommand";
7781
import { DescribeLimitsCommandInput, DescribeLimitsCommandOutput } from "./commands/DescribeLimitsCommand";
7882
import { DescribeStreamCommandInput, DescribeStreamCommandOutput } from "./commands/DescribeStreamCommand";
7983
import {
@@ -134,12 +138,20 @@ import {
134138
import { SubscribeToShardCommandInput, SubscribeToShardCommandOutput } from "./commands/SubscribeToShardCommand";
135139
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
136140
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
141+
import {
142+
UpdateAccountSettingsCommandInput,
143+
UpdateAccountSettingsCommandOutput,
144+
} from "./commands/UpdateAccountSettingsCommand";
137145
import {
138146
UpdateMaxRecordSizeCommandInput,
139147
UpdateMaxRecordSizeCommandOutput,
140148
} from "./commands/UpdateMaxRecordSizeCommand";
141149
import { UpdateShardCountCommandInput, UpdateShardCountCommandOutput } from "./commands/UpdateShardCountCommand";
142150
import { UpdateStreamModeCommandInput, UpdateStreamModeCommandOutput } from "./commands/UpdateStreamModeCommand";
151+
import {
152+
UpdateStreamWarmThroughputCommandInput,
153+
UpdateStreamWarmThroughputCommandOutput,
154+
} from "./commands/UpdateStreamWarmThroughputCommand";
143155
import {
144156
ClientInputEndpointParameters,
145157
ClientResolvedEndpointParameters,
@@ -161,6 +173,7 @@ export type ServiceInputTypes =
161173
| DeleteResourcePolicyCommandInput
162174
| DeleteStreamCommandInput
163175
| DeregisterStreamConsumerCommandInput
176+
| DescribeAccountSettingsCommandInput
164177
| DescribeLimitsCommandInput
165178
| DescribeStreamCommandInput
166179
| DescribeStreamConsumerCommandInput
@@ -188,9 +201,11 @@ export type ServiceInputTypes =
188201
| SubscribeToShardCommandInput
189202
| TagResourceCommandInput
190203
| UntagResourceCommandInput
204+
| UpdateAccountSettingsCommandInput
191205
| UpdateMaxRecordSizeCommandInput
192206
| UpdateShardCountCommandInput
193-
| UpdateStreamModeCommandInput;
207+
| UpdateStreamModeCommandInput
208+
| UpdateStreamWarmThroughputCommandInput;
194209

195210
/**
196211
* @public
@@ -202,6 +217,7 @@ export type ServiceOutputTypes =
202217
| DeleteResourcePolicyCommandOutput
203218
| DeleteStreamCommandOutput
204219
| DeregisterStreamConsumerCommandOutput
220+
| DescribeAccountSettingsCommandOutput
205221
| DescribeLimitsCommandOutput
206222
| DescribeStreamCommandOutput
207223
| DescribeStreamConsumerCommandOutput
@@ -229,9 +245,11 @@ export type ServiceOutputTypes =
229245
| SubscribeToShardCommandOutput
230246
| TagResourceCommandOutput
231247
| UntagResourceCommandOutput
248+
| UpdateAccountSettingsCommandOutput
232249
| UpdateMaxRecordSizeCommandOutput
233250
| UpdateShardCountCommandOutput
234-
| UpdateStreamModeCommandOutput;
251+
| UpdateStreamModeCommandOutput
252+
| UpdateStreamWarmThroughputCommandOutput;
235253

236254
/**
237255
* @public

clients/client-kinesis/src/commands/CreateStreamCommand.ts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,9 @@ export interface CreateStreamCommandOutput extends __MetadataBearer {}
3232
* continuously emitted from different data sources or <i>producers</i>.
3333
* Scale-out within a stream is explicitly supported by means of shards, which are uniquely
3434
* identified groups of data records in a stream.</p>
35-
* <p>You can create your data stream using either on-demand or provisioned capacity mode.
36-
* Data streams with an on-demand mode require no capacity planning and automatically scale
37-
* to handle gigabytes of write and read throughput per minute. With the on-demand mode,
38-
* Kinesis Data Streams automatically manages the shards in order to provide the necessary
39-
* throughput. For the data streams with a provisioned mode, you must specify the number of
40-
* shards for the data stream. Each shard can support reads up to five transactions per
41-
* second, up to a maximum data read total of 2 MiB per second. Each shard can support
42-
* writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per
43-
* second. If the amount of data input increases or decreases, you can add or remove
44-
* shards.</p>
35+
* <p>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.</p>
36+
* <p>If you'd still like to proactively scale your on-demand data stream’s capacity, you can unlock the warm throughput feature for on-demand data streams by enabling <code>MinimumThroughputBillingCommitment</code> for your account. Once your account has <code>MinimumThroughputBillingCommitment</code> enabled, you can specify the warm throughput in MiB per second that your stream can support in writes.</p>
37+
* <p>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.</p>
4538
* <p>The stream name identifies the stream. The name is scoped to the Amazon Web Services
4639
* account used by the application. It is also scoped by Amazon Web Services Region. That
4740
* is, two streams in two different accounts can have the same name, and two streams in the
@@ -63,10 +56,7 @@ export interface CreateStreamCommandOutput extends __MetadataBearer {}
6356
* <p>Create more shards than are authorized for your account.</p>
6457
* </li>
6558
* </ul>
66-
* <p>For the default shard limit for an Amazon Web Services account, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon
67-
* Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams
68-
* Developer Guide</i>. To increase this limit, <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">contact Amazon Web Services
69-
* Support</a>.</p>
59+
* <p>For the default shard or on-demand throughput limits for an Amazon Web Services account, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To increase this limit, <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">contact Amazon Web Services Support</a>.</p>
7060
* <p>You can use <a>DescribeStreamSummary</a> to check the stream status, which
7161
* is returned in <code>StreamStatus</code>.</p>
7262
* <p>
@@ -90,6 +80,7 @@ export interface CreateStreamCommandOutput extends __MetadataBearer {}
9080
* Tags: { // TagMap
9181
* "<keys>": "STRING_VALUE",
9282
* },
83+
* WarmThroughputMiBps: Number("int"),
9384
* MaxRecordSizeInKiB: Number("int"),
9485
* };
9586
* const command = new CreateStreamCommand(input);
@@ -116,6 +107,11 @@ export interface CreateStreamCommandOutput extends __MetadataBearer {}
116107
* <p>The resource is not available for this operation. For successful operation, the
117108
* resource must be in the <code>ACTIVE</code> state.</p>
118109
*
110+
* @throws {@link ValidationException} (client fault)
111+
* <p>Specifies that you tried to invoke this API for a data stream with the on-demand
112+
* capacity mode. This API is only supported for data streams with the provisioned capacity
113+
* mode. </p>
114+
*
119115
* @throws {@link KinesisServiceException}
120116
* <p>Base exception class for all service exceptions from Kinesis service.</p>
121117
*

0 commit comments

Comments
 (0)