teamdrives
Creates, updates, deletes, gets or lists a teamdrives resource.
Overview
| Name | teamdrives |
| Type | Resource |
| Id | googleworkspace.drivev3.teamdrives |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of this Team Drive which is also the ID of the top level folder of this Team Drive. |
name | string | The name of this Team Drive. |
backgroundImageFile | object | The background image file for a Team Drive. |
backgroundImageLink | string | A short-lived link to this Team Drive's background image. |
capabilities | object | Capabilities the current user has on this Team Drive. |
colorRgb | string | The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId. |
createdTime | string (date-time) | The time at which the Team Drive was created (RFC 3339 date-time). |
kind | string | Identifies what kind of resource this is. Value: the fixed string "drive#teamDrive". (default: drive#teamDrive) |
orgUnitId | string | The organizational unit of this shared drive. This field is only populated on drives.list responses when the useDomainAdminAccess parameter is set to true. |
restrictions | object | A set of restrictions that apply to this Team Drive or items inside this Team Drive. |
themeId | string | The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of this Team Drive which is also the ID of the top level folder of this Team Drive. |
name | string | The name of this Team Drive. |
backgroundImageFile | object | The background image file for a Team Drive. |
backgroundImageLink | string | A short-lived link to this Team Drive's background image. |
capabilities | object | Capabilities the current user has on this Team Drive. |
colorRgb | string | The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId. |
createdTime | string (date-time) | The time at which the Team Drive was created (RFC 3339 date-time). |
kind | string | Identifies what kind of resource this is. Value: the fixed string "drive#teamDrive". (default: drive#teamDrive) |
orgUnitId | string | The organizational unit of this shared drive. This field is only populated on drives.list responses when the useDomainAdminAccess parameter is set to true. |
restrictions | object | A set of restrictions that apply to this Team Drive or items inside this Team Drive. |
themeId | string | The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | teamDriveId | useDomainAdminAccess | Deprecated: Use drives.get instead. |
list | select | pageToken, pageSize, useDomainAdminAccess, q | Deprecated: Use drives.list instead. | |
create | insert | requestId | Deprecated: Use drives.create instead. | |
update | update | teamDriveId | useDomainAdminAccess | Deprecated: Use drives.update instead. |
delete | delete | teamDriveId | Deprecated: Use drives.delete instead. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
requestId | string | |
teamDriveId | string | |
pageSize | integer (int32) | |
pageToken | string | |
q | string | |
useDomainAdminAccess | boolean |
SELECT examples
- get
- list
Deprecated: Use drives.get instead.
SELECT
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdTime,
kind,
orgUnitId,
restrictions,
themeId
FROM googleworkspace.drivev3.teamdrives
WHERE teamDriveId = '{{ teamDriveId }}' -- required
AND useDomainAdminAccess = '{{ useDomainAdminAccess }}'
;
Deprecated: Use drives.list instead.
SELECT
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdTime,
kind,
orgUnitId,
restrictions,
themeId
FROM googleworkspace.drivev3.teamdrives
WHERE pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND useDomainAdminAccess = '{{ useDomainAdminAccess }}'
AND q = '{{ q }}'
;
INSERT examples
- create
- Manifest
Deprecated: Use drives.create instead.
INSERT INTO googleworkspace.drivev3.teamdrives (
data__id,
data__backgroundImageFile,
data__orgUnitId,
data__kind,
data__themeId,
data__restrictions,
data__name,
data__capabilities,
data__colorRgb,
data__backgroundImageLink,
data__createdTime,
requestId
)
SELECT
'{{ id }}',
'{{ backgroundImageFile }}',
'{{ orgUnitId }}',
'{{ kind }}',
'{{ themeId }}',
'{{ restrictions }}',
'{{ name }}',
'{{ capabilities }}',
'{{ colorRgb }}',
'{{ backgroundImageLink }}',
'{{ createdTime }}',
'{{ requestId }}'
RETURNING
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdTime,
kind,
orgUnitId,
restrictions,
themeId
;
# Description fields are for documentation purposes
- name: teamdrives
props:
- name: requestId
value: "{{ requestId }}"
description: Required parameter for the teamdrives resource.
- name: id
value: "{{ id }}"
description: |
The ID of this Team Drive which is also the ID of the top level folder of this Team Drive.
- name: backgroundImageFile
description: |
The background image file for a Team Drive.
value:
xCoordinate: {{ xCoordinate }}
id: "{{ id }}"
yCoordinate: {{ yCoordinate }}
width: {{ width }}
- name: orgUnitId
value: "{{ orgUnitId }}"
description: |
The organizational unit of this shared drive. This field is only populated on `drives.list` responses when the `useDomainAdminAccess` parameter is set to `true`.
- name: kind
value: "{{ kind }}"
description: |
Identifies what kind of resource this is. Value: the fixed string `"drive#teamDrive"`.
default: drive#teamDrive
- name: themeId
value: "{{ themeId }}"
description: |
The ID of the theme from which the background image and color will be set. The set of possible `teamDriveThemes` can be retrieved from a `drive.about.get` response. When not specified on a `drive.teamdrives.create` request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set `colorRgb` or `backgroundImageFile`.
- name: restrictions
description: |
A set of restrictions that apply to this Team Drive or items inside this Team Drive.
value:
domainUsersOnly: {{ domainUsersOnly }}
teamMembersOnly: {{ teamMembersOnly }}
adminManagedRestrictions: {{ adminManagedRestrictions }}
copyRequiresWriterPermission: {{ copyRequiresWriterPermission }}
sharingFoldersRequiresOrganizerPermission: {{ sharingFoldersRequiresOrganizerPermission }}
downloadRestriction:
restrictedForReaders: {{ restrictedForReaders }}
restrictedForWriters: {{ restrictedForWriters }}
- name: name
value: "{{ name }}"
description: |
The name of this Team Drive.
- name: capabilities
description: |
Capabilities the current user has on this Team Drive.
value:
canChangeSharingFoldersRequiresOrganizerPermissionRestriction: {{ canChangeSharingFoldersRequiresOrganizerPermissionRestriction }}
canComment: {{ canComment }}
canResetTeamDriveRestrictions: {{ canResetTeamDriveRestrictions }}
canCopy: {{ canCopy }}
canShare: {{ canShare }}
canDeleteChildren: {{ canDeleteChildren }}
canRename: {{ canRename }}
canReadRevisions: {{ canReadRevisions }}
canChangeTeamMembersOnlyRestriction: {{ canChangeTeamMembersOnlyRestriction }}
canListChildren: {{ canListChildren }}
canChangeDomainUsersOnlyRestriction: {{ canChangeDomainUsersOnlyRestriction }}
canChangeDownloadRestriction: {{ canChangeDownloadRestriction }}
canRenameTeamDrive: {{ canRenameTeamDrive }}
canDeleteTeamDrive: {{ canDeleteTeamDrive }}
canDownload: {{ canDownload }}
canChangeTeamDriveBackground: {{ canChangeTeamDriveBackground }}
canRemoveChildren: {{ canRemoveChildren }}
canEdit: {{ canEdit }}
canTrashChildren: {{ canTrashChildren }}
canAddChildren: {{ canAddChildren }}
canManageMembers: {{ canManageMembers }}
canChangeCopyRequiresWriterPermissionRestriction: {{ canChangeCopyRequiresWriterPermissionRestriction }}
- name: colorRgb
value: "{{ colorRgb }}"
description: |
The color of this Team Drive as an RGB hex string. It can only be set on a `drive.teamdrives.update` request that does not set `themeId`.
- name: backgroundImageLink
value: "{{ backgroundImageLink }}"
description: |
A short-lived link to this Team Drive's background image.
- name: createdTime
value: "{{ createdTime }}"
description: |
The time at which the Team Drive was created (RFC 3339 date-time).
UPDATE examples
- update
Deprecated: Use drives.update instead.
UPDATE googleworkspace.drivev3.teamdrives
SET
data__id = '{{ id }}',
data__backgroundImageFile = '{{ backgroundImageFile }}',
data__orgUnitId = '{{ orgUnitId }}',
data__kind = '{{ kind }}',
data__themeId = '{{ themeId }}',
data__restrictions = '{{ restrictions }}',
data__name = '{{ name }}',
data__capabilities = '{{ capabilities }}',
data__colorRgb = '{{ colorRgb }}',
data__backgroundImageLink = '{{ backgroundImageLink }}',
data__createdTime = '{{ createdTime }}'
WHERE
teamDriveId = '{{ teamDriveId }}' --required
AND useDomainAdminAccess = {{ useDomainAdminAccess}}
RETURNING
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdTime,
kind,
orgUnitId,
restrictions,
themeId;
DELETE examples
- delete
Deprecated: Use drives.delete instead.
DELETE FROM googleworkspace.drivev3.teamdrives
WHERE teamDriveId = '{{ teamDriveId }}' --required
;