teamdrives
Creates, updates, deletes, gets or lists a teamdrives resource.
Overview
| Name | teamdrives |
| Type | Resource |
| Id | googleworkspace.drivev2.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 | An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. |
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. |
createdDate | string (date-time) | The time at which the Team Drive was created (RFC 3339 date-time). |
kind | string | This is always 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.insert 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 | An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. |
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. |
createdDate | string (date-time) | The time at which the Team Drive was created (RFC 3339 date-time). |
kind | string | This is always 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.insert 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, q, maxResults, useDomainAdminAccess | Deprecated: Use drives.list instead. | |
insert | insert | requestId | Deprecated: Use drives.insert instead. | |
update | replace | 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 | |
maxResults | integer (int32) | |
pageToken | string | |
q | string | |
useDomainAdminAccess | boolean |
SELECT examples
- get
- list
Deprecated: Use drives.get instead.
SELECT
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdDate,
kind,
orgUnitId,
restrictions,
themeId
FROM googleworkspace.drivev2.teamdrives
WHERE teamDriveId = '{{ teamDriveId }}' -- required
AND useDomainAdminAccess = '{{ useDomainAdminAccess }}'
;
Deprecated: Use drives.list instead.
SELECT
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdDate,
kind,
orgUnitId,
restrictions,
themeId
FROM googleworkspace.drivev2.teamdrives
WHERE pageToken = '{{ pageToken }}'
AND q = '{{ q }}'
AND maxResults = '{{ maxResults }}'
AND useDomainAdminAccess = '{{ useDomainAdminAccess }}'
;
INSERT examples
- insert
- Manifest
Deprecated: Use drives.insert instead.
INSERT INTO googleworkspace.drivev2.teamdrives (
data__colorRgb,
data__createdDate,
data__backgroundImageLink,
data__backgroundImageFile,
data__kind,
data__restrictions,
data__id,
data__orgUnitId,
data__capabilities,
data__themeId,
data__name,
requestId
)
SELECT
'{{ colorRgb }}',
'{{ createdDate }}',
'{{ backgroundImageLink }}',
'{{ backgroundImageFile }}',
'{{ kind }}',
'{{ restrictions }}',
'{{ id }}',
'{{ orgUnitId }}',
'{{ capabilities }}',
'{{ themeId }}',
'{{ name }}',
'{{ requestId }}'
RETURNING
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdDate,
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: 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: createdDate
value: "{{ createdDate }}"
description: |
The time at which the Team Drive was created (RFC 3339 date-time).
- name: backgroundImageLink
value: "{{ backgroundImageLink }}"
description: |
A short-lived link to this Team Drive's background image.
- name: backgroundImageFile
description: |
An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on `drive.teamdrives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.
value:
id: "{{ id }}"
width: {{ width }}
xCoordinate: {{ xCoordinate }}
yCoordinate: {{ yCoordinate }}
- name: kind
value: "{{ kind }}"
description: |
This is always `drive#teamDrive`
default: drive#teamDrive
- name: restrictions
description: |
A set of restrictions that apply to this Team Drive or items inside this Team Drive.
value:
teamMembersOnly: {{ teamMembersOnly }}
copyRequiresWriterPermission: {{ copyRequiresWriterPermission }}
adminManagedRestrictions: {{ adminManagedRestrictions }}
sharingFoldersRequiresOrganizerPermission: {{ sharingFoldersRequiresOrganizerPermission }}
domainUsersOnly: {{ domainUsersOnly }}
- 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: 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: capabilities
description: |
Capabilities the current user has on this Team Drive.
value:
canComment: {{ canComment }}
canEdit: {{ canEdit }}
canRenameTeamDrive: {{ canRenameTeamDrive }}
canDeleteChildren: {{ canDeleteChildren }}
canDeleteTeamDrive: {{ canDeleteTeamDrive }}
canChangeTeamDriveBackground: {{ canChangeTeamDriveBackground }}
canShare: {{ canShare }}
canAddChildren: {{ canAddChildren }}
canChangeTeamMembersOnlyRestriction: {{ canChangeTeamMembersOnlyRestriction }}
canResetTeamDriveRestrictions: {{ canResetTeamDriveRestrictions }}
canReadRevisions: {{ canReadRevisions }}
canRemoveChildren: {{ canRemoveChildren }}
canChangeCopyRequiresWriterPermissionRestriction: {{ canChangeCopyRequiresWriterPermissionRestriction }}
canDownload: {{ canDownload }}
canChangeSharingFoldersRequiresOrganizerPermissionRestriction: {{ canChangeSharingFoldersRequiresOrganizerPermissionRestriction }}
canTrashChildren: {{ canTrashChildren }}
canManageMembers: {{ canManageMembers }}
canChangeDomainUsersOnlyRestriction: {{ canChangeDomainUsersOnlyRestriction }}
canCopy: {{ canCopy }}
canListChildren: {{ canListChildren }}
canRename: {{ canRename }}
- 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.insert` 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: name
value: "{{ name }}"
description: |
The name of this Team Drive.
REPLACE examples
- update
Deprecated: Use drives.update instead.
REPLACE googleworkspace.drivev2.teamdrives
SET
data__colorRgb = '{{ colorRgb }}',
data__createdDate = '{{ createdDate }}',
data__backgroundImageLink = '{{ backgroundImageLink }}',
data__backgroundImageFile = '{{ backgroundImageFile }}',
data__kind = '{{ kind }}',
data__restrictions = '{{ restrictions }}',
data__id = '{{ id }}',
data__orgUnitId = '{{ orgUnitId }}',
data__capabilities = '{{ capabilities }}',
data__themeId = '{{ themeId }}',
data__name = '{{ name }}'
WHERE
teamDriveId = '{{ teamDriveId }}' --required
AND useDomainAdminAccess = {{ useDomainAdminAccess}}
RETURNING
id,
name,
backgroundImageFile,
backgroundImageLink,
capabilities,
colorRgb,
createdDate,
kind,
orgUnitId,
restrictions,
themeId;
DELETE examples
- delete
Deprecated: Use drives.delete instead.
DELETE FROM googleworkspace.drivev2.teamdrives
WHERE teamDriveId = '{{ teamDriveId }}' --required
;