@aws-sdk/client-ivs 3.42.0 → 3.47.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 (55) hide show
  1. package/CHANGELOG.md +50 -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 +1 -0
  8. package/dist-cjs/models/models_0.js +68 -62
  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-cjs/runtimeConfig.browser.js +7 -2
  13. package/dist-cjs/runtimeConfig.js +9 -3
  14. package/dist-es/Ivs.js +30 -0
  15. package/dist-es/commands/GetStreamSessionCommand.js +39 -0
  16. package/dist-es/commands/ListStreamSessionsCommand.js +39 -0
  17. package/dist-es/commands/index.js +2 -0
  18. package/dist-es/endpoints.js +1 -0
  19. package/dist-es/models/models_0.js +44 -40
  20. package/dist-es/pagination/ListStreamSessionsPaginator.js +74 -0
  21. package/dist-es/pagination/index.js +1 -0
  22. package/dist-es/protocols/Aws_restJson1.js +309 -1
  23. package/dist-es/runtimeConfig.browser.js +12 -3
  24. package/dist-es/runtimeConfig.js +13 -6
  25. package/dist-types/Ivs.d.ts +44 -19
  26. package/dist-types/IvsClient.d.ts +19 -4
  27. package/dist-types/commands/CreateRecordingConfigurationCommand.d.ts +9 -9
  28. package/dist-types/commands/DeleteChannelCommand.d.ts +2 -1
  29. package/dist-types/commands/GetStreamSessionCommand.d.ts +35 -0
  30. package/dist-types/commands/ListChannelsCommand.d.ts +3 -3
  31. package/dist-types/commands/ListRecordingConfigurationsCommand.d.ts +2 -2
  32. package/dist-types/commands/ListStreamSessionsCommand.d.ts +36 -0
  33. package/dist-types/commands/ListStreamsCommand.d.ts +2 -2
  34. package/dist-types/commands/PutMetadataCommand.d.ts +1 -1
  35. package/dist-types/commands/index.d.ts +2 -0
  36. package/dist-types/models/models_0.d.ts +289 -66
  37. package/dist-types/pagination/ListStreamSessionsPaginator.d.ts +4 -0
  38. package/dist-types/pagination/index.d.ts +1 -0
  39. package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
  40. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  41. package/dist-types/runtimeConfig.d.ts +4 -3
  42. package/dist-types/runtimeConfig.native.d.ts +1 -0
  43. package/dist-types/ts3.4/Ivs.d.ts +10 -0
  44. package/dist-types/ts3.4/IvsClient.d.ts +7 -3
  45. package/dist-types/ts3.4/commands/GetStreamSessionCommand.d.ts +17 -0
  46. package/dist-types/ts3.4/commands/ListStreamSessionsCommand.d.ts +17 -0
  47. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  48. package/dist-types/ts3.4/models/models_0.d.ts +153 -40
  49. package/dist-types/ts3.4/pagination/ListStreamSessionsPaginator.d.ts +4 -0
  50. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  51. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
  52. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
  53. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
  54. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  55. package/package.json +38 -45
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopStreamCommand = exports.deserializeAws_restJson1PutMetadataCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListStreamsCommand = exports.deserializeAws_restJson1ListStreamKeysCommand = exports.deserializeAws_restJson1ListRecordingConfigurationsCommand = exports.deserializeAws_restJson1ListPlaybackKeyPairsCommand = exports.deserializeAws_restJson1ListChannelsCommand = exports.deserializeAws_restJson1ImportPlaybackKeyPairCommand = exports.deserializeAws_restJson1GetStreamKeyCommand = exports.deserializeAws_restJson1GetStreamCommand = exports.deserializeAws_restJson1GetRecordingConfigurationCommand = exports.deserializeAws_restJson1GetPlaybackKeyPairCommand = exports.deserializeAws_restJson1GetChannelCommand = exports.deserializeAws_restJson1DeleteStreamKeyCommand = exports.deserializeAws_restJson1DeleteRecordingConfigurationCommand = exports.deserializeAws_restJson1DeletePlaybackKeyPairCommand = exports.deserializeAws_restJson1DeleteChannelCommand = exports.deserializeAws_restJson1CreateStreamKeyCommand = exports.deserializeAws_restJson1CreateRecordingConfigurationCommand = exports.deserializeAws_restJson1CreateChannelCommand = exports.deserializeAws_restJson1BatchGetStreamKeyCommand = exports.deserializeAws_restJson1BatchGetChannelCommand = exports.serializeAws_restJson1UpdateChannelCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopStreamCommand = exports.serializeAws_restJson1PutMetadataCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListStreamsCommand = exports.serializeAws_restJson1ListStreamKeysCommand = exports.serializeAws_restJson1ListRecordingConfigurationsCommand = exports.serializeAws_restJson1ListPlaybackKeyPairsCommand = exports.serializeAws_restJson1ListChannelsCommand = exports.serializeAws_restJson1ImportPlaybackKeyPairCommand = exports.serializeAws_restJson1GetStreamKeyCommand = exports.serializeAws_restJson1GetStreamCommand = exports.serializeAws_restJson1GetRecordingConfigurationCommand = exports.serializeAws_restJson1GetPlaybackKeyPairCommand = exports.serializeAws_restJson1GetChannelCommand = exports.serializeAws_restJson1DeleteStreamKeyCommand = exports.serializeAws_restJson1DeleteRecordingConfigurationCommand = exports.serializeAws_restJson1DeletePlaybackKeyPairCommand = exports.serializeAws_restJson1DeleteChannelCommand = exports.serializeAws_restJson1CreateStreamKeyCommand = exports.serializeAws_restJson1CreateRecordingConfigurationCommand = exports.serializeAws_restJson1CreateChannelCommand = exports.serializeAws_restJson1BatchGetStreamKeyCommand = exports.serializeAws_restJson1BatchGetChannelCommand = void 0;
4
- exports.deserializeAws_restJson1UpdateChannelCommand = exports.deserializeAws_restJson1UntagResourceCommand = void 0;
3
+ exports.deserializeAws_restJson1ListStreamSessionsCommand = exports.deserializeAws_restJson1ListStreamsCommand = exports.deserializeAws_restJson1ListStreamKeysCommand = exports.deserializeAws_restJson1ListRecordingConfigurationsCommand = exports.deserializeAws_restJson1ListPlaybackKeyPairsCommand = exports.deserializeAws_restJson1ListChannelsCommand = exports.deserializeAws_restJson1ImportPlaybackKeyPairCommand = exports.deserializeAws_restJson1GetStreamSessionCommand = exports.deserializeAws_restJson1GetStreamKeyCommand = exports.deserializeAws_restJson1GetStreamCommand = exports.deserializeAws_restJson1GetRecordingConfigurationCommand = exports.deserializeAws_restJson1GetPlaybackKeyPairCommand = exports.deserializeAws_restJson1GetChannelCommand = exports.deserializeAws_restJson1DeleteStreamKeyCommand = exports.deserializeAws_restJson1DeleteRecordingConfigurationCommand = exports.deserializeAws_restJson1DeletePlaybackKeyPairCommand = exports.deserializeAws_restJson1DeleteChannelCommand = exports.deserializeAws_restJson1CreateStreamKeyCommand = exports.deserializeAws_restJson1CreateRecordingConfigurationCommand = exports.deserializeAws_restJson1CreateChannelCommand = exports.deserializeAws_restJson1BatchGetStreamKeyCommand = exports.deserializeAws_restJson1BatchGetChannelCommand = exports.serializeAws_restJson1UpdateChannelCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopStreamCommand = exports.serializeAws_restJson1PutMetadataCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListStreamSessionsCommand = exports.serializeAws_restJson1ListStreamsCommand = exports.serializeAws_restJson1ListStreamKeysCommand = exports.serializeAws_restJson1ListRecordingConfigurationsCommand = exports.serializeAws_restJson1ListPlaybackKeyPairsCommand = exports.serializeAws_restJson1ListChannelsCommand = exports.serializeAws_restJson1ImportPlaybackKeyPairCommand = exports.serializeAws_restJson1GetStreamSessionCommand = exports.serializeAws_restJson1GetStreamKeyCommand = exports.serializeAws_restJson1GetStreamCommand = exports.serializeAws_restJson1GetRecordingConfigurationCommand = exports.serializeAws_restJson1GetPlaybackKeyPairCommand = exports.serializeAws_restJson1GetChannelCommand = exports.serializeAws_restJson1DeleteStreamKeyCommand = exports.serializeAws_restJson1DeleteRecordingConfigurationCommand = exports.serializeAws_restJson1DeletePlaybackKeyPairCommand = exports.serializeAws_restJson1DeleteChannelCommand = exports.serializeAws_restJson1CreateStreamKeyCommand = exports.serializeAws_restJson1CreateRecordingConfigurationCommand = exports.serializeAws_restJson1CreateChannelCommand = exports.serializeAws_restJson1BatchGetStreamKeyCommand = exports.serializeAws_restJson1BatchGetChannelCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateChannelCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopStreamCommand = exports.deserializeAws_restJson1PutMetadataCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = 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_restJson1BatchGetChannelCommand = async (input, context) => {
@@ -312,6 +312,28 @@ const serializeAws_restJson1GetStreamKeyCommand = async (input, context) => {
312
312
  });
