@aws-sdk/client-ivs 3.40.0 → 3.45.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 (65) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +10 -1
  3. package/dist-cjs/Ivs.js +30 -0
  4. package/dist-cjs/commands/GetStreamSessionCommand.js +36 -0
  5. package/dist-cjs/commands/ListStreamSessionsCommand.js +36 -0
  6. package/dist-cjs/commands/index.js +2 -0
  7. package/dist-cjs/endpoints.js +9 -0
  8. package/dist-cjs/models/models_0.js +68 -2
  9. package/dist-cjs/pagination/ListStreamSessionsPaginator.js +35 -0
  10. package/dist-cjs/pagination/index.js +1 -0
  11. package/dist-cjs/protocols/Aws_restJson1.js +282 -2
  12. package/dist-es/Ivs.js +30 -0
  13. package/dist-es/commands/GetStreamSessionCommand.js +39 -0
  14. package/dist-es/commands/ListStreamSessionsCommand.js +39 -0
  15. package/dist-es/commands/index.js +2 -0
  16. package/dist-es/endpoints.js +9 -0
  17. package/dist-es/models/models_0.js +44 -0
  18. package/dist-es/pagination/ListStreamSessionsPaginator.js +74 -0
  19. package/dist-es/pagination/index.js +1 -0
  20. package/dist-es/protocols/Aws_restJson1.js +309 -1
  21. package/dist-types/Ivs.d.ts +44 -19
  22. package/dist-types/IvsClient.d.ts +14 -3
  23. package/dist-types/commands/BatchGetChannelCommand.d.ts +1 -1
  24. package/dist-types/commands/BatchGetStreamKeyCommand.d.ts +1 -1
  25. package/dist-types/commands/CreateChannelCommand.d.ts +1 -1
  26. package/dist-types/commands/CreateRecordingConfigurationCommand.d.ts +10 -10
  27. package/dist-types/commands/CreateStreamKeyCommand.d.ts +1 -1
  28. package/dist-types/commands/DeleteChannelCommand.d.ts +3 -2
  29. package/dist-types/commands/DeletePlaybackKeyPairCommand.d.ts +1 -1
  30. package/dist-types/commands/DeleteRecordingConfigurationCommand.d.ts +1 -1
  31. package/dist-types/commands/DeleteStreamKeyCommand.d.ts +1 -1
  32. package/dist-types/commands/GetChannelCommand.d.ts +1 -1
  33. package/dist-types/commands/GetPlaybackKeyPairCommand.d.ts +1 -1
  34. package/dist-types/commands/GetRecordingConfigurationCommand.d.ts +1 -1
  35. package/dist-types/commands/GetStreamCommand.d.ts +1 -1
  36. package/dist-types/commands/GetStreamKeyCommand.d.ts +1 -1
  37. package/dist-types/commands/GetStreamSessionCommand.d.ts +35 -0
  38. package/dist-types/commands/ImportPlaybackKeyPairCommand.d.ts +1 -1
  39. package/dist-types/commands/ListChannelsCommand.d.ts +4 -4
  40. package/dist-types/commands/ListPlaybackKeyPairsCommand.d.ts +1 -1
  41. package/dist-types/commands/ListRecordingConfigurationsCommand.d.ts +3 -3
  42. package/dist-types/commands/ListStreamKeysCommand.d.ts +1 -1
  43. package/dist-types/commands/ListStreamSessionsCommand.d.ts +36 -0
  44. package/dist-types/commands/ListStreamsCommand.d.ts +3 -3
  45. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  46. package/dist-types/commands/PutMetadataCommand.d.ts +2 -2
  47. package/dist-types/commands/StopStreamCommand.d.ts +1 -1
  48. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  49. package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
  50. package/dist-types/commands/UpdateChannelCommand.d.ts +1 -1
  51. package/dist-types/commands/index.d.ts +2 -0
  52. package/dist-types/models/models_0.d.ts +289 -6
  53. package/dist-types/pagination/ListStreamSessionsPaginator.d.ts +4 -0
  54. package/dist-types/pagination/index.d.ts +1 -0
  55. package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
  56. package/dist-types/ts3.4/Ivs.d.ts +10 -0
  57. package/dist-types/ts3.4/IvsClient.d.ts +4 -2
  58. package/dist-types/ts3.4/commands/GetStreamSessionCommand.d.ts +17 -0
  59. package/dist-types/ts3.4/commands/ListStreamSessionsCommand.d.ts +17 -0
  60. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  61. package/dist-types/ts3.4/models/models_0.d.ts +153 -0
  62. package/dist-types/ts3.4/pagination/ListStreamSessionsPaginator.d.ts +4 -0
  63. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  64. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
  65. package/package.json +6 -6
