batchStartViewerSessionRevocation method
Future<BatchStartViewerSessionRevocationResponse>
batchStartViewerSessionRevocation({
- required List<
BatchStartViewerSessionRevocationViewerSession> viewerSessions,
Performs StartViewerSessionRevocation on multiple channel ARN and viewer ID pairs simultaneously.
May throw AccessDeniedException.
May throw PendingVerification.
May throw ThrottlingException.
May throw ValidationException.
Parameter viewerSessions :
Array of viewer sessions, one per channel-ARN and viewer-ID pair.
Implementation
Future<BatchStartViewerSessionRevocationResponse>
batchStartViewerSessionRevocation({
required List<BatchStartViewerSessionRevocationViewerSession>
viewerSessions,
}) async {
final $payload = <String, dynamic>{
'viewerSessions': viewerSessions,
};
final response = await _protocol.sendRaw(
payload: $payload,
method: 'POST',
requestUri: '/BatchStartViewerSessionRevocation',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return BatchStartViewerSessionRevocationResponse(
errors: ($json['errors'] as List?)
?.nonNulls
.map((e) => BatchStartViewerSessionRevocationError.fromJson(
e as Map<String, dynamic>))
.toList(),
accessControlAllowOrigin: _s.extractHeaderStringValue(
response.headers, 'Access-Control-Allow-Origin'),
accessControlExposeHeaders: _s.extractHeaderStringValue(
response.headers, 'Access-Control-Expose-Headers'),
cacheControl:
_s.extractHeaderStringValue(response.headers, 'Cache-Control'),
contentSecurityPolicy: _s.extractHeaderStringValue(
response.headers, 'Content-Security-Policy'),
strictTransportSecurity: _s.extractHeaderStringValue(
response.headers, 'Strict-Transport-Security'),
xContentTypeOptions: _s.extractHeaderStringValue(
response.headers, 'X-Content-Type-Options'),
xFrameOptions:
_s.extractHeaderStringValue(response.headers, 'X-Frame-Options'),
);
}