getMembershipGraph method
Get a membership graph of just a member or both a member and a group.
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. Given a member, the response will contain all membership paths from the member. Given both a group and a member, the response will contain all membership paths between the group and the member.
Request parameters:
parent
- Required.
Resource name of
the group to search transitive memberships in. Format: groups/{group}
,
where group
is the unique ID assigned to the Group to which the
Membership belongs to. group can be a wildcard collection id "-". When a
group is specified, the membership graph will be constrained to paths
between the member (defined in the query) and the parent. If a wildcard
collection is provided, all membership paths connected to the member will
be returned.
Value must have pattern ^groups/\[^/\]+$
.
query
- Required. A CEL expression that MUST include member
specification AND label(s). Certain 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
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Operation.
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<Operation> getMembershipGraph(
core.String parent, {
core.String? query,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (query != null) 'query': [query],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' +
core.Uri.encodeFull('$parent') +
'/memberships:getMembershipGraph';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}