searchTransitiveGroups method
Search transitive groups of a member.
Note: This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium accounts. If the account of the member is not one of these, a 403 (PERMISSION_DENIED) HTTP status code will be returned. A transitive group is any group that has a direct or indirect membership to the member. Actor must have view permissions all transitive groups.
Request parameters:
parent -
Resource name of
the group to search transitive memberships in. Format: groups/{group},
where group is always '-' as this API will search across all groups for
a given member.
Value must have pattern ^groups/\[^/\]+$.
pageSize - The default page size is 200 (max 1000).
pageToken - The next_page_token value returned from a previous list
request, if any.
query - Required. A CEL expression that MUST include member
specification AND label(s). This is a required field. Users can search
on label attributes of groups. CONTAINS match ('in') is supported on
labels. Identity-mapped groups are uniquely identified by both a
member_key_id and a member_key_namespace, which requires an additional
query input: member_key_namespace. Example query: member_key_id == 'member_key_id_value' && in labels Query may optionally contain equality
operators on the parent of the group restricting the search within a
particular customer, e.g. parent == 'customers/{customer_id}'. The
customer_id must begin with "C" (for example, 'C046psxkn'). This
filtering is only supported for Admins with groups read permissions on the
input customer. Example query: member_key_id == 'member_key_id_value' && in labels && parent == 'customers/C046psxkn'
$fields - Selector specifying which fields to include in a partial
response.
Completes with a SearchTransitiveGroupsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<SearchTransitiveGroupsResponse> searchTransitiveGroups(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? query,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (query != null) 'query': [query],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' +
core.Uri.encodeFull('$parent') +
'/memberships:searchTransitiveGroups';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SearchTransitiveGroupsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}