listPermissionGroupsByUser method
Lists all the permission groups that are associated with a specific user.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results per page.
Parameter userId :
The unique identifier for the user.
Parameter nextToken :
A token that indicates where a results page should begin.
Implementation
Future<ListPermissionGroupsByUserResponse> listPermissionGroupsByUser({
required int maxResults,
required String userId,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
isRequired: true,
);
final $query = <String, List<String>>{
'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/user/${Uri.encodeComponent(userId)}/permission-groups',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListPermissionGroupsByUserResponse.fromJson(response);
}