listUsersByPermissionGroup method
Lists details of all the users in a specific permission group.
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 permissionGroupId :
The unique identifier for the permission group.
Parameter nextToken :
A token that indicates where a results page should begin.
Implementation
Future<ListUsersByPermissionGroupResponse> listUsersByPermissionGroup({
required int maxResults,
required String permissionGroupId,
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:
'/permission-group/${Uri.encodeComponent(permissionGroupId)}/users',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListUsersByPermissionGroupResponse.fromJson(response);
}