313
313
  };
314
314
  exports.serializeAws_restJson1GetStreamKeyCommand = serializeAws_restJson1GetStreamKeyCommand;
315
+ const serializeAws_restJson1GetStreamSessionCommand = async (input, context) => {
316
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
317
+ const headers = {
318
+ "content-type": "application/json",
319
+ };
320
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/GetStreamSession";
321
+ let body;
322
+ body = JSON.stringify({
323
+ ...(input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn }),
324
+ ...(input.streamId !== undefined && input.streamId !== null && { streamId: input.streamId }),
325
+ });
326
+ return new protocol_http_1.HttpRequest({
327
+ protocol,
328
+ hostname,
329
+ port,
330
+ method: "POST",
331
+ headers,
332
+ path: resolvedPath,
333
+ body,
334
+ });
335
+ };
336
+ exports.serializeAws_restJson1GetStreamSessionCommand = serializeAws_restJson1GetStreamSessionCommand;
315
337
  const serializeAws_restJson1ImportPlaybackKeyPairCommand = async (input, context) => {
316
338
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
317
339
  const headers = {
@@ -438,6 +460,8 @@ const serializeAws_restJson1ListStreamsCommand = async (input, context) => {
438
460
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreams";
439
461
  let body;
440
462
  body = JSON.stringify({
463
+ ...(input.filterBy !== undefined &&
464
+ input.filterBy !== null && { filterBy: serializeAws_restJson1StreamFilters(input.filterBy, context) }),
441
465
  ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
442
466
  ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
443
467
  });
@@ -452,6 +476,29 @@ const serializeAws_restJson1ListStreamsCommand = async (input, context) => {
452
476
  });
453
477
  };
454
478
  exports.serializeAws_restJson1ListStreamsCommand = serializeAws_restJson1ListStreamsCommand;
479
+ const serializeAws_restJson1ListStreamSessionsCommand = async (input, context) => {
480
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
481
+ const headers = {
482
+ "content-type": "application/json",
483
+ };
484
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreamSessions";
485
+ let body;
486
+ body = JSON.stringify({
487
+ ...(input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn }),
488
+ ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
489
+ ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
490
+ });
491
+ return new protocol_http_1.HttpRequest({
492
+ protocol,
493
+ hostname,
494
+ port,
495
+ method: "POST",
496
+ headers,
497
+ path: resolvedPath,
498
+ body,
499
+ });
500
+ };
501
+ exports.serializeAws_restJson1ListStreamSessionsCommand = serializeAws_restJson1ListStreamSessionsCommand;
455
502
  const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
