listChannelsModeratedByAppInstanceUser method
A list of the channels moderated by an AppInstanceUser.
May throw BadRequestException.
May throw ForbiddenException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter chimeBearer :
The ARN of the AppInstanceUser or AppInstanceBot
that makes the API call.
Parameter appInstanceUserArn :
The ARN of the user or bot in the moderated channel.
Parameter maxResults :
The maximum number of channels in the request.
Parameter nextToken :
The token returned from previous API requests until the number of channels
moderated by the user is reached.
Implementation
Future<ListChannelsModeratedByAppInstanceUserResponse>
listChannelsModeratedByAppInstanceUser({
required String chimeBearer,
String? appInstanceUserArn,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final headers = <String, String>{
'x-amz-chime-bearer': chimeBearer.toString(),
};
final $query = <String, List<String>>{
if (appInstanceUserArn != null)
'app-instance-user-arn': [appInstanceUserArn],
if (maxResults != null) 'max-results': [maxResults.toString()],
if (nextToken != null) 'next-token': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/channels?scope=app-instance-user-moderated-channels',
queryParams: $query,
headers: headers,
exceptionFnMap: _exceptionFns,
);
return ListChannelsModeratedByAppInstanceUserResponse.fromJson(response);
}