batchGetStreamKey method
Performs GetStreamKey on multiple ARNs simultaneously.
May throw AccessDeniedException.
May throw ServiceUnavailable.
May throw ValidationException.
Parameter arns :
Array of ARNs, one per stream key.
Implementation
Future<BatchGetStreamKeyResponse> batchGetStreamKey({
required List<String> arns,
}) async {
final $payload = <String, dynamic>{
'arns': arns,
};
final response = await _protocol.sendRaw(
payload: $payload,
method: 'POST',
requestUri: '/BatchGetStreamKey',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return BatchGetStreamKeyResponse(
errors: ($json['errors'] as List?)
?.nonNulls
.map((e) => BatchError.fromJson(e as Map<String, dynamic>))
.toList(),
streamKeys: ($json['streamKeys'] as List?)
?.nonNulls
.map((e) => StreamKey.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'),
);
}