456
503
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
457
504
  const headers = {};
@@ -1573,6 +1620,70 @@ const deserializeAws_restJson1GetStreamKeyCommandError = async (output, context)
1573
1620
  delete response.Message;
1574
1621
  return Promise.reject(Object.assign(new Error(message), response));
1575
1622
  };
1623
+ const deserializeAws_restJson1GetStreamSessionCommand = async (output, context) => {
1624
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1625
+ return deserializeAws_restJson1GetStreamSessionCommandError(output, context);
1626
+ }
1627
+ const contents = {
1628
+ $metadata: deserializeMetadata(output),
1629
+ streamSession: undefined,
1630
+ };
1631
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1632
+ if (data.streamSession !== undefined && data.streamSession !== null) {
1633
+ contents.streamSession = deserializeAws_restJson1StreamSession(data.streamSession, context);
1634
+ }
1635
+ return Promise.resolve(contents);
1636
+ };
1637
+ exports.deserializeAws_restJson1GetStreamSessionCommand = deserializeAws_restJson1GetStreamSessionCommand;
1638
+ const deserializeAws_restJson1GetStreamSessionCommandError = async (output, context) => {
1639
+ const parsedOutput = {
1640
+ ...output,
1641
+ body: await parseBody(output.body, context),
1642
+ };
1643
+ let response;
1644
+ let errorCode = "UnknownError";
1645
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1646
+ switch (errorCode) {
1647
+ case "AccessDeniedException":
1648
+ case "com.amazonaws.ivs#AccessDeniedException":
1649
+ response = {
1650
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1651
+ name: errorCode,
1652
+ $metadata: deserializeMetadata(output),
1653
+ };
1654
+ break;
1655
+ case "ResourceNotFoundException":
1656
+ case "com.amazonaws.ivs#ResourceNotFoundException":
1657
+ response = {
1658
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1659
+ name: errorCode,
1660
+ $metadata: deserializeMetadata(output),
1661
+ };
1662
+ break;
1663
+ case "ValidationException":
1664
+ case "com.amazonaws.ivs#ValidationException":
1665
+ response = {
1666
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1667
+ name: errorCode,
1668
+ $metadata: deserializeMetadata(output),
1669
+ };
1670
+ break;
1671
+ default:
1672
+ const parsedBody = parsedOutput.body;
1673
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1674
+ response = {
1675
+ ...parsedBody,
1676
+ name: `${errorCode}`,
1677
+ message: parsedBody.message || parsedBody.Message || errorCode,
1678
+ $fault: "client",
1679
+ $metadata: deserializeMetadata(output),
1680
+ };
1681
+ }
1682
+ const message = response.message || response.Message || errorCode;
1683
+ response.message = message;
1684
+ delete response.Message;
1685
+ return Promise.reject(Object.assign(new Error(message), response));
1686
+ };
1576
1687
  const deserializeAws_restJson1ImportPlaybackKeyPairCommand = async (output, context) => {
1577
1688
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1578
1689
  return deserializeAws_restJson1ImportPlaybackKeyPairCommandError(output, context);
@@ -1969,6 +2080,74 @@ const deserializeAws_restJson1ListStreamsCommandError = async (output, context)
1969
2080
  delete response.Message;
1970
2081
  return Promise.reject(Object.assign(new Error(message), response));
1971
2082
  };
