class Members extends Resource (View source)

The "members" collection of methods.

Typical usage is:

 $adminService = new Google\Service\Directory(...);
 $members = $adminService->members;

Methods

delete(string $groupKey, string $memberKey, array $optParams = [])

Removes a member from a group. (members.delete)

get(string $groupKey, string $memberKey, array $optParams = [])

Retrieves a group member's properties. (members.get)

hasMember(string $groupKey, string $memberKey, array $optParams = [])

Checks whether the given user is a member of the group. Membership can be direct or nested, but if nested, the memberKey and groupKey must be entities in the same domain or an Invalid input error is returned. To check for nested memberships that include entities outside of the group's domain, use the checkTransitiveMembership() method in the Cloud Identity Groups API. (members.hasMember)

insert(string $groupKey, Member $postBody, array $optParams = [])

Adds a user to the specified group. (members.insert)

listMembers(string $groupKey, array $optParams = [])

Retrieves a paginated list of all members in a group. This method times out after 60 minutes. For more information, see Troubleshoot error codes. (members.listMembers)

patch(string $groupKey, string $memberKey, Member $postBody, array $optParams = [])

Updates the membership properties of a user in the specified group. This method supports patch semantics. (members.patch)

update(string $groupKey, string $memberKey, Member $postBody, array $optParams = [])

Updates the membership of a user in the specified group. (members.update)

Details

delete(string $groupKey, string $memberKey, array $optParams = [])

Removes a member from a group. (members.delete)

Parameters

string $groupKey

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

string $memberKey

Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

array $optParams

Optional parameters.

Exceptions

Exception

Member get(string $groupKey, string $memberKey, array $optParams = [])

Retrieves a group member's properties. (members.get)

Parameters

string $groupKey

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

string $memberKey

Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

array $optParams

Optional parameters.

Return Value

Member

Exceptions

Exception

MembersHasMember hasMember(string $groupKey, string $memberKey, array $optParams = [])

Checks whether the given user is a member of the group. Membership can be direct or nested, but if nested, the memberKey and groupKey must be entities in the same domain or an Invalid input error is returned. To check for nested memberships that include entities outside of the group's domain, use the checkTransitiveMembership() method in the Cloud Identity Groups API. (members.hasMember)

Parameters

string $groupKey

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

string $memberKey

Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.

array $optParams

Optional parameters.

Return Value

MembersHasMember

Exceptions

Exception

Member insert(string $groupKey, Member $postBody, array $optParams = [])

Adds a user to the specified group. (members.insert)

Parameters

string $groupKey

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Member $postBody
array $optParams

Optional parameters.

Return Value

Member

Exceptions

Exception

Members listMembers(string $groupKey, array $optParams = [])

Retrieves a paginated list of all members in a group. This method times out after 60 minutes. For more information, see Troubleshoot error codes. (members.listMembers)

Parameters

string $groupKey

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

array $optParams

Optional parameters.

Return Value

Members

Exceptions

Exception

Member patch(string $groupKey, string $memberKey, Member $postBody, array $optParams = [])

Updates the membership properties of a user in the specified group. This method supports patch semantics. (members.patch)

Parameters

string $groupKey

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

string $memberKey

Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

Member $postBody
array $optParams

Optional parameters.

Return Value

Member

Exceptions

Exception

Member update(string $groupKey, string $memberKey, Member $postBody, array $optParams = [])

Updates the membership of a user in the specified group. (members.update)

Parameters

string $groupKey

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

string $memberKey

Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

Member $postBody
array $optParams

Optional parameters.

Return Value

Member

Exceptions

Exception