listChannelsModeratedByAppInstanceUser method

Future<ListChannelsModeratedByAppInstanceUserResponse> listChannelsModeratedByAppInstanceUser({
  1. String? appInstanceUserArn,
  2. int? maxResults,
  3. String? nextToken,
})

A list of the channels moderated by an app instance user.

May throw BadRequestException. May throw ForbiddenException. May throw UnauthorizedClientException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter appInstanceUserArn : The ARN of the user 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({
  String? appInstanceUserArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateStringLength(
    'appInstanceUserArn',
    appInstanceUserArn,
    5,
    1600,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    2048,
  );
  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,
    exceptionFnMap: _exceptionFns,
  );
  return ListChannelsModeratedByAppInstanceUserResponse.fromJson(response);
}