2083
+ const deserializeAws_restJson1ListStreamSessionsCommand = async (output, context) => {
2084
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2085
+ return deserializeAws_restJson1ListStreamSessionsCommandError(output, context);
2086
+ }
2087
+ const contents = {
2088
+ $metadata: deserializeMetadata(output),
2089
+ nextToken: undefined,
2090
+ streamSessions: undefined,
2091
+ };
2092
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2093
+ if (data.nextToken !== undefined && data.nextToken !== null) {
2094
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
2095
+ }
2096
+ if (data.streamSessions !== undefined && data.streamSessions !== null) {
2097
+ contents.streamSessions = deserializeAws_restJson1StreamSessionList(data.streamSessions, context);
2098
+ }
2099
+ return Promise.resolve(contents);
2100
+ };
2101
+ exports.deserializeAws_restJson1ListStreamSessionsCommand = deserializeAws_restJson1ListStreamSessionsCommand;
2102
+ const deserializeAws_restJson1ListStreamSessionsCommandError = async (output, context) => {
2103
+ const parsedOutput = {
2104
+ ...output,
2105
+ body: await parseBody(output.body, context),
2106
+ };
2107
+ let response;
2108
+ let errorCode = "UnknownError";
2109
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2110
+ switch (errorCode) {
2111
+ case "AccessDeniedException":
2112
+ case "com.amazonaws.ivs#AccessDeniedException":
2113
+ response = {
2114
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2115
+ name: errorCode,
2116
+ $metadata: deserializeMetadata(output),
2117
+ };
2118
+ break;
2119
+ case "ResourceNotFoundException":
2120
+ case "com.amazonaws.ivs#ResourceNotFoundException":
2121
+ response = {
2122
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2123
+ name: errorCode,
2124
+ $metadata: deserializeMetadata(output),
2125
+ };
2126
+ break;
2127
+ case "ValidationException":
2128
+ case "com.amazonaws.ivs#ValidationException":
2129
+ response = {
2130
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2131
+ name: errorCode,
2132
+ $metadata: deserializeMetadata(output),
2133
+ };
2134
+ break;
2135
+ default:
2136
+ const parsedBody = parsedOutput.body;
2137
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2138
+ response = {
2139
+ ...parsedBody,
2140
+ name: `${errorCode}`,
2141
+ message: parsedBody.message || parsedBody.Message || errorCode,
2142
+ $fault: "client",
2143
+ $metadata: deserializeMetadata(output),
2144
+ };
2145
+ }
2146
+ const message = response.message || response.Message || errorCode;
2147
+ response.message = message;
2148
+ delete response.Message;
2149
+ return Promise.reject(Object.assign(new Error(message), response));
2150
+ };
1972
2151
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
1973
2152
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1974
2153
  return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
