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 | maxResults , pageToken , q , 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 maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
AND q = '{{ q }}'
AND useDomainAdminAccess = '{{ useDomainAdminAccess }}'
;
INSERT
examples
- insert
- Manifest
Deprecated: Use drives.insert
instead.
INSERT INTO googleworkspace.drivev2.teamdrives (
data__id,
data__name,
data__colorRgb,
data__kind,
data__backgroundImageLink,
data__capabilities,
data__themeId,
data__backgroundImageFile,
data__createdDate,
data__restrictions,
data__orgUnitId,
requestId
)
SELECT
'{{ id }}',
'{{ name }}',
'{{ colorRgb }}',
'{{ kind }}',
'{{ backgroundImageLink }}',
'{{ capabilities }}',
'{{ themeId }}',
'{{ backgroundImageFile }}',
'{{ createdDate }}',
'{{ restrictions }}',
'{{ orgUnitId }}',
'{{ 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: string
description: Required parameter for the teamdrives resource.
- name: id
value: string
description: >
The ID of this Team Drive which is also the ID of the top level folder of this Team Drive.
- name: name
value: string
description: >
The name of this Team Drive.
- name: colorRgb
value: string
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: kind
value: string
description: >
This is always `drive#teamDrive`
default: drive#teamDrive
- name: backgroundImageLink
value: string
description: >
A short-lived link to this Team Drive's background image.
- name: capabilities
value: object
description: >
Capabilities the current user has on this Team Drive.
- name: themeId
value: string
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: backgroundImageFile
value: object
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.
- name: createdDate
value: string
description: >
The time at which the Team Drive was created (RFC 3339 date-time).
- name: restrictions
value: object
description: >
A set of restrictions that apply to this Team Drive or items inside this Team Drive.
- name: orgUnitId
value: string
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`.
REPLACE
examples
- update
Deprecated: Use drives.update
instead.
REPLACE googleworkspace.drivev2.teamdrives
SET
data__id = '{{ id }}',
data__name = '{{ name }}',
data__colorRgb = '{{ colorRgb }}',
data__kind = '{{ kind }}',
data__backgroundImageLink = '{{ backgroundImageLink }}',
data__capabilities = '{{ capabilities }}',
data__themeId = '{{ themeId }}',
data__backgroundImageFile = '{{ backgroundImageFile }}',
data__createdDate = '{{ createdDate }}',
data__restrictions = '{{ restrictions }}',
data__orgUnitId = '{{ orgUnitId }}'
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
;