startViewerSessionRevocation method
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. For instructions on associating a viewer ID with a viewer session, see Setting Up Private Channels.
May throw AccessDeniedException.
May throw InternalServerException.
May throw PendingVerification.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter channelArn :
The ARN of the channel associated with the viewer session to revoke.
Parameter viewerId :
The ID of the viewer associated with the viewer session to revoke. Do not
use this field for personally identifying, confidential, or sensitive
information.
Parameter viewerSessionVersionsLessThanOrEqualTo :
An optional filter on which versions of the viewer session to revoke. All
versions less than or equal to the specified version will be revoked.
Default: 0.
Implementation
Future<void> startViewerSessionRevocation({
required String channelArn,
required String viewerId,
int? viewerSessionVersionsLessThanOrEqualTo,
}) async {
_s.validateNumRange(
'viewerSessionVersionsLessThanOrEqualTo',
viewerSessionVersionsLessThanOrEqualTo,
0,
1152921504606846976,
);
final $payload = <String, dynamic>{
'channelArn': channelArn,
'viewerId': viewerId,
if (viewerSessionVersionsLessThanOrEqualTo != null)
'viewerSessionVersionsLessThanOrEqualTo':
viewerSessionVersionsLessThanOrEqualTo,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/StartViewerSessionRevocation',
exceptionFnMap: _exceptionFns,
);
}