@@ -2536,6 +2715,11 @@ const serializeAws_restJson1S3DestinationConfiguration = (input, context) => {
2536
2715
  ...(input.bucketName !== undefined && input.bucketName !== null && { bucketName: input.bucketName }),
2537
2716
  };
2538
2717
  };
2718
+ const serializeAws_restJson1StreamFilters = (input, context) => {
2719
+ return {
2720
+ ...(input.health !== undefined && input.health !== null && { health: input.health }),
2721
+ };
2722
+ };
2539
2723
  const serializeAws_restJson1StreamKeyArnList = (input, context) => {
2540
2724
  return input
2541
2725
  .filter((e) => e != null)
@@ -2557,6 +2741,14 @@ const serializeAws_restJson1Tags = (input, context) => {
2557
2741
  };
2558
2742
  }, {});
2559
2743
  };
2744
+ const deserializeAws_restJson1AudioConfiguration = (output, context) => {
2745
+ return {
2746
+ channels: smithy_client_1.expectLong(output.channels),
2747
+ codec: smithy_client_1.expectString(output.codec),
2748
+ sampleRate: smithy_client_1.expectLong(output.sampleRate),
2749
+ targetBitrate: smithy_client_1.expectLong(output.targetBitrate),
2750
+ };
2751
+ };
2560
2752
  const deserializeAws_restJson1BatchError = (output, context) => {
2561
2753
  return {
2562
2754
  arn: smithy_client_1.expectString(output.arn),
@@ -2628,6 +2820,16 @@ const deserializeAws_restJson1DestinationConfiguration = (output, context) => {
2628
2820
  : undefined,
2629
2821
  };
2630
2822
  };
2823
+ const deserializeAws_restJson1IngestConfiguration = (output, context) => {
2824
+ return {
2825
+ audio: output.audio !== undefined && output.audio !== null
2826
+ ? deserializeAws_restJson1AudioConfiguration(output.audio, context)
2827
+ : undefined,
2828
+ video: output.video !== undefined && output.video !== null
2829
+ ? deserializeAws_restJson1VideoConfiguration(output.video, context)
2830
+ : undefined,
2831
+ };
2832
+ };
2631
2833
  const deserializeAws_restJson1PlaybackKeyPair = (output, context) => {
2632
2834
  return {
2633
2835
  arn: smithy_client_1.expectString(output.arn),
@@ -2707,9 +2909,29 @@ const deserializeAws_restJson1_Stream = (output, context) => {
2707
2909
  ? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.startTime))
2708
2910
  : undefined,
2709
2911
  state: smithy_client_1.expectString(output.state),
2912
+ streamId: smithy_client_1.expectString(output.streamId),
2710
2913
  viewerCount: smithy_client_1.expectLong(output.viewerCount),
2711
2914
  };
2712
2915
  };
