class RoleAssignments extends Resource (View source)

The "roleAssignments" collection of methods.

Typical usage is:

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

Methods

delete(string $customer, string $roleAssignmentId, array $optParams = [])

Deletes a role assignment. (roleAssignments.delete)

get(string $customer, string $roleAssignmentId, array $optParams = [])

Retrieves a role assignment. (roleAssignments.get)

insert(string $customer, RoleAssignment $postBody, array $optParams = [])

Creates a role assignment. (roleAssignments.insert)

listRoleAssignments(string $customer, array $optParams = [])

Retrieves a paginated list of all roleAssignments.

Details

delete(string $customer, string $roleAssignmentId, array $optParams = [])

Deletes a role assignment. (roleAssignments.delete)

Parameters

string $customer

Immutable ID of the Google Workspace account.

string $roleAssignmentId

Immutable ID of the role assignment.

array $optParams

Optional parameters.

Exceptions

Exception

RoleAssignment get(string $customer, string $roleAssignmentId, array $optParams = [])

Retrieves a role assignment. (roleAssignments.get)

Parameters

string $customer

The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

string $roleAssignmentId

Immutable ID of the role assignment.

array $optParams

Optional parameters.

Return Value

RoleAssignment

Exceptions

Exception

RoleAssignment insert(string $customer, RoleAssignment $postBody, array $optParams = [])

Creates a role assignment. (roleAssignments.insert)

Parameters

string $customer

Immutable ID of the Google Workspace account.

RoleAssignment $postBody
array $optParams

Optional parameters.

Return Value

RoleAssignment

Exceptions

Exception

RoleAssignments listRoleAssignments(string $customer, array $optParams = [])

Retrieves a paginated list of all roleAssignments.

(roleAssignments.listRoleAssignments)

Parameters

string $customer

The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

array $optParams

Optional parameters.

Return Value

RoleAssignments

Exceptions

Exception