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