2916
+ const deserializeAws_restJson1StreamEvent = (output, context) => {
2917
+ return {
2918
+ eventTime: output.eventTime !== undefined && output.eventTime !== null
2919
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.eventTime))
2920
+ : undefined,
2921
+ name: smithy_client_1.expectString(output.name),
2922
+ type: smithy_client_1.expectString(output.type),
2923
+ };
2924
+ };
2925
+ const deserializeAws_restJson1StreamEvents = (output, context) => {
2926
+ return (output || [])
2927
+ .filter((e) => e != null)
2928
+ .map((entry) => {
2929
+ if (entry === null) {
2930
+ return null;
2931
+ }
2932
+ return deserializeAws_restJson1StreamEvent(entry, context);
2933
+ });
2934
+ };
2713
2935
  const deserializeAws_restJson1StreamKey = (output, context) => {
2714
2936
  return {
2715
2937
  arn: smithy_client_1.expectString(output.arn),
@@ -2759,6 +2981,51 @@ const deserializeAws_restJson1StreamList = (output, context) => {
2759
2981
  return deserializeAws_restJson1StreamSummary(entry, context);
2760
2982
  });
2761
2983
  };
2984
+ const deserializeAws_restJson1StreamSession = (output, context) => {
2985
+ return {
2986
+ channel: output.channel !== undefined && output.channel !== null
2987
+ ? deserializeAws_restJson1Channel(output.channel, context)
2988
+ : undefined,
2989
+ endTime: output.endTime !== undefined && output.endTime !== null
2990
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.endTime))
2991
+ : undefined,
2992
+ ingestConfiguration: output.ingestConfiguration !== undefined && output.ingestConfiguration !== null
2993
+ ? deserializeAws_restJson1IngestConfiguration(output.ingestConfiguration, context)
2994
+ : undefined,
2995
+ recordingConfiguration: output.recordingConfiguration !== undefined && output.recordingConfiguration !== null
2996
+ ? deserializeAws_restJson1RecordingConfiguration(output.recordingConfiguration, context)
2997
+ : undefined,
2998
+ startTime: output.startTime !== undefined && output.startTime !== null
2999
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.startTime))
3000
+ : undefined,
3001
+ streamId: smithy_client_1.expectString(output.streamId),
3002
+ truncatedEvents: output.truncatedEvents !== undefined && output.truncatedEvents !== null
3003
+ ? deserializeAws_restJson1StreamEvents(output.truncatedEvents, context)
3004
+ : undefined,
3005
+ };
3006
+ };
3007
+ const deserializeAws_restJson1StreamSessionList = (output, context) => {
3008
+ return (output || [])
3009
+ .filter((e) => e != null)
3010
+ .map((entry) => {
3011
+ if (entry === null) {
3012
+ return null;
3013
+ }
3014
+ return deserializeAws_restJson1StreamSessionSummary(entry, context);
3015
+ });
3016
+ };
3017
+ const deserializeAws_restJson1StreamSessionSummary = (output, context) => {
3018
+ return {
3019
+ endTime: output.endTime !== undefined && output.endTime !== null
3020
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.endTime))
3021
+ : undefined,
3022
+ hasErrorEvent: smithy_client_1.expectBoolean(output.hasErrorEvent),
3023
+ startTime: output.startTime !== undefined && output.startTime !== null
3024
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.startTime))
3025
+ : undefined,
3026
+ streamId: smithy_client_1.expectString(output.streamId),
3027
+ };
3028
+ };
2762
3029
  const deserializeAws_restJson1StreamSummary = (output, context) => {
2763
3030
  return {
2764
3031
  channelArn: smithy_client_1.expectString(output.channelArn),
@@ -2767,6 +3034,7 @@ const deserializeAws_restJson1StreamSummary = (output, context) => {
2767
3034
  ? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.startTime))
2768
3035
  : undefined,
2769
3036
  state: smithy_client_1.expectString(output.state),
3037
+ streamId: smithy_client_1.expectString(output.streamId),
2770
3038
  viewerCount: smithy_client_1.expectLong(output.viewerCount),
2771
3039
  };
2772
3040
  };
@@ -2781,6 +3049,18 @@ const deserializeAws_restJson1Tags = (output, context) => {
2781
3049
  };
2782
3050
  }, {});
2783
3051
  };