@@ -0,0 +1,74 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { ListStreamSessionsCommand, } from "../commands/ListStreamSessionsCommand";
3
+ import { Ivs } from "../Ivs";
4
+ import { IvsClient } from "../IvsClient";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new ListStreamSessionsCommand(input)], __read(args)))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.listStreamSessions.apply(client, __spreadArray([input], __read(args)))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListStreamSessions(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListStreamSessions_1() {
39
+ var token, hasNext, page;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.nextToken = token;
49
+ input["maxResults"] = config.pageSize;
50
+ if (!(config.client instanceof Ivs)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof IvsClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected Ivs | IvsClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ token = page.nextToken;
67
+ hasNext = !!token;
68
+ return [3, 1];
69
+ case 9: return [4, __await(undefined)];
70
+ case 10: return [2, _a.sent()];
71
+ }
72
+ });
73
+ });
74
+ }
@@ -3,4 +3,5 @@ export * from "./ListChannelsPaginator";
3
3
  export * from "./ListPlaybackKeyPairsPaginator";
4
4
  export * from "./ListRecordingConfigurationsPaginator";
5
5
  export * from "./ListStreamKeysPaginator";
6
+ export * from "./ListStreamSessionsPaginator";
6
7
  export * from "./ListStreamsPaginator";
@@ -343,6 +343,30 @@ export var serializeAws_restJson1GetStreamKeyCommand = function (input, context)
343
343
  }
344
344
  });
345
345
  }); };
346
+ export var serializeAws_restJson1GetStreamSessionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
347
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
348
+ return __generator(this, function (_c) {
349
+ switch (_c.label) {
350
+ case 0: return [4, context.endpoint()];
351
+ case 1:
352
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
353
+ headers = {
354
+ "content-type": "application/json",
355
+ };
356
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/GetStreamSession";
357
+ body = JSON.stringify(__assign(__assign({}, (input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn })), (input.streamId !== undefined && input.streamId !== null && { streamId: input.streamId })));
358
+ return [2, new __HttpRequest({
359
+ protocol: protocol,
360
+ hostname: hostname,
361
+ port: port,
362
+ method: "POST",
363
+ headers: headers,
364
+ path: resolvedPath,
365
+ body: body,
366
+ })];
367
+ }
368
+ });
369
+ }); };
346
370
  export var serializeAws_restJson1ImportPlaybackKeyPairCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
