searchDirectGroups method
Searches direct groups of a member.
Request parameters:
parent
-
Resource name of
the group to search transitive memberships in. Format: groups/{group_id},
where group_id is always '-' as this API will search across all groups for
a given member.
Value must have pattern ^groups/\[^/\]+$
.
orderBy
- The ordering of membership relation for the display name or
email in the response. The syntax for this field can be found at
https://cloud.google.com/apis/design/design_patterns#sorting_order.
Example: Sort by the ascending display name: order_by="group_name" or
order_by="group_name asc". Sort by the descending display name:
order_by="group_name desc". Sort by the ascending group key:
order_by="group_key" or order_by="group_key asc". Sort by the descending
group key: order_by="group_key desc".
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). 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' && 'label_value' in labels
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SearchDirectGroupsResponse.
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<SearchDirectGroupsResponse> searchDirectGroups(
core.String parent, {
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? query,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (orderBy != null) 'orderBy': [orderBy],
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:searchDirectGroups';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SearchDirectGroupsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}