3052
+ const deserializeAws_restJson1VideoConfiguration = (output, context) => {
3053
+ return {
3054
+ avcLevel: smithy_client_1.expectString(output.avcLevel),
3055
+ avcProfile: smithy_client_1.expectString(output.avcProfile),
3056
+ codec: smithy_client_1.expectString(output.codec),
3057
+ encoder: smithy_client_1.expectString(output.encoder),
3058
+ targetBitrate: smithy_client_1.expectLong(output.targetBitrate),
3059
+ targetFramerate: smithy_client_1.expectLong(output.targetFramerate),
3060
+ videoHeight: smithy_client_1.expectLong(output.videoHeight),
3061
+ videoWidth: smithy_client_1.expectLong(output.videoWidth),
3062
+ };
3063
+ };
2784
3064
  const deserializeMetadata = (output) => {
2785
3065
  var _a;
2786
3066
  return ({
@@ -13,13 +13,18 @@ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
13
13
  const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
14
14
  const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
15
15
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
17
+ const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
16
18
  const getRuntimeConfig = (config) => {
17
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20
+ const defaultsMode = util_defaults_mode_browser_1.resolveDefaultsModeConfig(config);
21
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
18
22
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
19
23
  return {
20
24
  ...clientSharedValues,
21
25
  ...config,
22
26
  runtime: "browser",
27
+ defaultsMode,
23
28
  base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
24
29
  base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
25
30
  bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
@@ -27,8 +32,8 @@ const getRuntimeConfig = (config) => {
27
32
  defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_browser_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
28
33
  maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
29
34
  region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalid_dependency_1.invalidProvider("Region is missing"),
30
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(),
31
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() => Promise.resolve(middleware_retry_1.DEFAULT_RETRY_MODE)),
35
+ requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
+ retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
32
37
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
33
38
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
34
39
  useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
@@ -16,14 +16,17 @@ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
16
16
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
17
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
18
  const smithy_client_1 = require("@aws-sdk/smithy-client");
19
+ const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
19
20
  const getRuntimeConfig = (config) => {
20
21
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
21
- smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
22
+ const defaultsMode = util_defaults_mode_node_1.resolveDefaultsModeConfig(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
24
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
23
25
  return {
24
26
  ...clientSharedValues,
25
27
  ...config,
26
28
  runtime: "node",
29
+ defaultsMode,
27
30
  base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
28
31
  base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
29
32
  bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
@@ -31,8 +34,11 @@ const getRuntimeConfig = (config) => {
31
34
  defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
32
35
  maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
33
36
  region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
34
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
35
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
37
+ requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
38
+ retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig({
39
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
40
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
41
+ }),
36
42
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
37
43
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
38
44
  useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
package/dist-es/Ivs.js CHANGED
@@ -13,12 +13,14 @@ import { GetPlaybackKeyPairCommand, } from "./commands/GetPlaybackKeyPairCommand
13
13
  import { GetRecordingConfigurationCommand, } from "./commands/GetRecordingConfigurationCommand";
14
14
  import { GetStreamCommand } from "./commands/GetStreamCommand";
15
15
  import { GetStreamKeyCommand, } from "./commands/GetStreamKeyCommand";
16
+ import { GetStreamSessionCommand, } from "./commands/GetStreamSessionCommand";
16
17
  import { ImportPlaybackKeyPairCommand, } from "./commands/ImportPlaybackKeyPairCommand";
17
18
  import { ListChannelsCommand, } from "./commands/ListChannelsCommand";
18
19
  import { ListPlaybackKeyPairsCommand, } from "./commands/ListPlaybackKeyPairsCommand";
19
20
  import { ListRecordingConfigurationsCommand, } from "./commands/ListRecordingConfigurationsCommand";
20
21
  import { ListStreamKeysCommand, } from "./commands/ListStreamKeysCommand";
21
22
  import { ListStreamsCommand } from "./commands/ListStreamsCommand";
23
+ import { ListStreamSessionsCommand, } from "./commands/ListStreamSessionsCommand";
22
24
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
23
25
  import { PutMetadataCommand } from "./commands/PutMetadataCommand";
24
26
  import { StopStreamCommand } from "./commands/StopStreamCommand";
@@ -227,6 +229,20 @@ var Ivs = (function (_super) {
227
229
  return this.send(command, optionsOrCb);
228
230
  }
229
231
  };
232
+ Ivs.prototype.getStreamSession = function (args, optionsOrCb, cb) {
233
+ var command = new GetStreamSessionCommand(args);
234
+ if (typeof optionsOrCb === "function") {
235
+ this.send(command, optionsOrCb);
236
+ }
237
+ else if (typeof cb === "function") {
238
+ if (typeof optionsOrCb !== "object")
239
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
240
+ this.send(command, optionsOrCb || {}, cb);
241
+ }
242
+ else {
243
+ return this.send(command, optionsOrCb);
244
+ }
245
+ };
230
246
  Ivs.prototype.importPlaybackKeyPair = function (args, optionsOrCb, cb) {
231
247
  var command = new ImportPlaybackKeyPairCommand(args);
232
248
  if (typeof optionsOrCb === "function") {
@@ -311,6 +327,20 @@ var Ivs = (function (_super) {
311
327
  return this.send(command, optionsOrCb);
312
328
  }
313
329
  };
330
+ Ivs.prototype.listStreamSessions = function (args, optionsOrCb, cb) {
331
+ var command = new ListStreamSessionsCommand(args);
332
+ if (typeof optionsOrCb === "function") {
333
+ this.send(command, optionsOrCb);
334
+ }
335
+ else if (typeof cb === "function") {
336
+ if (typeof optionsOrCb !== "object")
337
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
338
+ this.send(command, optionsOrCb || {}, cb);
339
+ }
340
+ else {
341
+ return this.send(command, optionsOrCb);
342
+ }
343
+ };
314
344
  Ivs.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
315
345
  var command = new ListTagsForResourceCommand(args);
316
346
  if (typeof optionsOrCb === "function") {
@@ -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 { GetStreamSessionRequest, GetStreamSessionResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1GetStreamSessionCommand, serializeAws_restJson1GetStreamSessionCommand, } from "../protocols/Aws_restJson1";
6
+ var GetStreamSessionCommand = (function (_super) {
7
+ __extends(GetStreamSessionCommand, _super);
8
+ function GetStreamSessionCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ GetStreamSessionCommand.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 = "IvsClient";
18
+ var commandName = "GetStreamSessionCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: GetStreamSessionRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: GetStreamSessionResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ GetStreamSessionCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1GetStreamSessionCommand(input, context);
33
+ };
34
+ GetStreamSessionCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1GetStreamSessionCommand(output, context);
36
+ };
37
+ return GetStreamSessionCommand;
38
+ }($Command));
39
+ export { GetStreamSessionCommand };
@@ -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 { ListStreamSessionsRequest, ListStreamSessionsResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1ListStreamSessionsCommand, serializeAws_restJson1ListStreamSessionsCommand, } from "../protocols/Aws_restJson1";
6
+ var ListStreamSessionsCommand = (function (_super) {
7
+ __extends(ListStreamSessionsCommand, _super);
8
+ function ListStreamSessionsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ListStreamSessionsCommand.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 = "IvsClient";
18
+ var commandName = "ListStreamSessionsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ListStreamSessionsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: ListStreamSessionsResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ListStreamSessionsCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1ListStreamSessionsCommand(input, context);
33
+ };
34
+ ListStreamSessionsCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1ListStreamSessionsCommand(output, context);
36
+ };
37
+ return ListStreamSessionsCommand;
38
+ }($Command));
39
+ export { ListStreamSessionsCommand };
@@ -12,11 +12,13 @@ export * from "./GetPlaybackKeyPairCommand";
12
12
  export * from "./GetRecordingConfigurationCommand";
13
13
  export * from "./GetStreamCommand";
14
14
  export * from "./GetStreamKeyCommand";
15
+ export * from "./GetStreamSessionCommand";
15
16
  export * from "./ImportPlaybackKeyPairCommand";
16
17
  export * from "./ListChannelsCommand";
17
18
  export * from "./ListPlaybackKeyPairsCommand";
18
19
  export * from "./ListRecordingConfigurationsCommand";
19
20
  export * from "./ListStreamKeysCommand";
21
+ export * from "./ListStreamSessionsCommand";
20
22
  export * from "./ListStreamsCommand";
21
23
  export * from "./ListTagsForResourceCommand";
22
24
  export * from "./PutMetadataCommand";
@@ -12,6 +12,7 @@ var partitionHash = {
12
12
  "ap-south-1",
13
13
  "ap-southeast-1",
14
14
  "ap-southeast-2",
15
+ "ap-southeast-3",
15
16
  "ca-central-1",
16
17
  "eu-central-1",
17
18
  "eu-north-1",