listChannelMembershipsForAppInstanceUser method
Future<ListChannelMembershipsForAppInstanceUserResponse>
listChannelMembershipsForAppInstanceUser({})
Lists all channels that a particular AppInstanceUser
is a
part of. Only an AppInstanceAdmin
can call the API with a
user ARN that is not their own.
May throw BadRequestException. May throw ForbiddenException. May throw UnauthorizedClientException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.
Parameter appInstanceUserArn
:
The ARN of the app instance users
Parameter maxResults
:
The maximum number of users that you want returned.
Parameter nextToken
:
The token returned from previous API requests until the number of channel
memberships is reached.
Implementation
Future<ListChannelMembershipsForAppInstanceUserResponse>
listChannelMembershipsForAppInstanceUser({
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-memberships',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListChannelMembershipsForAppInstanceUserResponse.fromJson(response);
}