checkTransitiveMembership method

Future<CheckTransitiveMembershipResponse> checkTransitiveMembership(
  1. String parent, {
  2. String? query,
  3. String? $fields,
})

Check a potential member for membership in 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. A member has membership to a group as long as there is a single viewable transitive membership between the group and the member. The actor must have view permissions to at least one transitive membership between the member and group.

Request parameters:

parent - Resource name of the group to check the transitive membership in. Format: groups/{group}, where group is the unique id assigned to the Group to which the Membership belongs to. Value must have pattern ^groups/\[^/\]+$.

query - Required. A CEL expression that MUST include member specification. This is a required field. 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'

$fields - Selector specifying which fields to include in a partial response.

Completes with a CheckTransitiveMembershipResponse.

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<CheckTransitiveMembershipResponse> checkTransitiveMembership(
  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:checkTransitiveMembership';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return CheckTransitiveMembershipResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}