class Roles extends Resource (View source)

The "roles" collection of methods.

Typical usage is:

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

Methods

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

Deletes a role. (roles.delete)

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

Retrieves a role. (roles.get)

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

Creates a role. (roles.insert)

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

Retrieves a paginated list of all the roles in a domain. (roles.listRoles)

patch(string $customer, string $roleId, Role $postBody, array $optParams = [])

Patches a role. (roles.patch)

update(string $customer, string $roleId, Role $postBody, array $optParams = [])

Updates a role. (roles.update)

Details

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

Deletes a role. (roles.delete)

Parameters

string $customer

Immutable ID of the Google Workspace account.

string $roleId

Immutable ID of the role.

array $optParams

Optional parameters.

Exceptions

Exception

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

Retrieves a role. (roles.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 $roleId

Immutable ID of the role.

array $optParams

Optional parameters.

Return Value

Role

Exceptions

Exception

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

Creates a role. (roles.insert)

Parameters

string $customer

Immutable ID of the Google Workspace account.

Role $postBody
array $optParams

Optional parameters.

Return Value

Role

Exceptions

Exception

Roles listRoles(string $customer, array $optParams = [])

Retrieves a paginated list of all the roles in a domain. (roles.listRoles)

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

Roles

Exceptions

Exception

Role patch(string $customer, string $roleId, Role $postBody, array $optParams = [])

Patches a role. (roles.patch)

Parameters

string $customer

Immutable ID of the Google Workspace account.

string $roleId

Immutable ID of the role.

Role $postBody
array $optParams

Optional parameters.

Return Value

Role

Exceptions

Exception

Role update(string $customer, string $roleId, Role $postBody, array $optParams = [])

Updates a role. (roles.update)

Parameters

string $customer

Immutable ID of the Google Workspace account.

string $roleId

Immutable ID of the role.

Role $postBody
array $optParams

Optional parameters.

Return Value

Role

Exceptions

Exception