class Orgunits extends Resource (View source)

The "orgunits" collection of methods.

Typical usage is:

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

Methods

delete(string $customerId, string $orgUnitPath, array $optParams = [])

Removes an organizational unit. (orgunits.delete)

get(string $customerId, string $orgUnitPath, array $optParams = [])

Retrieves an organizational unit. (orgunits.get)

insert(string $customerId, OrgUnit $postBody, array $optParams = [])

Adds an organizational unit. (orgunits.insert)

listOrgunits(string $customerId, array $optParams = [])

Retrieves a list of all organizational units for an account.

patch(string $customerId, string $orgUnitPath, OrgUnit $postBody, array $optParams = [])

Updates an organizational unit. This method supports patch semantics (orgunits.patch)

update(string $customerId, string $orgUnitPath, OrgUnit $postBody, array $optParams = [])

Updates an organizational unit. (orgunits.update)

Details

delete(string $customerId, string $orgUnitPath, array $optParams = [])

Removes an organizational unit. (orgunits.delete)

Parameters

string $customerId

The unique ID for the customer's Google Workspace account. As an account administrator, 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.

string $orgUnitPath

The full path of the organizational unit (minus the leading /) or its unique ID.

array $optParams

Optional parameters.

Exceptions

Exception

OrgUnit get(string $customerId, string $orgUnitPath, array $optParams = [])

Retrieves an organizational unit. (orgunits.get)

Parameters

string $customerId

The unique ID for the customer's Google Workspace account. As an account administrator, 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.

string $orgUnitPath

The full path of the organizational unit (minus the leading /) or its unique ID.

array $optParams

Optional parameters.

Return Value

OrgUnit

Exceptions

Exception

OrgUnit insert(string $customerId, OrgUnit $postBody, array $optParams = [])

Adds an organizational unit. (orgunits.insert)

Parameters

string $customerId

The unique ID for the customer's Google Workspace account. As an account administrator, 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.

OrgUnit $postBody
array $optParams

Optional parameters.

Return Value

OrgUnit

Exceptions

Exception

OrgUnits listOrgunits(string $customerId, array $optParams = [])

Retrieves a list of all organizational units for an account.

(orgunits.listOrgunits)

Parameters

string $customerId

The unique ID for the customer's Google Workspace account. As an account administrator, 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.

array $optParams

Optional parameters.

Return Value

OrgUnits

Exceptions

Exception

OrgUnit patch(string $customerId, string $orgUnitPath, OrgUnit $postBody, array $optParams = [])

Updates an organizational unit. This method supports patch semantics (orgunits.patch)

Parameters

string $customerId

The unique ID for the customer's Google Workspace account. As an account administrator, 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.

string $orgUnitPath

The full path of the organizational unit (minus the leading /) or its unique ID.

OrgUnit $postBody
array $optParams

Optional parameters.

Return Value

OrgUnit

Exceptions

Exception

OrgUnit update(string $customerId, string $orgUnitPath, OrgUnit $postBody, array $optParams = [])

Updates an organizational unit. (orgunits.update)

Parameters

string $customerId

The unique ID for the customer's Google Workspace account. As an account administrator, 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.

string $orgUnitPath

The full path of the organizational unit (minus the leading /) or its unique ID.

OrgUnit $postBody
array $optParams

Optional parameters.

Return Value

OrgUnit

Exceptions

Exception