Skip to content

Commit

Permalink
feat(client-ivs): IVS customers can now revoke the viewer session ass…
Browse files Browse the repository at this point in the history
…ociated with an auth token, to prevent and stop playback using that token.
  • Loading branch information
awstools committed Jun 27, 2023
1 parent 5410b90 commit 5e12ed4
Show file tree
Hide file tree
Showing 10 changed files with 985 additions and 34 deletions.
30 changes: 29 additions & 1 deletion clients/client-ivs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ allowed.</p>
</li>
</ul>
<p>
<b>PlaybackKeyPair Endpoints</b>
<b>Private Channel Endpoints</b>
</p>
<p>For more information, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/private-channels.html">Setting Up Private Channels</a> in the
<i>Amazon IVS User Guide</i>.</p>
Expand Down Expand Up @@ -287,6 +287,18 @@ key pairs.</p>
pair. This invalidates future viewer tokens generated using the key pair’s
<code>privateKey</code>.</p>
</li>
<li>
<p>
<a>StartViewerSessionRevocation</a> — Starts the process of revoking
the viewer session associated with a specified channel ARN and viewer ID. Optionally, you
can provide a version to revoke viewer sessions less than and including that
version.</p>
</li>
<li>
<p>
<a>BatchStartViewerSessionRevocation</a> — Performs <a>StartViewerSessionRevocation</a> on multiple channel ARN and viewer ID pairs
simultaneously.</p>
</li>
</ul>
<p>
<b>RecordingConfiguration Endpoints</b>
Expand Down Expand Up @@ -544,6 +556,14 @@ BatchGetStreamKey

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/classes/batchgetstreamkeycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/interfaces/batchgetstreamkeycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/interfaces/batchgetstreamkeycommandoutput.html)

</details>
<details>
<summary>
BatchStartViewerSessionRevocation
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/classes/batchstartviewersessionrevocationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/interfaces/batchstartviewersessionrevocationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/interfaces/batchstartviewersessionrevocationcommandoutput.html)

</details>
<details>
<summary>
Expand Down Expand Up @@ -720,6 +740,14 @@ PutMetadata

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/classes/putmetadatacommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/interfaces/putmetadatacommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/interfaces/putmetadatacommandoutput.html)

</details>
<details>
<summary>
StartViewerSessionRevocation
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/classes/startviewersessionrevocationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/interfaces/startviewersessionrevocationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ivs/interfaces/startviewersessionrevocationcommandoutput.html)

