Skip to content

BatchStartViewerSessionRevocation

Source: src/AWS/IVS/BatchStartViewerSessionRevocation.ts

Runtime binding for ivs:BatchStartViewerSessionRevocation.

Starts revoking viewer sessions for up to 20 channel-ARN/viewer-ID pairs in one call — the multi-channel form of StartViewerSessionRevocation (e.g. kicking a banned viewer off every channel they are watching). Per-pair failures are reported in the response’s errors array rather than failing the whole call. The operation spans many channels, so it is account-scoped. Provide the implementation with Effect.provide(AWS.IVS.BatchStartViewerSessionRevocationHttp).

// init — bind the account-level operation
const revokeViewerSessions =
yield* AWS.IVS.BatchStartViewerSessionRevocation();
// runtime
const { errors } = yield* revokeViewerSessions({
viewerSessions: [
{ channelArn: channelA, viewerId: "banned-viewer" },
{ channelArn: channelB, viewerId: "banned-viewer" },
],
});