listGroupsForMember method
Returns group information for the specified member.
This operation supports pagination with the use of the
NextToken request and response parameters. If more results
are available, the ListGroupsForMember.NextToken member
contains a token that you pass in the next call to
ListGroupsForMember. This retrieves the next set of items.
You can also specify a maximum number of return results with the
MaxResults parameter.
May throw AccessDeniedException.
May throw DirectoryUnavailableException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter directoryId :
The identifier (ID) of the directory that's associated with the member.
Parameter sAMAccountName :
The SAMAccountName of the user, group, or computer that's a
member of the group.
Parameter maxResults :
The maximum number of results to be returned per request.
Parameter memberRealm :
The domain name that's associated with the group member.
This parameter is case insensitive and defaults to Realm
Parameter nextToken :
An encoded paging token for paginated calls that can be passed back to
retrieve the next page.
Parameter realm :
The domain name that's associated with the group.
This value is case insensitive and defaults to your Managed Microsoft AD domain.
Implementation
Future<ListGroupsForMemberResult> listGroupsForMember({
required String directoryId,
required String sAMAccountName,
int? maxResults,
String? memberRealm,
String? nextToken,
String? realm,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
'DirectoryId': [directoryId],
};
final $payload = <String, dynamic>{
'SAMAccountName': sAMAccountName,
if (maxResults != null) 'MaxResults': maxResults,
if (memberRealm != null) 'MemberRealm': memberRealm,
if (nextToken != null) 'NextToken': nextToken,
if (realm != null) 'Realm': realm,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/GroupMemberships/ListGroupsForMember',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListGroupsForMemberResult.fromJson(response);
}