@aws-sdk/client-kinesis 3.42.0 → 3.46.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +2 -2
  3. package/dist-cjs/Kinesis.js +15 -0
  4. package/dist-cjs/commands/UpdateStreamModeCommand.js +36 -0
  5. package/dist-cjs/commands/index.js +1 -0
  6. package/dist-cjs/endpoints.js +1 -0
  7. package/dist-cjs/models/models_0.js +25 -2
  8. package/dist-cjs/protocols/Aws_json1_1.js +151 -2
  9. package/dist-cjs/runtimeConfig.js +0 -2
  10. package/dist-es/Kinesis.js +15 -0
  11. package/dist-es/commands/UpdateStreamModeCommand.js +39 -0
  12. package/dist-es/commands/index.js +1 -0
  13. package/dist-es/endpoints.js +1 -0
  14. package/dist-es/models/models_0.js +17 -0
  15. package/dist-es/protocols/Aws_json1_1.js +189 -35
  16. package/dist-es/runtimeConfig.js +0 -2
  17. package/dist-types/Kinesis.d.ts +165 -143
  18. package/dist-types/KinesisClient.d.ts +5 -4
  19. package/dist-types/commands/AddTagsToStreamCommand.d.ts +2 -4
  20. package/dist-types/commands/CreateStreamCommand.d.ts +19 -19
  21. package/dist-types/commands/DecreaseStreamRetentionPeriodCommand.d.ts +5 -5
  22. package/dist-types/commands/DeleteStreamCommand.d.ts +5 -4
  23. package/dist-types/commands/DescribeStreamCommand.d.ts +5 -1
  24. package/dist-types/commands/DescribeStreamSummaryCommand.d.ts +5 -5
  25. package/dist-types/commands/GetRecordsCommand.d.ts +29 -19
  26. package/dist-types/commands/GetShardIteratorCommand.d.ts +7 -7
  27. package/dist-types/commands/IncreaseStreamRetentionPeriodCommand.d.ts +3 -3
  28. package/dist-types/commands/ListShardsCommand.d.ts +4 -2
  29. package/dist-types/commands/ListStreamsCommand.d.ts +1 -1
  30. package/dist-types/commands/MergeShardsCommand.d.ts +5 -5
  31. package/dist-types/commands/PutRecordCommand.d.ts +8 -8
  32. package/dist-types/commands/PutRecordsCommand.d.ts +7 -7
  33. package/dist-types/commands/SplitShardCommand.d.ts +17 -19
  34. package/dist-types/commands/StartStreamEncryptionCommand.d.ts +10 -10
  35. package/dist-types/commands/StopStreamEncryptionCommand.d.ts +8 -9
  36. package/dist-types/commands/SubscribeToShardCommand.d.ts +3 -2
  37. package/dist-types/commands/UpdateShardCountCommand.d.ts +10 -11
  38. package/dist-types/commands/UpdateStreamModeCommand.d.ts +38 -0
  39. package/dist-types/commands/index.d.ts +1 -0
  40. package/dist-types/models/models_0.d.ts +333 -152
  41. package/dist-types/protocols/Aws_json1_1.d.ts +3 -0
  42. package/dist-types/ts3.4/Kinesis.d.ts +5 -0
  43. package/dist-types/ts3.4/KinesisClient.d.ts +3 -2
  44. package/dist-types/ts3.4/commands/UpdateStreamModeCommand.d.ts +17 -0
  45. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  46. package/dist-types/ts3.4/models/models_0.d.ts +54 -1
  47. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +3 -0
  48. package/package.json +40 -47