</details>
<details>
<summary>
Expand Down
60 changes: 59 additions & 1 deletion clients/client-ivs/src/Ivs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import {
BatchGetStreamKeyCommandInput,
BatchGetStreamKeyCommandOutput,
} from "./commands/BatchGetStreamKeyCommand";
import {
BatchStartViewerSessionRevocationCommand,
BatchStartViewerSessionRevocationCommandInput,
BatchStartViewerSessionRevocationCommandOutput,
} from "./commands/BatchStartViewerSessionRevocationCommand";
import {
CreateChannelCommand,
CreateChannelCommandInput,
Expand Down Expand Up @@ -106,6 +111,11 @@ import {
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import { PutMetadataCommand, PutMetadataCommandInput, PutMetadataCommandOutput } from "./commands/PutMetadataCommand";
import {
StartViewerSessionRevocationCommand,
StartViewerSessionRevocationCommandInput,
StartViewerSessionRevocationCommandOutput,
} from "./commands/StartViewerSessionRevocationCommand";
import { StopStreamCommand, StopStreamCommandInput, StopStreamCommandOutput } from "./commands/StopStreamCommand";
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import {
Expand All @@ -123,6 +133,7 @@ import { IvsClient, IvsClientConfig } from "./IvsClient";
const commands = {
BatchGetChannelCommand,
BatchGetStreamKeyCommand,
BatchStartViewerSessionRevocationCommand,
CreateChannelCommand,
CreateRecordingConfigurationCommand,
CreateStreamKeyCommand,
Expand All @@ -145,6 +156,7 @@ const commands = {
ListStreamSessionsCommand,
ListTagsForResourceCommand,
PutMetadataCommand,
StartViewerSessionRevocationCommand,
StopStreamCommand,
TagResourceCommand,
UntagResourceCommand,
Expand Down Expand Up @@ -183,6 +195,23 @@ export interface Ivs {
cb: (err: any, data?: BatchGetStreamKeyCommandOutput) => void
): void;

/**
* @see {@link BatchStartViewerSessionRevocationCommand}
*/
batchStartViewerSessionRevocation(
args: BatchStartViewerSessionRevocationCommandInput,
options?: __HttpHandlerOptions
): Promise<BatchStartViewerSessionRevocationCommandOutput>;
batchStartViewerSessionRevocation(
args: BatchStartViewerSessionRevocationCommandInput,
cb: (err: any, data?: BatchStartViewerSessionRevocationCommandOutput) => void
): void;
batchStartViewerSessionRevocation(
args: BatchStartViewerSessionRevocationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: BatchStartViewerSessionRevocationCommandOutput) => void
): void;

/**
* @see {@link CreateChannelCommand}
*/
Expand Down Expand Up @@ -500,6 +529,23 @@ export interface Ivs {
cb: (err: any, data?: PutMetadataCommandOutput) => void
): void;

/**
* @see {@link StartViewerSessionRevocationCommand}
*/
startViewerSessionRevocation(
args: StartViewerSessionRevocationCommandInput,
options?: __HttpHandlerOptions
): Promise<StartViewerSessionRevocationCommandOutput>;
startViewerSessionRevocation(
args: StartViewerSessionRevocationCommandInput,
cb: (err: any, data?: StartViewerSessionRevocationCommandOutput) => void
): void;
startViewerSessionRevocation(
args: StartViewerSessionRevocationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartViewerSessionRevocationCommandOutput) => void
): void;

/**
* @see {@link StopStreamCommand}
*/
Expand Down Expand Up @@ -797,7 +843,7 @@ export interface Ivs {
* </li>
* </ul>
* <p>
* <b>PlaybackKeyPair Endpoints</b>
* <b>Private Channel Endpoints</b>
* </p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/private-channels.html">Setting Up Private Channels</a> in the
* <i>Amazon IVS User Guide</i>.</p>
Expand Down Expand Up @@ -828,6 +874,18 @@ export interface Ivs {
* pair. This invalidates future viewer tokens generated using the key pair’s
* <code>privateKey</code>.</p>
* </li>
* <li>
* <p>
* <a>StartViewerSessionRevocation</a> — Starts the process of revoking
* the viewer session associated with a specified channel ARN and viewer ID. Optionally, you
* can provide a version to revoke viewer sessions less than and including that
* version.</p>
* </li>
* <li>
* <p>
* <a>BatchStartViewerSessionRevocation</a> — Performs <a>StartViewerSessionRevocation</a> on multiple channel ARN and viewer ID pairs
* simultaneously.</p>
* </li>
* </ul>
* <p>
* <b>RecordingConfiguration Endpoints</b>
Expand Down
26 changes: 25 additions & 1 deletion clients/client-ivs/src/IvsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ import {

import { BatchGetChannelCommandInput, BatchGetChannelCommandOutput } from "./commands/BatchGetChannelCommand";
import { BatchGetStreamKeyCommandInput, BatchGetStreamKeyCommandOutput } from "./commands/BatchGetStreamKeyCommand";
import {
BatchStartViewerSessionRevocationCommandInput,
BatchStartViewerSessionRevocationCommandOutput,
} from "./commands/BatchStartViewerSessionRevocationCommand";
import { CreateChannelCommandInput, CreateChannelCommandOutput } from "./commands/CreateChannelCommand";
import {
CreateRecordingConfigurationCommandInput,
Expand Down Expand Up @@ -99,6 +103,10 @@ import {
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import { PutMetadataCommandInput, PutMetadataCommandOutput } from "./commands/PutMetadataCommand";
import {
StartViewerSessionRevocationCommandInput,
StartViewerSessionRevocationCommandOutput,
} from "./commands/StartViewerSessionRevocationCommand";
import { StopStreamCommandInput, StopStreamCommandOutput } from "./commands/StopStreamCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
Expand All @@ -119,6 +127,7 @@ export { __Client };
export type ServiceInputTypes =
| BatchGetChannelCommandInput
| BatchGetStreamKeyCommandInput
| BatchStartViewerSessionRevocationCommandInput
| CreateChannelCommandInput
| CreateRecordingConfigurationCommandInput
| CreateStreamKeyCommandInput
Expand All @@ -141,6 +150,7 @@ export type ServiceInputTypes =
| ListStreamsCommandInput
| ListTagsForResourceCommandInput
| PutMetadataCommandInput
| StartViewerSessionRevocationCommandInput
| StopStreamCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput
Expand All @@ -152,6 +162,7 @@ export type ServiceInputTypes =
export type ServiceOutputTypes =
| BatchGetChannelCommandOutput
| BatchGetStreamKeyCommandOutput
| BatchStartViewerSessionRevocationCommandOutput
| CreateChannelCommandOutput
| CreateRecordingConfigurationCommandOutput
| CreateStreamKeyCommandOutput
Expand All @@ -174,6 +185,7 @@ export type ServiceOutputTypes =
| ListStreamsCommandOutput
| ListTagsForResourceCommandOutput
| PutMetadataCommandOutput
| StartViewerSessionRevocationCommandOutput
| StopStreamCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput
Expand Down Expand Up @@ -593,7 +605,7 @@ export interface IvsClientResolvedConfig extends IvsClientResolvedConfigType {}
* </li>
* </ul>
* <p>
* <b>PlaybackKeyPair Endpoints</b>
* <b>Private Channel Endpoints</b>
* </p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/private-channels.html">Setting Up Private Channels</a> in the
* <i>Amazon IVS User Guide</i>.</p>
Expand Down Expand Up @@ -624,6 +636,18 @@ export interface IvsClientResolvedConfig extends IvsClientResolvedConfigType {}
* pair. This invalidates future viewer tokens generated using the key pair’s
* <code>privateKey</code>.</p>
* </li>
* <li>
* <p>
* <a>StartViewerSessionRevocation</a> — Starts the process of revoking
* the viewer session associated with a specified channel ARN and viewer ID. Optionally, you
* can provide a version to revoke viewer sessions less than and including that
* version.</p>
* </li>
* <li>
* <p>
* <a>BatchStartViewerSessionRevocation</a> — Performs <a>StartViewerSessionRevocation</a> on multiple channel ARN and viewer ID pairs
* simultaneously.</p>
* </li>
* </ul>
* <p>
* <b>RecordingConfiguration Endpoints</b>
Expand Down
Loading

0 comments on commit 5e12ed4

Please sign in to comment.