347
371
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
348
372
  return __generator(this, function (_c) {
@@ -478,7 +502,32 @@ export var serializeAws_restJson1ListStreamsCommand = function (input, context)
478
502
  "content-type": "application/json",
479
503
  };
480
504
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/ListStreams";
481
- body = JSON.stringify(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
505
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.filterBy !== undefined &&
506
+ input.filterBy !== null && { filterBy: serializeAws_restJson1StreamFilters(input.filterBy, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
507
+ return [2, new __HttpRequest({
508
+ protocol: protocol,
509
+ hostname: hostname,
510
+ port: port,
511
+ method: "POST",
512
+ headers: headers,
513
+ path: resolvedPath,
514
+ body: body,
515
+ })];
516
+ }
517
+ });
518
+ }); };
519
+ export var serializeAws_restJson1ListStreamSessionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
520
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
521
+ return __generator(this, function (_c) {
522
+ switch (_c.label) {
523
+ case 0: return [4, context.endpoint()];
524
+ case 1:
525
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
526
+ headers = {
527
+ "content-type": "application/json",
528
+ };
529
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/ListStreamSessions";
530
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
482
531
  return [2, new __HttpRequest({
483
532
  protocol: protocol,
484
533
  hostname: hostname,
@@ -1806,6 +1855,84 @@ var deserializeAws_restJson1GetStreamKeyCommandError = function (output, context
1806
1855
  }
1807
1856
  });
1808
1857
  }); };
1858
+ export var deserializeAws_restJson1GetStreamSessionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1859
+ var contents, data, _a, _b;
1860
+ return __generator(this, function (_c) {
1861
+ switch (_c.label) {
1862
+ case 0:
1863
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1864
+ return [2, deserializeAws_restJson1GetStreamSessionCommandError(output, context)];
1865
+ }
1866
+ contents = {
1867
+ $metadata: deserializeMetadata(output),
1868
+ streamSession: undefined,
1869
+ };
1870
+ _a = __expectNonNull;
1871
+ _b = __expectObject;
1872
+ return [4, parseBody(output.body, context)];
1873
+ case 1:
1874
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1875
+ if (data.streamSession !== undefined && data.streamSession !== null) {
1876
+ contents.streamSession = deserializeAws_restJson1StreamSession(data.streamSession, context);
1877
+ }
1878
+ return [2, Promise.resolve(contents)];
1879
+ }
1880
+ });
1881
+ }); };
1882
+ var deserializeAws_restJson1GetStreamSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1883
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
1884
+ var _f;
1885
+ return __generator(this, function (_g) {
1886
+ switch (_g.label) {
1887
+ case 0:
1888
+ _a = [__assign({}, output)];
1889
+ _f = {};
1890
+ return [4, parseBody(output.body, context)];
1891
+ case 1:
1892
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
1893
+ errorCode = "UnknownError";
1894
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1895
+ _b = errorCode;
1896
+ switch (_b) {
1897
+ case "AccessDeniedException": return [3, 2];
1898
+ case "com.amazonaws.ivs#AccessDeniedException": return [3, 2];
1899
+ case "ResourceNotFoundException": return [3, 4];
1900
+ case "com.amazonaws.ivs#ResourceNotFoundException": return [3, 4];
1901
+ case "ValidationException": return [3, 6];
1902
+ case "com.amazonaws.ivs#ValidationException": return [3, 6];
1903
+ }
1904
+ return [3, 8];
1905
+ case 2:
1906
+ _c = [{}];
1907
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1908
+ case 3:
1909
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1910
+ return [3, 9];
1911
+ case 4:
1912
+ _d = [{}];
1913
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1914
+ case 5:
1915
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1916
+ return [3, 9];
1917
+ case 6:
1918
+ _e = [{}];
1919
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1920
+ case 7:
1921
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1922
+ return [3, 9];
1923
+ case 8:
1924
+ parsedBody = parsedOutput.body;
1925
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1926
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1927
+ _g.label = 9;
1928
+ case 9:
1929
+ message = response.message || response.Message || errorCode;
1930
+ response.message = message;
1931
+ delete response.Message;
1932
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1933
+ }
1934
+ });
1935
+ }); };
1809
1936
  export var deserializeAws_restJson1ImportPlaybackKeyPairCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1810
1937
  var contents, data, _a, _b;
1811
1938
  return __generator(this, function (_c) {
@@ -2286,6 +2413,88 @@ var deserializeAws_restJson1ListStreamsCommandError = function (output, context)
2286
2413
  }
2287
2414
  });
2288
2415
  }); };
2416
+ export var deserializeAws_restJson1ListStreamSessionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2417
+ var contents, data, _a, _b;
2418
+ return __generator(this, function (_c) {
2419
+ switch (_c.label) {
2420
+ case 0:
2421
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2422
+ return [2, deserializeAws_restJson1ListStreamSessionsCommandError(output, context)];
2423
+ }
2424
+ contents = {
2425
+ $metadata: deserializeMetadata(output),
2426
+ nextToken: undefined,
2427
+ streamSessions: undefined,
2428
+ };
2429
+ _a = __expectNonNull;
2430
+ _b = __expectObject;
2431
+ return [4, parseBody(output.body, context)];
2432
+ case 1:
2433
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2434
+ if (data.nextToken !== undefined && data.nextToken !== null) {
2435
+ contents.nextToken = __expectString(data.nextToken);
2436
+ }
2437
+ if (data.streamSessions !== undefined && data.streamSessions !== null) {
2438
+ contents.streamSessions = deserializeAws_restJson1StreamSessionList(data.streamSessions, context);
2439
+ }
2440
+ return [2, Promise.resolve(contents)];
2441
+ }
2442
+ });
2443
+ }); };
2444
+ var deserializeAws_restJson1ListStreamSessionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2445
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
2446
+ var _f;
2447
+ return __generator(this, function (_g) {
2448
+ switch (_g.label) {
2449
+ case 0:
2450
+ _a = [__assign({}, output)];
2451
+ _f = {};
2452
+ return [4, parseBody(output.body, context)];
2453
+ case 1:
2454
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
2455
+ errorCode = "UnknownError";
2456
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2457
+ _b = errorCode;
2458
+ switch (_b) {
2459
+ case "AccessDeniedException": return [3, 2];
2460
+ case "com.amazonaws.ivs#AccessDeniedException": return [3, 2];
2461
+ case "ResourceNotFoundException": return [3, 4];
2462
+ case "com.amazonaws.ivs#ResourceNotFoundException": return [3, 4];
2463
+ case "ValidationException": return [3, 6];
2464
+ case "com.amazonaws.ivs#ValidationException": return [3, 6];
2465
+ }
2466
+ return [3, 8];
2467
+ case 2:
2468
+ _c = [{}];
2469
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2470
+ case 3:
2471
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2472
+ return [3, 9];
2473
+ case 4:
2474
+ _d = [{}];
2475
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2476
+ case 5:
2477
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2478
+ return [3, 9];
2479
+ case 6:
2480
+ _e = [{}];
2481
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2482
+ case 7:
2483
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2484
+ return [3, 9];
2485
+ case 8:
2486
+ parsedBody = parsedOutput.body;
2487
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2488
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
2489
+ _g.label = 9;
2490
+ case 9:
2491
+ message = response.message || response.Message || errorCode;
2492
+ response.message = message;
2493
+ delete response.Message;
2494
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
2495
+ }
2496
+ });
2497
+ }); };
2289
2498
  export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2290