package/CHANGELOG.md CHANGED
@@ -3,6 +3,53 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.46.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.45.0...v3.46.0) (2022-01-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **clients:** update clean:dist script to delete dist-* folder ([#3155](https://github.com/aws/aws-sdk-js-v3/issues/3155)) ([cdb1709](https://github.com/aws/aws-sdk-js-v3/commit/cdb17090f82d1fc8755811c82cbed5976ec7e60b))
12
+
13
+
14
+ ### Features
15
+
16
+ * **clients:** extend typedoc.json from root ([#3136](https://github.com/aws/aws-sdk-js-v3/issues/3136)) ([f6a3ef5](https://github.com/aws/aws-sdk-js-v3/commit/f6a3ef541ae2d92872d09d8cab6727911287ebb2))
17
+ * end support for Node.js 10.x ([#3122](https://github.com/aws/aws-sdk-js-v3/issues/3122)) ([7acf18a](https://github.com/aws/aws-sdk-js-v3/commit/7acf18abd3fb1cc461f809110cdb0d7968c2070e))
18
+
19
+
20
+
21
+
22
+
23
+ # [3.45.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.44.0...v3.45.0) (2021-12-23)
24
+
25
+
26
+ ### Features
27
+
28
+ * **clients:** update clients as of 2021/12/23 ([#3110](https://github.com/aws/aws-sdk-js-v3/issues/3110)) ([5d638e1](https://github.com/aws/aws-sdk-js-v3/commit/5d638e188ce64fa80fe36b8cba79ba63b80b50b7))
29
+
30
+
31
+
32
+
33
+
34
+ # [3.44.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.43.0...v3.44.0) (2021-12-02)
35
+
36
+
37
+ ### Features
38
+
39
+ * **clients:** update clients as of 2021/11/30 ([#3077](https://github.com/aws/aws-sdk-js-v3/issues/3077)) ([2bdba30](https://github.com/aws/aws-sdk-js-v3/commit/2bdba30963e550728ba2903d57daa1e666a29d71))
40
+
41
+
42
+
43
+
44
+
45
+ # [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
46
+
47
+ **Note:** Version bump only for package @aws-sdk/client-kinesis
48
+
49
+
50
+
51
+
52
+
6
53
  # [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
7
54
 
8
55
  **Note:** Version bump only for package @aws-sdk/client-kinesis
package/README.md CHANGED
@@ -9,8 +9,8 @@ AWS SDK for JavaScript Kinesis Client for Node.js, Browser and React Native.
9
9
 
10
10
  <fullname>Amazon Kinesis Data Streams Service API Reference</fullname>
11
11
 
12
- <p>Amazon Kinesis Data Streams is a managed service that scales elastically for
13
- real-time processing of streaming big data.</p>
12
+ <p>Amazon Kinesis Data Streams is a managed service that scales elastically for real-time
13
+ processing of streaming big data.</p>
14
14
 
15
15
  ## Installing
16
16
 
@@ -29,6 +29,7 @@ const StartStreamEncryptionCommand_1 = require("./commands/StartStreamEncryption
29
29
  const StopStreamEncryptionCommand_1 = require("./commands/StopStreamEncryptionCommand");
30
30
  const SubscribeToShardCommand_1 = require("./commands/SubscribeToShardCommand");
31
31
  const UpdateShardCountCommand_1 = require("./commands/UpdateShardCountCommand");
32
+ const UpdateStreamModeCommand_1 = require("./commands/UpdateStreamModeCommand");
32
33
  const KinesisClient_1 = require("./KinesisClient");
33
34
  class Kinesis extends KinesisClient_1.KinesisClient {
34
35
  addTagsToStream(args, optionsOrCb, cb) {
@@ -423,5 +424,19 @@ class Kinesis extends KinesisClient_1.KinesisClient {
423
424
  return this.send(command, optionsOrCb);
424
425
  }
425
426
  }
427
+ updateStreamMode(args, optionsOrCb, cb) {
428
+ const command = new UpdateStreamModeCommand_1.UpdateStreamModeCommand(args);
429
+ if (typeof optionsOrCb === "function") {
430
+ this.send(command, optionsOrCb);
431
+ }
432
+ else if (typeof cb === "function") {
433
+ if (typeof optionsOrCb !== "object")
434
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
435
+ this.send(command, optionsOrCb || {}, cb);
436
+ }
437
+ else {
438
+ return this.send(command, optionsOrCb);
439
+ }
440
+ }
426
441
  }
427
442
  exports.Kinesis = Kinesis;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateStreamModeCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
+ class UpdateStreamModeCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "KinesisClient";
18
+ const commandName = "UpdateStreamModeCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.UpdateStreamModeInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: (output) => output,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return Aws_json1_1_1.serializeAws_json1_1UpdateStreamModeCommand(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return Aws_json1_1_1.deserializeAws_json1_1UpdateStreamModeCommand(output, context);
34
+ }
35
+ }
36
+ exports.UpdateStreamModeCommand = UpdateStreamModeCommand;
@@ -29,3 +29,4 @@ tslib_1.__exportStar(require("./StartStreamEncryptionCommand"), exports);
29
29
  tslib_1.__exportStar(require("./StopStreamEncryptionCommand"), exports);
30
30
  tslib_1.__exportStar(require("./SubscribeToShardCommand"), exports);
31
31
  tslib_1.__exportStar(require("./UpdateShardCountCommand"), exports);
32
+ tslib_1.__exportStar(require("./UpdateStreamModeCommand"), exports);
@@ -81,6 +81,7 @@ const partitionHash = {
81
81
  "ap-south-1",
82
82
  "ap-southeast-1",
83
83
  "ap-southeast-2",
84
+ "ap-southeast-3",
84
85
  "ca-central-1",
85
86
  "eu-central-1",
86
87
  "eu-north-1",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InternalFailureException = exports.IncreaseStreamRetentionPeriodInput = exports.GetShardIteratorOutput = exports.GetShardIteratorInput = exports.ShardIteratorType = exports.ProvisionedThroughputExceededException = exports.KMSThrottlingException = exports.KMSOptInRequired = exports.KMSNotFoundException = exports.KMSInvalidStateException = exports.KMSDisabledException = exports.KMSAccessDeniedException = exports.GetRecordsOutput = exports._Record = exports.GetRecordsInput = exports.ExpiredNextTokenException = exports.ExpiredIteratorException = exports.EnableEnhancedMonitoringInput = exports.EnhancedMonitoringOutput = exports.DisableEnhancedMonitoringInput = exports.DescribeStreamSummaryOutput = exports.StreamDescriptionSummary = exports.DescribeStreamSummaryInput = exports.DescribeStreamConsumerOutput = exports.DescribeStreamConsumerInput = exports.DescribeStreamOutput = exports.StreamDescription = exports.StreamStatus = exports.Shard = exports.SequenceNumberRange = exports.EnhancedMetrics = exports.MetricsName = exports.EncryptionType = exports.DescribeStreamInput = exports.DescribeLimitsOutput = exports.DescribeLimitsInput = exports.DeregisterStreamConsumerInput = exports.DeleteStreamInput = exports.DecreaseStreamRetentionPeriodInput = exports.CreateStreamInput = exports.ConsumerDescription = exports.Consumer = exports.ConsumerStatus = exports.ChildShard = exports.HashKeyRange = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.LimitExceededException = exports.InvalidArgumentException = exports.AddTagsToStreamInput = void 0;
4
- exports.UpdateShardCountOutput = exports.UpdateShardCountInput = exports.ScalingType = exports.SubscribeToShardOutput = exports.SubscribeToShardEventStream = exports.SubscribeToShardEvent = exports.SubscribeToShardInput = exports.StartingPosition = exports.StopStreamEncryptionInput = exports.StartStreamEncryptionInput = exports.SplitShardInput = exports.RemoveTagsFromStreamInput = exports.RegisterStreamConsumerOutput = exports.RegisterStreamConsumerInput = exports.PutRecordsOutput = exports.PutRecordsResultEntry = exports.PutRecordsInput = exports.PutRecordsRequestEntry = exports.PutRecordOutput = exports.PutRecordInput = exports.MergeShardsInput = exports.ListTagsForStreamOutput = exports.Tag = exports.ListTagsForStreamInput = exports.ListStreamsOutput = exports.ListStreamsInput = exports.ListStreamConsumersOutput = exports.ListStreamConsumersInput = exports.ListShardsOutput = exports.ListShardsInput = exports.ShardFilter = exports.ShardFilterType = void 0;
3
+ exports.GetShardIteratorOutput = exports.GetShardIteratorInput = exports.ShardIteratorType = exports.ProvisionedThroughputExceededException = exports.KMSThrottlingException = exports.KMSOptInRequired = exports.KMSNotFoundException = exports.KMSInvalidStateException = exports.KMSDisabledException = exports.KMSAccessDeniedException = exports.GetRecordsOutput = exports._Record = exports.GetRecordsInput = exports.ExpiredNextTokenException = exports.ExpiredIteratorException = exports.EnableEnhancedMonitoringInput = exports.EnhancedMonitoringOutput = exports.DisableEnhancedMonitoringInput = exports.DescribeStreamSummaryOutput = exports.StreamDescriptionSummary = exports.DescribeStreamSummaryInput = exports.DescribeStreamConsumerOutput = exports.DescribeStreamConsumerInput = exports.DescribeStreamOutput = exports.StreamDescription = exports.StreamStatus = exports.Shard = exports.SequenceNumberRange = exports.EnhancedMetrics = exports.MetricsName = exports.EncryptionType = exports.DescribeStreamInput = exports.DescribeLimitsOutput = exports.DescribeLimitsInput = exports.DeregisterStreamConsumerInput = exports.DeleteStreamInput = exports.DecreaseStreamRetentionPeriodInput = exports.CreateStreamInput = exports.StreamModeDetails = exports.StreamMode = exports.ConsumerDescription = exports.Consumer = exports.ConsumerStatus = exports.ChildShard = exports.HashKeyRange = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.LimitExceededException = exports.InvalidArgumentException = exports.AddTagsToStreamInput = void 0;
4
+ exports.UpdateStreamModeInput = exports.UpdateShardCountOutput = exports.UpdateShardCountInput = exports.ScalingType = exports.SubscribeToShardOutput = exports.SubscribeToShardEventStream = exports.SubscribeToShardEvent = exports.SubscribeToShardInput = exports.StartingPosition = exports.StopStreamEncryptionInput = exports.StartStreamEncryptionInput = exports.SplitShardInput = exports.RemoveTagsFromStreamInput = exports.RegisterStreamConsumerOutput = exports.RegisterStreamConsumerInput = exports.PutRecordsOutput = exports.PutRecordsResultEntry = exports.PutRecordsInput = exports.PutRecordsRequestEntry = exports.PutRecordOutput = exports.PutRecordInput = exports.ValidationException = exports.MergeShardsInput = exports.ListTagsForStreamOutput = exports.Tag = exports.ListTagsForStreamInput = exports.ListStreamsOutput = exports.ListStreamsInput = exports.ListStreamConsumersOutput = exports.ListStreamConsumersInput = exports.ListShardsOutput = exports.ListShardsInput = exports.ShardFilter = exports.ShardFilterType = exports.InternalFailureException = exports.IncreaseStreamRetentionPeriodInput = void 0;
5
5
  var AddTagsToStreamInput;
6
6
  (function (AddTagsToStreamInput) {
7
7
  AddTagsToStreamInput.filterSensitiveLog = (obj) => ({
@@ -62,6 +62,17 @@ var ConsumerDescription;
62
62
  ...obj,
63
63
  });
64
64
  })(ConsumerDescription = exports.ConsumerDescription || (exports.ConsumerDescription = {}));
65
+ var StreamMode;
66
+ (function (StreamMode) {
67
+ StreamMode["ON_DEMAND"] = "ON_DEMAND";
68
+ StreamMode["PROVISIONED"] = "PROVISIONED";
69
+ })(StreamMode = exports.StreamMode || (exports.StreamMode = {}));
70
+ var StreamModeDetails;
71
+ (function (StreamModeDetails) {
72
+ StreamModeDetails.filterSensitiveLog = (obj) => ({
73
+ ...obj,
74
+ });
75
+ })(StreamModeDetails = exports.StreamModeDetails || (exports.StreamModeDetails = {}));
65
76
  var CreateStreamInput;
66
77
  (function (CreateStreamInput) {
67
78
  CreateStreamInput.filterSensitiveLog = (obj) => ({
@@ -384,6 +395,12 @@ var MergeShardsInput;
384
395
  ...obj,
385
396
  });
386
397
  })(MergeShardsInput = exports.MergeShardsInput || (exports.MergeShardsInput = {}));
398
+ var ValidationException;
399
+ (function (ValidationException) {
400
+ ValidationException.filterSensitiveLog = (obj) => ({
401
+ ...obj,
402
+ });
403
+ })(ValidationException = exports.ValidationException || (exports.ValidationException = {}));
387
404
  var PutRecordInput;
388
405
  (function (PutRecordInput) {
389
406
  PutRecordInput.filterSensitiveLog = (obj) => ({
@@ -547,3 +564,9 @@ var UpdateShardCountOutput;
547
564
  ...obj,
548
565
  });
549
566
  })(UpdateShardCountOutput = exports.UpdateShardCountOutput || (exports.UpdateShardCountOutput = {}));
567
+ var UpdateStreamModeInput;
568
+ (function (UpdateStreamModeInput) {
569
+ UpdateStreamModeInput.filterSensitiveLog = (obj) => ({
570
+ ...obj,
571
+ });
572
+ })(UpdateStreamModeInput = exports.UpdateStreamModeInput || (exports.UpdateStreamModeInput = {}));
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_json1_1RegisterStreamConsumerCommand = exports.deserializeAws_json1_1PutRecordsCommand = exports.deserializeAws_json1_1PutRecordCommand = exports.deserializeAws_json1_1MergeShardsCommand = exports.deserializeAws_json1_1ListTagsForStreamCommand = exports.deserializeAws_json1_1ListStreamsCommand = exports.deserializeAws_json1_1ListStreamConsumersCommand = exports.deserializeAws_json1_1ListShardsCommand = exports.deserializeAws_json1_1IncreaseStreamRetentionPeriodCommand = exports.deserializeAws_json1_1GetShardIteratorCommand = exports.deserializeAws_json1_1GetRecordsCommand = exports.deserializeAws_json1_1EnableEnhancedMonitoringCommand = exports.deserializeAws_json1_1DisableEnhancedMonitoringCommand = exports.deserializeAws_json1_1DescribeStreamSummaryCommand = exports.deserializeAws_json1_1DescribeStreamConsumerCommand = exports.deserializeAws_json1_1DescribeStreamCommand = exports.deserializeAws_json1_1DescribeLimitsCommand = exports.deserializeAws_json1_1DeregisterStreamConsumerCommand = exports.deserializeAws_json1_1DeleteStreamCommand = exports.deserializeAws_json1_1DecreaseStreamRetentionPeriodCommand = exports.deserializeAws_json1_1CreateStreamCommand = exports.deserializeAws_json1_1AddTagsToStreamCommand = exports.serializeAws_json1_1UpdateShardCountCommand = exports.serializeAws_json1_1SubscribeToShardCommand = exports.serializeAws_json1_1StopStreamEncryptionCommand = exports.serializeAws_json1_1StartStreamEncryptionCommand = exports.serializeAws_json1_1SplitShardCommand = exports.serializeAws_json1_1RemoveTagsFromStreamCommand = exports.serializeAws_json1_1RegisterStreamConsumerCommand = exports.serializeAws_json1_1PutRecordsCommand = exports.serializeAws_json1_1PutRecordCommand = exports.serializeAws_json1_1MergeShardsCommand = exports.serializeAws_json1_1ListTagsForStreamCommand = exports.serializeAws_json1_1ListStreamsCommand = exports.serializeAws_json1_1ListStreamConsumersCommand = exports.serializeAws_json1_1ListShardsCommand = exports.serializeAws_json1_1IncreaseStreamRetentionPeriodCommand = exports.serializeAws_json1_1GetShardIteratorCommand = exports.serializeAws_json1_1GetRecordsCommand = exports.serializeAws_json1_1EnableEnhancedMonitoringCommand = exports.serializeAws_json1_1DisableEnhancedMonitoringCommand = exports.serializeAws_json1_1DescribeStreamSummaryCommand = exports.serializeAws_json1_1DescribeStreamConsumerCommand = exports.serializeAws_json1_1DescribeStreamCommand = exports.serializeAws_json1_1DescribeLimitsCommand = exports.serializeAws_json1_1DeregisterStreamConsumerCommand = exports.serializeAws_json1_1DeleteStreamCommand = exports.serializeAws_json1_1DecreaseStreamRetentionPeriodCommand = exports.serializeAws_json1_1CreateStreamCommand = exports.serializeAws_json1_1AddTagsToStreamCommand = void 0;
4
- exports.deserializeAws_json1_1UpdateShardCountCommand = exports.deserializeAws_json1_1SubscribeToShardCommand = exports.deserializeAws_json1_1StopStreamEncryptionCommand = exports.deserializeAws_json1_1StartStreamEncryptionCommand = exports.deserializeAws_json1_1SplitShardCommand = exports.deserializeAws_json1_1RemoveTagsFromStreamCommand = void 0;
3
+ exports.deserializeAws_json1_1PutRecordsCommand = exports.deserializeAws_json1_1PutRecordCommand = exports.deserializeAws_json1_1MergeShardsCommand = exports.deserializeAws_json1_1ListTagsForStreamCommand = exports.deserializeAws_json1_1ListStreamsCommand = exports.deserializeAws_json1_1ListStreamConsumersCommand = exports.deserializeAws_json1_1ListShardsCommand = exports.deserializeAws_json1_1IncreaseStreamRetentionPeriodCommand = exports.deserializeAws_json1_1GetShardIteratorCommand = exports.deserializeAws_json1_1GetRecordsCommand = exports.deserializeAws_json1_1EnableEnhancedMonitoringCommand = exports.deserializeAws_json1_1DisableEnhancedMonitoringCommand = exports.deserializeAws_json1_1DescribeStreamSummaryCommand = exports.deserializeAws_json1_1DescribeStreamConsumerCommand = exports.deserializeAws_json1_1DescribeStreamCommand = exports.deserializeAws_json1_1DescribeLimitsCommand = exports.deserializeAws_json1_1DeregisterStreamConsumerCommand = exports.deserializeAws_json1_1DeleteStreamCommand = exports.deserializeAws_json1_1DecreaseStreamRetentionPeriodCommand = exports.deserializeAws_json1_1CreateStreamCommand = exports.deserializeAws_json1_1AddTagsToStreamCommand = exports.serializeAws_json1_1UpdateStreamModeCommand = exports.serializeAws_json1_1UpdateShardCountCommand = exports.serializeAws_json1_1SubscribeToShardCommand = exports.serializeAws_json1_1StopStreamEncryptionCommand = exports.serializeAws_json1_1StartStreamEncryptionCommand = exports.serializeAws_json1_1SplitShardCommand = exports.serializeAws_json1_1RemoveTagsFromStreamCommand = exports.serializeAws_json1_1RegisterStreamConsumerCommand = exports.serializeAws_json1_1PutRecordsCommand = exports.serializeAws_json1_1PutRecordCommand = exports.serializeAws_json1_1MergeShardsCommand = exports.serializeAws_json1_1ListTagsForStreamCommand = exports.serializeAws_json1_1ListStreamsCommand = exports.serializeAws_json1_1ListStreamConsumersCommand = exports.serializeAws_json1_1ListShardsCommand = exports.serializeAws_json1_1IncreaseStreamRetentionPeriodCommand = exports.serializeAws_json1_1GetShardIteratorCommand = exports.serializeAws_json1_1GetRecordsCommand = exports.serializeAws_json1_1EnableEnhancedMonitoringCommand = exports.serializeAws_json1_1DisableEnhancedMonitoringCommand = exports.serializeAws_json1_1DescribeStreamSummaryCommand = exports.serializeAws_json1_1DescribeStreamConsumerCommand = exports.serializeAws_json1_1DescribeStreamCommand = exports.serializeAws_json1_1DescribeLimitsCommand = exports.serializeAws_json1_1DeregisterStreamConsumerCommand = exports.serializeAws_json1_1DeleteStreamCommand = exports.serializeAws_json1_1DecreaseStreamRetentionPeriodCommand = exports.serializeAws_json1_1CreateStreamCommand = exports.serializeAws_json1_1AddTagsToStreamCommand = void 0;
4
+ exports.deserializeAws_json1_1UpdateStreamModeCommand = exports.deserializeAws_json1_1UpdateShardCountCommand = exports.deserializeAws_json1_1SubscribeToShardCommand = exports.deserializeAws_json1_1StopStreamEncryptionCommand = exports.deserializeAws_json1_1StartStreamEncryptionCommand = exports.deserializeAws_json1_1SplitShardCommand = exports.deserializeAws_json1_1RemoveTagsFromStreamCommand = exports.deserializeAws_json1_1RegisterStreamConsumerCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const serializeAws_json1_1AddTagsToStreamCommand = async (input, context) => {
@@ -284,6 +284,16 @@ const serializeAws_json1_1UpdateShardCountCommand = async (input, context) => {
284
284
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
285
285
  };
286
286
  exports.serializeAws_json1_1UpdateShardCountCommand = serializeAws_json1_1UpdateShardCountCommand;
287
+ const serializeAws_json1_1UpdateStreamModeCommand = async (input, context) => {
288
+ const headers = {
289
+ "content-type": "application/x-amz-json-1.1",
290
+ "x-amz-target": "Kinesis_20131202.UpdateStreamMode",
291
+ };
292
+ let body;
293
+ body = JSON.stringify(serializeAws_json1_1UpdateStreamModeInput(input, context));
294
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
295
+ };
296
+ exports.serializeAws_json1_1UpdateStreamModeCommand = serializeAws_json1_1UpdateStreamModeCommand;
287
297
  const deserializeAws_json1_1AddTagsToStreamCommand = async (output, context) => {
288
298
  if (output.statusCode >= 300) {
289
299
  return deserializeAws_json1_1AddTagsToStreamCommandError(output, context);
@@ -1532,6 +1542,14 @@ const deserializeAws_json1_1MergeShardsCommandError = async (output, context) =>
1532
1542
  $metadata: deserializeMetadata(output),
1533
1543
  };
1534
1544
  break;
1545
+ case "ValidationException":
1546
+ case "com.amazonaws.kinesis#ValidationException":
1547
+ response = {
1548
+ ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
1549
+ name: errorCode,
1550
+ $metadata: deserializeMetadata(output),
1551
+ };
1552
+ break;
1535
1553
  default:
1536
1554
  const parsedBody = parsedOutput.body;
1537
1555
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -1961,6 +1979,14 @@ const deserializeAws_json1_1SplitShardCommandError = async (output, context) =>
1961
1979
  $metadata: deserializeMetadata(output),
1962
1980
  };
1963
1981
  break;
1982
+ case "ValidationException":
1983
+ case "com.amazonaws.kinesis#ValidationException":
1984
+ response = {
1985
+ ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
1986
+ name: errorCode,
1987
+ $metadata: deserializeMetadata(output),
1988
+ };
1989
+ break;
1964
1990
  default:
1965
1991
  const parsedBody = parsedOutput.body;
1966
1992
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -2247,6 +2273,82 @@ const deserializeAws_json1_1UpdateShardCountCommand = async (output, context) =>
2247
2273
  };
2248
2274
  exports.deserializeAws_json1_1UpdateShardCountCommand = deserializeAws_json1_1UpdateShardCountCommand;
2249
2275
  const deserializeAws_json1_1UpdateShardCountCommandError = async (output, context) => {
2276
+ const parsedOutput = {
2277
+ ...output,
2278
+ body: await parseBody(output.body, context),
2279
+ };
2280
+ let response;
2281
+ let errorCode = "UnknownError";
2282
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2283
+ switch (errorCode) {
2284
+ case "InvalidArgumentException":
2285
+ case "com.amazonaws.kinesis#InvalidArgumentException":
2286
+ response = {
2287
+ ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
2288
+ name: errorCode,
2289
+ $metadata: deserializeMetadata(output),
2290
+ };
2291
+ break;
2292
+ case "LimitExceededException":
2293
+ case "com.amazonaws.kinesis#LimitExceededException":
2294
+ response = {
2295
+ ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
2296
+ name: errorCode,
2297
+ $metadata: deserializeMetadata(output),
2298
+ };
2299
+ break;
2300
+ case "ResourceInUseException":
2301
+ case "com.amazonaws.kinesis#ResourceInUseException":
2302
+ response = {
2303
+ ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
2304
+ name: errorCode,
2305
+ $metadata: deserializeMetadata(output),
2306
+ };
2307
+ break;
2308
+ case "ResourceNotFoundException":
2309
+ case "com.amazonaws.kinesis#ResourceNotFoundException":
2310
+ response = {
2311
+ ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2312
+ name: errorCode,
2313
+ $metadata: deserializeMetadata(output),
2314
+ };
2315
+ break;
2316
+ case "ValidationException":
2317
+ case "com.amazonaws.kinesis#ValidationException":
2318
+ response = {
2319
+ ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
2320
+ name: errorCode,
2321
+ $metadata: deserializeMetadata(output),
2322
+ };
2323
+ break;
2324
+ default:
2325
+ const parsedBody = parsedOutput.body;
2326
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2327
+ response = {
2328
+ ...parsedBody,
2329
+ name: `${errorCode}`,
2330
+ message: parsedBody.message || parsedBody.Message || errorCode,
2331
+ $fault: "client",
2332
+ $metadata: deserializeMetadata(output),
2333
+ };
2334
+ }
2335
+ const message = response.message || response.Message || errorCode;
2336
+ response.message = message;
2337
+ delete response.Message;
2338
+ return Promise.reject(Object.assign(new Error(message), response));
2339
+ };
2340
+ const deserializeAws_json1_1UpdateStreamModeCommand = async (output, context) => {
2341
+ if (output.statusCode >= 300) {
2342
+ return deserializeAws_json1_1UpdateStreamModeCommandError(output, context);
2343
+ }
2344
+ await collectBody(output.body, context);
2345
+ const response = {
2346
+ $metadata: deserializeMetadata(output),
2347
+ };
2348
+ return Promise.resolve(response);
2349
+ };
2350
+ exports.deserializeAws_json1_1UpdateStreamModeCommand = deserializeAws_json1_1UpdateStreamModeCommand;
2351
+ const deserializeAws_json1_1UpdateStreamModeCommandError = async (output, context) => {
2250
2352
  const parsedOutput = {
2251
2353
  ...output,
2252
2354
  body: await parseBody(output.body, context),
@@ -2446,6 +2548,17 @@ const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOut
2446
2548
  };
2447
2549
  return contents;
2448
2550
  };
2551
+ const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
2552
+ const body = parsedOutput.body;
2553
+ const deserialized = deserializeAws_json1_1ValidationException(body, context);
2554
+ const contents = {
2555
+ name: "ValidationException",
2556
+ $fault: "client",
2557
+ $metadata: deserializeMetadata(parsedOutput),
2558
+ ...deserialized,
2559
+ };
2560
+ return contents;
2561
+ };
2449
2562
  const serializeAws_json1_1AddTagsToStreamInput = (input, context) => {
2450
2563
  return {
2451
2564
  ...(input.StreamName !== undefined && input.StreamName !== null && { StreamName: input.StreamName }),
@@ -2455,6 +2568,10 @@ const serializeAws_json1_1AddTagsToStreamInput = (input, context) => {
2455
2568
  const serializeAws_json1_1CreateStreamInput = (input, context) => {
2456
2569
  return {
2457
2570
  ...(input.ShardCount !== undefined && input.ShardCount !== null && { ShardCount: input.ShardCount }),
2571
+ ...(input.StreamModeDetails !== undefined &&
2572
+ input.StreamModeDetails !== null && {
2573
+ StreamModeDetails: serializeAws_json1_1StreamModeDetails(input.StreamModeDetails, context),
2574
+ }),
2458
2575
  ...(input.StreamName !== undefined && input.StreamName !== null && { StreamName: input.StreamName }),
2459
2576
  };
2460
2577
  };
@@ -2694,6 +2811,11 @@ const serializeAws_json1_1StopStreamEncryptionInput = (input, context) => {
2694
2811
  ...(input.StreamName !== undefined && input.StreamName !== null && { StreamName: input.StreamName }),
2695
2812
  };
2696
2813
  };
2814
+ const serializeAws_json1_1StreamModeDetails = (input, context) => {
2815
+ return {
2816
+ ...(input.StreamMode !== undefined && input.StreamMode !== null && { StreamMode: input.StreamMode }),
2817
+ };
2818
+ };
2697
2819
  const serializeAws_json1_1SubscribeToShardInput = (input, context) => {
2698
2820
  return {
2699
2821
  ...(input.ConsumerARN !== undefined && input.ConsumerARN !== null && { ConsumerARN: input.ConsumerARN }),
@@ -2733,6 +2855,15 @@ const serializeAws_json1_1UpdateShardCountInput = (input, context) => {
2733
2855
  input.TargetShardCount !== null && { TargetShardCount: input.TargetShardCount }),
2734
2856
  };
2735
2857
  };
2858
+ const serializeAws_json1_1UpdateStreamModeInput = (input, context) => {
2859
+ return {
2860
+ ...(input.StreamARN !== undefined && input.StreamARN !== null && { StreamARN: input.StreamARN }),
2861
+ ...(input.StreamModeDetails !== undefined &&
2862
+ input.StreamModeDetails !== null && {
2863
+ StreamModeDetails: serializeAws_json1_1StreamModeDetails(input.StreamModeDetails, context),
2864
+ }),
2865
+ };
2866
+ };
2736
2867
  const deserializeAws_json1_1ChildShard = (output, context) => {
2737
2868
  return {
2738
2869
  HashKeyRange: output.HashKeyRange !== undefined && output.HashKeyRange !== null
@@ -2787,6 +2918,8 @@ const deserializeAws_json1_1ConsumerList = (output, context) => {
2787
2918
  };
2788
2919
  const deserializeAws_json1_1DescribeLimitsOutput = (output, context) => {
2789
2920
  return {
2921
+ OnDemandStreamCount: smithy_client_1.expectInt32(output.OnDemandStreamCount),
2922
+ OnDemandStreamCountLimit: smithy_client_1.expectInt32(output.OnDemandStreamCountLimit),
2790
2923
  OpenShardCount: smithy_client_1.expectInt32(output.OpenShardCount),
2791
2924
  ShardLimit: smithy_client_1.expectInt32(output.ShardLimit),
2792
2925
  };
@@ -3092,6 +3225,9 @@ const deserializeAws_json1_1StreamDescription = (output, context) => {
3092
3225
  StreamCreationTimestamp: output.StreamCreationTimestamp !== undefined && output.StreamCreationTimestamp !== null
3093
3226
  ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.StreamCreationTimestamp)))
3094
3227
  : undefined,
3228
+ StreamModeDetails: output.StreamModeDetails !== undefined && output.StreamModeDetails !== null
3229
+ ? deserializeAws_json1_1StreamModeDetails(output.StreamModeDetails, context)
3230
+ : undefined,
3095
3231
  StreamName: smithy_client_1.expectString(output.StreamName),
3096
3232
  StreamStatus: smithy_client_1.expectString(output.StreamStatus),
3097
3233
  };
@@ -3110,10 +3246,18 @@ const deserializeAws_json1_1StreamDescriptionSummary = (output, context) => {
3110
3246
  StreamCreationTimestamp: output.StreamCreationTimestamp !== undefined && output.StreamCreationTimestamp !== null
3111
3247
  ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.StreamCreationTimestamp)))
3112
3248
  : undefined,
3249
+ StreamModeDetails: output.StreamModeDetails !== undefined && output.StreamModeDetails !== null
3250
+ ? deserializeAws_json1_1StreamModeDetails(output.StreamModeDetails, context)
3251
+ : undefined,
3113
3252
  StreamName: smithy_client_1.expectString(output.StreamName),
3114
3253
  StreamStatus: smithy_client_1.expectString(output.StreamStatus),
3115
3254
  };
3116
3255
  };
3256
+ const deserializeAws_json1_1StreamModeDetails = (output, context) => {
3257
+ return {
3258
+ StreamMode: smithy_client_1.expectString(output.StreamMode),
3259
+ };
3260
+ };
3117
3261
  const deserializeAws_json1_1StreamNameList = (output, context) => {
3118
3262
  return (output || [])
3119
3263
  .filter((e) => e != null)
@@ -3219,6 +3363,11 @@ const deserializeAws_json1_1UpdateShardCountOutput = (output, context) => {
3219
3363
  TargetShardCount: smithy_client_1.expectInt32(output.TargetShardCount),
3220
3364
  };
3221
3365
  };
3366
+ const deserializeAws_json1_1ValidationException = (output, context) => {
3367
+ return {
3368
+ message: smithy_client_1.expectString(output.message),
3369
+ };
3370
+ };
3222
3371
  const deserializeMetadata = (output) => {
3223
3372
  var _a;
3224
3373
  return ({
@@ -16,10 +16,8 @@ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
16
16
  const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
17
17
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
18
18
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
19
- const smithy_client_1 = require("@aws-sdk/smithy-client");
20
19
  const getRuntimeConfig = (config) => {
21
20
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
22
- smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
23
21
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
24
22
  return {
25
23
  ...clientSharedValues,
@@ -27,6 +27,7 @@ import { StartStreamEncryptionCommand, } from "./commands/StartStreamEncryptionC
27
27
  import { StopStreamEncryptionCommand, } from "./commands/StopStreamEncryptionCommand";
28
28
  import { SubscribeToShardCommand, } from "./commands/SubscribeToShardCommand";
29
29
  import { UpdateShardCountCommand, } from "./commands/UpdateShardCountCommand";
30
+ import { UpdateStreamModeCommand, } from "./commands/UpdateStreamModeCommand";
30
31
  import { KinesisClient } from "./KinesisClient";
31
32
  var Kinesis = (function (_super) {
32
33
  __extends(Kinesis, _super);
@@ -425,6 +426,20 @@ var Kinesis = (function (_super) {
425
426
  return this.send(command, optionsOrCb);
426
427
  }
427
428
  };
429
+ Kinesis.prototype.updateStreamMode = function (args, optionsOrCb, cb) {
430
+ var command = new UpdateStreamModeCommand(args);
431
+ if (typeof optionsOrCb === "function") {
432
+ this.send(command, optionsOrCb);
433
+ }
434
+ else if (typeof cb === "function") {
435
+ if (typeof optionsOrCb !== "object")
436
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
437
+ this.send(command, optionsOrCb || {}, cb);
438
+ }
439
+ else {
440
+ return this.send(command, optionsOrCb);
441
+ }
442
+ };
428
443
  return Kinesis;
429
444
  }(KinesisClient));
430
445
  export { Kinesis };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { UpdateStreamModeInput } from "../models/models_0";
5
+ import { deserializeAws_json1_1UpdateStreamModeCommand, serializeAws_json1_1UpdateStreamModeCommand, } from "../protocols/Aws_json1_1";
6
+ var UpdateStreamModeCommand = (function (_super) {
7
+ __extends(UpdateStreamModeCommand, _super);
8
+ function UpdateStreamModeCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ UpdateStreamModeCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "KinesisClient";
18
+ var commandName = "UpdateStreamModeCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: UpdateStreamModeInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: function (output) { return output; },
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ UpdateStreamModeCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_json1_1UpdateStreamModeCommand(input, context);
33
+ };
34
+ UpdateStreamModeCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_json1_1UpdateStreamModeCommand(output, context);
36
+ };
37
+ return UpdateStreamModeCommand;
38
+ }($Command));
39
+ export { UpdateStreamModeCommand };
@@ -26,3 +26,4 @@ export * from "./StartStreamEncryptionCommand";
26
26
  export * from "./StopStreamEncryptionCommand";
27
27
  export * from "./SubscribeToShardCommand";
28
28
  export * from "./UpdateShardCountCommand";
29
+ export * from "./UpdateStreamModeCommand";
@@ -79,6 +79,7 @@ var partitionHash = {
79
79
  "ap-south-1",
80
80
  "ap-southeast-1",
81
81
  "ap-southeast-2",
82
+ "ap-southeast-3",
82
83
  "ca-central-1",
83
84
  "eu-central-1",
84
85
  "eu-north-1",
@@ -41,6 +41,15 @@ export var ConsumerDescription;
41
41
  (function (ConsumerDescription) {
42
42
  ConsumerDescription.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
43
43
  })(ConsumerDescription || (ConsumerDescription = {}));
44
+ export var StreamMode;
45
+ (function (StreamMode) {
46
+ StreamMode["ON_DEMAND"] = "ON_DEMAND";
47
+ StreamMode["PROVISIONED"] = "PROVISIONED";
48
+ })(StreamMode || (StreamMode = {}));
49
+ export var StreamModeDetails;
50
+ (function (StreamModeDetails) {
51
+ StreamModeDetails.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
52
+ })(StreamModeDetails || (StreamModeDetails = {}));
44
53
  export var CreateStreamInput;
45
54
  (function (CreateStreamInput) {
46
55
  CreateStreamInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -269,6 +278,10 @@ export var MergeShardsInput;
269
278
  (function (MergeShardsInput) {
270
279
  MergeShardsInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
271
280
  })(MergeShardsInput || (MergeShardsInput = {}));
281
+ export var ValidationException;
282
+ (function (ValidationException) {
283
+ ValidationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
284
+ })(ValidationException || (ValidationException = {}));
272
285
  export var PutRecordInput;
273
286
  (function (PutRecordInput) {
274
287
  PutRecordInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -396,3 +409,7 @@ export var UpdateShardCountOutput;
396
409
  (function (UpdateShardCountOutput) {
397
410
  UpdateShardCountOutput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
398
411
  })(UpdateShardCountOutput || (UpdateShardCountOutput = {}));
412
+ export var UpdateStreamModeInput;
413
+ (function (UpdateStreamModeInput) {
414
+ UpdateStreamModeInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
415
+ })(UpdateStreamModeInput || (UpdateStreamModeInput = {}));