class Permissions extends Resource (View source)

The "permissions" collection of methods.

Typical usage is:

 $driveService = new Google\Service\Drive(...);
 $permissions = $driveService->permissions;

Methods

create(string $fileId, Permission $postBody, array $optParams = [])

Creates a permission for a file or shared drive. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied. (permissions.create)

delete(string $fileId, string $permissionId, array $optParams = [])

Deletes a permission. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.

get(string $fileId, string $permissionId, array $optParams = [])

Gets a permission by ID. (permissions.get)

listPermissions(string $fileId, array $optParams = [])

Lists a file's or shared drive's permissions. (permissions.listPermissions)

update(string $fileId, string $permissionId, Permission $postBody, array $optParams = [])

Updates a permission with patch semantics. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied. (permissions.update)

Details

Permission create(string $fileId, Permission $postBody, array $optParams = [])

Creates a permission for a file or shared drive. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied. (permissions.create)

Parameters

string $fileId

The ID of the file or shared drive.

Permission $postBody
array $optParams

Optional parameters.

Return Value

Permission

Exceptions

Exception

delete(string $fileId, string $permissionId, array $optParams = [])

Deletes a permission. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.

(permissions.delete)

Parameters

string $fileId

The ID of the file or shared drive.

string $permissionId

The ID of the permission.

array $optParams

Optional parameters.

Exceptions

Exception

Permission get(string $fileId, string $permissionId, array $optParams = [])

Gets a permission by ID. (permissions.get)

Parameters

string $fileId

The ID of the file.

string $permissionId

The ID of the permission.

array $optParams

Optional parameters.

Return Value

Permission

Exceptions

Exception

PermissionList listPermissions(string $fileId, array $optParams = [])

Lists a file's or shared drive's permissions. (permissions.listPermissions)

Parameters

string $fileId

The ID of the file or shared drive.

array $optParams

Optional parameters.

Return Value

PermissionList

Exceptions

Exception

Permission update(string $fileId, string $permissionId, Permission $postBody, array $optParams = [])

Updates a permission with patch semantics. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied. (permissions.update)

Parameters

string $fileId

The ID of the file or shared drive.

string $permissionId

The ID of the permission.

Permission $postBody
array $optParams

Optional parameters.

Return Value

Permission

Exceptions

Exception