2499
  var contents, data, _a, _b;
2291
2500
  return __generator(this, function (_c) {
@@ -2955,6 +3164,9 @@ var serializeAws_restJson1DestinationConfiguration = function (input, context) {
2955
3164
  var serializeAws_restJson1S3DestinationConfiguration = function (input, context) {
2956
3165
  return __assign({}, (input.bucketName !== undefined && input.bucketName !== null && { bucketName: input.bucketName }));
2957
3166
  };
3167
+ var serializeAws_restJson1StreamFilters = function (input, context) {
3168
+ return __assign({}, (input.health !== undefined && input.health !== null && { health: input.health }));
3169
+ };
2958
3170
  var serializeAws_restJson1StreamKeyArnList = function (input, context) {
2959
3171
  return input
2960
3172
  .filter(function (e) { return e != null; })
@@ -2975,6 +3187,14 @@ var serializeAws_restJson1Tags = function (input, context) {
2975
3187
  return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
2976
3188
  }, {});
2977
3189
  };
3190
+ var deserializeAws_restJson1AudioConfiguration = function (output, context) {
3191
+ return {
3192
+ channels: __expectLong(output.channels),
3193
+ codec: __expectString(output.codec),
3194
+ sampleRate: __expectLong(output.sampleRate),
3195
+ targetBitrate: __expectLong(output.targetBitrate),
3196
+ };
3197
+ };
2978
3198
  var deserializeAws_restJson1BatchError = function (output, context) {
2979
3199
  return {
2980
3200
  arn: __expectString(output.arn),
@@ -3046,6 +3266,16 @@ var deserializeAws_restJson1DestinationConfiguration = function (output, context
3046
3266
  : undefined,
3047
3267
  };
3048
3268
  };
3269
+ var deserializeAws_restJson1IngestConfiguration = function (output, context) {
3270
+ return {
3271
+ audio: output.audio !== undefined && output.audio !== null
3272
+ ? deserializeAws_restJson1AudioConfiguration(output.audio, context)
3273
+ : undefined,
3274
+ video: output.video !== undefined && output.video !== null
3275
+ ? deserializeAws_restJson1VideoConfiguration(output.video, context)
3276
+ : undefined,
3277
+ };
3278
+ };
3049
3279
  var deserializeAws_restJson1PlaybackKeyPair = function (output, context) {
3050
3280
  return {
3051
3281
  arn: __expectString(output.arn),
@@ -3125,9 +3355,29 @@ var deserializeAws_restJson1_Stream = function (output, context) {
3125
3355
  ? __expectNonNull(__parseRfc3339DateTime(output.startTime))
3126
3356
  : undefined,
3127
3357
  state: __expectString(output.state),
3358
+ streamId: __expectString(output.streamId),
3128
3359
  viewerCount: __expectLong(output.viewerCount),
3129
3360
  };
3130
3361
  };
3362
+ var deserializeAws_restJson1StreamEvent = function (output, context) {
3363
+ return {
3364
+ eventTime: output.eventTime !== undefined && output.eventTime !== null
3365
+ ? __expectNonNull(__parseRfc3339DateTime(output.eventTime))
3366
+ : undefined,
3367
+ name: __expectString(output.name),
3368
+ type: __expectString(output.type),
3369
+ };
3370
+ };
3371
+ var deserializeAws_restJson1StreamEvents = function (output, context) {
3372
+ return (output || [])
3373
+ .filter(function (e) { return e != null; })
3374
+ .map(function (entry) {
3375
+ if (entry === null) {
3376
+ return null;
3377
+ }
3378
+ return deserializeAws_restJson1StreamEvent(entry, context);
3379
+ });
3380
+ };
3131
3381
  var deserializeAws_restJson1StreamKey = function (output, context) {
3132
3382
  return {
3133
3383
  arn: __expectString(output.arn),
@@ -3177,6 +3427,51 @@ var deserializeAws_restJson1StreamList = function (output, context) {
3177
3427
  return deserializeAws_restJson1StreamSummary(entry, context);
3178
3428
  });
3179
3429
  };
3430
+ var deserializeAws_restJson1StreamSession = function (output, context) {
3431
+ return {
3432
+ channel: output.channel !== undefined && output.channel !== null
3433
+ ? deserializeAws_restJson1Channel(output.channel, context)
3434
+ : undefined,
3435
+ endTime: output.endTime !== undefined && output.endTime !== null
3436
+ ? __expectNonNull(__parseRfc3339DateTime(output.endTime))
3437
+ : undefined,
3438
+ ingestConfiguration: output.ingestConfiguration !== undefined && output.ingestConfiguration !== null
3439
+ ? deserializeAws_restJson1IngestConfiguration(output.ingestConfiguration, context)
3440
+ : undefined,
3441
+ recordingConfiguration: output.recordingConfiguration !== undefined && output.recordingConfiguration !== null
3442
+ ? deserializeAws_restJson1RecordingConfiguration(output.recordingConfiguration, context)
3443
+ : undefined,
3444
+ startTime: output.startTime !== undefined && output.startTime !== null
3445
+ ? __expectNonNull(__parseRfc3339DateTime(output.startTime))
3446
+ : undefined,
3447
+ streamId: __expectString(output.streamId),
3448
+ truncatedEvents: output.truncatedEvents !== undefined && output.truncatedEvents !== null
3449
+ ? deserializeAws_restJson1StreamEvents(output.truncatedEvents, context)
3450
+ : undefined,
3451
+ };
3452
+ };
3453
+ var deserializeAws_restJson1StreamSessionList = function (output, context) {
3454
+ return (output || [])
3455
+ .filter(function (e) { return e != null; })
3456
+ .map(function (entry) {
3457
+ if (entry === null) {
3458
+ return null;
3459
+ }
3460
+ return deserializeAws_restJson1StreamSessionSummary(entry, context);
3461
+ });
3462
+ };
3463
+ var deserializeAws_restJson1StreamSessionSummary = function (output, context) {
3464
+ return {
3465
+ endTime: output.endTime !== undefined && output.endTime !== null
3466
+ ? __expectNonNull(__parseRfc3339DateTime(output.endTime))
3467
+ : undefined,
3468
+ hasErrorEvent: __expectBoolean(output.hasErrorEvent),
3469
+ startTime: output.startTime !== undefined && output.startTime !== null
3470
+ ? __expectNonNull(__parseRfc3339DateTime(output.startTime))
3471
+ : undefined,
3472
+ streamId: __expectString(output.streamId),
3473
+ };
3474
+ };
3180
3475
  var deserializeAws_restJson1StreamSummary = function (output, context) {
3181
3476
  return {
3182
3477
  channelArn: __expectString(output.channelArn),
@@ -3185,6 +3480,7 @@ var deserializeAws_restJson1StreamSummary = function (output, context) {
3185
3480
  ? __expectNonNull(__parseRfc3339DateTime(output.startTime))
3186
3481
  : undefined,
3187
3482
  state: __expectString(output.state),
3483
+ streamId: __expectString(output.streamId),
3188
3484
  viewerCount: __expectLong(output.viewerCount),
3189
3485
  };
3190
3486
  };
@@ -3198,6 +3494,18 @@ var deserializeAws_restJson1Tags = function (output, context) {
3198
3494
  return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
3199
3495
  }, {});
3200
3496
  };
3497
+ var deserializeAws_restJson1VideoConfiguration = function (output, context) {
3498
+ return {
3499
+ avcLevel: __expectString(output.avcLevel),
3500
+ avcProfile: __expectString(output.avcProfile),
3501
+ codec: __expectString(output.codec),
3502
+ encoder: __expectString(output.encoder),
3503
+ targetBitrate: __expectLong(output.targetBitrate),
3504
+ targetFramerate: __expectLong(output.targetFramerate),
3505
+ videoHeight: __expectLong(output.videoHeight),
3506
+ videoWidth: __expectLong(output.videoWidth),
3507
+ };
3508
+ };
3201
3509
  var deserializeMetadata = function (output) {
3202
3510
  var _a;
3203
3511
  return ({
@@ -13,12 +13,14 @@ import { GetPlaybackKeyPairCommandInput, GetPlaybackKeyPairCommandOutput } from
13
13
  import { GetRecordingConfigurationCommandInput, GetRecordingConfigurationCommandOutput } from "./commands/GetRecordingConfigurationCommand";
14
14
  import { GetStreamCommandInput, GetStreamCommandOutput } from "./commands/GetStreamCommand";
15
15
  import { GetStreamKeyCommandInput, GetStreamKeyCommandOutput } from "./commands/GetStreamKeyCommand";
16
+ import { GetStreamSessionCommandInput, GetStreamSessionCommandOutput } from "./commands/GetStreamSessionCommand";
16
17
  import { ImportPlaybackKeyPairCommandInput, ImportPlaybackKeyPairCommandOutput } from "./commands/ImportPlaybackKeyPairCommand";
17
18
  import { ListChannelsCommandInput, ListChannelsCommandOutput } from "./commands/ListChannelsCommand";
18
19
  import { ListPlaybackKeyPairsCommandInput, ListPlaybackKeyPairsCommandOutput } from "./commands/ListPlaybackKeyPairsCommand";
19
20
  import { ListRecordingConfigurationsCommandInput, ListRecordingConfigurationsCommandOutput } from "./commands/ListRecordingConfigurationsCommand";
20
21
  import { ListStreamKeysCommandInput, ListStreamKeysCommandOutput } from "./commands/ListStreamKeysCommand";
21
22
  import { ListStreamsCommandInput, ListStreamsCommandOutput } from "./commands/ListStreamsCommand";
23
+ import { ListStreamSessionsCommandInput, ListStreamSessionsCommandOutput } from "./commands/ListStreamSessionsCommand";
22
24
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
23
25
  import { PutMetadataCommandInput, PutMetadataCommandOutput } from "./commands/PutMetadataCommand";
24
26
  import { StopStreamCommandInput, StopStreamCommandOutput } from "./commands/StopStreamCommand";
@@ -44,7 +46,6 @@ import { IvsClient } from "./IvsClient";
44
46
  * </p>
45
47
  * <p>For a summary of notable documentation changes in each release, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/doc-history.html"> Document
46
48
  * History</a>.</p>
47
- *
48
49
  * <p>
49
50
  * <b>Allowed Header Values</b>
50
51
  * </p>
@@ -234,11 +235,21 @@ import { IvsClient } from "./IvsClient";
234
235
  * </li>
235
236
  * <li>
236
237
  * <p>
238
+ * <a>GetStreamSession</a> — Gets metadata on a specified stream.</p>
239
+ * </li>
240
+ * <li>
241
+ * <p>
237
242
  * <a>ListStreams</a> — Gets summary information about live streams in
238
243
  * your account, in the Amazon Web Services region where the API request is processed.</p>
239
244
  * </li>
240
245
  * <li>
241
246
  * <p>
247
+ * <a>ListStreamSessions</a> — Gets a summary of current and previous
248
+ * streams for a specified channel in your account, in the AWS region where the API request
249
+ * is processed.</p>
250
+ * </li>
251
+ * <li>
252
+ * <p>
242
253
  * <a>StopStream</a> — Disconnects the incoming RTMPS stream for the
243
254
  * specified channel. Can be used in conjunction with <a>DeleteStreamKey</a> to
244
255
  * prevent further streaming to a channel.</p>
@@ -353,16 +364,16 @@ export declare class Ivs extends IvsClient {
353
364
  /**
354
365
  * <p>Creates a new recording configuration, used to enable recording to Amazon S3.</p>
355
366
  * <p>
356
- * <b>Known issue:</b> In the us-east-1 region, if you use the Amazon Web Services
357
- * CLI to create a recording configuration, it returns success even if the S3 bucket is in a
358
- * different region. In this case, the <code>state</code> of the recording configuration is
359
- * <code>CREATE_FAILED</code> (instead of <code>ACTIVE</code>). (In other regions, the CLI
360
- * correctly returns failure if the bucket is in a different region.)</p>
367
+ * <b>Known issue:</b> In the us-east-1 region, if you use the
368
+ * Amazon Web Services CLI to create a recording configuration, it returns success even if the
369
+ * S3 bucket is in a different region. In this case, the <code>state</code> of the recording
370
+ * configuration is <code>CREATE_FAILED</code> (instead of <code>ACTIVE</code>). (In other
371
+ * regions, the CLI correctly returns failure if the bucket is in a different region.)</p>
361
372
  * <p>
362
- * <b>Workaround:</b> Ensure that your S3 bucket is in the same region as the recording
363
- * configuration. If you create a recording configuration in a different region as your S3
364
- * bucket, delete that recording configuration and create a new one with an S3 bucket from the
365
- * correct region.</p>
373
+ * <b>Workaround:</b> Ensure that your S3 bucket is in the same
374
+ * region as the recording configuration. If you create a recording configuration in a different
375
+ * region as your S3 bucket, delete that recording configuration and create a new one with an S3
376
+ * bucket from the correct region.</p>
366
377
  */
367
378
  createRecordingConfiguration(args: CreateRecordingConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<CreateRecordingConfigurationCommandOutput>;
368
379
  createRecordingConfiguration(args: CreateRecordingConfigurationCommandInput, cb: (err: any, data?: CreateRecordingConfigurationCommandOutput) => void): void;
@@ -381,7 +392,8 @@ export declare class Ivs extends IvsClient {
381
392
  * <p>If you try to delete a live channel, you will get an error (409 ConflictException). To
382
393
  * delete a channel that is live, call <a>StopStream</a>, wait for the Amazon
383
394
  * EventBridge "Stream End" event (to verify that the stream's state was changed from Live to
384
- * Offline), then call DeleteChannel. (See <a href="https://docs.aws.amazon.com/ivs/latest/userguide/eventbridge.html"> Using EventBridge with Amazon IVS</a>.) </p>
395
+ * Offline), then call DeleteChannel. (See <a href="https://docs.aws.amazon.com/ivs/latest/userguide/eventbridge.html"> Using EventBridge with Amazon IVS</a>.)
396
+ * </p>
385
397
  */
386
398
  deleteChannel(args: DeleteChannelCommandInput, options?: __HttpHandlerOptions): Promise<DeleteChannelCommandOutput>;
387
399
  deleteChannel(args: DeleteChannelCommandInput, cb: (err: any, data?: DeleteChannelCommandOutput) => void): void;
@@ -446,6 +458,12 @@ export declare class Ivs extends IvsClient {
446
458
  getStreamKey(args: GetStreamKeyCommandInput, options?: __HttpHandlerOptions): Promise<GetStreamKeyCommandOutput>;
447
459
  getStreamKey(args: GetStreamKeyCommandInput, cb: (err: any, data?: GetStreamKeyCommandOutput) => void): void;
448
460
  getStreamKey(args: GetStreamKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetStreamKeyCommandOutput) => void): void;
461
+ /**
462
+ * <p>Gets metadata on a specified stream.</p>
463
+ */
464
+ getStreamSession(args: GetStreamSessionCommandInput, options?: __HttpHandlerOptions): Promise<GetStreamSessionCommandOutput>;
465
+ getStreamSession(args: GetStreamSessionCommandInput, cb: (err: any, data?: GetStreamSessionCommandOutput) => void): void;
466
+ getStreamSession(args: GetStreamSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetStreamSessionCommandOutput) => void): void;
449
467
  /**
450
468
  * <p>Imports the public portion of a new key pair and returns its <code>arn</code> and
451
469
  * <code>fingerprint</code>. The <code>privateKey</code> can then be used to generate viewer
@@ -457,9 +475,9 @@ export declare class Ivs extends IvsClient {
457
475
  importPlaybackKeyPair(args: ImportPlaybackKeyPairCommandInput, cb: (err: any, data?: ImportPlaybackKeyPairCommandOutput) => void): void;
458
476
  importPlaybackKeyPair(args: ImportPlaybackKeyPairCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ImportPlaybackKeyPairCommandOutput) => void): void;
459
477
  /**
460
- * <p>Gets summary information about all channels in your account, in the Amazon Web Services region where the
461
- * API request is processed. This list can be filtered to match a specified name or
462
- * recording-configuration ARN. Filters are mutually exclusive and cannot be used together. If
478
+ * <p>Gets summary information about all channels in your account, in the Amazon Web Services
479
+ * region where the API request is processed. This list can be filtered to match a specified name
480
+ * or recording-configuration ARN. Filters are mutually exclusive and cannot be used together. If
463
481
  * you try to use both filters, you will get an error (409 ConflictException).</p>
464
482
  */
465
483
  listChannels(args: ListChannelsCommandInput, options?: __HttpHandlerOptions): Promise<ListChannelsCommandOutput>;
@@ -473,8 +491,8 @@ export declare class Ivs extends IvsClient {
473
491
  listPlaybackKeyPairs(args: ListPlaybackKeyPairsCommandInput, cb: (err: any, data?: ListPlaybackKeyPairsCommandOutput) => void): void;
474
492
  listPlaybackKeyPairs(args: ListPlaybackKeyPairsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPlaybackKeyPairsCommandOutput) => void): void;
475
493
  /**
476
- * <p>Gets summary information about all recording configurations in your account, in the Amazon Web Services
477
- * region where the API request is processed.</p>
494
+ * <p>Gets summary information about all recording configurations in your account, in the
495
+ * Amazon Web Services region where the API request is processed.</p>
478
496
  */
479
497
  listRecordingConfigurations(args: ListRecordingConfigurationsCommandInput, options?: __HttpHandlerOptions): Promise<ListRecordingConfigurationsCommandOutput>;
480
498
  listRecordingConfigurations(args: ListRecordingConfigurationsCommandInput, cb: (err: any, data?: ListRecordingConfigurationsCommandOutput) => void): void;
@@ -486,12 +504,19 @@ export declare class Ivs extends IvsClient {
486
504
  listStreamKeys(args: ListStreamKeysCommandInput, cb: (err: any, data?: ListStreamKeysCommandOutput) => void): void;
487
505
  listStreamKeys(args: ListStreamKeysCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListStreamKeysCommandOutput) => void): void;
488
506
  /**
489
- * <p>Gets summary information about live streams in your account, in the Amazon Web Services region where the
490
- * API request is processed.</p>
507
+ * <p>Gets summary information about live streams in your account, in the Amazon Web Services
508
+ * region where the API request is processed.</p>
491
509
  */
492
510
  listStreams(args: ListStreamsCommandInput, options?: __HttpHandlerOptions): Promise<ListStreamsCommandOutput>;
493
511
  listStreams(args: ListStreamsCommandInput, cb: (err: any, data?: ListStreamsCommandOutput) => void): void;
494
512
  listStreams(args: ListStreamsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListStreamsCommandOutput) => void): void;
513
+ /**
514
+ * <p>Gets a summary of current and previous streams for a specified channel in your account, in
515
+ * the AWS region where the API request is processed.</p>
516
+ */
517
+ listStreamSessions(args: ListStreamSessionsCommandInput, options?: __HttpHandlerOptions): Promise<ListStreamSessionsCommandOutput>;
518
+ listStreamSessions(args: ListStreamSessionsCommandInput, cb: (err: any, data?: ListStreamSessionsCommandOutput) => void): void;
519
+ listStreamSessions(args: ListStreamSessionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListStreamSessionsCommandOutput) => void): void;
495
520
  /**
496
521
  * <p>Gets information about Amazon Web Services tags for the specified ARN.</p>
497
522
  */
@@ -499,7 +524,7 @@ export declare class Ivs extends IvsClient {
499
524
  listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
500
525
  listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
501
526
  /**
502
- * <p>Inserts metadata into the active stream of the specified channel. At most 5 requests per
527
+ * <p>Inserts metadata into the active stream of the specified channel. At most 5 requests per
503
528
  * second per channel are allowed, each with a maximum 1 KB payload. (If 5 TPS is not sufficient
504
529
  * for your needs, we recommend batching your data into a single PutMetadata call.) At most 155
505
530
  * requests per second per account are allowed. Also see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/metadata.html">Embedding Metadata within a Video Stream</a> in