mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-17 20:51:37 +00:00
Compare commits
36 Commits
20240221.2
...
20240404.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23b0b0f203 | ||
|
|
83d464d167 | ||
|
|
1ba9f73fbd | ||
|
|
0a21f2c959 | ||
|
|
62b7b5d84b | ||
|
|
7e12a8f0a7 | ||
|
|
d347c65fcb | ||
|
|
51f109ffa7 | ||
|
|
a5e7d6ff6c | ||
|
|
2260e7df50 | ||
|
|
08fc3bdb6f | ||
|
|
0754a9b176 | ||
|
|
448d58f9ba | ||
|
|
bdc330405e | ||
|
|
abe1d5381d | ||
|
|
be0eff7e14 | ||
|
|
f88a125966 | ||
|
|
623ff1fae9 | ||
|
|
63d7b5568b | ||
|
|
7c8a87673a | ||
|
|
a3b814f758 | ||
|
|
1989d72f4f | ||
|
|
63b1ca7e30 | ||
|
|
a328ac8ea9 | ||
|
|
2188bfa704 | ||
|
|
0f5adbe211 | ||
|
|
d0251182de | ||
|
|
a04345fb10 | ||
|
|
80440255ab | ||
|
|
7b3cc6d819 | ||
|
|
76d3ead61b | ||
|
|
21ca008a47 | ||
|
|
96aa4f3bd2 | ||
|
|
883979f5f5 | ||
|
|
b03a43777d | ||
|
|
a0e4be4b50 |
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -618,8 +618,8 @@ jobs:
|
||||
GAM_ARCHIVE="../gam-${GAMVERSION}-windows-${GAM_ARCHIVE_ARCH}.zip"
|
||||
/c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE gam "-xr@${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" -bb3
|
||||
cd ..
|
||||
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/candle.exe -arch "${WIX_ARCH}" gam.wxs
|
||||
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/light.exe -ext /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/WixUIExtension.dll gam.wixobj -o "gam-${GAMVERSION}-windows-${GAM_ARCHIVE_ARCH}.msi" || true;
|
||||
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/candle.exe -arch "${WIX_ARCH}" gam.wxs
|
||||
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/light.exe -ext /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/WixUIExtension.dll gam.wixobj -o "gam-${GAMVERSION}-windows-${GAM_ARCHIVE_ARCH}.msi" || true;
|
||||
rm -v -f *.wixpdb
|
||||
|
||||
- name: Basic Tests build jobs only
|
||||
|
||||
@@ -851,11 +851,15 @@ gam delete adminrole <RoleItem>
|
||||
## Display administrative roles
|
||||
```
|
||||
gam info adminrole <RoleItem> [privileges]
|
||||
gam print adminroles|roles [todrive <ToDriveAttribute>*] [privileges]
|
||||
gam print adminroles|roles [todrive <ToDriveAttribute>*]
|
||||
[privileges] [oneitemperrow]
|
||||
gam show adminroles|roles [todrive <ToDriveAttribute>*] [privileges]
|
||||
```
|
||||
* `privileges` - Display privileges associated with each role
|
||||
|
||||
By default, all privileges for a role are shown on one row as a repeating item.
|
||||
When `oneitemperrow` is specified, each privilege is output on a separate row/line with the other role fields.
|
||||
|
||||
## Create an administrator
|
||||
Add an administrator role to an administrator.
|
||||
```
|
||||
@@ -877,7 +881,8 @@ gam delete admin <RoleAssignmentId>
|
||||
## Display administrators
|
||||
```
|
||||
gam print admins [todrive <ToDriveAttribute>*]
|
||||
[user|group <EmailAddress>|<UniqueID>] [role <RoleItem>] [condition] [privileges]
|
||||
[user|group <EmailAddress>|<UniqueID>] [role <RoleItem>] [condition]
|
||||
[privileges] [oneitemperrow]
|
||||
gam show admins
|
||||
[user|group <EmailAddress>|<UniqueID>] [role <RoleItem>] [condition] [privileges]
|
||||
```
|
||||
@@ -889,6 +894,9 @@ options to limit the display:
|
||||
* `condition` - Display any conditions associated with a role assignment
|
||||
* `privileges` - Display privileges associated with each role assignment
|
||||
|
||||
By default, all role privileges for an admin are shown on one row as a repeating item.
|
||||
When `oneitemperrow` is specified, each role privilege is output on a separate row/line with the other admin fields.
|
||||
|
||||
In versions prior to 6.07.01, specification of both `user <UserItem>`
|
||||
and `role <RoleItem>` generated no output due to an undocumented API rule that disallows both.
|
||||
|
||||
|
||||
@@ -89,15 +89,6 @@ If you run a Google Workspace Education SKU, verify that the super admin you'll
|
||||
* Choose "All users are 18 or older"
|
||||
* Click "SAVE"
|
||||
|
||||
Verify whether the super admin you'll be using is in an OU where reauthentication is required.
|
||||
* Access the admin console and go to Security -> Overview
|
||||
* Scroll down and open Google Cloud session control section
|
||||
* Select the OU containing the super admin
|
||||
* If Require reauthentication is selected and Exempt Trusted apps is not checked, you'll have to do `gam oauth create` at whatever frequency is specified
|
||||
* If that sounds unappealing, check Exempt Trusted apps
|
||||
* Click "OVERRIDE"
|
||||
* Follow the steps below to mark GAM as a trusted app
|
||||
|
||||
Based on your domain policies, you may have to mark GAM as a trusted app. These steps are performed after a project is created.
|
||||
* Access the admin console and go to Security -> Access and data control -> API controls
|
||||
* Check Trust internal, domain-owned apps
|
||||
@@ -114,6 +105,19 @@ Based on your domain policies, you may have to mark GAM as a trusted app. These
|
||||
* Click Next/Continue
|
||||
* Click Finish
|
||||
|
||||
Verify whether the super admin you'll be using is in an OU where reauthentication is required.
|
||||
* Access the admin console and go to Security -> Overview
|
||||
* Scroll down and open Google Cloud session control section
|
||||
* Select the OU containing the super admin
|
||||
* If Require reauthentication is selected and Exempt Trusted apps is not checked, you'll have to do `gam oauth create` at whatever frequency is specified
|
||||
* If that sounds unappealing, check Exempt Trusted apps
|
||||
* Click "OVERRIDE"
|
||||
* Follow the steps below to mark GAM as a trusted app
|
||||
|
||||
Additional steps may be required if errors are encountered.
|
||||
* [Authorize a super admin to create projects](#authorize-a-super-admin-to-create-projects)
|
||||
* [Authorize GAM to create projects](#authorize-gam-to-create-projects)
|
||||
|
||||
## Headless computers and Cloud Shells
|
||||
With many thanks to Jay, `gam oauth create` now uses a new client access authentication flow
|
||||
as required by Google for headless computers/cloud shells; this is required as of February 28, 2022.
|
||||
@@ -404,60 +408,70 @@ writes the credentials into the file oauth2.txt.
|
||||
```
|
||||
gam oauth create
|
||||
|
||||
Select the authorized scopes by entering a number.
|
||||
Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
[*] 2) Chrome Management API - Telemetry read only
|
||||
[*] 3) Chrome Management API - read only
|
||||
[*] 4) Chrome Policy API (supports readonly)
|
||||
[*] 5) Chrome Printer Management API (supports readonly)
|
||||
[*] 6) Chrome Version History API
|
||||
[*] 7) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 8) Classroom API - Course Topics (supports readonly)
|
||||
[*] 9) Classroom API - Course Work/Materials (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Submissions (supports readonly)
|
||||
[*] 11) Classroom API - Courses (supports readonly)
|
||||
[*] 12) Classroom API - Profile Emails
|
||||
[*] 13) Classroom API - Profile Photos
|
||||
[*] 14) Classroom API - Rosters (supports readonly)
|
||||
[*] 15) Classroom API - Student Guardians (supports readonly)
|
||||
[*] 16) Cloud Identity Groups API (supports readonly)
|
||||
[*] 17) Cloud Storage (Vault Export - read only)
|
||||
[*] 18) Contact Delegation API (supports readonly)
|
||||
[*] 19) Contacts API - Domain Shared and Users and GAL
|
||||
[*] 20) Data Transfer API (supports readonly)
|
||||
[*] 21) Directory API - Chrome OS Devices (supports readonly)
|
||||
[*] 22) Directory API - Customers (supports readonly)
|
||||
[*] 23) Directory API - Domains (supports readonly)
|
||||
[*] 24) Directory API - Groups (supports readonly)
|
||||
[*] 25) Directory API - Mobile Devices Directory (supports readonly and action)
|
||||
[*] 26) Directory API - Organizational Units (supports readonly)
|
||||
[*] 27) Directory API - Resource Calendars (supports readonly)
|
||||
[*] 28) Directory API - Roles (supports readonly)
|
||||
[*] 29) Directory API - User Schemas (supports readonly)
|
||||
[*] 30) Directory API - User Security
|
||||
[*] 31) Directory API - Users (supports readonly)
|
||||
[*] 32) Email Audit API
|
||||
[*] 33) Groups Migration API
|
||||
[*] 34) Groups Settings API
|
||||
[*] 35) License Manager API
|
||||
[*] 36) People API (supports readonly)
|
||||
[*] 37) People Directory API - read only
|
||||
[ ] 38) Pub / Sub API
|
||||
[*] 39) Reports API - Audit Reports
|
||||
[*] 40) Reports API - Usage Reports
|
||||
[ ] 41) Reseller API
|
||||
[*] 42) Site Verification API
|
||||
[*] 43) Sites API
|
||||
[*] 44) Vault API (supports readonly)
|
||||
[*] 2) Chrome Management API - AppDetails read only
|
||||
[*] 3) Chrome Management API - Telemetry read only
|
||||
[*] 4) Chrome Management API - read only
|
||||
[*] 5) Chrome Policy API (supports readonly)
|
||||
[*] 6) Chrome Printer Management API (supports readonly)
|
||||
[*] 7) Chrome Version History API
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
[*] 11) Classroom API - Course Work/Submissions (supports readonly)
|
||||
[*] 12) Classroom API - Courses (supports readonly)
|
||||
[*] 13) Classroom API - Profile Emails
|
||||
[*] 14) Classroom API - Profile Photos
|
||||
[*] 15) Classroom API - Rosters (supports readonly)
|
||||
[*] 16) Classroom API - Student Guardians (supports readonly)
|
||||
[ ] 17) Cloud Channel API (supports readonly)
|
||||
[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly)
|
||||
[*] 19) Cloud Identity Groups API (supports readonly)
|
||||
[*] 20) Cloud Identity OrgUnits API (supports readonly)
|
||||
[*] 21) Cloud Identity User Invitations API (supports readonly)
|
||||
[ ] 22) Cloud Storage API (Read Only, Vault/Takeout Download, Cloud Storage)
|
||||
[ ] 23) Cloud Storage API (Read/Write, Vault/Takeout Copy/Download, Cloud Storage)
|
||||
[*] 24) Contact Delegation API (supports readonly)
|
||||
[*] 25) Contacts API - Domain Shared Contacts and GAL
|
||||
[*] 26) Data Transfer API (supports readonly)
|
||||
[*] 27) Directory API - Chrome OS Devices (supports readonly)
|
||||
[*] 28) Directory API - Customers (supports readonly)
|
||||
[*] 29) Directory API - Domains (supports readonly)
|
||||
[*] 30) Directory API - Groups (supports readonly)
|
||||
[*] 31) Directory API - Mobile Devices Directory (supports readonly and action)
|
||||
[*] 32) Directory API - Organizational Units (supports readonly)
|
||||
[*] 33) Directory API - Resource Calendars (supports readonly)
|
||||
[*] 34) Directory API - Roles (supports readonly)
|
||||
[*] 35) Directory API - User Schemas (supports readonly)
|
||||
[*] 36) Directory API - User Security
|
||||
[*] 37) Directory API - Users (supports readonly)
|
||||
[ ] 38) Email Audit API
|
||||
[*] 39) Groups Migration API
|
||||
[*] 40) Groups Settings API
|
||||
[*] 41) License Manager API
|
||||
[*] 42) People API (supports readonly)
|
||||
[*] 43) People Directory API - read only
|
||||
[ ] 44) Pub / Sub API
|
||||
[*] 45) Reports API - Audit Reports
|
||||
[*] 46) Reports API - Usage Reports
|
||||
[ ] 47) Reseller API
|
||||
[*] 48) Site Verification API
|
||||
[ ] 49) Sites API
|
||||
[*] 50) Vault API (supports readonly)
|
||||
|
||||
s) Select all scopes
|
||||
u) Unselect all scopes
|
||||
e) Exit without changes
|
||||
c) Continue to authorization
|
||||
Please enter 0-42[a|r] or s|u|e|c:
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
|
||||
Please enter 0-50[a|r] or s|u|e|c: c
|
||||
|
||||
Enter your Google Workspace admin email address? admin@domain.com
|
||||
|
||||
@@ -487,60 +501,70 @@ writes the credentials into the file `oauth2.txt`.
|
||||
```
|
||||
gam oauth update
|
||||
|
||||
Select the authorized scopes by entering a number.
|
||||
Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
[*] 2) Chrome Management API - Telemetry read only
|
||||
[*] 3) Chrome Management API - read only
|
||||
[*] 4) Chrome Policy API (supports readonly)
|
||||
[*] 5) Chrome Printer Management API (supports readonly)
|
||||
[*] 6) Chrome Version History API
|
||||
[*] 7) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 8) Classroom API - Course Topics (supports readonly)
|
||||
[*] 9) Classroom API - Course Work/Materials (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Submissions (supports readonly)
|
||||
[*] 11) Classroom API - Courses (supports readonly)
|
||||
[*] 12) Classroom API - Profile Emails
|
||||
[*] 13) Classroom API - Profile Photos
|
||||
[*] 14) Classroom API - Rosters (supports readonly)
|
||||
[*] 15) Classroom API - Student Guardians (supports readonly)
|
||||
[*] 16) Cloud Identity Groups API (supports readonly)
|
||||
[*] 17) Cloud Storage (Vault Export - read only)
|
||||
[*] 18) Contact Delegation API (supports readonly)
|
||||
[*] 19) Contacts API - Domain Shared and Users and GAL
|
||||
[*] 20) Data Transfer API (supports readonly)
|
||||
[*] 21) Directory API - Chrome OS Devices (supports readonly)
|
||||
[*] 22) Directory API - Customers (supports readonly)
|
||||
[*] 23) Directory API - Domains (supports readonly)
|
||||
[*] 24) Directory API - Groups (supports readonly)
|
||||
[*] 25) Directory API - Mobile Devices Directory (supports readonly and action)
|
||||
[*] 26) Directory API - Organizational Units (supports readonly)
|
||||
[*] 27) Directory API - Resource Calendars (supports readonly)
|
||||
[*] 28) Directory API - Roles (supports readonly)
|
||||
[*] 29) Directory API - User Schemas (supports readonly)
|
||||
[*] 30) Directory API - User Security
|
||||
[*] 31) Directory API - Users (supports readonly)
|
||||
[*] 32) Email Audit API
|
||||
[*] 33) Groups Migration API
|
||||
[*] 34) Groups Settings API
|
||||
[*] 35) License Manager API
|
||||
[*] 36) People API (supports readonly)
|
||||
[*] 37) People Directory API - read only
|
||||
[ ] 38) Pub / Sub API
|
||||
[*] 39) Reports API - Audit Reports
|
||||
[*] 40) Reports API - Usage Reports
|
||||
[ ] 41) Reseller API
|
||||
[*] 42) Site Verification API
|
||||
[*] 43) Sites API
|
||||
[*] 44) Vault API (supports readonly)
|
||||
[*] 2) Chrome Management API - AppDetails read only
|
||||
[*] 3) Chrome Management API - Telemetry read only
|
||||
[*] 4) Chrome Management API - read only
|
||||
[*] 5) Chrome Policy API (supports readonly)
|
||||
[*] 6) Chrome Printer Management API (supports readonly)
|
||||
[*] 7) Chrome Version History API
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
[*] 11) Classroom API - Course Work/Submissions (supports readonly)
|
||||
[*] 12) Classroom API - Courses (supports readonly)
|
||||
[*] 13) Classroom API - Profile Emails
|
||||
[*] 14) Classroom API - Profile Photos
|
||||
[*] 15) Classroom API - Rosters (supports readonly)
|
||||
[*] 16) Classroom API - Student Guardians (supports readonly)
|
||||
[ ] 17) Cloud Channel API (supports readonly)
|
||||
[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly)
|
||||
[*] 19) Cloud Identity Groups API (supports readonly)
|
||||
[*] 20) Cloud Identity OrgUnits API (supports readonly)
|
||||
[*] 21) Cloud Identity User Invitations API (supports readonly)
|
||||
[ ] 22) Cloud Storage API (Read Only, Vault/Takeout Download, Cloud Storage)
|
||||
[ ] 23) Cloud Storage API (Read/Write, Vault/Takeout Copy/Download, Cloud Storage)
|
||||
[*] 24) Contact Delegation API (supports readonly)
|
||||
[*] 25) Contacts API - Domain Shared Contacts and GAL
|
||||
[*] 26) Data Transfer API (supports readonly)
|
||||
[*] 27) Directory API - Chrome OS Devices (supports readonly)
|
||||
[*] 28) Directory API - Customers (supports readonly)
|
||||
[*] 29) Directory API - Domains (supports readonly)
|
||||
[*] 30) Directory API - Groups (supports readonly)
|
||||
[*] 31) Directory API - Mobile Devices Directory (supports readonly and action)
|
||||
[*] 32) Directory API - Organizational Units (supports readonly)
|
||||
[*] 33) Directory API - Resource Calendars (supports readonly)
|
||||
[*] 34) Directory API - Roles (supports readonly)
|
||||
[*] 35) Directory API - User Schemas (supports readonly)
|
||||
[*] 36) Directory API - User Security
|
||||
[*] 37) Directory API - Users (supports readonly)
|
||||
[ ] 38) Email Audit API
|
||||
[*] 39) Groups Migration API
|
||||
[*] 40) Groups Settings API
|
||||
[*] 41) License Manager API
|
||||
[*] 42) People API (supports readonly)
|
||||
[*] 43) People Directory API - read only
|
||||
[ ] 44) Pub / Sub API
|
||||
[*] 45) Reports API - Audit Reports
|
||||
[*] 46) Reports API - Usage Reports
|
||||
[ ] 47) Reseller API
|
||||
[*] 48) Site Verification API
|
||||
[ ] 49) Sites API
|
||||
[*] 50) Vault API (supports readonly)
|
||||
|
||||
s) Select all scopes
|
||||
u) Unselect all scopes
|
||||
e) Exit without changes
|
||||
c) Continue to authorization
|
||||
Please enter 0-42[a|r] or s|u|e|c:
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
|
||||
Please enter 0-50[a|r] or s|u|e|c: c
|
||||
|
||||
Enter your Google Workspace admin email address? admin@domain.com
|
||||
|
||||
@@ -817,24 +841,38 @@ By default, the following scopes are verified:
|
||||
```
|
||||
https://mail.google.com/
|
||||
https://sites.google.com/feeds
|
||||
https://www.google.com/m8/feeds
|
||||
https://www.googleapis.com/auth/analytics.readonly
|
||||
https://www.googleapis.com/auth/apps.alerts
|
||||
https://www.googleapis.com/auth/calendar
|
||||
https://www.googleapis.com/auth/chat.delete
|
||||
https://www.googleapis.com/auth/chat.memberships
|
||||
https://www.googleapis.com/auth/chat.messages
|
||||
https://www.googleapis.com/auth/chat.spaces
|
||||
https://www.googleapis.com/auth/classroom.announcements
|
||||
https://www.googleapis.com/auth/classroom.coursework.students
|
||||
https://www.googleapis.com/auth/classroom.courseworkmaterials
|
||||
https://www.googleapis.com/auth/classroom.profile.emails
|
||||
https://www.googleapis.com/auth/classroom.profile.photos
|
||||
https://www.googleapis.com/auth/classroom.rosters
|
||||
https://www.googleapis.com/auth/classroom.topics
|
||||
https://www.googleapis.com/auth/cloud-identity
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
https://www.googleapis.com/auth/cloudprint
|
||||
https://www.googleapis.com/auth/contacts
|
||||
https://www.googleapis.com/auth/contacts.other.readonly
|
||||
https://www.googleapis.com/auth/datastudio
|
||||
https://www.googleapis.com/auth/directory.readonly
|
||||
https://www.googleapis.com/auth/documents
|
||||
https://www.googleapis.com/auth/drive
|
||||
https://www.googleapis.com/auth/drive.activity
|
||||
https://www.googleapis.com/auth/drive.admin.labels
|
||||
https://www.googleapis.com/auth/drive.labels
|
||||
https://www.googleapis.com/auth/gmail.modify
|
||||
https://www.googleapis.com/auth/gmail.settings.basic
|
||||
https://www.googleapis.com/auth/gmail.settings.sharing
|
||||
https://www.googleapis.com/auth/keep
|
||||
https://www.googleapis.com/auth/spreadsheets
|
||||
https://www.googleapis.com/auth/tasks
|
||||
https://www.googleapis.com/auth/userinfo.profile
|
||||
```
|
||||
This scope is verified when `user_service_account_access_only = true` in `gam.cfg`.
|
||||
```
|
||||
@@ -862,6 +900,118 @@ gam <UserTypeEntity> update serviceaccount (scope|scopes <APIScopeURLList>)*
|
||||
* `<UserTypeEntity>` - Typically `user <EmailAddress>`, a non-Google Workspace administrator.
|
||||
* `scopes <APIScopeURLList>` - Verify/enable service account access for a set of specific scopes rather than selecting the scopes.
|
||||
|
||||
```
|
||||
gam user user@domain.com update serviceaccount
|
||||
|
||||
[*] 0) AlertCenter API
|
||||
[*] 1) Analytics API - read only
|
||||
[*] 2) Analytics Admin API - read only
|
||||
[*] 3) Calendar API (supports readonly)
|
||||
[*] 4) Chat API - Memberships (supports readonly)
|
||||
[*] 5) Chat API - Messages (supports readonly)
|
||||
[*] 6) Chat API - Spaces (supports readonly)
|
||||
[*] 7) Chat API - Spaces Delete
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
[*] 11) Classroom API - Course Work/Submissions (supports readonly)
|
||||
[*] 12) Classroom API - Profile Emails
|
||||
[*] 13) Classroom API - Profile Photos
|
||||
[*] 14) Classroom API - Rosters (supports readonly)
|
||||
[*] 15) Cloud Identity Devices API (supports readonly)
|
||||
[*] 16) Cloud Resource Manager API v3
|
||||
[*] 17) Docs API (supports readonly)
|
||||
[*] 18) Drive API (supports readonly)
|
||||
[*] 19) Drive API - todrive
|
||||
[*] 20) Drive Activity API v2 - must pair with Drive API
|
||||
[*] 21) Drive Labels API v2beta - Admin (supports readonly)
|
||||
[*] 22) Drive Labels API v2beta - User (supports readonly)
|
||||
[*] 23) Forms API
|
||||
[*] 24) Gmail API - Basic Settings (Filters,IMAP, Language, POP, Vacation) - read/write, Sharing Settings (Delegates, Forwarding, SendAs) - read
|
||||
[*] 25) Gmail API - Full Access (Labels, Messages)
|
||||
[*] 26) Gmail API - Full Access (Labels, Messages) except delete message
|
||||
[ ] 27) Gmail API - Full Access - read only
|
||||
[ ] 28) Gmail API - Send Messages - including todrive
|
||||
[*] 29) Gmail API - Sharing Settings (Delegates, Forwarding, SendAs) - write
|
||||
[*] 30) Identity and Access Management API
|
||||
[*] 31) Keep API (supports readonly)
|
||||
[*] 32) Looker Studio API (supports readonly)
|
||||
[*] 33) OAuth2 API
|
||||
[*] 34) People API (supports readonly)
|
||||
[*] 35) People API - Other Contacts - read only
|
||||
[*] 36) People Directory API - read only
|
||||
[*] 37) Sheets API (supports readonly)
|
||||
[*] 38) Sheets API - todrive
|
||||
[*] 39) Sites API
|
||||
[*] 40) Tasks API (supports readonly)
|
||||
[ ] 41) Youtube API - read only
|
||||
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
|
||||
Please enter 0-41[a|r] or s|u|e|c: c
|
||||
|
||||
System time status
|
||||
Your system time differs from admin.googleapis.com by less than 1 second PASS
|
||||
Service Account Private Key Authentication
|
||||
Authentication PASS
|
||||
Service Account Private Key age; Google recommends rotating keys on a routine basis
|
||||
Service Account Private Key age: 364 days WARN
|
||||
Domain-wide Delegation authentication:, User: user@domain.com, Scopes: 34
|
||||
https://mail.google.com/ PASS (1/34)
|
||||
https://sites.google.com/feeds PASS (2/34)
|
||||
https://www.googleapis.com/auth/analytics.readonly PASS (3/34)
|
||||
https://www.googleapis.com/auth/apps.alerts PASS (4/34)
|
||||
https://www.googleapis.com/auth/calendar PASS (5/34)
|
||||
https://www.googleapis.com/auth/chat.delete PASS (6/34)
|
||||
https://www.googleapis.com/auth/chat.memberships PASS (7/34)
|
||||
https://www.googleapis.com/auth/chat.messages PASS (8/34)
|
||||
https://www.googleapis.com/auth/chat.spaces PASS (9/34)
|
||||
https://www.googleapis.com/auth/classroom.announcements PASS (10/34)
|
||||
https://www.googleapis.com/auth/classroom.coursework.students PASS (11/34)
|
||||
https://www.googleapis.com/auth/classroom.courseworkmaterials PASS (12/34)
|
||||
https://www.googleapis.com/auth/classroom.profile.emails PASS (13/34)
|
||||
https://www.googleapis.com/auth/classroom.profile.photos PASS (14/34)
|
||||
https://www.googleapis.com/auth/classroom.rosters PASS (15/34)
|
||||
https://www.googleapis.com/auth/classroom.topics PASS (16/34)
|
||||
https://www.googleapis.com/auth/cloud-identity PASS (17/34)
|
||||
https://www.googleapis.com/auth/cloud-platform PASS (18/34)
|
||||
https://www.googleapis.com/auth/contacts PASS (19/34)
|
||||
https://www.googleapis.com/auth/contacts.other.readonly PASS (20/34)
|
||||
https://www.googleapis.com/auth/datastudio PASS (21/34)
|
||||
https://www.googleapis.com/auth/directory.readonly PASS (22/34)
|
||||
https://www.googleapis.com/auth/documents PASS (23/34)
|
||||
https://www.googleapis.com/auth/drive PASS (24/34)
|
||||
https://www.googleapis.com/auth/drive.activity PASS (25/34)
|
||||
https://www.googleapis.com/auth/drive.admin.labels FAIL (26/34)
|
||||
https://www.googleapis.com/auth/drive.labels FAIL (27/34)
|
||||
https://www.googleapis.com/auth/gmail.modify PASS (28/34)
|
||||
https://www.googleapis.com/auth/gmail.settings.basic PASS (29/34)
|
||||
https://www.googleapis.com/auth/gmail.settings.sharing PASS (30/34)
|
||||
https://www.googleapis.com/auth/keep PASS (31/34)
|
||||
https://www.googleapis.com/auth/spreadsheets PASS (32/34)
|
||||
https://www.googleapis.com/auth/tasks PASS (33/34)
|
||||
https://www.googleapis.com/auth/userinfo.profile PASS (34/34)
|
||||
Some scopes Failed!
|
||||
To authorize them, please go to the following link in your browser:
|
||||
|
||||
https://admin.google.com/ac/owl/domainwidedelegation?clientScopeToAdd=https://mail.google.com/,...
|
||||
|
||||
You will be directed to the Google Workspace admin console Security > API Controls > Domain-wide Delegation page
|
||||
The "Add a new Client ID" box will open
|
||||
Make sure that "Overwrite existing client ID" is checked
|
||||
Click AUTHORIZE
|
||||
When the box closes you're done
|
||||
After authorizing it may take some time for this test to pass so wait a few moments and then try this command again.
|
||||
```
|
||||
|
||||
## Configure Limited access
|
||||
You can configure GAM to allow users limited access to your domain via GAM.
|
||||
You can limit both client and service account access.
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
#7a4706|#8a1c0a|#994a64|#ffffff
|
||||
<LanguageCode> ::=
|
||||
ach|af|ag|ak|am|ar|az|be|bem|bg|bn|br|bs|ca|chr|ckb|co|crs|cs|cy|da|de|
|
||||
ee|el|en|en-gb|en-us|eo|es|es-419|et|eu|fa|fi|fil|fo|fr|fr-ca|fy|
|
||||
ee|el|en|en-ca|en-gb|en-us|eo|es|es-419|et|eu|fa|fi|fil|fo|fr|fr-ca|fy|
|
||||
ga|gaa|gd|gl|gn|gu|ha|haw|he|hi|hr|ht|hu|hy|ia|id|ig|in|is|it|iw|ja|jw|
|
||||
ka|kg|kk|km|kn|ko|kri|ku|ky|la|lg|ln|lo|loz|lt|lua|lv|
|
||||
mfe|mg|mi|mk|ml|mn|mo|mr|ms|mt|my|ne|nl|nn|no|nso|ny|nyn|oc|om|or|
|
||||
@@ -222,72 +222,6 @@
|
||||
shortcut
|
||||
<MimeTypeName> ::= application|audio|font|image|message|model|multipart|text|video
|
||||
<MimeType> ::= <MimeTypeShortcut>|(<MimeTypeName>/<String>)
|
||||
<ProductID> ::=
|
||||
nv:<String> |
|
||||
101001 |
|
||||
101005 |
|
||||
101031 |
|
||||
101033 |
|
||||
101034 |
|
||||
101035 |
|
||||
101036 |
|
||||
101037 |
|
||||
101039 |
|
||||
101040 |
|
||||
Google-Apps |
|
||||
Google-Chrome-Device-Management |
|
||||
Google-Drive-storage |
|
||||
Google-Vault
|
||||
<SKUID> ::=
|
||||
nv:<String>:<String> |
|
||||
20gb | drive20gb | googledrivestorage20gb | Google-Drive-storage-20GB |
|
||||
50gb | drive50gb | googledrivestorage50gb | Google-Drive-storage-50GB |
|
||||
200gb | drive200gb | googledrivestorage200gb | Google-Drive-storage-200GB |
|
||||
400gb | drive400gb | googledrivestorage400gb | Google-Drive-storage-400GB |
|
||||
1tb | drive1tb | googledrivestorage1tb | Google-Drive-storage-1TB |
|
||||
2tb | drive2tb | googledrivestorage2tb | Google-Drive-storage-2TB |
|
||||
4tb | drive4tb | googledrivestorage4tb | Google-Drive-storage-4TB |
|
||||
8tb | drive8tb | googledrivestorage8tb | Google-Drive-storage-8TB |
|
||||
16tb | drive16tb | googledrivestorage16tb | Google-Drive-storage-16TB |
|
||||
assuredcontrols | 1010390001 |
|
||||
bce | beyondcorp | beyondcorpenterprise | 1010400001 |
|
||||
cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management |
|
||||
cloudidentity | identity | 1010010001 |
|
||||
cloudidentitypremium | identitypremium | 1010050001 |
|
||||
cloudsearch | 1010350001 |
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 |
|
||||
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 |
|
||||
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 |
|
||||
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 |
|
||||
gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government |
|
||||
gsuitelite | gal | gsl | lite | Google-Apps-Lite |
|
||||
gwep | workspaceeducationplus | 1010310008 |
|
||||
gwepstaff | workspaceeducationplusstaff | 1010310009 |
|
||||
gwepstudent | workspaceeducationplusstudent | 1010310010 |
|
||||
gwes | workspaceeducationstandard | 1010310005 |
|
||||
gwesstaff | workspaceeducationstandardstaff | 1010310006 |
|
||||
gwesstudent | workspaceeducationstandardstudent | 1010310007 |
|
||||
gwetlu | workspaceeducationupgrade | 1010370001 |
|
||||
meetdialing | googlemeetglobaldialing | 1010360001 |
|
||||
postini | gams | gsuitegams | gsuitepostini | gsuitemessagesecurity | Google-Apps-For-Postini |
|
||||
standard | free | Google-Apps |
|
||||
vault | googlevault | Google-Vault |
|
||||
vfe | googlevaultformeremployee | Google-Vault-Former-Employee |
|
||||
voicepremier | gvpremier | googlevoicepremier | 1010330002 |
|
||||
voicestandard | gvstandard | googlevoicestandard | 1010330004 |
|
||||
voicestarter | gvstarter | googlevoicestarter | 1010330003 |
|
||||
wsbizplus | workspacebusinessplus | 1010020025 |
|
||||
wsbizplusarchived | workspacebusinessplusarchived | 1010340003 |
|
||||
wsbizstan | workspacebusinessstandard | 1010020028 |
|
||||
wsbizstarter | workspacebusinessstarter | wsbizstart | 1010020027 |
|
||||
wsentess | workspaceenterpriseessentials | 1010060003 |
|
||||
wsentplus | workspaceenterpriseplus | gae | gse | enterprise | gsuiteenterprise | 1010020020 |
|
||||
wsentstan | workspaceenterprisestandard | 1010020026 |
|
||||
wsentstanarchived | workspaceenterprisestandardarchived | 1010340004 |
|
||||
wsess | workspaceesentials | gsuiteessentials | essentials | d4e | driveenterprise | drive4enterprise | 1010060001 |
|
||||
wsflw | workspacefrontline | workspacefrontlineworker | 1010020030
|
||||
```
|
||||
## Items built from primitives
|
||||
```
|
||||
@@ -346,7 +280,7 @@
|
||||
<ChannelCustomerID> ::= <String>
|
||||
<ChatMember> ::= spaces/<String>/members/<String>
|
||||
<ChatMessage> ::= spaces/<String>/messages/<String>
|
||||
<ChatSpace> ::= spaces/<String> | <String>
|
||||
<ChatSpace> ::= spaces/<String> | space <String> | space spaces/<String>
|
||||
<ChatThread> ::= spaces/<String>/threads/<String>
|
||||
<ClassroomInvitationID> ::= <String>
|
||||
<ClientID> ::= <String>
|
||||
@@ -421,6 +355,7 @@
|
||||
<DriveLabelFieldID> ::= <String>
|
||||
<DriveLabelSelectionID> ::= <String>
|
||||
<DriveLabelName> ::= labels/<DriveLabelID>[@latest|@published|@<Number>]
|
||||
<DriveLabelPermissionName> ::= labels/<DriveLabelID>[@latest|@published|@<Number>]/permissions/(audiences|groups|people)/<String>
|
||||
<EmailAddress> ::= <String>@<DomainName>
|
||||
<EmailItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
<EmailReplacement> ::= <String>
|
||||
@@ -456,6 +391,11 @@
|
||||
<Marker> ::= <String>
|
||||
<MatterItem> ::= <UniqueID>|<String>
|
||||
<MatterState> ::= open|closed|deleted
|
||||
<MessageContent> ::=
|
||||
(message|textmessage|htmlmessage <String>)|
|
||||
(file|textfile|htmlfile <FileName> [charset <Charset>])|
|
||||
(gdoc|ghtml <UserGoogleDoc>)|
|
||||
(gcsdoc|gcshtml <StorageBucketObjectName>)
|
||||
<MessageID> ::= <String>
|
||||
<Namespace> ::= <String>
|
||||
<NotesName> ::= notes/<String>
|
||||
@@ -529,7 +469,7 @@
|
||||
<ServiceAccountDisplayName> ::= <String>
|
||||
Maximum of 100 characters
|
||||
<ServiceAccountDescrition> ::= <String>
|
||||
Maximumof 256 chcracters
|
||||
Maximum of 256 chcracters
|
||||
<ServiceAccountEmail> ::= <ServiceAccountName>@<ProjectID>.iam.gserviceaccount.com
|
||||
<ServiceAccountUniqueID> ::= <Number>
|
||||
<ServiceAccountKey> ::= <String>
|
||||
@@ -584,8 +524,10 @@
|
||||
(tdlocale <Locale>)|
|
||||
(tdnobrowser [<Boolean>])|
|
||||
(tdnoemail [<Boolean>])|
|
||||
(tdnoescapechar [<Boolean>])|
|
||||
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
||||
(tdshare <EmailAddress> commenter|reader|writer)|
|
||||
(tdretaintitle [<Boolean>])|
|
||||
(tdshare <EmailAddress> commenter|reader|writer)*|
|
||||
(tdsheet (id:<Number>)|<String>)|
|
||||
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
|
||||
(tdsheettitle <String>)|
|
||||
|
||||
@@ -105,7 +105,9 @@ The second form is backwards compatible with Standard GAM and selection with `<C
|
||||
annotatedlocation|location|
|
||||
annotateduser|user|
|
||||
autoupdateexpiration|
|
||||
backlightinfo|
|
||||
bootmode|
|
||||
cpuinfo|
|
||||
cpustatusreports|
|
||||
deprovisionreason|
|
||||
devicefiles|
|
||||
@@ -551,6 +553,7 @@ gam print cros [todrive <ToDriveAttribute>*]
|
||||
[start <Date>] [end <Date>] [listlimit <Number>]
|
||||
[reverselists <CrOSListFieldNameList>]
|
||||
[timerangeorder ascending|descending] [showdvrsfp]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[sortheaders]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
@@ -593,6 +596,9 @@ otherwise, the remaining field names will appear in the order specified.
|
||||
- `timerangeorder descending` - Change the `activetimeranges` order from ascending (oldest to newest) to descending (newest to oldest); this makes it easy to get the `N` most recent values with `timeranges listlimit N timerangeorder descending`.
|
||||
- `showdvrsfp` - Display a field `diskVolumeReports.volumeInfo.storageFreePercentage` which is calculated as: `(diskVolumeReports.volumeInfo.storageFree/diskVolumeReports.volumeInfo.storageTotal)*100`
|
||||
|
||||
Add additional columns of data from the command line to the output
|
||||
* `addcsvdata <FieldName> <String>`
|
||||
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format:
|
||||
|
||||
- `formatjson` - Display the fields in JSON format.
|
||||
@@ -615,6 +621,7 @@ gam <CrOSTypeEntity> print cros [todrive <ToDriveAttribute>*]
|
||||
[start <Date>] [end <Date>] [listlimit <Number>]
|
||||
[reverselists <CrOSListFieldNameList>]
|
||||
[timerangeorder ascending|descending] [showdvrsfp]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[sortheaders]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
@@ -643,6 +650,9 @@ otherwise, the remaining field names will appear in the order specified.
|
||||
- `timerangeorder descending` - Change the `activetimeranges` order from ascending (oldest to newest) to descending (newest to oldest); this makes it easy to get the `N` most recent values with `timeranges listlimit N timerangeorder descending`.
|
||||
- `showdvrsfp` - Display a field `diskVolumeReports.volumeInfo.storageFreePercentage` which is calculated as: `(diskVolumeReports.volumeInfo.storageFree/diskVolumeReports.volumeInfo.storageTotal)*100`
|
||||
|
||||
Add additional columns of data from the command line to the output
|
||||
* `addcsvdata <FieldName> <String>`
|
||||
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format:
|
||||
|
||||
- `formatjson` - Display the fields in JSON format.
|
||||
|
||||
@@ -262,6 +262,8 @@ Data fields identified in a `csvkmd` argument.
|
||||
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<DriveLabelNameEntity> ::=
|
||||
<DriveLabelNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
|
||||
<DriveLabelPermissionNameEntity> ::=
|
||||
<DriveLabelPermissionNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
|
||||
<EmailAddressEntity> ::=
|
||||
<EmailAddressList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<FilterIDEntity> ::=
|
||||
|
||||
@@ -10,6 +10,251 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
||||
|
||||
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
|
||||
|
||||
### 6.72.08
|
||||
|
||||
Added option `countsonly` to `gam <UserTypeEntity> print|show notes` that displays
|
||||
the number of notes a user owns and the number of notes of user can edit.
|
||||
|
||||
### 6.72.07
|
||||
|
||||
Updated commands that send emails to not downshift `'First Last<firstlast@domain.com>'` to `'first last<firstlast@domain.com>'`.
|
||||
|
||||
### 6.72.06
|
||||
|
||||
Updated the following commands to properly handle emailaddress lists containing addresses of the form: `'First Last<firstlast@domain.com>'`.
|
||||
```
|
||||
gam <UserTypeEntity> sendemail recipient|to <RecipientEntity> [cc <RecipientEntity>] [bcc <RecipientEntity>] [singlemessage]
|
||||
gam create|update user ... notify <EmailAddressList>
|
||||
```
|
||||
|
||||
### 6.72.05
|
||||
|
||||
Cleaned up code for all commands that display Chat objects.
|
||||
|
||||
### 6.72.04
|
||||
|
||||
Added commands to display Chat events.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Chat#display-chat-events
|
||||
|
||||
### 6.72.03
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> create chatspace` that caused a trap.
|
||||
|
||||
### 6.72.02
|
||||
|
||||
Updated `gam delete admin <RoleAssignmentId>` to handle the following error that
|
||||
occurs when `<RoleAssignmentId>` references a user that has been deleted.
|
||||
```
|
||||
ERROR: 404: resourceNotFound - Does not exist
|
||||
```
|
||||
|
||||
### 6.72.01
|
||||
|
||||
Improved commands to display drive file comments.
|
||||
|
||||
### 6.72.00
|
||||
|
||||
Added commands to display drive file comments.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Comments
|
||||
|
||||
### 6.71.18
|
||||
|
||||
Updated `<CrOSFieldName>` to include `cpuinfo` and `backlightinfo`.
|
||||
|
||||
### 6.71.17
|
||||
|
||||
Added `depth` column to output of `gam <UserTypeEntity> print diskusage <DriveFileEntity>` that can
|
||||
be used to filter the depth of the folders displayed. Depth `-1` is the top level folder, depth `0`
|
||||
are its immediate children, depth `2` are the children of depth `1` and so forth.
|
||||
```
|
||||
gam config csv_output_row_filter "depth:count<1" user organizer@domain.com print diskusage teamdriveid <TeamDriveID>
|
||||
```
|
||||
|
||||
### 6.71.16
|
||||
|
||||
Updated `gam <UserTypeEntity> create|update sendas <EmailAddress> ... replyto <EmailAddress>`
|
||||
to allow uppercase letters in `sendas <EmailAddress>` and `replyto <EmailAddress>`.
|
||||
|
||||
### 6.71.15
|
||||
|
||||
Updated `gam create project` to handle the following error:
|
||||
```
|
||||
ERROR: 403: permissionDenied - Authentication error: 7; Error Details: User not allowed to access GCP services.
|
||||
```
|
||||
This error occurs when the Google Workspace admin or GCP project manager email address used in the command
|
||||
is in an OU where Google Cloud Platform is not enabled in Apps/Additional Google services.
|
||||
|
||||
### 6.71.14
|
||||
|
||||
Added a command to update a Gmail label's settings by specifying it's ID rather than it's name.
|
||||
```
|
||||
gam <UserTypeEntity> update labelid <LabelID> [name <String>]
|
||||
[messagelistvisibility hide|show] [labellistvisibility hide|show|showifunread]
|
||||
[backgroundcolor <LabelColorHex>] [textcolor <LabelColorHex>]
|
||||
```
|
||||
|
||||
### 6.71.13
|
||||
|
||||
Updated `<UserMultiAttribute>.location.buildingid <String>` to allow non-validated building IDs
|
||||
by specifying `nv:` at the beginning of `<String>`; e.g., `nv:Building X' sets the building ID to `Building X`.
|
||||
|
||||
### 6.71.12
|
||||
|
||||
Added option `showmimetype category <MimeTypeNameList>` to `gam <UserTypeEntity> print|show filecounts|filelist|filetree`
|
||||
```
|
||||
<MimeTypeName> ::= application|audio|font|image|message|model|multipart|text|video
|
||||
<MimeTypeNameList> ::= "<MimeTypeName>(,<MimeTypeName>)*"
|
||||
|
||||
gam user user@domain.com print filelist fields id,name,mimetype showmimetype prefixes audio,video
|
||||
```
|
||||
|
||||
### 6.71.11
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam print cros` that adds
|
||||
additional columns of data to the CSV file output. Typically, you would read CSV file of device IDs/serial numbers
|
||||
to generate a CSV file of results and copy data from the input CSV to the outout CSV.
|
||||
|
||||
### 6.71.10
|
||||
|
||||
Reverted change made in 6.71.09 to `gam <UserTypeEntity> print filelist` when `showmimetype` and `filepath|fullpath`
|
||||
were both specified. The change improved the performance when `showmimetype` selected a small number of files;
|
||||
the information for just those files was downloaded and then additional API calls were made to construct the file paths.
|
||||
However, if a large number of files were selected, the additional APIs calls decreased performance.
|
||||
|
||||
Added option `mimetypeinquery` can be used when you expect the query to return a small number of files
|
||||
relative to the total number of files.
|
||||
|
||||
### 6.71.09
|
||||
|
||||
Improved the performance of `gam <UserTypeEntity> print filelist` when `showmimetype` and `filepath|fullpath`
|
||||
are both specified.
|
||||
|
||||
### 6.71.08
|
||||
|
||||
Added option `oneitemperrow` to 'gam print admins|adminroles` to have each of a
|
||||
roles privileges displayed on a separate row with all of the other admin/role fields.
|
||||
This produces a CSV file that can be used in subsequent commands without further script processing.
|
||||
|
||||
### 6.71.07
|
||||
|
||||
Added command to upload changes to Google Docs.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Files-Manage#upload-changes-to-google-documents
|
||||
|
||||
### 6.71.06
|
||||
|
||||
Added additional error handling to Gmail Client Side Encryption commands.
|
||||
|
||||
Added license product Education Endpoint Management
|
||||
* ProductID - 101049
|
||||
|
||||
Added license SKU Endpoint Education Upgrade
|
||||
* ProductID - 101049
|
||||
* SKUID - 1010490001 | eeu
|
||||
|
||||
### 6.71.05
|
||||
|
||||
Fixed a bug introduced in 6.71.00 that caused a trap in `gam <UserTypeEntity> print filelist`.
|
||||
|
||||
Added option `tdfrom <EmailAddress>` to `<ToDriveAttribute>` that causes GAM to use `<EmailAddress>` as the from address
|
||||
in all emails sent. By default, the from address is the Google Workspace Admin in `gam oauth info`.
|
||||
|
||||
### 6.71.04
|
||||
|
||||
Updated `gam <UserTypeEntity> create|update cseidentity` to accept either of the following key pair options:
|
||||
* `primarykeypairid <KeyPairID>` - The configuration of a CSE identity that uses the same key pair for signing and encryption.
|
||||
* `signingkeypairid <KeyPairID> encryptionkeypairid <KeyPairID>` - The configuration of a CSE identity that uses different key pairs for signing and encryption.
|
||||
|
||||
Updated CSV output row sorting to avoid a trap that occurred when a row was missing one of the sort fields.
|
||||
|
||||
### 6.71.03
|
||||
|
||||
Added option `tdalert <EmailAddress>` to `<ToDriveAttribute>`. When a todrive file is created or updated,
|
||||
GAM will send notification emails to all `tdalert <EmailAddress>` users if `tdnotify` is true.
|
||||
`<EmailAddress>` must be valid within your Google Workspace.
|
||||
|
||||
### 6.71.02
|
||||
|
||||
Added additional error handling to Gmail Client Side Encryption commands.
|
||||
|
||||
### 6.71.01
|
||||
|
||||
Fixed bug in `gam audit monitor create` that caused a trap.
|
||||
|
||||
### 6.71.00
|
||||
|
||||
Added `csv_output_sort_headers` string list variable to `gam.cfg` that causes GAM to sort CSV output
|
||||
rows by the column headers specified in the variable. The column headers are case insensitive and
|
||||
if column header does not appear in the CSV output, it is ignored.
|
||||
|
||||
Added `sortheaders <StringList>` to `redirect csv <FileName>` that has the same effect as above.
|
||||
|
||||
The sort keys specified in `redirect csv ... sortheaders <StringList>` take precedence over the values from `gam.cfg`.
|
||||
|
||||
Added option `tdsubject <String>` to `<ToDriveAttribute>` that causes GAM to use `<String>` as the subject
|
||||
in all emails sent. In `<String>`, `#file#` will, be replaced by the file title and `#sheet#` will be replaced
|
||||
by the sheet/tab title. By default, the subject is the file title.
|
||||
|
||||
### 6.70.09
|
||||
|
||||
Added additional error handling to Gmail Client Side Encryption commands.
|
||||
|
||||
Added options `showpem` and `showkaclsdata` to all Gmail CSE commands that process/display
|
||||
CSE key pairs. By default, the `pem` and `kaclsdata` fields will not be displayed unless
|
||||
the corresponding `show` option is specified.
|
||||
|
||||
### 6.70.08
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> create cseidentity <KeyPairID>` that caused an error.
|
||||
|
||||
### 6.70.07
|
||||
|
||||
Updated user instructions in `gam oauth create` and `gam <UserTypeEntity> update serviceaccount`
|
||||
and changed `s` from selecting all scopes to selecting default scopes.
|
||||
|
||||
### 6.70.06
|
||||
|
||||
Updated `gam info users <UserTypeEntity>` to not include group tree infornation unless option `grouptree` is specified.
|
||||
|
||||
### 6.70.05
|
||||
|
||||
Added commands to create|delete|display Drive Label permissions.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Labels
|
||||
|
||||
### 6.70.04
|
||||
|
||||
Added option `showvalidcolumn` to `gam print users` that can be used to identify whether
|
||||
users are defined in the domain. Typically, you would read CSV file of email addresses
|
||||
to verify as domain members.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users#verify-domain-membership
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam print users` that adds
|
||||
additional columns of data to the CSV file output. Typically, you would read CSV file of email addresses
|
||||
to generate a CSV file of results and copy data from the input CSV to the outout CSV.
|
||||
|
||||
### 6.70.03
|
||||
|
||||
Renamed license product DuetAI to Gemini
|
||||
* ProductID - 101047
|
||||
|
||||
Renamed license SKU DuetAI for Google Workspace to Gemini Enterprise
|
||||
* ProductID - 101047
|
||||
* SKUID - 1010470001 | geminient | duetai
|
||||
|
||||
Added support for license SKU Gemini Business
|
||||
* ProductID - 101047
|
||||
* SKUID - 1010470003 | geminibiz
|
||||
|
||||
### 6.70.02
|
||||
|
||||
In 6.69.00, GAM starting using course owner access when using `copyfrom` in `gam create|update course`
|
||||
regardless of the value of `gam.cfg/use_course_owner_access`. This prevents copying from courses
|
||||
with a deleted user. GAM now uses the value of `gam.cfg/use_course_owner_access` when `copyfrom` is used.o
|
||||
|
||||
### 6.70.01
|
||||
|
||||
Added `gmail_cse_incert_dir` and `gmail_cse_inkey_dir` path variables to `gam.cfg` that provide
|
||||
@@ -25,10 +270,10 @@ This is an initial, minimally tested release; proceed with care and report all i
|
||||
|
||||
### 6.69.00
|
||||
|
||||
Added `use_classroom_owner_access` Boolean variable to `gam.cfg` that controls how GAM gets
|
||||
classroom member information and removes students/teachers. Client access does not provide
|
||||
Added `use_course_owner_access` Boolean variable to `gam.cfg` that controls how GAM gets
|
||||
classroom member information and removes students/teachers. Client/admin access does not provide
|
||||
complete information about non-domain students/teachers.
|
||||
* `False` - Use client access; this is the default. Use if you don't have non-domain members in your courses.
|
||||
* `False` - Use client/admin access; this is the default. Use if you don't have non-domain members in your courses.
|
||||
* `True` - Use service account access as the classroom owner. An extra API call is required per course to authenticate the owner; this will affect performance
|
||||
|
||||
Added the following command which must be used to delete classroom invitations for non-domain students/teachers.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* https://cloud.google.com/identity/docs/reference/rest/v1/groups
|
||||
|
||||
## Name guidelines
|
||||
* https://support.google.com/a/answer/9193374?hl=en
|
||||
* https://support.google.com/a/answer/9193374
|
||||
|
||||
## Query documentation
|
||||
* https://developers.google.com/admin-sdk/directory/v1/guides/search-groups
|
||||
|
||||
@@ -264,9 +264,6 @@ writes the credentials into the file oauth2.txt.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam oauth create
|
||||
|
||||
Select the authorized scopes by entering a number.
|
||||
Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
[*] 2) Chrome Management API - AppDetails read only
|
||||
@@ -274,7 +271,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 4) Chrome Management API - read only
|
||||
[*] 5) Chrome Policy API (supports readonly)
|
||||
[*] 6) Chrome Printer Management API (supports readonly)
|
||||
[ ] 7) Chrome Version History API
|
||||
[*] 7) Chrome Version History API
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
@@ -284,7 +281,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 14) Classroom API - Profile Photos
|
||||
[*] 15) Classroom API - Rosters (supports readonly)
|
||||
[*] 16) Classroom API - Student Guardians (supports readonly)
|
||||
[*] 17) Cloud Channel API (supports readonly)
|
||||
[ ] 17) Cloud Channel API (supports readonly)
|
||||
[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly)
|
||||
[*] 19) Cloud Identity Groups API (supports readonly)
|
||||
[*] 20) Cloud Identity OrgUnits API (supports readonly)
|
||||
@@ -314,15 +311,22 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[ ] 44) Pub / Sub API
|
||||
[*] 45) Reports API - Audit Reports
|
||||
[*] 46) Reports API - Usage Reports
|
||||
[*] 47) Reseller API
|
||||
[ ] 47) Reseller API
|
||||
[*] 48) Site Verification API
|
||||
[ ] 49) Sites API
|
||||
[*] 50) Vault API (supports readonly)
|
||||
|
||||
s) Select all scopes
|
||||
u) Unselect all scopes
|
||||
e) Exit without changes
|
||||
c) Continue to authorization
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
|
||||
Please enter 0-50[a|r] or s|u|e|c: c
|
||||
|
||||
Enter your Google Workspace admin email address? admin@domain.com
|
||||
@@ -709,9 +713,6 @@ writes the credentials into the file oauth2.txt.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam oauth create
|
||||
|
||||
Select the authorized scopes by entering a number.
|
||||
Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
[*] 2) Chrome Management API - AppDetails read only
|
||||
@@ -719,7 +720,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 4) Chrome Management API - read only
|
||||
[*] 5) Chrome Policy API (supports readonly)
|
||||
[*] 6) Chrome Printer Management API (supports readonly)
|
||||
[ ] 7) Chrome Version History API
|
||||
[*] 7) Chrome Version History API
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
@@ -729,7 +730,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 14) Classroom API - Profile Photos
|
||||
[*] 15) Classroom API - Rosters (supports readonly)
|
||||
[*] 16) Classroom API - Student Guardians (supports readonly)
|
||||
[*] 17) Cloud Channel API (supports readonly)
|
||||
[ ] 17) Cloud Channel API (supports readonly)
|
||||
[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly)
|
||||
[*] 19) Cloud Identity Groups API (supports readonly)
|
||||
[*] 20) Cloud Identity OrgUnits API (supports readonly)
|
||||
@@ -759,15 +760,22 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[ ] 44) Pub / Sub API
|
||||
[*] 45) Reports API - Audit Reports
|
||||
[*] 46) Reports API - Usage Reports
|
||||
[*] 47) Reseller API
|
||||
[ ] 47) Reseller API
|
||||
[*] 48) Site Verification API
|
||||
[ ] 49) Sites API
|
||||
[*] 50) Vault API (supports readonly)
|
||||
|
||||
s) Select all scopes
|
||||
u) Unselect all scopes
|
||||
e) Exit without changes
|
||||
c) Continue to authorization
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
|
||||
Please enter 0-50[a|r] or s|u|e|c: c
|
||||
|
||||
Enter your Google Workspace admin email address? admin@domain.com
|
||||
|
||||
@@ -99,9 +99,6 @@ writes the credentials into the file oauth2.txt.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam oauth create
|
||||
|
||||
Select the authorized scopes by entering a number.
|
||||
Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
[*] 2) Chrome Management API - AppDetails read only
|
||||
@@ -109,7 +106,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 4) Chrome Management API - read only
|
||||
[*] 5) Chrome Policy API (supports readonly)
|
||||
[*] 6) Chrome Printer Management API (supports readonly)
|
||||
[ ] 7) Chrome Version History API
|
||||
[*] 7) Chrome Version History API
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
@@ -119,7 +116,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 14) Classroom API - Profile Photos
|
||||
[*] 15) Classroom API - Rosters (supports readonly)
|
||||
[*] 16) Classroom API - Student Guardians (supports readonly)
|
||||
[*] 17) Cloud Channel API (supports readonly)
|
||||
[ ] 17) Cloud Channel API (supports readonly)
|
||||
[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly)
|
||||
[*] 19) Cloud Identity Groups API (supports readonly)
|
||||
[*] 20) Cloud Identity OrgUnits API (supports readonly)
|
||||
@@ -149,15 +146,22 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[ ] 44) Pub / Sub API
|
||||
[*] 45) Reports API - Audit Reports
|
||||
[*] 46) Reports API - Usage Reports
|
||||
[*] 47) Reseller API
|
||||
[ ] 47) Reseller API
|
||||
[*] 48) Site Verification API
|
||||
[ ] 49) Sites API
|
||||
[*] 50) Vault API (supports readonly)
|
||||
|
||||
s) Select all scopes
|
||||
u) Unselect all scopes
|
||||
e) Exit without changes
|
||||
c) Continue to authorization
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
|
||||
Please enter 0-50[a|r] or s|u|e|c: c
|
||||
|
||||
Enter your Google Workspace admin email address? admin@domain.com
|
||||
@@ -382,9 +386,6 @@ writes the credentials into the file oauth2.txt.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam oauth create
|
||||
|
||||
Select the authorized scopes by entering a number.
|
||||
Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
[*] 2) Chrome Management API - AppDetails read only
|
||||
@@ -392,7 +393,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 4) Chrome Management API - read only
|
||||
[*] 5) Chrome Policy API (supports readonly)
|
||||
[*] 6) Chrome Printer Management API (supports readonly)
|
||||
[ ] 7) Chrome Version History API
|
||||
[*] 7) Chrome Version History API
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
@@ -402,7 +403,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 14) Classroom API - Profile Photos
|
||||
[*] 15) Classroom API - Rosters (supports readonly)
|
||||
[*] 16) Classroom API - Student Guardians (supports readonly)
|
||||
[*] 17) Cloud Channel API (supports readonly)
|
||||
[ ] 17) Cloud Channel API (supports readonly)
|
||||
[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly)
|
||||
[*] 19) Cloud Identity Groups API (supports readonly)
|
||||
[*] 20) Cloud Identity OrgUnits API (supports readonly)
|
||||
@@ -432,15 +433,22 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[ ] 44) Pub / Sub API
|
||||
[*] 45) Reports API - Audit Reports
|
||||
[*] 46) Reports API - Usage Reports
|
||||
[*] 47) Reseller API
|
||||
[ ] 47) Reseller API
|
||||
[*] 48) Site Verification API
|
||||
[ ] 49) Sites API
|
||||
[*] 50) Vault API (supports readonly)
|
||||
|
||||
s) Select all scopes
|
||||
u) Unselect all scopes
|
||||
e) Exit without changes
|
||||
c) Continue to authorization
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
|
||||
Please enter 0-50[a|r] or s|u|e|c: c
|
||||
|
||||
Enter your Google Workspace admin email address? admin@domain.com
|
||||
|
||||
@@ -334,7 +334,7 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.70.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.72.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -343,9 +343,6 @@ Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_c
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam oauth create
|
||||
|
||||
Select the authorized scopes by entering a number.
|
||||
Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
[*] 2) Chrome Management API - AppDetails read only
|
||||
@@ -353,7 +350,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 4) Chrome Management API - read only
|
||||
[*] 5) Chrome Policy API (supports readonly)
|
||||
[*] 6) Chrome Printer Management API (supports readonly)
|
||||
[ ] 7) Chrome Version History API
|
||||
[*] 7) Chrome Version History API
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
@@ -363,7 +360,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 14) Classroom API - Profile Photos
|
||||
[*] 15) Classroom API - Rosters (supports readonly)
|
||||
[*] 16) Classroom API - Student Guardians (supports readonly)
|
||||
[*] 17) Cloud Channel API (supports readonly)
|
||||
[ ] 17) Cloud Channel API (supports readonly)
|
||||
[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly)
|
||||
[*] 19) Cloud Identity Groups API (supports readonly)
|
||||
[*] 20) Cloud Identity OrgUnits API (supports readonly)
|
||||
@@ -393,15 +390,22 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[ ] 44) Pub / Sub API
|
||||
[*] 45) Reports API - Audit Reports
|
||||
[*] 46) Reports API - Usage Reports
|
||||
[*] 47) Reseller API
|
||||
[ ] 47) Reseller API
|
||||
[*] 48) Site Verification API
|
||||
[ ] 49) Sites API
|
||||
[*] 50) Vault API (supports readonly)
|
||||
|
||||
s) Select all scopes
|
||||
u) Unselect all scopes
|
||||
e) Exit without changes
|
||||
c) Continue to authorization
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
|
||||
Please enter 0-50[a|r] or s|u|e|c: c
|
||||
|
||||
Enter your Google Workspace admin email address? admin@domain.com
|
||||
@@ -1002,7 +1006,7 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
|
||||
C:\GAMADV-XTD3>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.70.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.72.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
@@ -1011,9 +1015,6 @@ Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, customer_id: my_customer, d
|
||||
|
||||
C:\GAMADV-XTD3>gam oauth create
|
||||
|
||||
Select the authorized scopes by entering a number.
|
||||
Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
[*] 2) Chrome Management API - AppDetails read only
|
||||
@@ -1021,7 +1022,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 4) Chrome Management API - read only
|
||||
[*] 5) Chrome Policy API (supports readonly)
|
||||
[*] 6) Chrome Printer Management API (supports readonly)
|
||||
[ ] 7) Chrome Version History API
|
||||
[*] 7) Chrome Version History API
|
||||
[*] 8) Classroom API - Course Announcements (supports readonly)
|
||||
[*] 9) Classroom API - Course Topics (supports readonly)
|
||||
[*] 10) Classroom API - Course Work/Materials (supports readonly)
|
||||
@@ -1031,7 +1032,7 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[*] 14) Classroom API - Profile Photos
|
||||
[*] 15) Classroom API - Rosters (supports readonly)
|
||||
[*] 16) Classroom API - Student Guardians (supports readonly)
|
||||
[*] 17) Cloud Channel API (supports readonly)
|
||||
[ ] 17) Cloud Channel API (supports readonly)
|
||||
[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly)
|
||||
[*] 19) Cloud Identity Groups API (supports readonly)
|
||||
[*] 20) Cloud Identity OrgUnits API (supports readonly)
|
||||
@@ -1061,15 +1062,22 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
|
||||
[ ] 44) Pub / Sub API
|
||||
[*] 45) Reports API - Audit Reports
|
||||
[*] 46) Reports API - Usage Reports
|
||||
[*] 47) Reseller API
|
||||
[ ] 47) Reseller API
|
||||
[*] 48) Site Verification API
|
||||
[ ] 49) Sites API
|
||||
[*] 50) Vault API (supports readonly)
|
||||
|
||||
s) Select all scopes
|
||||
u) Unselect all scopes
|
||||
e) Exit without changes
|
||||
c) Continue to authorization
|
||||
Select an unselected scope [ ] by entering a number; yields [*]
|
||||
For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R]
|
||||
For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A]
|
||||
Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*]
|
||||
Unselect a selected scope [*] by entering a number; yields [ ]
|
||||
Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
|
||||
Please enter 0-50[a|r] or s|u|e|c: c
|
||||
|
||||
Enter your Google Workspace admin email address? admin@domain.com
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
| Cloud Identity Free | 101001 |
|
||||
| Cloud Identity Premium | 101005 |
|
||||
| Cloud Search | 101035 |
|
||||
| Duet AI | 101047 |
|
||||
| Education Endpoint Management | 101049 |
|
||||
| Gemini | 101047 |
|
||||
| Google Chrome Device Management | Google-Chrome-Device-Management |
|
||||
| Google Drive Storage | Google-Drive-storage |
|
||||
| Google Meet Global Dialing | 101036 |
|
||||
@@ -46,11 +47,13 @@
|
||||
| Cloud Identity Free | 1010010001 | cloudidentity |
|
||||
| Cloud Identity Premium | 1010050001 | cloudidentitypremium |
|
||||
| Cloud Search | 1010350001 | cloudsearch |
|
||||
| Duet AI | 1010470001 | duetai |
|
||||
| Endpoint Education Upgrade | 1010490001 | eeu |
|
||||
| G Suite Basic | Google-Apps-For-Business | gsuitebasic |
|
||||
| G Suite Business | Google-Apps-Unlimited | gsuitebusiness |
|
||||
| G Suite Legacy | Google-Apps | standard |
|
||||
| G Suite Lite | Google-Apps-Lite | gsuitelite |
|
||||
| Gemini Business | 1010470003 | geminibiz
|
||||
| Gemini Enterprise | 1010470001 | geminient | duetai |
|
||||
| Google Apps Message Security | Google-Apps-For-Postini | postini |
|
||||
| Google Chrome Device Management | Google-Chrome-Device-Management | cdm |
|
||||
| Google Drive Storage 16TB | Google-Drive-storage-16TB | 16tb |
|
||||
@@ -115,6 +118,7 @@
|
||||
101040 |
|
||||
101043 |
|
||||
101047 |
|
||||
101049 |
|
||||
Google-Apps |
|
||||
Google-Chrome-Device-Management |
|
||||
Google-Drive-storage |
|
||||
@@ -132,52 +136,58 @@
|
||||
4tb | drive4tb | googledrivestorage4tb | Google-Drive-storage-4TB |
|
||||
8tb | drive8tb | googledrivestorage8tb | Google-Drive-storage-8TB |
|
||||
16tb | drive16tb | googledrivestorage16tb | Google-Drive-storage-16TB |
|
||||
appsheetcore | 1010380001 |
|
||||
appsheetstandard | appsheetenterprisestandard | 1010380002 |
|
||||
appsheetplus | appsheetenterpriseplus | 1010380003 |
|
||||
assuredcontrols | 1010390001 |
|
||||
bce | beyondcorp | beyondcorpenterprise | 1010400001 |
|
||||
appsheetcore | 1010380001 | AppSheet Core |
|
||||
appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard |
|
||||
appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus |
|
||||
assuredcontrols | 1010390001 | Assured Controls |
|
||||
bce | beyondcorp | beyondcorpenterprise | 1010400001 | Beyond Corp Enterprise |
|
||||
cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management |
|
||||
cloudidentity | identity | 1010010001 |
|
||||
cloudidentitypremium | identitypremium | 1010050001 |
|
||||
cloudsearch | 1010350001 |
|
||||
duetai | 1010470001 |
|
||||
cloudidentity | identity | 1010010001 | Cloud Identity |
|
||||
cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium |
|
||||
cloudsearch | 1010350001 | Cloud Search |
|
||||
eeu | 1010490001 | SKU Endpoint Education Upgrade |
|
||||
geminibiz | 1010470003 | Gemini Business |
|
||||
geminient| duetai | 1010470001 | Gemini Enterprise |
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 |
|
||||
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 |
|
||||
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 |
|
||||
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 |
|
||||
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 | Google Workspace Business - Archived User |
|
||||
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 | Google Workspace Enterprise Plus - Archived User |
|
||||
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 | Google Workspace for Education Plus - Legacy |
|
||||
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 | Google Workspace for Education Plus - Legacy (Student) |
|
||||
gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government |
|
||||
gsuitelite | gal | gsl | lite | Google-Apps-Lite |
|
||||
gwep | workspaceeducationplus | 1010310008 |
|
||||
gwepstaff | workspaceeducationplusstaff | 1010310009 |
|
||||
gwepstudent | workspaceeducationplusstudent | 1010310010 |
|
||||
gwes | workspaceeducationstandard | 1010310005 |
|
||||
gwesstaff | workspaceeducationstandardstaff | 1010310006 |
|
||||
gwesstudent | workspaceeducationstandardstudent | 1010310007 |
|
||||
gwetlu | workspaceeducationupgrade | 1010370001 |
|
||||
gwlabs | workspacelabs | 1010470002
|
||||
meetdialing | googlemeetglobaldialing | 1010360001 |
|
||||
gwep | workspaceeducationplus | 1010310008 | Google Workspace for Education Plus |
|
||||
gwepstaff | workspaceeducationplusstaff | 1010310009 | Google Workspace for Education Plus (Staff) |
|
||||
gwepstudent | workspaceeducationplusstudent | 1010310010 | Google Workspace for Education Plus (Extra Student)|
|
||||
gwes | workspaceeducationstandard | 1010310005 | Google Workspace for Education Standard |
|
||||
gwesstaff | workspaceeducationstandardstaff | 1010310006 | Google Workspace for Education Standard (Staff) |
|
||||
gwesstudent | workspaceeducationstandardstudent | 1010310007 | Google Workspace for Education Standard (Extra Student)
|
||||
gwetlu | workspaceeducationupgrade | 1010370001 | Google Workspace for Education: Teaching and Learning Upgrade |
|
||||
gwlabs | workspacelabs | 1010470002 | Google Workspace Labs |
|
||||
meetdialing | googlemeetglobaldialing | 1010360001 | Google Meet Global Dialing |
|
||||
postini | gams | gsuitegams | gsuitepostini | gsuitemessagesecurity | Google-Apps-For-Postini |
|
||||
standard | free | Google-Apps |
|
||||
vault | googlevault | Google-Vault |
|
||||
vfe | googlevaultformeremployee | Google-Vault-Former-Employee |
|
||||
voicepremier | gvpremier | googlevoicepremier | 1010330002 |
|
||||
voicestandard | gvstandard | googlevoicestandard | 1010330004 |
|
||||
voicestarter | gvstarter | googlevoicestarter | 1010330003 |
|
||||
wsas | plusstorage | 1010430001 |
|
||||
wsbizplus | workspacebusinessplus | 1010020025 |
|
||||
wsbizplusarchived | workspacebusinessplusarchived | 1010340003 |
|
||||
wsbizstan | workspacebusinessstandard | 1010020028 |
|
||||
wsbizstarter | workspacebusinessstarter | wsbizstart | 1010020027 |
|
||||
wsentess | workspaceenterpriseessentials | 1010060003 |
|
||||
wsentplus | workspaceenterpriseplus | gae | gse | enterprise | gsuiteenterprise | 1010020020 |
|
||||
wsentstan | workspaceenterprisestandard | 1010020026 |
|
||||
wsentstanarchived | workspaceenterprisestandardarchived | 1010340004 |
|
||||
wsentstarter | workspaceenterprisestarter | 1010020029 | wes |
|
||||
wsess | workspaceesentials | gsuiteessentials | essentials | d4e | driveenterprise | drive4enterprise | 1010060001 |
|
||||
wsflw | workspacefrontline | workspacefrontlineworker | 1010020030
|
||||
voicepremier | gvpremier | googlevoicepremier | 1010330002 | Google Voice Premier
|
||||
voicestandard | gvstandard | googlevoicestandard | 1010330004 | Google Voice Standard |
|
||||
voicestarter | gvstarter | googlevoicestarter | 1010330003 | Google Voice Starter |
|
||||
wsas | plusstorage | 1010430001 | Google Workspace Additional Storage |
|
||||
wsbizplus | workspacebusinessplus | 1010020025 | Google Workspace Business Plus |
|
||||
wsbizplusarchived | workspacebusinessplusarchived | 1010340003 | Google Workspace Business Plus - Archived User |
|
||||
wsbizstan | workspacebusinessstandard | 1010020028 | Google Workspace Business Standard }
|
||||
wsbizstanarchived | workspacebusinessstandardarchived | 1010340006 | Google Workspace Business Standard - Archived User |
|
||||
wsbizstarter | workspacebusinessstarter | wsbizstart | 1010020027 | Google Workspace Business Starter |
|
||||
wsbizstarterarchived | workspacebusinessstarterarchived | 1010340005 | Google Workspace Business Starter - Archived User |
|
||||
wsentess | workspaceenterpriseessentials | 1010060003 | Google Workspace Enterprise Essentials |
|
||||
wsentplus | workspaceenterpriseplus | gae | gse | enterprise | gsuiteenterprise | 1010020020 | Google Workspace Enterprise Plus |
|
||||
wsentstan | workspaceenterprisestandard | 1010020026 | Google Workspace Enterprise Standard |
|
||||
wsentstanarchived | workspaceenterprisestandardarchived | 1010340004 | Google Workspace Enterprise Standard - Archived User |
|
||||
wsentstarter | workspaceenterprisestarter | wes | 1010020029 | Workspace Enterprise Starter |
|
||||
wsess | workspaceesentials | gsuiteessentials | essentials | d4e | driveenterprise | drive4enterprise | 1010060001 | Google Workspace Essentials |
|
||||
wsessplus | workspaceessentialsplus | 1010060005 | Google Workspace Essentials Plus |
|
||||
wsflw | workspacefrontline | workspacefrontlineworker | 1010020030 | Google Workspace Frontline Starter |
|
||||
wsflwstan | workspacefrontlinestan | workspacefrontlineworkerstan | 1010020031 | Google Workspace Frontline Standard
|
||||
<SKUIDList> ::= "<SKUID>(,<SKUID>)*"
|
||||
```
|
||||
## Notes
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<DriveFolderNameList> ::= "<DriveFolderName>(,<DriveFolderName>)*"
|
||||
<DriveLabelIDList> ::= "<DriveLabelID>(,<DriveLabelID>)*"
|
||||
<DriveLabelNameList> ::= "<DriveLabelName>(,<DriveLabelName>)*"
|
||||
<DriveLabelPermissionNameList> ::= "<DriveLabelPermissionName>(,<DriveLabelPermissionName>)*"
|
||||
<DriveLabelFieldIDList> ::= "<DriveLabelFieldID>(,<DriveLabelFieldID>)*"
|
||||
<DriveLabelSelectionIDList> ::= "<DriveLabelSelectionID>(,<DriveLabelSelectionID>)*"
|
||||
<EmailAddressList> ::= "<EmailAddress>(,<EmailAddress>)*"
|
||||
@@ -68,6 +69,7 @@
|
||||
<MatterStateList> ::= "<MatterState>(,<MatterState>)*"
|
||||
<MessageIDList> ::= "<MessageID>(,<MessageID>)*"
|
||||
<MimeTypeList> ::= "<MimeType>(,<MimeType>)*"
|
||||
<MimeTypeNameList> ::= "<MimeTypeName>(,<MimeTypeName>)*"
|
||||
<NamespaceList> ::= "<Namespace>(,<Namespace>)*"
|
||||
<NotesNameList> ::= "<NotesName>(,<NotesName>)*"
|
||||
<OrgUnitList> ::= "<OrgUnitItem>(,<OrgUnitItem>)*"
|
||||
|
||||
@@ -56,6 +56,7 @@ The only `<VariableNames>` recognized in this `<Section>` are:
|
||||
* `csv_output_row_drop_filter`
|
||||
* `csv_output_row_drop_filter_mode`
|
||||
* `csv_output_row_limit`
|
||||
* `csv_output_sort_headers`
|
||||
|
||||
### Select input filter section
|
||||
Select an input filter section from gam.cfg and process a GAM command using values from that section.
|
||||
@@ -113,7 +114,7 @@ You can redirect stdout and stderr to null and stderr can be redirected to stdou
|
||||
<Redirect> ::=
|
||||
redirect csv <FileName> [multiprocess] [append] [noheader] [charset <Charset>]
|
||||
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
|
||||
[timestampcolumn <String>]
|
||||
[sortheaders <StringList>] [timestampcolumn <String>]
|
||||
[todrive <ToDriveAttribute>*] |
|
||||
redirect stdout <FileName> [multiprocess] [append] |
|
||||
redirect stdout null [multiprocess] |
|
||||
@@ -151,6 +152,9 @@ The `quotechar <Character>` subargument sets the character used to quote fields
|
||||
that contaim special charactere; the default value is the value of `csv_output_quote_char` in `gam.cfg`
|
||||
which defaults to double quote.
|
||||
|
||||
The `sortheaders <StringList>` argument causes GAM to sort CSV output rows by the column headers specified in `<StringList>`.
|
||||
The column headers are case insensitive and if column header does not appear in the CSV output, it is ignored.
|
||||
|
||||
The `timestampcolumn <String>` adds a column named `<String>` to the CSV file; the value is the
|
||||
timestamp of when the GAM command started.
|
||||
|
||||
|
||||
@@ -192,6 +192,7 @@ By default, all users of the org units are displayed:
|
||||
* `nousers` - Don't display users of the org units
|
||||
* `notsuspended` - Display non-suspended users of the org units
|
||||
* `suspended` - Display suspended users of the org units
|
||||
* `children|child` - Display users in any child org unit
|
||||
|
||||
## Print organizational units
|
||||
This command displays information in CSV format.
|
||||
|
||||
@@ -6,6 +6,7 @@ Thank you.
|
||||
|
||||
* Gabriel Clifton - https://docs.google.com/document/d/1p32QOBTr89GaG7RfCafSbFuhlUQ9r3qBM_666E0xvQM/edit
|
||||
* Steve Larsen - https://docs.google.com/spreadsheets/d/1MzzA-u-cmoQcJnQOovCnZcEKMjvOyFhfkdFdf10X_GI/edit
|
||||
* Iain Macleod - https://docs.google.com/document/d/1QxWAPdhROcx70OXLpSD9Trh3vs-nJKSMiaMZCTwOOTg/edit?pli=1#heading=h.2a2azzpy36k0
|
||||
* Kevin Melillo - https://github.com/KevinMelilloIEEE/gam-script
|
||||
* James Seymour - https://sites.google.com/jis.edu.bn/gam-commands/home
|
||||
* Amado Tejada - https://github.com/amadotejada/GAMpass
|
||||
|
||||
@@ -59,46 +59,58 @@ Thanks to Duncan Isaksen-Loxton for a script to help manage multiple domains.
|
||||
4tb | drive4tb | googledrivestorage4tb | Google-Drive-storage-4TB |
|
||||
8tb | drive8tb | googledrivestorage8tb | Google-Drive-storage-8TB |
|
||||
16tb | drive16tb | googledrivestorage16tb | Google-Drive-storage-16TB |
|
||||
assuredcontrols | 1010390001 |
|
||||
bce | beyondcorp | beyondcorpenterprise | 1010400001 |
|
||||
appsheetcore | 1010380001 | AppSheet Core |
|
||||
appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard |
|
||||
appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus |
|
||||
assuredcontrols | 1010390001 | Assured Controls |
|
||||
bce | beyondcorp | beyondcorpenterprise | 1010400001 | Beyond Corp Enterprise |
|
||||
cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management |
|
||||
cloudidentity | identity | 1010010001 |
|
||||
cloudidentitypremium | identitypremium | 1010050001 |
|
||||
cloudsearch | 1010350001 |
|
||||
cloudidentity | identity | 1010010001 | Cloud Identity |
|
||||
cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium |
|
||||
cloudsearch | 1010350001 | Cloud Search |
|
||||
eeu | 1010490001 | SKU Endpoint Education Upgrade |
|
||||
geminibiz | 1010470003 | Gemini Business |
|
||||
geminient| duetai | 1010470001 | Gemini Enterprise |
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 |
|
||||
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 |
|
||||
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 |
|
||||
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 |
|
||||
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 | Google Workspace Business - Archived User |
|
||||
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 | Google Workspace Enterprise Plus - Archived User |
|
||||
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 | Google Workspace for Education Plus - Legacy |
|
||||
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 | Google Workspace for Education Plus - Legacy (Student) |
|
||||
gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government |
|
||||
gsuitelite | gal | gsl | lite | Google-Apps-Lite |
|
||||
gwep | workspaceeducationplus | 1010310008 |
|
||||
gwepstaff | workspaceeducationplusstaff | 1010310009 |
|
||||
gwepstudent | workspaceeducationplusstudent | 1010310010 |
|
||||
gwes | workspaceeducationstandard | 1010310005 |
|
||||
gwesstaff | workspaceeducationstandardstaff | 1010310006 |
|
||||
gwesstudent | workspaceeducationstandardstudent | 1010310007 |
|
||||
gwetlu | workspaceeducationupgrade | 1010370001 |
|
||||
meetdialing | googlemeetglobaldialing | 1010360001 |
|
||||
gwep | workspaceeducationplus | 1010310008 | Google Workspace for Education Plus |
|
||||
gwepstaff | workspaceeducationplusstaff | 1010310009 | Google Workspace for Education Plus (Staff) |
|
||||
gwepstudent | workspaceeducationplusstudent | 1010310010 | Google Workspace for Education Plus (Extra Student)|
|
||||
gwes | workspaceeducationstandard | 1010310005 | Google Workspace for Education Standard |
|
||||
gwesstaff | workspaceeducationstandardstaff | 1010310006 | Google Workspace for Education Standard (Staff) |
|
||||
gwesstudent | workspaceeducationstandardstudent | 1010310007 | Google Workspace for Education Standard (Extra Student)
|
||||
gwetlu | workspaceeducationupgrade | 1010370001 | Google Workspace for Education: Teaching and Learning Upgrade |
|
||||
gwlabs | workspacelabs | 1010470002 | Google Workspace Labs |
|
||||
meetdialing | googlemeetglobaldialing | 1010360001 | Google Meet Global Dialing |
|
||||
postini | gams | gsuitegams | gsuitepostini | gsuitemessagesecurity | Google-Apps-For-Postini |
|
||||
standard | free | Google-Apps |
|
||||
vault | googlevault | Google-Vault |
|
||||
vfe | googlevaultformeremployee | Google-Vault-Former-Employee |
|
||||
voicepremier | gvpremier | googlevoicepremier | 1010330002 |
|
||||
voicestandard | gvstandard | googlevoicestandard | 1010330004 |
|
||||
voicestarter | gvstarter | googlevoicestarter | 1010330003 |
|
||||
wsbizplus | workspacebusinessplus | 1010020025 |
|
||||
wsbizplusarchived | workspacebusinessplusarchived | 1010340003 |
|
||||
wsbizstan | workspacebusinessstandard | 1010020028 |
|
||||
wsbizstarter | workspacebusinessstarter | wsbizstart | 1010020027 |
|
||||
wsentess | workspaceenterpriseessentials | 1010060003 |
|
||||
wsentplus | workspaceenterpriseplus | gae | gse | enterprise | gsuiteenterprise | 1010020020 |
|
||||
wsentstan | workspaceenterprisestandard | 1010020026 |
|
||||
wsentstanarchived | workspaceenterprisestandardarchived | 1010340004 |
|
||||
wsentstarter | workspaceenterprisestarter | 1010020029 | wes |
|
||||
wsess | workspaceesentials | gsuiteessentials | essentials | d4e | driveenterprise | drive4enterprise | 1010060001 |
|
||||
wsflw | workspacefrontline | workspacefrontlineworker | 1010020030
|
||||
voicepremier | gvpremier | googlevoicepremier | 1010330002 | Google Voice Premier
|
||||
voicestandard | gvstandard | googlevoicestandard | 1010330004 | Google Voice Standard |
|
||||
voicestarter | gvstarter | googlevoicestarter | 1010330003 | Google Voice Starter |
|
||||
wsas | plusstorage | 1010430001 | Google Workspace Additional Storage |
|
||||
wsbizplus | workspacebusinessplus | 1010020025 | Google Workspace Business Plus |
|
||||
wsbizplusarchived | workspacebusinessplusarchived | 1010340003 | Google Workspace Business Plus - Archived User |
|
||||
wsbizstan | workspacebusinessstandard | 1010020028 | Google Workspace Business Standard }
|
||||
wsbizstanarchived | workspacebusinessstandardarchived | 1010340006 | Google Workspace Business Standard - Archived User |
|
||||
wsbizstarter | workspacebusinessstarter | wsbizstart | 1010020027 | Google Workspace Business Starter |
|
||||
wsbizstarterarchived | workspacebusinessstarterarchived | 1010340005 | Google Workspace Business Starter - Archived User |
|
||||
wsentess | workspaceenterpriseessentials | 1010060003 | Google Workspace Enterprise Essentials |
|
||||
wsentplus | workspaceenterpriseplus | gae | gse | enterprise | gsuiteenterprise | 1010020020 | Google Workspace Enterprise Plus |
|
||||
wsentstan | workspaceenterprisestandard | 1010020026 | Google Workspace Enterprise Standard |
|
||||
wsentstanarchived | workspaceenterprisestandardarchived | 1010340004 | Google Workspace Enterprise Standard - Archived User |
|
||||
wsentstarter | workspaceenterprisestarter | wes | 1010020029 | Workspace Enterprise Starter |
|
||||
wsess | workspaceesentials | gsuiteessentials | essentials | d4e | driveenterprise | drive4enterprise | 1010060001 | Google Workspace Essentials |
|
||||
wsessplus | workspaceessentialsplus | 1010060005 | Google Workspace Essentials Plus |
|
||||
wsflw | workspacefrontline | workspacefrontlineworker | 1010020030 | Google Workspace Frontline Starter |
|
||||
wsflwstan | workspacefrontlinestan | workspacefrontlineworkerstan | 1010020031 | Google Workspace Frontline Standard
|
||||
```
|
||||
## Manage Resold Customers
|
||||
```
|
||||
|
||||
@@ -174,11 +174,15 @@ direct the uploaded file to a particular user and location and add a timestamp t
|
||||
```
|
||||
<ToDriveAttribute> ::=
|
||||
(tdaddsheet [<Boolean>])|
|
||||
(tdalert <EmailAddress>)*|
|
||||
(tdbackupsheet (id:<Number>)|<String>)|
|
||||
(tdcellnumberformat text|number)|
|
||||
(tdcellwrap clip|overflow|wrap)|
|
||||
(tdclearfilter [<Boolean>])|
|
||||
(tdcopysheet (id:<Number>)|<String>)|
|
||||
(tddescription <String>)|
|
||||
(tdfileid <DriveFileID>)|
|
||||
(tdfrom <EmailAddress>)|
|
||||
(tdlocalcopy [<Boolean>])|
|
||||
(tdlocale <Locale>)|
|
||||
(tdnobrowser [<Boolean>])|
|
||||
@@ -191,13 +195,12 @@ direct the uploaded file to a particular user and location and add a timestamp t
|
||||
(tdsheet (id:<Number>)|<String>)|
|
||||
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
|
||||
(tdsheettitle <String>)|
|
||||
([tdsheetdaysoffset <Number>] [tdsheethoursoffset <Number])|
|
||||
(tdtimestamp [<Boolean>] [tdtimeformat <String>])|
|
||||
([tddaysoffset <Number>] [tdhoursoffset <Number])|
|
||||
(tdsubject <String>)|
|
||||
([tdsheetdaysoffset <Number>] [tdsheethoursoffset <Number>])|
|
||||
(tdtimestamp [<Boolean>] [tdtimeformat <String>]
|
||||
([tddaysoffset <Number>] [tdhoursoffset <Number>])|
|
||||
(tdtimezone <TimeZone>)|
|
||||
(tdtitle <String>)|
|
||||
(tdcellwrap clip|overflow|wrap)|
|
||||
(tdcellnumberformat text|plain)|
|
||||
(tdupdatesheet [<Boolean>])|
|
||||
(tduploadnodata [<Boolean>])|
|
||||
(tduser <EmailAddress>)
|
||||
@@ -227,6 +230,7 @@ If `tdfileid <DriveFileID>` is not specified, a new file is created.
|
||||
* `tdtimeformat` - Format of the timestamp added to the title of the uploaded file; if not specified, the `todrive_timeformat` value from gam.cfg is used, that value defaults to '' which selects an ISO format timestamp.
|
||||
* See: https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
|
||||
* `tddaysoffset` and `tdhoursoffset` - Values that subtract time from the timestamp, they default to 0. A possible use for these values is as documentation to reflect the end of the time period that the uploaded report covers.
|
||||
* `tdsubject <String>` - Use `<String>` as the subject in all emails sent. In `<String>`, `#file#` will, be replaced by the file title and `#sheet#` will be replaced by the sheet/tab title. By default, the subject is the file title.
|
||||
|
||||
## Spreadsheet settings
|
||||
* `tdlocale <Locale>` - The Spreadsheet settings Locale value.
|
||||
@@ -235,9 +239,10 @@ If `tdfileid <DriveFileID>` is not specified, a new file is created.
|
||||
* `tdcellnumberformat text|number` - The Spreadsheet number format.
|
||||
|
||||
## Open browser and send email
|
||||
* `tdnobrowser` - If False, a browser is opened to view the file uploaded to Google Drive; if not specified, the `todrive_nobrowser` value from gam.cfg is used.
|
||||
* `tdnoemail` - If False, an email is sent to `tduser` informing them of name and URL of the uploaded file; if not specified, the `todrive_noemail` value from gam.cfg is used.
|
||||
* `tdnotify` - If True, an email is sent to all `tdshare <EmailAddress>` users informing them of name and URL of the uploaded/updated file.
|
||||
* `tdnobrowser` - If False, a browser is opened to view the file uploaded to Google Drive; if not specified, the `todrive_nobrowser` value from gam.cfg is used. If True, no browser is opened.
|
||||
* `tdnoemail` - If False, an email is sent to `tduser` informing them of name and URL of the uploaded file; if not specified, the `todrive_noemail` value from gam.cfg is used. If True, no email is sent to `tduser`.
|
||||
* `tdnotify` - If True, an email is sent to all `tdshare <EmailAddress>` and `tdalert <EmailAddress>` users informing them of name and URL of the uploaded/updated file. If False, no emails are sent.
|
||||
* `tdfrom <EmailAddress>` - Emails will be sent with `<EmailAddress>` as the from address. By default, the from address is the Google Workspace Admin in `gam oauth info`.
|
||||
|
||||
## Escape character
|
||||
* `tdnoescapechar <Boolean>` - Should `\` be ignored as an escape character; if not specified, the value of `todrive_no_escape_char` from `gam.cfg` will be used
|
||||
|
||||
@@ -592,6 +592,13 @@ To empty the calendar trash a temporary calendar is created, the deleted events
|
||||
gam <UserTypeEntity> empty calendartrash <UserCalendarEntity>
|
||||
```
|
||||
|
||||
## Move calendar events to another calendar
|
||||
Generally you won't move all events from one calendar to another; typically, you'll move events created by the event creator
|
||||
using `matchfield creatoremail <RegularExpression>` in conjunction with other `<EventSelectProperty>` and `<EventMatchProperty>` options.
|
||||
```
|
||||
gam <UserTypeEntity> move events <UserCalendarEntity> [<EventEntity>] destination|to <CalendarItem> [<EventNotificationAttribute>]
|
||||
```
|
||||
|
||||
## Display calendar events
|
||||
```
|
||||
gam <UserTypeEntity> info events <UserCalendarEntity> [<EventEntity>] [maxinstances <Number>]
|
||||
|
||||
@@ -9,11 +9,15 @@
|
||||
- [Display Chat Members](#display-chat-members)
|
||||
- [Manage Chat Messages](#manage-chat-messages)
|
||||
- [Display Chat Messages](#display-chat-messages)
|
||||
- [Display Chat Events](#display-chat-events)
|
||||
- [Bulk Operations](#bulk-operations)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/chat/concepts
|
||||
* https://developers.google.com/chat/reference/rest
|
||||
* https://developers.google.com/workspace/chat/overview
|
||||
* https://developers.google.com/workspace/chat/api/reference/rest
|
||||
* https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members/list
|
||||
* https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/list
|
||||
* https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents/list
|
||||
* https://support.google.com/chat/answer/7655820
|
||||
|
||||
## Introduction
|
||||
@@ -63,6 +67,7 @@ Google requires that you have a Chat Bot configured in order to use the Chat API
|
||||
(gdoc <UserGoogleDoc>)|
|
||||
(gcsdoc <StorageBucketObjectName>))
|
||||
|
||||
<ChatEvent> ::= spaces/<String>/spaceEvents/<String>
|
||||
<ChatMember> ::= spaces/<String>/members/<String>
|
||||
<ChatMemberList> ::= "<ChatMember>(,<ChatMember>)*"
|
||||
<ChatMessage> ::= spaces/<String>/messages/<String>
|
||||
@@ -92,21 +97,21 @@ gam <UserTypeEntity> create chatspace
|
||||
[formatjson|returnidonly]
|
||||
```
|
||||
For `type space`, the following apply:
|
||||
* `member <UserTypeEntity>` - Optional, can not specify more that 20 users
|
||||
* `members <UserTypeEntity>` - Optional, can not specify more that 20 users
|
||||
* `displayname <String>` - Required
|
||||
* `description <String>` - Optional
|
||||
* `guidelines <String>` - Optional
|
||||
* `history <Boolean>` - Optional
|
||||
|
||||
For `type groupchat`, the following apply:
|
||||
* `member <UserTypeEntity>` - Required, must specify between 2 and 20 users
|
||||
* `members <UserTypeEntity>` - Required, must specify between 2 and 20 users
|
||||
* `displayname <String>` - Ignored
|
||||
* `description <String>` - Optional
|
||||
* `guidelines <String>` - Optional
|
||||
* `history <Boolean>` - Optional
|
||||
|
||||
For `type directmessage`, the following apply:
|
||||
* `member <UserTypeEntity>` - Required, must specify 1 user
|
||||
* `members <UserTypeEntity>` - Required, must specify 1 user
|
||||
* `displayname <String>` - Ignored
|
||||
* `description <String>` - Ignored
|
||||
* `guidelines <String>` - Ignored
|
||||
@@ -378,7 +383,6 @@ Display a specific Chat message.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> info chatmessage name <ChatMessage>
|
||||
[filter <String>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
@@ -447,6 +451,69 @@ filter 'createTime > \"2012-04-21T11:30:00+00:00\" AND createTime < \"2013-01-01
|
||||
filter 'thread.name = spaces/AAAAAAAAAAA/threads/123'
|
||||
```
|
||||
|
||||
## Display Chat Events
|
||||
Display a specific Chat event.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> info chatevent name <ChatEvent>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### Example
|
||||
```
|
||||
gam user user@domain.com info chatevent name spaces/AAAAsUhqjkg/spaceEvents/MTcxMTY4ODM2NDE3OTQzOV81X3VwZGF0ZWQ
|
||||
```
|
||||
|
||||
### Display information about all chat events in a chat space
|
||||
```
|
||||
gam <UserTypeEntity> show chatevents <ChatSpace>
|
||||
filter <String>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print chatevents [todrive <ToDriveAttribute>*] <ChatSpace>
|
||||
filter <String>
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
||||
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
Use `filter <String>` to filter events by when they occurred and by the type of event.
|
||||
|
||||
To filter events by the date they happened, specify the start_time and end_time with a timestamp in RFC-3339 format and double quotation marks.
|
||||
|
||||
You must specify at least one event type (event_types) using the has : operator. To filter by multiple event types, use the OR operator.
|
||||
For a list of supported event types, see: https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type
|
||||
|
||||
For example, the following queries are valid on Linux/MacOS:
|
||||
```
|
||||
filter 'start_time="2024-03-15T11:30:00-04:00" AND event_types:"google.workspace.chat.message.v1.created"'
|
||||
filter 'start_time="2024-03-15T11:30:00+00:00" AND end_time="2024-03-3100:00:00+00:00"event_types:"google.workspace.chat.message.v1.created"'
|
||||
```
|
||||
|
||||
For example, the following queries are valid on Windows Command Prompt:
|
||||
```
|
||||
filter "start_time=\"2024-03-15T11:30:00-04:00\" AND event_types:\"google.workspace.chat.message.v1.created\""
|
||||
filter "start_time=\"2024-03-15T11:30:00+00:00\" AND end_time=\"2024-03-3100:00:00+00:00\" AND event_types:\"google.workspace.chat.message.v1.created\""
|
||||
```
|
||||
|
||||
For example, the following queries are valid on Windows PowerShell:
|
||||
```
|
||||
filter 'start_time=\"2024-03-15T11:30:00-04:00\" AND event_types:\"google.workspace.chat.message.v1.created\"'
|
||||
filter 'start_time=\"2024-03-15T11:30:00+00:00\" AND end_time=\"2024-03-3100:00:00+00:00\" AND event_types:\"google.workspace.chat.message.v1.created\"'
|
||||
```
|
||||
|
||||
## Bulk Operations
|
||||
### Display information about all chat spaces for a collection of users
|
||||
```
|
||||
|
||||
157
docs/Users-Drive-Comments.md
Normal file
157
docs/Users-Drive-Comments.md
Normal file
@@ -0,0 +1,157 @@
|
||||
# Users - Drive - Comments
|
||||
- [API documentation](#api-documentation)
|
||||
- [Query documentation](Users-Drive-Query)
|
||||
- [Definitions](#definitions)
|
||||
- [Display file comments](#display-file-comments)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/drive/api/v3/reference/comments
|
||||
|
||||
## Definitions
|
||||
* [`<DriveFileEntity>`](Drive-File-Selection)
|
||||
* [`<UserTypeEntity>`](Collections-of-Users)
|
||||
|
||||
```
|
||||
<DomainName> ::= <String>(.<String>)+
|
||||
<EmailAddress> ::= <String>@<DomainName>
|
||||
<UniqueID> ::= id:<String>
|
||||
<UserItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
|
||||
<CommentsAuthorSubfieldName> ::=
|
||||
author.displayname|
|
||||
author.emailaddress|
|
||||
author.me|
|
||||
author.permissionid|
|
||||
author.photolink
|
||||
|
||||
<CommentsRepliesSubfieldName> ::=
|
||||
reply.action|
|
||||
reply.author|
|
||||
reply.author.<CommentsAuthorSubfieldName>|
|
||||
reply.content|
|
||||
reply.createddate|createdtime|
|
||||
reply.deleted|
|
||||
reply.htmlcontent|
|
||||
reply.id|
|
||||
reply.modifieddate|modifiedtime
|
||||
|
||||
<CommentsFieldName> ::=
|
||||
action|
|
||||
author|
|
||||
content|
|
||||
<CommentsAuthorSubfieldName>|
|
||||
<CommentsRepliesSubfieldName>|
|
||||
createddate|createdtime|
|
||||
deleted|
|
||||
htmlcontent|
|
||||
id|
|
||||
modifieddate|modifiedtime|
|
||||
quotedfilecontent|
|
||||
reply|replies|
|
||||
resolved
|
||||
<CommentsFieldNameList> ::= "<CommentsFieldName>(,<CommentsFieldName>)*"
|
||||
```
|
||||
|
||||
## Display file comments
|
||||
### Display as an indented list of keys and values.
|
||||
```
|
||||
gam <UserTypeEntity> show filecomments <DriveFileEntity>
|
||||
[showdeleted] [start <Date>|<Time>]
|
||||
[fields <CommentsFieldNameList>] [showphotolinks]
|
||||
[countsonly]
|
||||
[formatjson]
|
||||
```
|
||||
By default, all non-deleted comments for a file are displayed; use these options to modify that behavior.
|
||||
* `showdeleted` - Display deleted comments
|
||||
* `start <Date>|<Time>` - Display comments modified on or after `<Date>|<Time>`
|
||||
|
||||
By default, all comment and reply fields except author photolinks are displayed; use these options to modify that behavior.
|
||||
* `fields <CommentsFieldNameList>` - Select fields to display
|
||||
* `showphotolinks` - Display author photolinks
|
||||
* `countsonly` - Display just the number of comments and replies; no fields
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### Display as a CSV file.
|
||||
Each comment/reply pair is output on a separate CSV file row.
|
||||
```
|
||||
gam <UserTypeEntity> print filecomments <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
[showdeleted] [start <Date>|<Time>] [countsonly]
|
||||
[fields <CommentsFieldNameList>] [showphotolinks]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, all non-deleted comments for a file are displayed; use these options to modify that behavior.
|
||||
Files with no comments will not be displayed.
|
||||
* `showdeleted` - Display deleted comments
|
||||
* `start <Date>|<Time>` - Display comments modified on or after `<Date>|<Time>`
|
||||
|
||||
By default, all comment and reply fields except author photolinks are displayed; use these options to modify that behavior.
|
||||
* `fields <CommentsFieldNameList>` - Select fields to display
|
||||
* `showphotolinks` - Display author photolinks
|
||||
* `countsonly` - Display just the number of comments and replies; no fields. Files with no comments will display zero counts.
|
||||
|
||||
Add additional columns of data from the command line to the output:
|
||||
* `addcsvdata <FieldName> <String>`
|
||||
|
||||
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
||||
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
### Example
|
||||
```
|
||||
# Get files that may have comments
|
||||
$ gam redirect csv ./CheckForComments.csv user testsimple@domain.com print filelist showmimetype gdoc,gpresentation,gsheet fields id,name,mimetype
|
||||
Getting all Drive Files/Folders that match query ('me' in owners and (mimeType = 'application/vnd.google-apps.presentation' or mimeType = 'application/vnd.google-apps.spreadsheet' or mimeType = 'application/vnd.google-apps.document')) for testsimple@domain.com
|
||||
Got 131 Drive Files/Folders that matched query ('me' in owners and (mimeType = 'application/vnd.google-apps.presentation' or mimeType = 'application/vnd.google-apps.spreadsheet' or mimeType = 'application/vnd.google-apps.document')) for testsimple@domain.com...
|
||||
|
||||
# Display file comments
|
||||
$ gam redirect csv ./FilesWithComments.csv multiprocess csv CheckForComments.csv gam user "~Owner" print filecomments "~id" addcsvdata fileName "~name" addcsvdata mimeType "~mimeType" fields author.displayName,author.me,content,createdTime,deleted,modifiedTime,resolved,reply.author.displayName,reply.author.me,reply.content,reply.createdTime,reply.deleted,reply.modifiedTime
|
||||
2024-03-24T08:04:46.235-07:00,0/131,Using 10 processes...
|
||||
2024-03-24T08:04:58.122-07:00,0,Processing item 100/131
|
||||
2024-03-24T08:05:01.345-07:00,0,Processing item 131/131
|
||||
2024-03-24T08:07:11.731-07:00,0/131,Processing complete
|
||||
|
||||
$ more FilesWithCommnts.csv
|
||||
User,fileId,fileName,mimeType,commentId,replyId,author.displayName,author.me,content,createdTime,deleted,modifiedTime,resolved,reply.author.displayName,reply.author.me,reply.content,reply.createdTime,reply.deleted,reply.modifiedTime
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwm0,,Test-Simple,True,XXX Comment,2024-03-14T11:34:39-07:00,False,2024-03-14T11:34:39-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwkw,,Test-Simple,True,Grack Comment,2024-03-14T11:26:30-07:00,False,2024-03-14T11:26:30-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwkY,,Test-Simple,True,Again commnt,2024-03-14T11:24:13-07:00,False,2024-03-14T11:24:13-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwkQ,,Test-Simple,True,More Comment,2024-03-14T11:23:48-07:00,False,2024-03-14T11:23:48-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwkA,,Test-Simple,True,Comment 8,2024-03-14T11:23:14-07:00,False,2024-03-14T11:34:01-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwj4,,Test-Simple,True,Comment 7,2024-03-14T11:23:05-07:00,False,2024-03-14T11:23:05-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwj0,,Test-Simple,True,Comment 6,2024-03-14T11:22:55-07:00,False,2024-03-14T11:22:55-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwjs,,Test-Simple,True,Comment 5,2024-03-14T11:22:38-07:00,False,2024-03-14T11:22:38-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedwjo,,Test-Simple,True,Comment 4,2024-03-14T11:22:19-07:00,False,2024-03-14T11:22:19-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedtKQ,,Test-Simple,True,End Comment,2024-03-14T10:32:16-07:00,False,2024-03-14T10:32:16-07:00,False,,,,,,
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedtKI,AAABJFedwik,Test-Simple,True,My first comment,2024-03-14T10:32:03-07:00,False,2024-03-14T11:15:05-07:00,False,Test-Simple,True,My first reply,2024-03-14T11:14:13-07:00,False,2024-03-14T11:14:13-07:00
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,AAABJFedtKI,AAABJFedwiw,Test-Simple,True,My first comment,2024-03-14T10:32:03-07:00,False,2024-03-14T11:15:05-07:00,False,Test-Simple,True,Yet another reply,2024-03-14T11:15:05-07:00,False,2024-03-14T11:15:05-07:00
|
||||
testsimple@domain.com,yyy,TS Sheet,application/vnd.google-apps.spreadsheet,AAABJM6zbc0,,Test-Simple,True,Sheet Comment,2024-03-14T20:43:18-07:00,False,2024-03-14T20:43:18-07:00,False,,,,,,
|
||||
testsimple@domain.com,zzz,TS Pres,application/vnd.google-apps.presentation,AAABJLy5DpA,,Test-Simple,True,Presentation Comment,2024-03-14T20:42:48-07:00,False,2024-03-14T20:42:48-07:00,False,,,,,,
|
||||
|
||||
$ gam redirect csv ./FilesWithComments.csv multiprocess csv CheckForComments.csv gam user "~Owner" print filecomments "~id" addcsvdata fileName "~name" addcsvdata mimeType "~mimeType" fields author.displayName,author.me,content,createdTime,deleted,modifiedTime,resolved,reply.author.displayName,reply.author.me,reply.content,reply.createdTime,reply.deleted,,reply.modifiedTime
|
||||
2024-03-24T08:04:46.235-07:00,0/131,Using 10 processes...
|
||||
2024-03-24T08:04:58.122-07:00,0,Processing item 100/131
|
||||
2024-03-24T08:05:01.345-07:00,0,Processing item 131/131
|
||||
2024-03-24T08:07:11.731-07:00,0/131,Processing complete
|
||||
|
||||
|
||||
# Display file comment counts
|
||||
$ gam redirect csv ./FileCommentCounts.csv multiprocess csv CheckForComments.csv gam user "~Owner" print filecomments "~id" addcsvdata fileName "~name" addcsvdata mimeType "~mimeType" countsonly
|
||||
2024-03-24T07:51:16.881-07:00,0/131,Using 10 processes...
|
||||
2024-03-24T07:51:28.909-07:00,0,Processing item 100/131
|
||||
2024-03-24T07:51:32.241-07:00,0,Processing item 131/131
|
||||
2024-03-24T07:51:37.404-07:00,0/131,Processing complete
|
||||
|
||||
$ more FileCommentCounts.csv
|
||||
User,fileId,fileName,mimeType,comments,replies
|
||||
...
|
||||
testsimple@domain.com,yyy,TS Sheet,application/vnd.google-apps.spreadsheet,1,0
|
||||
testsimple@domain.com,aaa,ViewTest,application/vnd.google-apps.document,0,0
|
||||
testsimple@domain.com,xxx,TS Doc,application/vnd.google-apps.document,11,2
|
||||
testsimple@domain.com,zzz,TS Pres,application/vnd.google-apps.presentation,1,0
|
||||
...
|
||||
```
|
||||
@@ -71,6 +71,7 @@
|
||||
g3pshortcut|
|
||||
gsite
|
||||
<MimeTypeName> ::= application|audio|font|image|message|model|multipart|text|video
|
||||
<MimeTypeNameList> ::= "<MimeTypeName>(,<MimeTypeName>)*"
|
||||
<MimeType> ::= <MimeTypeShortcut>|(<MimeTypeName>/<String>)
|
||||
<MimeTypeList> ::= "<MimeType>(,<MimeType>)*"
|
||||
```
|
||||
@@ -611,9 +612,11 @@ By default, all types of files and folders are selected. You can specify a list
|
||||
This option updates the current query.
|
||||
```
|
||||
showmimetype [not] <MimeTypeList>
|
||||
showmimetype category <MimeTypeNameList>
|
||||
```
|
||||
* `showmimetype <MimeTypeList>` - Select files and folders with the specified MIME types
|
||||
* `showmimetype not <MimeTypeList>` - Select files and folders with MIME types other than those specified
|
||||
* `showmimetype category <MimeTypeNameList>` - Select files and folders with the specified MIME type categories
|
||||
|
||||
## File selection by file size
|
||||
These options would typically be used with `showmimetype` to select files of a particular type. This
|
||||
@@ -649,7 +652,7 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
@@ -662,7 +665,7 @@ gam <UserTypeEntity> show filecounts
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
@@ -894,7 +897,7 @@ gam <UserTypeEntity> print filetree [todrive <ToDriveAttribute>*]
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
[depth <Number>]]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
@@ -906,7 +909,7 @@ gam <UserTypeEntity> show filetree
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
[depth <Number>]]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
@@ -999,7 +1002,7 @@ gam <UserTypeEntity> print|show filelist [todrive <ToDriveAttribute>*]
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
[(norecursion [<Boolean>])|(depth <Number>)] [showparent]]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>] [mimetypeinquery [<Boolean>]]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>] [pmfilter] [oneitemperrow]
|
||||
@@ -1539,6 +1542,10 @@ For each folder in `<DriveFileEntity>`, the following items are displayed:
|
||||
* `totalFileCount` - The number of files directly in the folder and all of its subfolders
|
||||
* `totalFileSize` - The sum of the sizes of the files directly in the folder and all of its subfolders
|
||||
* `totalFolderCount` - The number of folders directly in the folder and all of its subfolders
|
||||
* `depth` - The depth of the folder
|
||||
* `-1` - The top level folder
|
||||
* `0` - Immediate children of the top level folder
|
||||
* `1` - Immediate children of level 0 folders
|
||||
* `path` - The path of the folder
|
||||
|
||||
There is a final row detailing files and folders in the trash; it is omitted if `excludetrashed` or `show summary` are specified.
|
||||
@@ -1555,8 +1562,13 @@ There is a final row detailing files and folders in the trash; it is omitted if
|
||||
* `totalFileCount` - The number of files in the trash
|
||||
* `totalFileSize` - The sum of the sizes of the files in the trash
|
||||
* `totalFolderCount` - The number of folders in the trash
|
||||
* `depth` - Always -1
|
||||
* `path` - Trash
|
||||
|
||||
GAM version `6.71.17` added the `depth` column that can be used to filter the depth of the folders displayed.
|
||||
Depth `-1` is the top level folder, depth `0` are its immediate children, depth `2` are the children of depth `1` and so forth.
|
||||
For example to limit the display to the top folder and its immediate children, use `config csv_output_row_filter depth:count<1`.
|
||||
|
||||
By default, files owned by the user are counted. These options update the current query with the desired ownership.
|
||||
* `showownedby me` - Count files owned by the user; this is the default
|
||||
* `showownedby any` or `anyowner` - Count files accessible by the user
|
||||
@@ -1586,24 +1598,37 @@ Use the `show` option to control the display of data:
|
||||
$ gam redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage mydrive
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,path
|
||||
testsimple@domain.com,testsimple@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,My Drive
|
||||
testsimple@domain.com,testsimple@domain.com,456YenC8f12ALfndaQ1NHc0RtUG92Y1BIUUl4bjVBRmNkWG5oakNqVVFDcXJWOHNmdFlwZmc,Classroom,True,False,False,0,0,15,9,6840,17,My Drive/Classroom
|
||||
User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
testsimple@domain.com,testsimple@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
testsimple@domain.com,testsimple@domain.com,456YenC8f12ALfndaQ1NHc0RtUG92Y1BIUUl4bjVBRmNkWG5oakNqVVFDcXJWOHNmdFlwZmc,Classroom,True,False,False,0,0,15,9,6840,17,0,My Drive/Classroom
|
||||
testsimple@domain.com,testsimple@domain.com,0B3YenC8f12ALfmRuX3I4WFlqaTRnMGhXNkVvWV9UUG1zRDQwY1BwVkJhUGx5WHVIcjJKZUU,TestUpdate,True,False,False,2,3420,0,2,3420,0,1,My Drive/Classroom/TestUpdate
|
||||
testsimple@domain.com,testsimple@domain.com,1MT5xJ897oYa0Q2OuzBDfLHvig6k_b0EKaovVA2imGYcnrmqZu5hjlJkEPMH-rHKj4qDyy9_j,TS Course,True,False,False,0,0,0,0,0,0,1,My Drive/Classroom/TS Course
|
||||
testsimple@domain.com,testsimple@domain.com,1gsbqsbhhwBx9hCF0sqtE213tpUn6Ebj2klLFhHb4xkzBKIdEFkvvwCVtZpYWPgOA796fIPEN,TS Course 2,True,False,False,0,0,0,0,0,0,1,My Drive/Classroom/TS Course 2
|
||||
...
|
||||
testsimple@domain.com,testsimple@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,My Drive/XferFolder
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,Trash
|
||||
testsimple@domain.com,testsimple@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,0,My Drive/XferFolder
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
|
||||
$ gam config csv_output_row_filter "depth:count<1" redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage mydrive
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
testsimple@domain.com,testsimple@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
testsimple@domain.com,testsimple@domain.com,456YenC8f12ALfndaQ1NHc0RtUG92Y1BIUUl4bjVBRmNkWG5oakNqVVFDcXJWOHNmdFlwZmc,Classroom,True,False,False,0,0,15,9,6840,17,0,My Drive/Classroom
|
||||
...
|
||||
testsimple@domain.com,testsimple@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,0,My Drive/XferFolder
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
|
||||
$ gam redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage mydrive show summaryandtrash
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,path
|
||||
testsimple@domain.com,testsimple@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,My Drive
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,Trash
|
||||
User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
testsimple@domain.com,testsimple@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
|
||||
$ gam redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage shareddriveid 0AL5LiIe4dqxZUk9PVA show summaryandtrash
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
User,id,name,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,path
|
||||
testsimple@domain.com,0125LiIe4dqxZUk9PVA,TS Shared Drive 1,False,False,16,6144,7,42,73799,25,SharedDrives/TS Shared Drive 1
|
||||
testsimple@domain.com,Trash,Trash,True,True,1,1024,0,1,1024,0,Trash
|
||||
User,id,name,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
testsimple@domain.com,0125LiIe4dqxZUk9PVA,TS Shared Drive 1,False,False,16,6144,7,42,73799,25,-1,SharedDrives/TS Shared Drive 1
|
||||
testsimple@domain.com,Trash,Trash,True,True,1,1024,0,1,1024,0,-1,Trash
|
||||
```
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
- [Shortcuts](Users-Drive-Shortcuts)
|
||||
- [Drive Labels](Users-Drive-Labels)
|
||||
- [Download Google Documents as JSON](#download-google-documents-as-json)
|
||||
- [Upload changes to Google Documents](#upload-changes-to-google-documents)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/drive/api/v3/reference/files
|
||||
@@ -642,8 +643,6 @@ gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> purge
|
||||
```
|
||||
|
||||
## Download Google Documents as JSON
|
||||
This command was added in version 5.31.04, you'll have to do `gam update project` and
|
||||
`gam <UserTypeEntity> check|update serviceaccount` to enable it.
|
||||
```
|
||||
gam <UserTypeEntity> get document <DriveFileEntity>
|
||||
[viewmode default|suggestions_inline|preview_suggestions_accepted|preview_without_suggestions]
|
||||
@@ -666,3 +665,31 @@ By default, when getting a document, an existing local file will not be overwrit
|
||||
* `overwrite` - Overwite an existing file
|
||||
* `overwrite true` - Overwite an existing file
|
||||
* `overwrite false` - Do not overwite an existing file; add a numeric prefix and create a new file
|
||||
|
||||
## Upload changes to Google Documents
|
||||
|
||||
```
|
||||
<DocumentJSONUpdateRequest> ::=
|
||||
'{"requests": [{object (Request)}], "writeControl": {object (WriteControl) }`
|
||||
See: https://developers.google.com/docs/api/reference/rest/v1/documents/request
|
||||
|
||||
gam <UserTypeEntity> update document <DriveFileEntity>
|
||||
((json [charset <Charset>] <DocumentJSONUpdateRequest>) |
|
||||
(json file <FileName> [charset <Charset>]))
|
||||
[formatjson]
|
||||
```
|
||||
The JSON data can be read from a command line argument or a file. On the command line, the
|
||||
JSON data is enclosed in single quotes; these should not be present when the JSON data is read from a file.
|
||||
|
||||
The output is formatted for human readability. Use the following option to produce JSON output for program parsing.
|
||||
* `formatjson` - Display output in JSON format.
|
||||
|
||||
### Examples
|
||||
Replace Foo with Goo in a document.
|
||||
```
|
||||
File Update.json contains:
|
||||
{ "requests": [{"replaceAllText": {"replaceText": "Goo", "containsText": {"text": "Foo", "matchCase": "True"}}}]}
|
||||
|
||||
|
||||
gam user testuser@domain.com update document <DriveFileItem> json file Update.json
|
||||
```
|
||||
|
||||
@@ -6,12 +6,15 @@
|
||||
- [Introduction](#introduction)
|
||||
- [Display Drive Labels](#display-drive-labels)
|
||||
- [Process File Drive Labels](#process-file-drive-labels)
|
||||
- [Manage Drive Label Permissions](#manage-drive-label-permissions)
|
||||
- [Display Drive Label Permissions](#display-drive-label-permissions)
|
||||
|
||||
## API documentation
|
||||
* https://support.google.com/a/answer/9292382
|
||||
* https://developers.google.com/drive/labels/guides/overview
|
||||
* https://developers.google.com/drive/labels/guides/authorize
|
||||
* https://developers.google.com/drive/labels/reference/rest/v2beta/labels
|
||||
* https://developers.google.com/drive/labels/reference/rest/v2beta/labels.permissions
|
||||
* https://developers.google.com/drive/api/guides/about-labels
|
||||
* https://developers.google.com/drive/api/v3/reference/files
|
||||
|
||||
@@ -19,13 +22,15 @@
|
||||
To use these commands you must add the 'Drive Labels API' to your project and update your service account authorization.
|
||||
```
|
||||
gam update project
|
||||
gam user user@domain.com check serviceaccount
|
||||
gam user user@domain.com update serviceaccount
|
||||
```
|
||||
Supported editions for this feature: Business Standard and Business Plus; Enterprise; Education Standard and Education Plus; G Suite Business; Essentials.
|
||||
|
||||
## Definitions
|
||||
* [`<DriveFileEntity>`](Drive-File-Selection)
|
||||
* [`<UserTypeEntity>`](Collections-of-Users)
|
||||
* [`<DriveLabelNameEntity>`, `<DriveLabelPermissionNameEntity'](Collections-of-Items)
|
||||
* [`<UserTypeEntity>`](Collections-of-Items)
|
||||
|
||||
```
|
||||
<DriveLabelID> ::= <String>
|
||||
@@ -35,7 +40,11 @@ Supported editions for this feature: Business Standard and Business Plus; Enterp
|
||||
<DriveLabelNameList> ::= "<DriveLabelName>(,<DriveLabelName)*"
|
||||
<DriveLabelNameEntity> ::=
|
||||
<DriveLabelNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
|
||||
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Collections-of-Items
|
||||
|
||||
<DriveLabelPermissionName> ::= labels/<DriveLabelID>[@latest|@published|@<Number>]/permissions/(audiences|groups|people)/<String>
|
||||
<DriveLabelPermissionNameList> ::= "<DriveLabelPermissionName>(,<DriveLabelPermissionName>)*"
|
||||
<DriveLabelPermissionNameEntity> ::=
|
||||
<DriveLabelPermissionNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
|
||||
|
||||
<DriveLabelFieldID> ::= <String>
|
||||
<DriveLabelSelectionID> ::= <String>
|
||||
@@ -86,9 +95,9 @@ A domain administrator with the Drive and Docs administrator privilege can searc
|
||||
owned by their organization, regardless of the admin's membership in any given Shared Drive.
|
||||
|
||||
Three forms of the commands are available:
|
||||
* `gam action ...` - The administrator named in oauth2.txt is used, domain administrator access implied and labels of type `SHARED` and `ADMIN`can be written
|
||||
* `gam <UserTypeEntity> action ... adminaccess` - The user named in `<UserTypeEntty>` is used, adminaccess indicates that labels of type `SHARED` and `ADMIN`can be written
|
||||
* `gam <UserTypeEntity> action ...` - The user named in `<UserTypeEntty>` is used, access is limited, onlylabels of type `SHARED` can be written
|
||||
* `gam action ...` - The administrator named in oauth2.txt is used, domain administrator access implied and labels of type `SHARED` and `ADMIN`can be processed
|
||||
* `gam <UserTypeEntity> action ... adminaccess` - The user named in `<UserTypeEntty>` is used, adminaccess indicates that labels of type `SHARED` and `ADMIN`can be processed
|
||||
* `gam <UserTypeEntity> action ...` - The user named in `<UserTypeEntty>` is used, access is limited, onlylabels of type `SHARED` can be processed
|
||||
|
||||
## Display Drive Labels
|
||||
|
||||
@@ -156,3 +165,51 @@ gam <UserTypeEntity> process filedrivelabels <DriveFileEntity>
|
||||
|
||||
By default, details of the process labels are displayed, use `nodetails` to suppress this display.
|
||||
|
||||
## Manage Drive Label Permissions
|
||||
Create a permission for a Drive Label by specifying the label name and the principal.
|
||||
```
|
||||
gam [<UserTypeEntity>] create drivelabelpermission <DriveLabelNameEntity>
|
||||
(user <UserItem>) | (group <GroupItem) | (audience <String>)
|
||||
role applier|editor|organizer|reader
|
||||
[nodetails|formatjson] [adminaccess|asadmin]
|
||||
```
|
||||
|
||||
By default, when a permission is created, GAM outputs details of the permission as indented keywords and values.
|
||||
* `nodetails` - Suppress the details output.
|
||||
* `formatjson` - Output the details in JSON format.
|
||||
|
||||
Delete a Drive Label permission by specifying the label name and the principal.
|
||||
```
|
||||
gam [<UserTypeEntity>] delete drivelabelpermission <DriveLabelNameEntity>
|
||||
(user <UserItem>) | (group <GroupItem) | (audience <String>)
|
||||
[adminaccess|asadmin]
|
||||
```
|
||||
|
||||
Delete a Drive Label permission by specifying the label permission name.
|
||||
```
|
||||
gam [<UserTypeEntity>] remove drivelabelpermission <DriveLabelPermissionNameEntity>
|
||||
[adminaccess|asadmin]
|
||||
```
|
||||
## Display Drive Label Permissions
|
||||
Display permissions for a collection of Drive Label permission names.
|
||||
```
|
||||
gam [<UserTypeEntity>] show drivelabelpermissions <DriveLabelNameEntity>
|
||||
[formatjson] [adminaccess|asadmin]
|
||||
```
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam [<UserTypeEntity>] print drivelabelpermissions <DriveLabelNameEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
|
||||
```
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
||||
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
- [Display file permissions/sharing](#display-file-permissionssharing)
|
||||
- [Delete all ACLs except owner from a file](#delete-all-acls-except-owner-from-a-file)
|
||||
- [Change shares to User1 to shares to User2](#change-shares-to-user1-to-shares-to-user2)
|
||||
- [Map All ACLs from an old domain to a new domain](#map-all-acls-from-an-old-domain-to-a-new-domain)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/drive/api/v3/reference/permissions
|
||||
@@ -316,4 +317,26 @@ gam redirect csv ./FilesSharedWithU1Settings.csv multiprocess csv FilesSharedWit
|
||||
gam redirect stdout ./DeleteU1Sharing.txt multiprocess redirect stderr stdout csv FilesSharedWithU1Settings.csv gam user "~Owner" delete drivefileacl "~id" "~permissions.0.emailAddress"
|
||||
# For each of these files, add the share to User2 with the same role that User1 had
|
||||
gam redirect stdout ./AddUser2Sharing.txt multiprocess redirect stderr stdout csv FilesSharedWithU1Settings.csv gam user "~Owner" create drivefileacl "~id" user user2@domain.com role "~permissions.0.role"
|
||||
```
|
||||
```
|
||||
|
||||
## Map All ACLs from an old domain to a new domain
|
||||
* Get ACLs
|
||||
```
|
||||
gam redirect csv ./allUsersFiles.csv multiprocess all users print filelist fields name,id,basicpermissions oneitemperrow pmfilter pm domain olddomain.com em
|
||||
```
|
||||
|
||||
* Delete ACLs with olddomain.com
|
||||
```
|
||||
gam redirect stdout ./DeleteOldDomainACLs.txt multiprocess redirect stderr stdout csv ./allUsersFiles.csv gam user "~Owner" delete drivefileacl "~id" "id:~~permission.id~~"
|
||||
```
|
||||
|
||||
* Add user/group ACLs replacing olddomain.com with newdomain.com
|
||||
```
|
||||
gam config csv_input_row_filter "permission.type:regex:user|group" redirect stdout ./AddNewDomainACLsUserGroupShares.txt multiprocess redirect stderr stdout csv ./allUsersFiles.csv gam user "~Owner" create drivefileacl "~id" "~permission.type" "~permission.emailAddress" role "~permission.role" mappermissionsdomain olddomain.com newdomain.com
|
||||
```
|
||||
|
||||
* Add domain ACLs replacing olddomain.com with newdomain.com
|
||||
```
|
||||
gam config csv_input_row_filter "permission.type:regex:domain" redirect stdout ./AddNewDomainACLsDomainShares.txt multiprocess redirect stderr stdout csv ./allUsersFiles.csv gam user "~Owner" create drivefileacl "~id" "~permission.type" "~permission.domain" role "~permission.role" allowfilediscovery "~permission.allowFileDiscovery" mappermissionsdomain olddomain.com newdomain.com
|
||||
```
|
||||
|
||||
|
||||
@@ -49,9 +49,15 @@ Creates and configures a client-side encryption identity that's authorized to se
|
||||
Google publishes the S/MIME certificate to a shared domain-wide directory so that people within a Google Workspace organization can encrypt and send mail to the identity.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> create cseidentity <KeyPairID> [kpemail <EmailAddress>]
|
||||
gam <UserTypeEntity> create cseidentity
|
||||
(primarykeypairid <KeyPairID>) | (signingkeypairid <KeyPairID> encryptionkeypairid <KeyPairID>)
|
||||
[kpemail <EmailAddress>]
|
||||
[formatjson]
|
||||
```
|
||||
One of the following is required:
|
||||
* `primarykeypairid <KeyPairID>` - The configuration of a CSE identity that uses the same key pair for signing and encryption.
|
||||
* `signingkeypairid <KeyPairID> encryptionkeypairid <KeyPairID>` - The configuration of a CSE identity that uses different key pairs for signing and encryption.
|
||||
|
||||
If `kpemail <EmailAddress>` is not specified, the user's primary email address is used for the identity.
|
||||
|
||||
By default, Gam displays the identity as an indented list of keys and values; the following option causes the output to be in JSON format:
|
||||
@@ -60,10 +66,16 @@ By default, Gam displays the identity as an indented list of keys and values; th
|
||||
## Update Gmail CSE Identity
|
||||
Associates a different key pair with an existing client-side encryption identity. The updated key pair must validate against Google's S/MIME certificate profiles.
|
||||
```
|
||||
gam <UserTypeEntity> update cseidentity <KeyPairID> [kpemail <EmailAddress>]
|
||||
gam <UserTypeEntity> update cseidentity
|
||||
(primarykeypairid <KeyPairID>) | (signingkeypairid <KeyPairID> encryptionkeypairid <KeyPairID>)
|
||||
[kpemail <EmailAddress>]
|
||||
[formatjson]
|
||||
```
|
||||
If `kpemail <EmailAddress>` is not specified, the key pair for the user's primary email address is identity updated.
|
||||
One of the following is required:
|
||||
* `primarykeypairid <KeyPairID>` - The configuration of a CSE identity that uses the same key pair for signing and encryption.
|
||||
* `signingkeypairid <KeyPairID> encryptionkeypairid <KeyPairID>` - The configuration of a CSE identity that uses different key pairs for signing and encryption.
|
||||
|
||||
bIf `kpemail <EmailAddress>` is not specified, the key pair for the user's primary email address is identity updated.
|
||||
|
||||
By default, Gam displays the identity as an indented list of keys and values; the following option causes the output to be in JSON format:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
@@ -112,7 +124,7 @@ Create a CSE Key Pair for the primary address of a user.
|
||||
gam <UserTypeEntity> create csekeypair
|
||||
[incertdir <FilePath>] [inkeydir <FilePath>]
|
||||
[addidentity [<Boolean>]] [kpemail <EmailAddress>]
|
||||
[formatjson|returnidonly]
|
||||
[showpem] [showkaclsdata] [formatjson|returnidonly]
|
||||
```
|
||||
* The S/MIME certificate files for the users are in the `incertdir <FilePath>` folder/directory.
|
||||
* If this option is not specified, the directory is taken from `gam.cfg/gmail_cse_incert_dir`.
|
||||
@@ -126,6 +138,8 @@ gam <UserTypeEntity> create csekeypair
|
||||
* `kacls_url` - The URI of the key access control list service that manages the private key.
|
||||
* `wrapped_private_key` - Opaque data generated and used by the key access control list service.
|
||||
|
||||
By default, the `pem` and `kaclsdata` fields will not be displayed unless the corresponding `showpem` and `showkaclsdata` option is specified.
|
||||
|
||||
By default, Gam displays the new key pair as an indented list of keys and values; the following options cause the output to be displayed in alternate forms.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
* `returnidonly` - Display just the new `<KeyPairID>`.
|
||||
@@ -139,11 +153,14 @@ By default, Gam displays the identity as an indented list of keys and values; th
|
||||
|
||||
|
||||
## Action Gmail CSE Key Pairs
|
||||
### Display pem and kaclsdata fields
|
||||
By default, the `pem` and `kaclsdata` fields will not be displayed unless the corresponding `showpem` and `showkaclsdata` option is specified.
|
||||
|
||||
### Disable
|
||||
Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair to decrypt incoming CSE message texts or sign outgoing CSE mail.
|
||||
```
|
||||
gam <UserTypeEntity> disable csekeypair <KeyPairID>
|
||||
[formatjson]
|
||||
[showpem] [showkaclsdata] [formatjson]
|
||||
```
|
||||
By default, Gam displays the disabled key pair as an indented list of keys and values; the following option causes the output to be displayed in alternate forms.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
@@ -152,7 +169,7 @@ By default, Gam displays the disabled key pair as an indented list of keys and v
|
||||
Turn on a client-side encryption key pair that was turned off. The key pair becomes active again for any associated client-side encryption identities.
|
||||
```
|
||||
gam <UserTypeEntity> ensable csekeypair <KeyPairID>
|
||||
[formatjson]
|
||||
[showpem] [showkaclsdata] [formatjson]
|
||||
```
|
||||
By default, Gam displays the enabled key pair as an indented list of keys and values; the following option causes the output to be displayed in alternate forms.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
@@ -167,10 +184,13 @@ gam <UserTypeEntity> obliterate csekeypair <KeyPairID>
|
||||
Gmail can't restore or decrypt any messages that were encrypted by an obliterated key. Authenticated users and Google Workspace administrators lose access to reading the encrypted messages.
|
||||
|
||||
## Display Gmail CSE Key Pairs
|
||||
### Display pem and kaclsdata fields
|
||||
By default, the `pem` and `kaclsdata` fields will not be displayed unless the corresponding `showpem` and `showkaclsdata` option is specified.
|
||||
|
||||
### Display an existing client-side encryption key pair.
|
||||
```
|
||||
gam <UserTypeEntity> info csekeypair <KeyPairID>
|
||||
[formatjson]
|
||||
[showpem] [showkaclsdata] [formatjson]
|
||||
```
|
||||
By default, Gam displays the key pairs as an indented list of keys and values; the following option causes the output to be in JSON format:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
@@ -179,14 +199,14 @@ By default, Gam displays the key pairs as an indented list of keys and values; t
|
||||
### Display all client-side encryption key pairs for an authenticated user.
|
||||
```
|
||||
gam <UserTypeEntity> show csekeypairs
|
||||
[formatjson]
|
||||
[showpem] [showkaclsdata] [formatjson]
|
||||
```
|
||||
By default, Gam displays the key pairs as an indented list of keys and values; the following option causes the output to be in JSON format:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print csekeypairs [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[showpem] [showkaclsdata] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the key pairs as columns of fields; the following option causes the output to be in JSON format:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
@@ -88,11 +88,17 @@ all parent labels are created as necessary.
|
||||
Example: `gam user user@domain.com add label "Top/Middle/Bottom" buildpath`
|
||||
|
||||
## Update a label's settings
|
||||
The two commands are equivalent; in the first you specify a `<LabelName>`, in the second you specify a `<LabelId>`.
|
||||
```
|
||||
gam <UserTypeEntity> update labelsettings <LabelName> [name <String>]
|
||||
[messagelistvisibility hide|show] [labellistvisibility hide|show|showifunread]
|
||||
[backgroundcolor "<LabelColorHex>|<LabelBackgroundColorHex>|custom:<ColorHex>"]
|
||||
[textcolor "<LabelColorHex>|<LabelTextColorHex>|custom:<ColorHex>"]
|
||||
|
||||
gam <UserTypeEntity> update labelid <LabelID> [name <String>]
|
||||
[messagelistvisibility hide|show] [labellistvisibility hide|show|showifunread]
|
||||
[backgroundcolor "<LabelColorHex>|<LabelBackgroundColorHex>|custom:<ColorHex>"]
|
||||
[textcolor "<LabelColorHex>|<LabelTextColorHex>|custom:<ColorHex>"]
|
||||
```
|
||||
`<LabelColorHex>` values should be enclosed in " to keep the command shell on MacOS and Linux from mis-interpreting them.
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Users - Gmail - Messages/Threads
|
||||
- [Notes](#notes)
|
||||
- [API documentation](#api-documentation)
|
||||
- [Query documentation](#query-documentation)
|
||||
- [Definitions](#definitions)
|
||||
@@ -25,6 +26,13 @@
|
||||
- [Display messages sent by delegates for delegator](#display-messages-sent-by-delegates-for-delegator)
|
||||
- [User attribute `replace <Tag> <UserReplacement>` processing](Tag-Replace)
|
||||
|
||||
## Notes
|
||||
Restrict email messages to authorized addresses or domains only
|
||||
* https://support.google.com/a/answer/2640542
|
||||
|
||||
Block emails between specific user groups
|
||||
* https://support.google.com/a/answer/9175444
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/gmail/api/v1/reference/users/messages
|
||||
* https://developers.google.com/gmail/api/v1/reference/users/threads
|
||||
@@ -347,10 +355,10 @@ See below for message selection.
|
||||
Export messages in EML format.
|
||||
```
|
||||
gam <UserTypeEntity> export message|messages
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [doit] [max_to_export <Number>])|(ids <MessageIDEntity>)
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [max_to_export <Number>])|(ids <MessageIDEntity>)
|
||||
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
|
||||
gam <UserTypeEntity> export thread|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [doit] [max_to_export <Number>])|(ids <ThreadIDEntity>)
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [max_to_export <Number>])|(ids <ThreadIDEntity>)
|
||||
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
|
||||
```
|
||||
|
||||
|
||||
@@ -131,13 +131,17 @@ Display all notes
|
||||
```
|
||||
gam <UserTypeEntity> show notes
|
||||
[fields <NotesFieldList>] [filter <String>]
|
||||
[role owner|writwer]
|
||||
[role owner|writer]
|
||||
[countsonly]
|
||||
[compact|formatjson]
|
||||
```
|
||||
By default, GAM displays all non-trashed notes:
|
||||
* `filter trashed` - Display notes in the trash
|
||||
* `role owner|writer` - Display notes where the user has the specified role
|
||||
|
||||
When option `countsonly` is specified, the number of notes a user owns and the number of notes of user can edit
|
||||
if displayed.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values; the note text is displayed as individual lines.
|
||||
* `compact` - Display the note text with escaped carriage returns as \r and newlines as \n
|
||||
* `formatjson` - Display the note in JSON format
|
||||
@@ -145,7 +149,8 @@ By default, Gam displays the information as an indented list of keys and values;
|
||||
```
|
||||
gam <UserTypeEntity> print notes [todrive <ToDriveAttribute>*]
|
||||
[fields <NotesFieldList>] [filter <String>]
|
||||
[role owner|writwer]
|
||||
[role owner|writer]
|
||||
[countsonly]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
```
|
||||
@@ -153,6 +158,9 @@ By default, GAM displays all non-trashed notes:
|
||||
* `filter trashed` - Display notes in the trash
|
||||
* `role owner|writer` - Display notes where the user has the specified role
|
||||
|
||||
When option `countsonly` is specified, the number of notes a user owns and the number of notes of user can edit
|
||||
if displayed.
|
||||
|
||||
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
||||
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
|
||||
@@ -293,7 +293,7 @@ gam <UserTypeEntity> show teamdrives
|
||||
```
|
||||
By default, Gam displays all Teams Drives accessible by the user.
|
||||
* `matchname <RegularExpression>` - Display Shared Drives with names that match a pattern.
|
||||
* `(role|roles <SharedDriveACLRoleList>)* - Display Shared Drives where the user has one of the specified roles.
|
||||
* `(role|roles <SharedDriveACLRoleList>)*` - Display Shared Drives where the user has one of the specified roles.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
@@ -39,13 +39,14 @@
|
||||
- [Print domain counts for users specified by `<UserTypeEntity>`](#print-domain-counts-for-users-specified-by-usertypeentity)
|
||||
- [Print user list](#print-user-list)
|
||||
- [Display user counts](#display-user-counts)
|
||||
- [Verify domain membership]($verify-domain-membership)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/admin-sdk/directory/reference/rest/v1/users
|
||||
* https://developers.google.com/admin-sdk/directory/reference/rest/v1/schemas
|
||||
|
||||
## Name guidelines
|
||||
* https://support.google.com/a/answer/9193374?hl=en
|
||||
* https://support.google.com/a/answer/9193374
|
||||
|
||||
## Query documentation
|
||||
* https://developers.google.com/admin-sdk/directory/v1/guides/search-users
|
||||
@@ -337,6 +338,10 @@ relation manager manageremail@domain.com
|
||||
externalid organization "Employee ID"
|
||||
|
||||
```
|
||||
`<UserMultiAttribute>.location.buildingid <String>` allows non-validated building IDs
|
||||
by specifying `nv:` at the beginning of `<String>`; e.g., `nv:Building X' sets the building ID to `Building X`.
|
||||
|
||||
|
||||
## Passwords
|
||||
To set a user's password, you specify a `<Password>` string and a hash method that specifies how to interpret the string
|
||||
* `password random|uniquerandom` - A 25 character plain text string of ASCII uppercase/lowecase letters, digits and punctuation
|
||||
@@ -981,14 +986,16 @@ gam print users [todrive <ToDriveAttribute>*]
|
||||
[limittoou <OrgUnitItem>] [deleted_only|only_deleted])
|
||||
[orderby <UserOrderByFieldName> [ascending|descending]]
|
||||
[groups|groupsincolumns]
|
||||
[license|licenses|licence|licences]
|
||||
[license|licenses|licence|licences|licensebyuser|licensesbyuser|licencebyuser|licencesbyuser]
|
||||
[onelicenseperrow|onelicenceperrow]
|
||||
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
|
||||
[schemas|custom|customschemas all|<SchemaNameList>]
|
||||
[emailpart|emailparts|username]
|
||||
[userview] [allfields|basic|full|(<UserFieldName>*|fields <UserFieldNameList>)]
|
||||
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
|
||||
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
|
||||
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
|
||||
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
|
||||
```
|
||||
|
||||
By default, users in all domains in the account are selected; these options allow selection of subsets of users:
|
||||
@@ -1008,11 +1015,13 @@ gam print users [todrive <ToDriveAttribute>*] select <UserTypeEntity>
|
||||
[onelicenseperrow|onelicenceperrow]
|
||||
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
|
||||
[schemas|custom|customschemas all|<SchemaNameList>]
|
||||
[emailpart|emailparts|username][schemas|custom all|<SchemaNameList>]
|
||||
[userview] [allfields|basic|full|(<UserFieldName>*|fields <UserFieldNameList>)]
|
||||
[emailpart|emailparts|username]
|
||||
[userview] [basic|full|allfields|(<UserFieldName>*|fields <UserFieldNameList>)]
|
||||
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
|
||||
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
|
||||
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
|
||||
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
|
||||
|
||||
gam <UserTypeEntity> print users [todrive <ToDriveAttribute>*]
|
||||
[orderby <UserOrderByFieldName> [ascending|descending]]
|
||||
[groups|groupsincolumns]
|
||||
@@ -1021,10 +1030,11 @@ gam <UserTypeEntity> print users [todrive <ToDriveAttribute>*]
|
||||
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
|
||||
[schemas|custom|customschemas all|<SchemaNameList>]
|
||||
[emailpart|emailparts|username]
|
||||
[userview] [allfields|basic|full|(<UserFieldName>*|fields <UserFieldNameList>)]
|
||||
[userview] [basic|full|allfields|(<UserFieldName>*|fields <UserFieldNameList>)]
|
||||
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
|
||||
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
|
||||
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
|
||||
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
|
||||
```
|
||||
|
||||
By default, Gam gets no group membership information for each user. The `groups` and `groupsincolumns`
|
||||
@@ -1079,6 +1089,17 @@ In the output, primaryEmail is the always the first column; these options contro
|
||||
* `<UserFieldName>*|fields <UserFieldNameList>` - The columns appear in the order that the fields are specified.
|
||||
* `scalarsfirst [true]` - When columns are sorted by name, scalar fields appear before repeating fields.
|
||||
|
||||
By default, if `<UserTypeEntity>` includes an email address the is not a user member of the domain,
|
||||
an error message is generated.
|
||||
```
|
||||
User: testuserxxx@domain.com, Does not exist
|
||||
```
|
||||
|
||||
Using option `showvalidcolumn`, a new column `Found` indicates domain membership; no errors are generated
|
||||
|
||||
Add additional columns of data from the command line to the output
|
||||
* `addcsvdata <FieldName> <String>`
|
||||
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
@@ -1249,3 +1270,34 @@ count=$(gam print users query "orgUnitPath='/Students/Middle School'" showitemco
|
||||
Windows PowerShell
|
||||
count = & gam print users query "orgUnitPath='/Students/Middle School'" showitemcountonly
|
||||
```
|
||||
## Verify domain membership
|
||||
You have a CSV file of email addresses and want to verify of the addresses are valid users in your domain.
|
||||
```
|
||||
# Users.csv
|
||||
$ more Users.csv
|
||||
primaryEmail,name
|
||||
testuser1@domain.com,Test User 1
|
||||
testuserxxx@domain.com,Test User XXX
|
||||
testuser2@domain.com,Test User 2
|
||||
|
||||
# Without showvalidcolumn, non-domain users generate an error
|
||||
$ gam redirect csv - multiprocess csv Users.csv gam user "~primaryEmail" print users fields primaryemail,id addcsvdata name "~name"
|
||||
2024-02-23T11:29:00.407-08:00,0/3,Using 3 processes...
|
||||
2024-02-23T11:29:00.410-08:00,0,Processing item 3/3
|
||||
User: testuserxxx@domain.com, Does not exist
|
||||
2024-02-23T11:29:06.511-08:00,0/3,Processing complete
|
||||
primaryEmail,id,name
|
||||
testuser1@domain.com,118080758787650801331,Test User 1
|
||||
testuser2@domain.com,107344800159717682514,Test User 2
|
||||
|
||||
# Using showvalidcolumn, a new column `Valid` indicates domain membership; no errors are generated
|
||||
$ gam redirect csv - multiprocess csv Users.csv gam user "~primaryEmail" print users fields primaryemail,id addcsvdata name "~name" showvalidcolumn
|
||||
2024-02-23T11:29:22.287-08:00,0/3,Using 3 processes...
|
||||
2024-02-23T11:29:22.292-08:00,0,Processing item 3/3
|
||||
2024-02-23T11:29:23.366-08:00,0/3,Processing complete
|
||||
primaryEmail,id,Valid,name
|
||||
testuser1@domain.com,118080758787650801331,True,Test User 1
|
||||
testuserxxx@domain.com,,False,Test User XXX
|
||||
testuser2@domain.com,107344800159717682514,True,Test User 2
|
||||
```
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAMADV-XTD3 6.70.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.72.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAMADV-XTD3 6.70.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.72.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second
|
||||
Print the current version of Gam with extended details and SSL information
|
||||
```
|
||||
gam version extended
|
||||
GAMADV-XTD3 6.70.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.72.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 6.70.00
|
||||
Latest: 6.72.08
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +72,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
6.70.00
|
||||
6.72.08
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -82,7 +82,7 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 6.70.00 - https://github.com/taers232c/GAMADV-XTD3
|
||||
GAM 6.72.08 - https://github.com/taers232c/GAMADV-XTD3
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
|
||||
@@ -129,6 +129,7 @@ Service Account Access
|
||||
* [Users - Drive - File Selection](Drive-File-Selection)
|
||||
* [Users - Drive - Activity/Settings](Users-Drive-Activity-Settings)
|
||||
* [Users - Drive - Cleanup](Users-Drive-Cleanup)
|
||||
* [Users - Drive - Comments](Users-Drive-Comments)
|
||||
* [Users - Drive - Copy/Move](Users-Drive-Copy-Move)
|
||||
* [Users - Drive - Files-Display](Users-Drive-Files-Display)
|
||||
* [Users - Drive - Files-Manage](Users-Drive-Files-Manage)
|
||||
|
||||
@@ -255,6 +255,10 @@ csv_output_row_filter_mode
|
||||
csv_output_row_limit
|
||||
A limit on the number of rows to write to a CSV file; a value of 0 sets no limit.
|
||||
Default: 0
|
||||
csv_output_sort_headers
|
||||
A list of column headers that causes GAM to sort CSV output rows by those headers.
|
||||
The column headers are case insensitive and if column header does not appear in the CSV output, it is ignored.
|
||||
Default: Blank
|
||||
csv_output_subfield_delimiter
|
||||
Character used to delimit fields and subfields in headers when writing CSV files;
|
||||
this must be a single character
|
||||
@@ -467,7 +471,7 @@ section
|
||||
Default section of gam.cfg.
|
||||
Default: DEFAULT
|
||||
show_api_calls_retry_data
|
||||
Enable/disable display of Google API calls retry data and end of processing
|
||||
Enable/disable display of Google API calls retry data at end of processing
|
||||
Default: False
|
||||
show_commands
|
||||
Enable/disable display of commands to stderr when executing `gam batch|tbatch|csv|loop`.
|
||||
|
||||
@@ -22,43 +22,6 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<FalseValues>= false|off|no|disabled|0
|
||||
<TrueValues> ::= true|on|yes|enabled|1
|
||||
|
||||
<Charset> ::= ascii|latin1|mbcs|utf-8|utf-8-sig|utf-16|<String>
|
||||
<CalendarColorIndex> ::= <Number in range 1-24>
|
||||
<CalendarColorName> ::=
|
||||
amethyst|avocado|banana|basil|birch|blueberry|
|
||||
cherryblossom|citron|cobalt|cocoa|eucalyptus|flamingo|
|
||||
grape|graphite|lavender|mango|peacock|pistachio|
|
||||
pumpkin|radicchio|sage|tangerine|tomato|wisteria|
|
||||
<ColorHex> ::= "#<Hex><Hex><Hex><Hex><Hex><Hex>"
|
||||
<ColorNameGoogle> ::=
|
||||
asparagus|bluevelvet|bubblegum|cardinal|chocolateicecream|denim|desertsand|
|
||||
earthworm|macaroni|marsorange|mountaingray|mountaingrey|mouse|oldbrickred|
|
||||
pool|purpledino|purplerain|rainysky|seafoam|slimegreen|spearmint|
|
||||
toyeggplant|vernfern|wildstrawberries|yellowcab
|
||||
<ColorNameWeb> ::=
|
||||
aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|
|
||||
blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|
|
||||
cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|
|
||||
darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|
|
||||
darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|
|
||||
darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|
|
||||
firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|
|
||||
gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|
|
||||
lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|
|
||||
lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|
|
||||
lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|
|
||||
lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|
|
||||
mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|
|
||||
mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|
|
||||
navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|
|
||||
palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|
|
||||
peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|
|
||||
sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|
|
||||
slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|
|
||||
wheat|white|whitesmoke|yellow|yellowgreen
|
||||
<ColorName> ::= <ColorNameGoogle>|<ColorNameWeb>
|
||||
<ColorValue> ::= <ColorName>|<ColorHex>
|
||||
<DayOfWeek> ::= mon|tue|wed|thu|fri|sat|sun
|
||||
<BCP47LanguageCode> ::=
|
||||
ar-sa| # Arabic Saudi Arabia
|
||||
cs-cz| # Czech Czech Republic
|
||||
@@ -97,6 +60,43 @@ If an item contains spaces, it should be surrounded by ".
|
||||
zh-cn| # Chinese China
|
||||
zh-hk| # Chinese Hong Kong
|
||||
zh-tw # Chinese Taiwan
|
||||
<Charset> ::= ascii|latin1|mbcs|utf-8|utf-8-sig|utf-16|<String>
|
||||
<CalendarColorIndex> ::= <Number in range 1-24>
|
||||
<CalendarColorName> ::=
|
||||
amethyst|avocado|banana|basil|birch|blueberry|
|
||||
cherryblossom|citron|cobalt|cocoa|eucalyptus|flamingo|
|
||||
grape|graphite|lavender|mango|peacock|pistachio|
|
||||
pumpkin|radicchio|sage|tangerine|tomato|wisteria|
|
||||
<ColorHex> ::= "#<Hex><Hex><Hex><Hex><Hex><Hex>"
|
||||
<ColorNameGoogle> ::=
|
||||
asparagus|bluevelvet|bubblegum|cardinal|chocolateicecream|denim|desertsand|
|
||||
earthworm|macaroni|marsorange|mountaingray|mountaingrey|mouse|oldbrickred|
|
||||
pool|purpledino|purplerain|rainysky|seafoam|slimegreen|spearmint|
|
||||
toyeggplant|vernfern|wildstrawberries|yellowcab
|
||||
<ColorNameWeb> ::=
|
||||
aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|
|
||||
blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|
|
||||
cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|
|
||||
darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|
|
||||
darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|
|
||||
darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|
|
||||
firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|
|
||||
gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|
|
||||
lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|
|
||||
lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|
|
||||
lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|
|
||||
lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|
|
||||
mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|
|
||||
mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|
|
||||
navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|
|
||||
palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|
|
||||
peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|
|
||||
sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|
|
||||
slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|
|
||||
wheat|white|whitesmoke|yellow|yellowgreen
|
||||
<ColorName> ::= <ColorNameGoogle>|<ColorNameWeb>
|
||||
<ColorValue> ::= <ColorName>|<ColorHex>
|
||||
<DayOfWeek> ::= mon|tue|wed|thu|fri|sat|sun
|
||||
<EventColorIndex> ::= <Number in range 1-11>
|
||||
<EventColorName> ::=
|
||||
banana|basil|blueberry|flamingo|graphite|grape|
|
||||
@@ -243,6 +243,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
101040 |
|
||||
101043 |
|
||||
101047 |
|
||||
101049 |
|
||||
Google-Apps |
|
||||
Google-Chrome-Device-Management |
|
||||
Google-Drive-storage |
|
||||
@@ -258,56 +259,58 @@ If an item contains spaces, it should be surrounded by ".
|
||||
4tb | drive4tb | googledrivestorage4tb | Google-Drive-storage-4TB |
|
||||
8tb | drive8tb | googledrivestorage8tb | Google-Drive-storage-8TB |
|
||||
16tb | drive16tb | googledrivestorage16tb | Google-Drive-storage-16TB |
|
||||
appsheetcore | 1010380001 |
|
||||
appsheetstandard | appsheetenterprisestandard | 1010380002 |
|
||||
appsheetplus | appsheetenterpriseplus | 1010380003 |
|
||||
assuredcontrols | 1010390001 |
|
||||
bce | beyondcorp | beyondcorpenterprise | 1010400001 |
|
||||
appsheetcore | 1010380001 | AppSheet Core |
|
||||
appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard |
|
||||
appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus |
|
||||
assuredcontrols | 1010390001 | Assured Controls |
|
||||
bce | beyondcorp | beyondcorpenterprise | 1010400001 | Beyond Corp Enterprise |
|
||||
cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management |
|
||||
cloudidentity | identity | 1010010001 |
|
||||
cloudidentitypremium | identitypremium | 1010050001 |
|
||||
cloudsearch | 1010350001 |
|
||||
duetai | 1010470001 |
|
||||
cloudidentity | identity | 1010010001 | Cloud Identity |
|
||||
cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium |
|
||||
cloudsearch | 1010350001 | Cloud Search |
|
||||
eeu | 1010490001 | SKU Endpoint Education Upgrade |
|
||||
geminibiz | 1010470003 | Gemini Business |
|
||||
geminient| duetai | 1010470001 | Gemini Enterprise |
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 |
|
||||
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 |
|
||||
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 |
|
||||
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 |
|
||||
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 | Google Workspace Business - Archived User |
|
||||
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 | Google Workspace Enterprise Plus - Archived User |
|
||||
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 | Google Workspace for Education Plus - Legacy |
|
||||
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 | Google Workspace for Education Plus - Legacy (Student) |
|
||||
gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government |
|
||||
gsuitelite | gal | gsl | lite | Google-Apps-Lite |
|
||||
gwep | workspaceeducationplus | 1010310008 |
|
||||
gwepstaff | workspaceeducationplusstaff | 1010310009 |
|
||||
gwepstudent | workspaceeducationplusstudent | 1010310010 |
|
||||
gwes | workspaceeducationstandard | 1010310005 |
|
||||
gwesstaff | workspaceeducationstandardstaff | 1010310006 |
|
||||
gwesstudent | workspaceeducationstandardstudent | 1010310007 |
|
||||
gwetlu | workspaceeducationupgrade | 1010370001 |
|
||||
gwlabs | workspacelabs | 1010470002
|
||||
meetdialing | googlemeetglobaldialing | 1010360001 |
|
||||
gwep | workspaceeducationplus | 1010310008 | Google Workspace for Education Plus |
|
||||
gwepstaff | workspaceeducationplusstaff | 1010310009 | Google Workspace for Education Plus (Staff) |
|
||||
gwepstudent | workspaceeducationplusstudent | 1010310010 | Google Workspace for Education Plus (Extra Student)|
|
||||
gwes | workspaceeducationstandard | 1010310005 | Google Workspace for Education Standard |
|
||||
gwesstaff | workspaceeducationstandardstaff | 1010310006 | Google Workspace for Education Standard (Staff) |
|
||||
gwesstudent | workspaceeducationstandardstudent | 1010310007 | Google Workspace for Education Standard (Extra Student)
|
||||
gwetlu | workspaceeducationupgrade | 1010370001 | Google Workspace for Education: Teaching and Learning Upgrade |
|
||||
gwlabs | workspacelabs | 1010470002 | Google Workspace Labs |
|
||||
meetdialing | googlemeetglobaldialing | 1010360001 | Google Meet Global Dialing |
|
||||
postini | gams | gsuitegams | gsuitepostini | gsuitemessagesecurity | Google-Apps-For-Postini |
|
||||
standard | free | Google-Apps |
|
||||
vault | googlevault | Google-Vault |
|
||||
vfe | googlevaultformeremployee | Google-Vault-Former-Employee |
|
||||
voicepremier | gvpremier | googlevoicepremier | 1010330002 |
|
||||
voicestandard | gvstandard | googlevoicestandard | 1010330004 |
|
||||
voicestarter | gvstarter | googlevoicestarter | 1010330003 |
|
||||
wsas | plusstorage | 1010430001 |
|
||||
wsbizplus | workspacebusinessplus | 1010020025 |
|
||||
wsbizplusarchived | workspacebusinessplusarchived | 1010340003 |
|
||||
wsbizstan | workspacebusinessstandard | 1010020028 |
|
||||
wsbizstanarchived | workspacebusinessstandardarchived | 1010340006 |
|
||||
wsbizstarter | workspacebusinessstarter | wsbizstart | 1010020027 |
|
||||
wsbizstarterarchived | workspacebusinessstarterarchived | 1010340005 |
|
||||
wsentess | workspaceenterpriseessentials | 1010060003 |
|
||||
wsentplus | workspaceenterpriseplus | gae | gse | enterprise | gsuiteenterprise | 1010020020 |
|
||||
wsentstan | workspaceenterprisestandard | 1010020026 |
|
||||
wsentstanarchived | workspaceenterprisestandardarchived | 1010340004 |
|
||||
wsentstarter | workspaceenterprisestarter | 1010020029 | wes |
|
||||
wsess | workspaceesentials | gsuiteessentials | essentials | d4e | driveenterprise | drive4enterprise | 1010060001 |
|
||||
wsessplus | workspaceessentialsplus | 1010060005 |
|
||||
wsflw | workspacefrontline | workspacefrontlineworker | 1010020030 |
|
||||
wsflwstan | workspacefrontlinestan | workspacefrontlineworkerstan | 1010020031
|
||||
voicepremier | gvpremier | googlevoicepremier | 1010330002 | Google Voice Premier
|
||||
voicestandard | gvstandard | googlevoicestandard | 1010330004 | Google Voice Standard |
|
||||
voicestarter | gvstarter | googlevoicestarter | 1010330003 | Google Voice Starter |
|
||||
wsas | plusstorage | 1010430001 | Google Workspace Additional Storage |
|
||||
wsbizplus | workspacebusinessplus | 1010020025 | Google Workspace Business Plus |
|
||||
wsbizplusarchived | workspacebusinessplusarchived | 1010340003 | Google Workspace Business Plus - Archived User |
|
||||
wsbizstan | workspacebusinessstandard | 1010020028 | Google Workspace Business Standard }
|
||||
wsbizstanarchived | workspacebusinessstandardarchived | 1010340006 | Google Workspace Business Standard - Archived User |
|
||||
wsbizstarter | workspacebusinessstarter | wsbizstart | 1010020027 | Google Workspace Business Starter |
|
||||
wsbizstarterarchived | workspacebusinessstarterarchived | 1010340005 | Google Workspace Business Starter - Archived User |
|
||||
wsentess | workspaceenterpriseessentials | 1010060003 | Google Workspace Enterprise Essentials |
|
||||
wsentplus | workspaceenterpriseplus | gae | gse | enterprise | gsuiteenterprise | 1010020020 | Google Workspace Enterprise Plus |
|
||||
wsentstan | workspaceenterprisestandard | 1010020026 | Google Workspace Enterprise Standard |
|
||||
wsentstanarchived | workspaceenterprisestandardarchived | 1010340004 | Google Workspace Enterprise Standard - Archived User |
|
||||
wsentstarter | workspaceenterprisestarter | wes | 1010020029 | Workspace Enterprise Starter |
|
||||
wsess | workspaceesentials | gsuiteessentials | essentials | d4e | driveenterprise | drive4enterprise | 1010060001 | Google Workspace Essentials |
|
||||
wsessplus | workspaceessentialsplus | 1010060005 | Google Workspace Essentials Plus |
|
||||
wsflw | workspacefrontline | workspacefrontlineworker | 1010020030 | Google Workspace Frontline Starter |
|
||||
wsflwstan | workspacefrontlinestan | workspacefrontlineworkerstan | 1010020031 | Google Workspace Frontline Standard
|
||||
|
||||
## Items built from primitives
|
||||
|
||||
@@ -441,6 +444,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<DriveLabelFieldID> ::= <String>
|
||||
<DriveLabelSelectionID> ::= <String>
|
||||
<DriveLabelName> ::= labels/<DriveLabelID>[@latest|@published|@<Number>]
|
||||
<DriveLabelPermissionName> ::= labels/<DriveLabelID>[@latest|@published|@<Number>]/permissions/(audiences|groups|people)/<String>
|
||||
<EmailAddress> ::= <String>@<DomainName>
|
||||
<EmailItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
<EmailReplacement> ::= <String>
|
||||
@@ -583,6 +587,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<StorageObjectName> ::= <String>
|
||||
<StorageBucketObjectName> ::=
|
||||
https://storage.cloud.google.com/<StorageBucketName>/<StorageObjectName>|
|
||||
https://storage.googleapis.com/<StorageBucketName>/<StorageObjectName>|
|
||||
gs://<StorageBucketName>/<StorageObjectName>|
|
||||
<StorageBucketName>/<StorageObjectName>
|
||||
<Tag> ::= <String>
|
||||
@@ -597,6 +602,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<Title> ::= <String>
|
||||
<ToDriveAttribute> ::=
|
||||
(tdaddsheet [<Boolean>])|
|
||||
(tdalert <EmailAddress>)*|
|
||||
(tdbackupsheet (id:<Number>)|<String>)|
|
||||
(tdcellnumberformat text|number)|
|
||||
(tdcellwrap clip|overflow|wrap)|
|
||||
@@ -604,20 +610,23 @@ If an item contains spaces, it should be surrounded by ".
|
||||
(tdcopysheet (id:<Number>)|<String>)|
|
||||
(tddescription <String>)|
|
||||
(tdfileid <DriveFileID>)|
|
||||
(tdfrom <EmailAddress>)|
|
||||
(tdlocalcopy [<Boolean>])|
|
||||
(tdlocale <Locale>)|
|
||||
(tdnobrowser [<Boolean>])|
|
||||
(tdnoemail [<Boolean>])|
|
||||
(tdnoescapechar [<Boolean>])|
|
||||
(tdnotify [<Boolean>])|
|
||||
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
||||
(tdretaintitle [<Boolean>])|
|
||||
(tdshare <EmailAddress> commenter|reader|writer)*|
|
||||
(tdsheet (id:<Number>)|<String>)|
|
||||
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
|
||||
(tdsheettitle <String>)|
|
||||
(tdsubject <String>)|
|
||||
([tdsheetdaysoffset <Number>] [tdsheethoursoffset <Number>])|
|
||||
(tdtimestamp [<Boolean>] [tdtimeformat <String>]
|
||||
[tddaysoffset <Number>] [tdhoursoffset <Number>])|
|
||||
([tddaysoffset <Number>] [tdhoursoffset <Number>])|
|
||||
(tdtimezone <TimeZone>)|
|
||||
(tdtitle <String>)|
|
||||
(tdupdatesheet [<Boolean>])|
|
||||
@@ -641,6 +650,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<AssetTagList> ::= "<AssetTag>(,<AssetTag>)*"
|
||||
<CalendarACLScopeList> ::= "<CalendarACLScope>(,<CalendarACLScope>)*"
|
||||
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
|
||||
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
||||
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
||||
<CIGroupTypeList> ::= "<CIGroupType>(,<CIGroupType>)*"
|
||||
<ClassroomInvitationIDList> ::= "<ClassroomInvitationID>(,<ClassroomInvitationID>)*"
|
||||
@@ -673,6 +683,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<DriveFolderNameList> ::= "<DriveFolderName>(,<DriveFolderName>)*"
|
||||
<DriveLabelIDList> ::= "<DriveLabelID>(,<DriveLabelID>)*"
|
||||
<DriveLabelNameList> ::= "<DriveLabelName>(,<DriveLabelName>)*"
|
||||
<DriveLabelPermissionNameList> ::= "<DriveLabelPermissionName>(,<DriveLabelPermissionName>)*"
|
||||
<DriveLabelFieldIDList> ::= "<DriveLabelFieldID>(,<DriveLabelFieldID>)*"
|
||||
<DriveLabelSelectionIDList> ::= "<DriveLabelSelectionID>(,<DriveLabelSelectionID>)*"
|
||||
<EmailAddressList> ::= "<EmailAddress>(,<EmailAddress>)*"
|
||||
@@ -698,6 +709,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<MatterStateList> ::= "<MatterState>(,<MatterState>)*"
|
||||
<MessageIDList> ::= "<MessageID>(,<MessageID>)*"
|
||||
<MimeTypeList> ::= "<MimeType>(,<MimeType>)*"
|
||||
<MimeTypeNameList> ::= "<MimeTypeName>(,<MimeTypeName>)*"
|
||||
<NamespaceList> ::= "<Namespace>(,<Namespace>)*"
|
||||
<NotesNameList> ::= "<NotesName>(,<NotesName>)*"
|
||||
<OrgUnitList> ::= "<OrgUnitItem>(,<OrgUnitItem>)*"
|
||||
@@ -1095,6 +1107,8 @@ Specify a collection of items by directly specifying them; the item type is dete
|
||||
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<DriveLabelNameEntity> ::=
|
||||
<DriveLabelNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
|
||||
<DriveLabelPermissionNameEntity> ::=
|
||||
<DriveLabelPermissionNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
|
||||
<EmailAddressEntity> ::=
|
||||
<EmailAddressList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<FilterIDEntity> ::=
|
||||
@@ -1240,7 +1254,7 @@ For redirect csv, the optional arguments must appear in the order shown.
|
||||
<Redirect> ::=
|
||||
redirect csv <FileName> [multiprocess] [append] [noheader] [charset <Charset>]
|
||||
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
|
||||
[timestampcolumn <String>]
|
||||
[sortheaders <StringList>] [timestampcolumn <String>]
|
||||
[todrive <ToDriveAttribute>*] |
|
||||
redirect stdout <FileName> [multiprocess] [append] |
|
||||
redirect stdout null [multiprocess] |
|
||||
@@ -1425,7 +1439,8 @@ gam create adminrole <String> privileges all|all_ou|<PrivilegesList> [descriptio
|
||||
gam update adminrole <RoleItem> [name <String>] [privileges all|all_ou|<PrivilegesList>] [description <String>]
|
||||
gam delete adminrole <RoleItem>
|
||||
gam info adminrole <RoleItem> [privileges]
|
||||
gam print adminroles|roles [todrive <ToDriveAttribute>*] [privileges]
|
||||
gam print adminroles|roles [todrive <ToDriveAttribute>*]
|
||||
[privileges] [oneitemperrow]
|
||||
gam show adminroles|roles [privileges]
|
||||
|
||||
gam create|add admin <EmailAddress>|<UniqueID> <RoleItem> customer|(org_unit <OrgUnitItem>)
|
||||
@@ -1433,7 +1448,8 @@ gam create|add admin <EmailAddress>|<UniqueID> <RoleItem> customer|(org_unit <Or
|
||||
gam delete admin <RoleAssignmentId>
|
||||
|
||||
gam print admins [todrive <ToDriveAttribute>*]
|
||||
[user|group <EmailAddress>|<UniqueID>] [role <RoleItem>] [condition] [privileges]
|
||||
[user|group <EmailAddress>|<UniqueID>] [role <RoleItem>] [condition]
|
||||
[privileges] [oneitemperrow]
|
||||
gam show admins
|
||||
[user|group <EmailAddress>|<UniqueID>] [role <RoleItem>] [condition] [privileges]
|
||||
|
||||
@@ -1827,7 +1843,7 @@ gam calendar <CalendarEntity> deleteevent (id|eventid <EventID>)+ [doit] [<Event
|
||||
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]
|
||||
gam calendar <CalendarEntity> moveevent (id|eventid <EventID>)+ destination <CalendarItem> [<EventNotificationAttribute>]
|
||||
gam calendar <CalendarEntity> wipe
|
||||
gam calendar <CalendarEntity> printevents <EventSelectProperty>* <EventDisplayProperty>* [fields <EventFieldNameList>]
|
||||
gam calendar <CalendarEntity> printevents <EventSelectProperty>* <EventDisplayProperty>*
|
||||
[fields <EventFieldNameList>] [showdayofweek]
|
||||
[countsonly]
|
||||
[formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]
|
||||
@@ -2027,6 +2043,9 @@ gam delete chatmessage name <ChatMessage>
|
||||
gam info chatmessage name <ChatMessage>
|
||||
[formatjson]
|
||||
|
||||
gam info chatevent name <ChatEvent>
|
||||
[formatjson]
|
||||
|
||||
# Chrome Installed Apps Counts
|
||||
|
||||
gam show chromeapps
|
||||
@@ -2208,7 +2227,9 @@ gam <CrOSTypeEntity> update <CrOSAttribute>+ [quickcrosmove [<Boolean>]] [nobatc
|
||||
annotatedlocation|location|
|
||||
annotateduser|user|
|
||||
autoupdateexpiration|
|
||||
backlightinfo|
|
||||
bootmode|
|
||||
cpuinfo|
|
||||
cpustatusreports|
|
||||
deprovisionreason|
|
||||
devicefiles|
|
||||
@@ -2294,6 +2315,7 @@ gam print cros [todrive <ToDriveAttribute>*]
|
||||
[start <Date>] [end <Date>] [listlimit <Number>]
|
||||
[reverselists <CrOSListFieldNameList>]
|
||||
[timerangeorder ascending|descending] [showdvrsfp]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[sortheaders]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[showitemcountonly]
|
||||
@@ -2318,6 +2340,7 @@ gam <CrOSTypeEntity> print cros [todrive <ToDriveAttribute>*]
|
||||
[start <Date>] [end <Date>] [listlimit <Number>]
|
||||
[reverselists <CrOSListFieldNameList>]
|
||||
[timerangeorder ascending|descending] [showdvrsfp]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[sortheaders]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[showitemcountonly]
|
||||
@@ -3395,6 +3418,21 @@ gam [<UserTypeEntity>] show drivelabels
|
||||
[basic|full] [languagecode <LanguageCode>]
|
||||
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
|
||||
[formatjson] [adminaccess|asadmin]
|
||||
`
|
||||
gam [<UserTypeEntity>] create drivelabelpermission <DriveLabelNameEntity>
|
||||
(user <UserItem>) | (group <GroupItem) | (audience <String>)
|
||||
role applier|editor|organizer|reader
|
||||
[formatjson] [adminaccess|asadmin]
|
||||
gam [<UserTypeEntity>] delete drivelabelpermission <DriveLabelNameEntity>
|
||||
(user <UserItem>) | (group <GroupItem) | (audience <String>)
|
||||
[adminaccess|asadmin]
|
||||
gam [<UserTypeEntity>] remove drivelabelpermission <DriveLabelPermissionNameEntity>
|
||||
[adminaccess|asadmin]
|
||||
|
||||
gam [<UserTypeEntity>] print drivelabelpermissions <DriveLabelNameEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
|
||||
gam [<UserTypeEntity>] show drivelabelpermissions <DriveLabelNameEntity>
|
||||
[formatjson] [adminaccess|asadmin]
|
||||
|
||||
# Email Audit Monitor
|
||||
|
||||
@@ -5413,10 +5451,11 @@ gam print users [todrive <ToDriveAttribute>*]
|
||||
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
|
||||
[schemas|custom|customschemas all|<SchemaNameList>]
|
||||
[emailpart|emailparts|username]
|
||||
[userview] [basic|full|allfields | <UserFieldName>* | fields <UserFieldNameList>]
|
||||
[userview] [basic|full|allfields|(<UserFieldName>*|fields <UserFieldNameList>)]
|
||||
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
|
||||
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
|
||||
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
|
||||
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
|
||||
[showitemcountonly]
|
||||
|
||||
Print fields for specified users.
|
||||
@@ -5429,10 +5468,11 @@ gam print users [todrive <ToDriveAttribute>*] select <UserTypeEntity>
|
||||
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
|
||||
[schemas|custom|customschemas all|<SchemaNameList>]
|
||||
[emailpart|emailparts|username]
|
||||
[userview] [basic|full|allfields | <UserFieldName>* | fields <UserFieldNameList>]
|
||||
[userview] [basic|full|allfields|(<UserFieldName>*|fields <UserFieldNameList>)]
|
||||
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
|
||||
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
|
||||
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
|
||||
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
|
||||
[showitemcountonly]
|
||||
|
||||
gam <UserTypeEntity> print users [todrive <ToDriveAttribute>*]
|
||||
@@ -5443,10 +5483,11 @@ gam <UserTypeEntity> print users [todrive <ToDriveAttribute>*]
|
||||
[(products|product <ProductIDList>)|(skus|sku <SKUIDList>)]
|
||||
[schemas|custom|customschemas all|<SchemaNameList>]
|
||||
[emailpart|emailparts|username]
|
||||
[userview] [basic|full|allfields | <UserFieldName>* | fields <UserFieldNameList>]
|
||||
[userview] [basic|full|allfields|(<UserFieldName>*|fields <UserFieldNameList>)]
|
||||
[delimiter <Character>] [sortheaders [<Boolean>]] [scalarsfirst [<Boolean>]]
|
||||
[formatjson [quotechar <Character>]] [quoteplusphonenumbers]
|
||||
[issuspended <Boolean>] [aliasmatchpattern <RegularExpression>]
|
||||
[showvalidcolumn] (addcsvdata <FieldName> <String>)*
|
||||
[showitemcountonly]
|
||||
|
||||
The first column will always be primaryEmail; the remaining field names will be sorted if allfields, basic, full or sortheaders is specified;
|
||||
@@ -5963,6 +6004,15 @@ gam <UserTypeEntity> print chatmessages [todrive <ToDriveAttribute>*] <ChatSpace
|
||||
[showdeleted [<Boolean>]] [filter <String>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> info chatevent name <ChatEvent>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> show chatevents <ChatSpace>
|
||||
filter <String>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print chatevents [todrive <ToDriveAttribute>*] <ChatSpace>
|
||||
filter <String>
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
# Users - Drive
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
@@ -6163,6 +6213,11 @@ gam <UserTypeEntity> get document <DriveFileEntity>
|
||||
[targetfolder <FilePath>] [targetname <FileName>]
|
||||
[donotfollowshortcuts [<Boolean>]] [overwrite [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> update docuument <DriveFileEntity>
|
||||
((json [charset <Charset>] <SpreadsheetJSONUpdateRequest>) |
|
||||
(json file <FileName> [charset <Charset>]))
|
||||
[formatjson]
|
||||
|
||||
gam <UserTypeEntity> get drivefile <DriveFileEntity> [revision <DriveFileRevisionID>]
|
||||
[(format <FileFormatList>)|(gsheet|csvsheet <SheetEntity>)] [exportsheetaspdf <String>]
|
||||
[targetfolder <FilePath>] [targetname <FileName>|-]
|
||||
@@ -6311,6 +6366,52 @@ gam print ownership <DriveFileID>|(drivefilename <DriveFileName>) [todrive <ToDr
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
<CommentsAuthorSubfieldName> ::=
|
||||
author.displayname|
|
||||
author.emailaddress|
|
||||
author.me|
|
||||
author.permissionid|
|
||||
author.photolink
|
||||
|
||||
<CommentsRepliesSubfieldName> ::=
|
||||
reply.action|
|
||||
reply.author|
|
||||
reply.author.<CommentsAuthorSubfieldName>|
|
||||
reply.content|
|
||||
reply.createddate|createdtime|
|
||||
reply.deleted|
|
||||
reply.htmlcontent|
|
||||
reply.id|
|
||||
reply.modifieddate|modifiedtime
|
||||
|
||||
<CommentsFieldName> ::=
|
||||
action|
|
||||
author|
|
||||
content|
|
||||
<CommentsAuthorSubfieldName>|
|
||||
<CommentsRepliesSubfieldName>|
|
||||
createddate|createdtime|
|
||||
deleted|
|
||||
htmlcontent|
|
||||
id|
|
||||
modifieddate|modifiedtime|
|
||||
quotedfilecontent|
|
||||
reply|replies|
|
||||
resolved
|
||||
<CommentsFieldNameList> ::= "<CommentsFieldName>(,<CommentsFieldName>)*"
|
||||
|
||||
gam <UserTypeEntity> show filecomments <DriveFileEntity>
|
||||
[showdeleted] [start <Date>|<Time>]
|
||||
[fields <CommentsFieldNameList>] [showphotolinks]
|
||||
[countsonly]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print filecomments <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
[showdeleted] [start <Date>|<Time>]
|
||||
[fields <CommentsFieldNameList>] [showphotolinks]
|
||||
[countsonly]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
<RevisionsFieldName> ::=
|
||||
filesize|
|
||||
id|
|
||||
@@ -6636,7 +6737,7 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
@@ -6649,7 +6750,7 @@ gam <UserTypeEntity> show filecounts
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [`<showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
@@ -6681,7 +6782,7 @@ gam <UserTypeEntity> print filetree [todrive <ToDriveAttribute>*]
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
[depth <Number>]]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
@@ -6693,7 +6794,7 @@ gam <UserTypeEntity> show filetree
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
[depth <Number>]]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
@@ -6713,7 +6814,7 @@ gam <UserTypeEntity> print filelist [todrive <ToDriveAttribute>*]
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
[(norecursion [<Boolean>])|(depth <Number>)] [showparent]]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>] [mimetypeinquery [<Boolean>]]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>] [pmfilter] [oneitemperrow]
|
||||
@@ -6899,6 +7000,10 @@ gam <UserTypeEntity> create labellist <LabelNameEntity>
|
||||
[backgroundcolor "<LabelColorHex>|<LabelBackgroundColorHex>|custom:<ColorHex>"]
|
||||
[textcolor "<LabelColorHex>|<LabelTextColorHex>|custom:<ColorHex>"]
|
||||
[buildpath [<Boolean>]]
|
||||
gam <UserTypeEntity> update labelid <LabelID> [name <String>]
|
||||
[messagelistvisibility hide|show] [labellistvisibility hide|show|showifunread]
|
||||
[backgroundcolor "<LabelColorHex>|<LabelBackgroundColorHex>|custom:<ColorHex>"]
|
||||
[textcolor "<LabelColorHex>|<LabelTextColorHex>|custom:<ColorHex>"]
|
||||
gam <UserTypeEntity> update labelsettings <LabelName> [name <String>]
|
||||
[messagelistvisibility hide|show] [labellistvisibility hide|show|showifunread]
|
||||
[backgroundcolor "<LabelColorHex>|<LabelBackgroundColorHex>|custom:<ColorHex>"]
|
||||
@@ -7148,9 +7253,13 @@ gam <UserTypeEntity> print smimes [todrive <ToDriveAttribute>*]
|
||||
|
||||
# Users - Gmail Client Side Encryption
|
||||
|
||||
gam <UserTypeEntity> create cseidentity <KeyPairID> [kpemail <EmailAddress>]
|
||||
gam <UserTypeEntity> create cseidentity
|
||||
(primarykeypairid <KeyPairID>) | (signingkeypairid <KeyPairID> encryptionkeypairid <KeyPairID>)
|
||||
[kpemail <EmailAddress>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> update cseidentity <KeyPairID> [kpemail <EmailAddress>]
|
||||
gam <UserTypeEntity> update cseidentity
|
||||
(primarykeypairid <KeyPairID>) | (signingkeypairid <KeyPairID> encryptionkeypairid <KeyPairID>)
|
||||
[kpemail <EmailAddress>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> delete cseidentity [kpemail <EmailAddress>]
|
||||
|
||||
@@ -7164,19 +7273,19 @@ gam <UserTypeEntity> print cseidentities [todrive <ToDriveAttribute>*]
|
||||
gam <UserTypeEntity> create csekeypair
|
||||
[incertdir <FilePath>] [inkeydir <FilePath>]
|
||||
[addidentity [<Boolean>]] [kpemail <EmailAddress>]
|
||||
[formatjson|returnidonly]
|
||||
[showpem] [showkaclsdata] [formatjson|returnidonly]
|
||||
gam <UserTypeEntity> disable csekeypair <KeyPairID>
|
||||
[formatjson]
|
||||
[showpem] [showkaclsdata] [formatjson]
|
||||
gam <UserTypeEntity> enable csekeypair <KeyPairID>
|
||||
[formatjson]
|
||||
[showpem] [showkaclsdata] [formatjson]
|
||||
gam <UserTypeEntity> obliterate csekeypair <KeyPairID>
|
||||
|
||||
gam <UserTypeEntity> info csekeypair <KeyPairID>
|
||||
[formatjson]
|
||||
[showpem] [showkaclsdata] [formatjson]
|
||||
gam <UserTypeEntity> show csekeypairs
|
||||
[formatjson]
|
||||
[showpem] [showkaclsdata] [formatjson]
|
||||
gam <UserTypeEntity> print csekeypairs [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[showpem] [showkaclsdata] [formatjson [quotechar <Character>]]
|
||||
|
||||
# Users - Gmail - Settings
|
||||
|
||||
@@ -7282,10 +7391,12 @@ gam <UserTypeEntity> info note <NotesNameEntity>
|
||||
gam <UserTypeEntity> show notes
|
||||
[fields <NotesFieldList>] [filter <String>]
|
||||
[role owner|writer]
|
||||
[countsonly]
|
||||
[compact|formatjson]
|
||||
gam <UserTypeEntity> print notes [todrive <ToDriveAttribute>*]
|
||||
[fields <NotesFieldList>] [filter <String>]
|
||||
[role owner|writer]
|
||||
[countsonly]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> get noteattachments <NotesNameEntity>
|
||||
|
||||
@@ -2,6 +2,254 @@
|
||||
|
||||
Merged GAM-Team version
|
||||
|
||||
6.72.08
|
||||
|
||||
Added option `countsonly` to `gam <UserTypeEntity> print|show notes` that displays
|
||||
the number of notes a user owns and the number of notes of user can edit.
|
||||
|
||||
6.72.07
|
||||
|
||||
Updated commands that send emails to not downshift `'First Last<firstlast@domain.com>'` to `'first last<firstlast@domain.com>'`.
|
||||
|
||||
6.72.06
|
||||
|
||||
Updated the following commands to properly handle emailaddress lists containing addresses of the form: `'First Last<firstlast@domain.com>'`.
|
||||
```
|
||||
gam <UserTypeEntity> sendemail recipient|to <RecipientEntity> [cc <RecipientEntity>] [bcc <RecipientEntity>] [singlemessage]
|
||||
gam create|update user ... notify <EmailAddressList>
|
||||
```
|
||||
|
||||
6.72.05
|
||||
|
||||
Cleaned up code for all commands that display Chat objects.
|
||||
|
||||
6.72.04
|
||||
|
||||
Added commands to display Chat events.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Chat#display-chat-events
|
||||
|
||||
6.72.03
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> create chatspace` that caused a trap.
|
||||
|
||||
6.72.02
|
||||
|
||||
Updated `gam delete admin <RoleAssignmentId>` to handle the following error that
|
||||
occurs when `<RoleAssignmentId>` references a user that has been deleted.
|
||||
```
|
||||
ERROR: 404: resourceNotFound - Does not exist
|
||||
```
|
||||
|
||||
6.72.01
|
||||
|
||||
Improved commands to display drive file comments.
|
||||
|
||||
6.72.00
|
||||
|
||||
Added commands to display drive file comments.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Comments
|
||||
|
||||
6.71.18
|
||||
|
||||
Updated `<CrOSFieldName>` to include `cpuinfo` and `backlightinfo`.
|
||||
|
||||
6.71.17
|
||||
|
||||
Added `depth` column to output of `gam <UserTypeEntity> print diskusage <DriveFileEntity>` that can
|
||||
be used to filter the depth of the folders displayed. Depth `-1` is the top level folder, depth `0`
|
||||
are its immediate children, depth `2` are the children of depth `1` and so forth.
|
||||
```
|
||||
gam config csv_output_row_filter "depth:count<1" user organizer@domain.com print diskusage teamdriveid <TeamDriveID>
|
||||
```
|
||||
|
||||
6.71.16
|
||||
|
||||
Updated `gam <UserTypeEntity> create|update sendas <EmailAddress> ... replyto <EmailAddress>`
|
||||
to allow uppercase letters in `sendas <EmailAddress>` and `replyto <EmailAddress>`.
|
||||
|
||||
6.71.15
|
||||
|
||||
Updated `gam create project` to handle the following error:
|
||||
```
|
||||
ERROR: 403: permissionDenied - Authentication error: 7; Error Details: User not allowed to access GCP services.
|
||||
```
|
||||
This error occurs when the Google Workspace admin or GCP project manager email address used in the command
|
||||
is in an OU where Google Cloud Platform is not enabled in Apps/Additional Google services.
|
||||
|
||||
6.71.14
|
||||
|
||||
Added a command to update a Gmail label's settings by specifying it's ID rather than it's name.
|
||||
```
|
||||
gam <UserTypeEntity> update labelid <LabelID> [name <String>]
|
||||
[messagelistvisibility hide|show] [labellistvisibility hide|show|showifunread]
|
||||
[backgroundcolor "<LabelColorHex>|<LabelBackgroundColorHex>|custom:<ColorHex>"]
|
||||
[textcolor "<LabelColorHex>|<LabelTextColorHex>|custom:<ColorHex>"]
|
||||
```
|
||||
|
||||
6.71.13
|
||||
|
||||
Updated `<UserMultiAttribute>.location.buildingid <String>` to allow non-validated building IDs
|
||||
by specifying `nv:` at the beginning of `<String>`; e.g., `nv:Building X' sets the building ID to `Building X`.
|
||||
|
||||
6.71.12
|
||||
|
||||
Added option `showmimetype category <MimeTypeNameList>` to `gam <UserTypeEntity> print|show filecounts|filelist|filetree`
|
||||
```
|
||||
<MimeTypeName> ::= application|audio|font|image|message|model|multipart|text|video
|
||||
<MimeTypeNameList> ::= "<MimeTypeName>(,<MimeTypeName>)*"
|
||||
|
||||
gam user user@domain.com print filelist fields id,name,mimetype showmimetype prefixes audio,video
|
||||
```
|
||||
|
||||
Fix bug in `gam <UserTypeEntity> info|show sheet <DriveFileEntity>` that caused a trap.
|
||||
|
||||
6.71.11
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam print cros` that adds
|
||||
additional columns of data to the CSV file output. Typically, you would read CSV file of device IDs/serial numbers
|
||||
to generate a CSV file of results and copy data from the input CSV to the outout CSV.
|
||||
|
||||
6.71.10
|
||||
|
||||
Reverted change made in 6.71.09 to `gam <UserTypeEntity> print filelist` when `showmimetype` and `filepath|fullpath`
|
||||
were both specified. The change improved the performance when `showmimetype` selected a small number of files;
|
||||
the information for just those files was downloaded and then additional API calls were made to construct the file paths.
|
||||
However, if a large number of files were selected, the additional APIs calls decreased performance.
|
||||
|
||||
Added option `mimetypeinquery` can be used when you expect the query to return a small number of files
|
||||
relative to the total number of files.
|
||||
|
||||
6.71.09
|
||||
|
||||
Improved the performance of `gam <UserTypeEntity> print filelist` when `showmimetype` and `filepath|fullpath`
|
||||
are both specified.
|
||||
|
||||
6.71.08
|
||||
|
||||
Added option `oneitemperrow` to 'gam print admins|adminroles` to have each of a
|
||||
roles privileges displayed on a separate row with all of the other admin/role fields.
|
||||
This produces a CSV file that can be used in subsequent commands without further script processing.
|
||||
|
||||
6.71.07
|
||||
|
||||
Added command to upload changes to Google Docs.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Files-Manage#upload-changes-to-google-documents
|
||||
|
||||
6.71.06
|
||||
|
||||
Added additional error handling to Gmail Client Side Encryption commands.
|
||||
|
||||
Added license product Education Endpoint Management
|
||||
* ProductID - 101049
|
||||
|
||||
Added license SKU Endpoint Education Upgrade
|
||||
* ProductID - 101049
|
||||
* SKUID - 1010490001 | eeu
|
||||
|
||||
6.71.05
|
||||
|
||||
Fixed a bug introduced in 6.71.00 that caused a trap in `gam <UserTypeEntity> print filelist`.
|
||||
|
||||
Added option `tdfrom <EmailAddress>` to `<ToDriveAttribute>` that causes GAM to use `<EmailAddress>` as the from address
|
||||
in all emails sent. By default, the from address is the Google Workspace Admin in `gam oauth info`.o
|
||||
|
||||
6.71.04
|
||||
|
||||
Updated `gam <UserTypeEntity> create|update cseidentity` to accept either of the following key pair options:
|
||||
* `primarykeypairid <KeyPairID>` - The configuration of a CSE identity that uses the same key pair for signing and encryption.
|
||||
* `signingkeypairid <KeyPairID> encryptionkeypairid <KeyPairID>` - The configuration of a CSE identity that uses different key pairs for signing and encryption.
|
||||
|
||||
Updated CSV output row sorting to avoid a trap that occurred when a row was missing one of the sort fields.
|
||||
|
||||
6.71.03
|
||||
|
||||
Added option `tdalert <EmailAddress>` to `<ToDriveAttribute>`. When a todrive file is created or updated,
|
||||
GAM will send notification emails to all `tdalert <EmailAddress>` users if `tdnotify` is true.
|
||||
`<EmailAddress>` must be valid within your Google Workspace.
|
||||
|
||||
6.71.02
|
||||
|
||||
Added additional error handling to Gmail Client Side Encryption commands.
|
||||
|
||||
6.71.01
|
||||
|
||||
Fixed bug in `gam audit monitor create` that caused a trap.
|
||||
|
||||
6.71.00
|
||||
|
||||
Added `csv_output_sort_headers` string list variable to `gam.cfg` that causes GAM to sort CSV output
|
||||
rows by the column headers specified in the variable. The column headers are case insensitive and
|
||||
if column header does not appear in the CSV output, it is ignored.
|
||||
|
||||
Added `sortheaders <StringList>` to `redirect csv <FileName>` that has the same effect as above.
|
||||
|
||||
The sort keys specified in `redirect csv ... sortheaders <StringList>` take precedence over the values from `gam.cfg`.
|
||||
|
||||
Added option `tdsubject <String>` to `<ToDriveAttribute>` that causes GAM to use `<String>` as the subject
|
||||
in all emails sent. In `<String>`, `#file#` will, be replaced by the file title and `#sheet#` will be replaced
|
||||
by the sheet/tab title. By default, the subject is the file title.
|
||||
|
||||
6.70.09
|
||||
|
||||
Added additional error handling to Gmail Client Side Encryption commands.
|
||||
|
||||
Added options `showpem` and `showkaclsdata` to all Gmail CSE commands that process/display
|
||||
CSE key pairs. By default, the `pem` and `kaclsdata` fields will not be displayed unless
|
||||
the corresponding `show` option is specified.
|
||||
|
||||
6.70.08
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> create cseidentity <KeyPairID>` that caused an error.
|
||||
|
||||
6.70.07
|
||||
|
||||
Updated user instructions in `gam oauth create` and `gam <UserTypeEntity> update serviceaccount`
|
||||
and changed `s` from selecting all scopes to selecting default scopes.
|
||||
|
||||
6.70.06
|
||||
|
||||
Updated `gam info users <UserTypeEntity>` to not include group tree infornation unless option `grouptree` is specified.
|
||||
|
||||
6.70.05
|
||||
|
||||
Added commands to create|delete|display Drive Label permissions.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Labels
|
||||
|
||||
6.70.04
|
||||
|
||||
Added option `showvalidcolumn` to `gam print users` that can be used to identify whether
|
||||
users are defined in the domain. Typically, you would read CSV file of email addresses
|
||||
to verify as domain members.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users#verify-domain-membership
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam print users` that adds
|
||||
additional columns of data to the CSV file output. Typically, you would read CSV file of email addresses
|
||||
to generate a CSV file of results and copy data from the input CSV to the outout CSV.
|
||||
|
||||
6.70.03
|
||||
|
||||
Renamed license product DuetAI to Gemini
|
||||
* ProductID - 101047
|
||||
|
||||
Renamed license SKU DuetAI for Google Workspace to Gemini Enterprise
|
||||
* ProductID - 101047
|
||||
* SKUID - 1010470001 | geminient | duetai
|
||||
|
||||
Added support for license SKU Gemini Business
|
||||
* ProductID - 101047
|
||||
* SKUID - 1010470003 | geminibiz
|
||||
|
||||
6.70.02
|
||||
|
||||
In 6.69.00, GAM starting using course owner access when using `copyfrom` in `gam create|update course`
|
||||
regardless of the value of `gam.cfg/use_course_owner_access`. This prevents copying from courses
|
||||
with a deleted user. GAM now uses the value of `gam.cfg/use_course_owner_access` when `copyfrom` is used.
|
||||
|
||||
6.70.01
|
||||
|
||||
Added `gmail_cse_incert_dir` and `gmail_cse_inkey_dir` path variables to `gam.cfg` that provide
|
||||
@@ -15,12 +263,12 @@ Added support for Gmail Client Side Encryption.
|
||||
|
||||
This is an initial, minimally tested release; proceed with care and report all issues.
|
||||
|
||||
c6.69.00
|
||||
6.69.00
|
||||
|
||||
Added `use_classroom_owner_access` Boolean variable to `gam.cfg` that controls how GAM gets
|
||||
classroom member information and removes students/teachers. Client access does not provide
|
||||
Added `use_course_owner_access` Boolean variable to `gam.cfg` that controls how GAM gets
|
||||
classroom member information and removes students/teachers. Client/admin access does not provide
|
||||
complete information about non-domain students/teachers.
|
||||
* `False` - Use client access; this is the default. Use if you don't have non-domain members in your courses.
|
||||
* `False` - Use client/admin access; this is the default. Use if you don't have non-domain members in your courses.
|
||||
* `True` - Use service account access as the classroom owner. An extra API call is required per course to authenticate the owner; this will affect performance
|
||||
|
||||
Added the following command which must be used to delete classroom invitations for non-domain students/teachers.
|
||||
@@ -222,8 +470,8 @@ Added option `exportlinkeddrivefiles <Boolean>` to `gam create vaultexport` that
|
||||
Updated `gam remove aliases <EmailAddress> user|group <EmailAddressEntity>` to give a more informative
|
||||
error message when the target/alias combination does not exist.
|
||||
```
|
||||
Old: User: testsimple@rdschool.org, User Alias: tsalias@rdschool.org, Remove Failed: Invalid Input: resource_id
|
||||
New: User: testsimple@rdschool.org, User Alias: tsalias@rdschool.org, Remove Failed: Does not exist
|
||||
Old: User: testsimple@domain.com, User Alias: tsalias@domain.com, Remove Failed: Invalid Input: resource_id
|
||||
New: User: testsimple@domain.com, User Alias: tsalias@domain.com, Remove Failed: Does not exist
|
||||
```
|
||||
|
||||
6.67.20
|
||||
|
||||
1557
src/gam/__init__.py
1557
src/gam/__init__.py
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,7 @@ ANALYTICS_ADMIN = 'analyticsadmin'
|
||||
CALENDAR = 'calendar'
|
||||
CBCM = 'cbcm'
|
||||
CHAT = 'chat'
|
||||
CHAT_EVENTS = 'chatevents'
|
||||
CHAT_MEMBERSHIPS = 'chatmemberships'
|
||||
CHAT_MESSAGES = 'chatmessages'
|
||||
CHAT_SPACES = 'chatspaces'
|
||||
@@ -190,6 +191,7 @@ _INFO = {
|
||||
CALENDAR: {'name': 'Calendar API', 'version': 'v3', 'v2discovery': True, 'mappedAPI': 'calendar-json'},
|
||||
CBCM: {'name': 'Chrome Browser Cloud Management API', 'version': 'v1.1beta1', 'v2discovery': True, 'localjson': True},
|
||||
CHAT: {'name': 'Chat API', 'version': 'v1', 'v2discovery': True},
|
||||
CHAT_EVENTS: {'name': 'Chat API - Events', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
CHAT_MEMBERSHIPS: {'name': 'Chat API - Memberships', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
CHAT_MESSAGES: {'name': 'Chat API - Messages', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
CHAT_SPACES: {'name': 'Chat API - Spaces', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
@@ -642,6 +644,7 @@ _SVCACCT_SCOPES = [
|
||||
{'name': 'Youtube API - read only',
|
||||
'api': YOUTUBE,
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/youtube.readonly'},
|
||||
]
|
||||
|
||||
@@ -657,10 +660,12 @@ _SVCACCT_SPECIAL_SCOPES = [
|
||||
{'name': 'Gmail API - Full Access - read only',
|
||||
'api': GMAIL,
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/gmail.readonly'},
|
||||
{'name': 'Gmail API - Send Messages - including todrive',
|
||||
'api': GMAIL,
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': GMAIL_SEND_SCOPE},
|
||||
{'name': 'Sheets API - todrive',
|
||||
'api': SHEETSTD,
|
||||
|
||||
@@ -131,6 +131,8 @@ CSV_OUTPUT_ROW_DROP_FILTER = 'csv_output_row_drop_filter'
|
||||
CSV_OUTPUT_ROW_DROP_FILTER_MODE = 'csv_output_row_drop_filter_mode'
|
||||
# Limit number of output rows
|
||||
CSV_OUTPUT_ROW_LIMIT = 'csv_output_row_limit'
|
||||
# Output sort headers
|
||||
CSV_OUTPUT_SORT_HEADERS = 'csv_output_sort_headers'
|
||||
# Column header subfield name delimiter in CSV output file
|
||||
CSV_OUTPUT_SUBFIELD_DELIMITER = 'csv_output_subfield_delimiter'
|
||||
# Add timestamp column to CSV output file
|
||||
@@ -350,6 +352,7 @@ Defaults = {
|
||||
CSV_OUTPUT_ROW_DROP_FILTER: '',
|
||||
CSV_OUTPUT_ROW_DROP_FILTER_MODE: 'anymatch',
|
||||
CSV_OUTPUT_ROW_LIMIT: '0',
|
||||
CSV_OUTPUT_SORT_HEADERS: '',
|
||||
CSV_OUTPUT_SUBFIELD_DELIMITER: '.',
|
||||
CSV_OUTPUT_TIMESTAMP_COLUMN: '',
|
||||
CSV_OUTPUT_USERS_AUDIT: FALSE,
|
||||
@@ -454,6 +457,7 @@ TYPE_LOCALE = 'locl'
|
||||
TYPE_PASSWORD = 'pass'
|
||||
TYPE_ROWFILTER = 'rowf'
|
||||
TYPE_STRING = 'stri'
|
||||
TYPE_STRINGLIST = 'strl'
|
||||
TYPE_TIMEZONE = 'tmzn'
|
||||
|
||||
VAR_TYPE = 'type'
|
||||
@@ -508,6 +512,7 @@ VAR_INFO = {
|
||||
CSV_OUTPUT_ROW_DROP_FILTER: {VAR_TYPE: TYPE_ROWFILTER},
|
||||
CSV_OUTPUT_ROW_DROP_FILTER_MODE: {VAR_TYPE: TYPE_CHOICE, VAR_CHOICES: {'allmatch': True, 'anymatch': False}},
|
||||
CSV_OUTPUT_ROW_LIMIT: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (0, None)},
|
||||
CSV_OUTPUT_SORT_HEADERS: {VAR_TYPE: TYPE_STRINGLIST},
|
||||
CSV_OUTPUT_SUBFIELD_DELIMITER: {VAR_TYPE: TYPE_CHARACTER},
|
||||
CSV_OUTPUT_TIMESTAMP_COLUMN: {VAR_TYPE: TYPE_STRING, VAR_LIMITS: (0, None)},
|
||||
CSV_OUTPUT_USERS_AUDIT: {VAR_TYPE: TYPE_BOOLEAN},
|
||||
|
||||
@@ -463,6 +463,8 @@ class GamCLArgs():
|
||||
ARG_CHANNELSKU = 'channelsku'
|
||||
ARG_CHANNELSKUS = 'channelskus'
|
||||
ARG_CHAT = 'chat'
|
||||
ARG_CHATEVENT = 'chatevent'
|
||||
ARG_CHATEVENTS = 'chatevents'
|
||||
ARG_CHATMEMBER = 'chatmember'
|
||||
ARG_CHATMEMBERS = 'chatmembers'
|
||||
ARG_CHATMESSAGE = 'chatmessage'
|
||||
@@ -567,6 +569,8 @@ class GamCLArgs():
|
||||
ARG_DRIVEFOLDERPATH = 'drivefolderpath'
|
||||
ARG_DRIVELABEL = 'drivelabel'
|
||||
ARG_DRIVELABELS = 'drivelabels'
|
||||
ARG_DRIVELABELPERMISSION = 'drivelabelpermission'
|
||||
ARG_DRIVELABELPERMISSIONS = 'drivelabelpermissions'
|
||||
ARG_DRIVESETTINGS = 'drivesettings'
|
||||
ARG_DRIVETRASH = 'drivetrash'
|
||||
ARG_EMPTYDRIVEFOLDERS = 'emptydrivefolders'
|
||||
@@ -576,6 +580,8 @@ class GamCLArgs():
|
||||
ARG_EXPORTS = 'exports'
|
||||
ARG_FEATURE = 'feature'
|
||||
ARG_FEATURES = 'features'
|
||||
ARG_FILECOMMENT = 'filecomment'
|
||||
ARG_FILECOMMENTS = 'filecomments'
|
||||
ARG_FILECOUNT = 'filecount'
|
||||
ARG_FILECOUNTS = 'filecounts'
|
||||
ARG_FILEDRIVELABEL = 'filedrivelabel'
|
||||
@@ -814,6 +820,8 @@ class GamCLArgs():
|
||||
OB_CHANNEL_CUSTOMER_ID = 'ChannelCustomerID'
|
||||
OB_CHARACTER = 'Character'
|
||||
OB_CHAR_SET = 'CharacterSet'
|
||||
OG_CHAT_ATTACHMENT = 'ChatAttachment'
|
||||
OB_CHAT_EVENT = 'ChatEvent'
|
||||
OB_CHAT_MEMBER = 'ChatMember'
|
||||
OB_CHAT_MESSAGE = 'ChatMessage'
|
||||
OB_CHAT_MESSAGE_ID = 'ChatMessageID'
|
||||
@@ -877,6 +885,7 @@ class GamCLArgs():
|
||||
OB_DRIVE_FOLDER_PATH = 'DriveFolderPath'
|
||||
OB_DRIVE_LABEL_ID = 'DriveLabelID'
|
||||
OB_DRIVE_LABEL_NAME = 'DriveLabelName'
|
||||
OB_DRIVE_LABEL_PERMISSION_NAME = 'DriveLabelPermissionName'
|
||||
OB_DRIVE_LABEL_FIELD_ID = 'DriveLabelFieldID'
|
||||
OB_DRIVE_LABEL_SELECTION_ID_LIST = 'DriveLabelSelectionIDList'
|
||||
OB_EMAIL_ADDRESS = 'EmailAddress'
|
||||
|
||||
@@ -84,6 +84,7 @@ class GamEntity():
|
||||
CHANNEL_PRODUCT = 'chpr'
|
||||
CHANNEL_SKU = 'chsk'
|
||||
CHAT_BOT = 'chbo'
|
||||
CHAT_EVENT = 'chev'
|
||||
CHAT_MANAGER_USER = 'chgu'
|
||||
CHAT_MEMBER = 'chme'
|
||||
CHAT_MEMBER_GROUP = 'chmg'
|
||||
@@ -173,6 +174,7 @@ class GamEntity():
|
||||
DOMAIN_PROFILE = 'dopr'
|
||||
DRIVE_DISK_USAGE = 'drdu'
|
||||
DRIVE_FILE = 'dfil'
|
||||
DRIVE_FILE_COMMENT = 'filc'
|
||||
DRIVE_FILE_ID = 'fili'
|
||||
DRIVE_FILE_NAME = 'filn'
|
||||
DRIVE_FILE_RENAMED = 'firn'
|
||||
@@ -191,6 +193,8 @@ class GamEntity():
|
||||
DRIVE_LABEL_FIELD_ID = 'dlfi'
|
||||
DRIVE_LABEL_ID = 'dlid'
|
||||
DRIVE_LABEL_NAME = 'dlna'
|
||||
DRIVE_LABEL_PERMISSION = 'dlpe'
|
||||
DRIVE_LABEL_PERMISSION_NAME = 'dlpn'
|
||||
DRIVE_ORPHAN_FILE_OR_FOLDER = 'orph'
|
||||
DRIVE_PARENT_FOLDER = 'fipf'
|
||||
DRIVE_PARENT_FOLDER_ID = 'fipi'
|
||||
@@ -288,6 +292,7 @@ class GamEntity():
|
||||
PERSONAL_DEVICE = 'pedv'
|
||||
PHOTO = 'phot'
|
||||
POP_ENABLED = 'popa'
|
||||
PRESENTATION = 'pres'
|
||||
PRINTER = 'prin'
|
||||
PRINTER_ID = 'prid'
|
||||
PRINTER_MODEL = 'prmd'
|
||||
@@ -419,6 +424,7 @@ class GamEntity():
|
||||
CHANNEL_PRODUCT: ['Channel Products', 'Channel Product'],
|
||||
CHANNEL_SKU: ['Channel SKUs', 'Channel SKU'],
|
||||
CHAT_BOT: ['Chat BOTs', 'Chat BOT'],
|
||||
CHAT_EVENT: ['Chat Events', 'Chat Event'],
|
||||
CHAT_MANAGER_USER: ['Chat User Managers', 'Chat User Manager'],
|
||||
CHAT_MESSAGE: ['Chat Messages', 'Chat Message'],
|
||||
CHAT_MESSAGE_ID: ['Chat Message IDs', 'Chat Message ID'],
|
||||
@@ -508,6 +514,7 @@ class GamEntity():
|
||||
DOMAIN_PROFILE: ['Domain Profiles', 'Domain Profile'],
|
||||
DRIVE_DISK_USAGE: ['Drive Disk Usages', 'Drive Disk Usage'],
|
||||
DRIVE_FILE: ['Drive Files', 'Drive File'],
|
||||
DRIVE_FILE_COMMENT: ['Drive File Comments', 'Drive File Comment'],
|
||||
DRIVE_FILE_ID: ['Drive File IDs', 'Drive File ID'],
|
||||
DRIVE_FILE_NAME: ['Drive File Names', 'Drive File Name'],
|
||||
DRIVE_FILE_REVISION: ['Drive File Revisions', 'Drive File Revision'],
|
||||
@@ -526,6 +533,8 @@ class GamEntity():
|
||||
DRIVE_LABEL_FIELD_ID: ['Drive Label Field IDs', 'Drive Label Field ID'],
|
||||
DRIVE_LABEL_ID: ['Drive Label IDs', 'Drive Label ID'],
|
||||
DRIVE_LABEL_NAME: ['Drive Label Names', 'Drive Label Name'],
|
||||
DRIVE_LABEL_PERMISSION: ['Drive Label Permissions', 'Drive Label Permission'],
|
||||
DRIVE_LABEL_PERMISSION_NAME: ['Drive Label Permission Names', 'Drive Label Permission Name'],
|
||||
DRIVE_ORPHAN_FILE_OR_FOLDER: ['Drive Orphan Files/Folders', 'Drive Orphan File/Folder'],
|
||||
DRIVE_PARENT_FOLDER: ['Drive Parent Folders', 'Drive Parent Folder'],
|
||||
DRIVE_PARENT_FOLDER_ID: ['Drive Parent Folder IDs', 'Drive Parent Folder ID'],
|
||||
@@ -623,6 +632,7 @@ class GamEntity():
|
||||
PERSONAL_DEVICE: ['Personal Devices', 'Personal Device'],
|
||||
PHOTO: ['Photos', 'Photo'],
|
||||
POP_ENABLED: ['POP Enabled', 'POP Enabled'],
|
||||
PRESENTATION: ['Presentations', 'Presentation'],
|
||||
PRINTER: ['Printers', 'Printer'],
|
||||
PRINTER_ID: ['Printer IDs', 'Printer ID'],
|
||||
PRINTER_MODEL: ['Printer Models', 'Printer Model'],
|
||||
|
||||
@@ -24,6 +24,7 @@ ABORTED = 'aborted'
|
||||
ABUSIVE_CONTENT_RESTRICTION = 'abusiveContentRestriction'
|
||||
ACCESS_NOT_CONFIGURED = 'accessNotConfigured'
|
||||
ALREADY_EXISTS = 'alreadyExists'
|
||||
APPLY_LABEL_FORBIDDEN = 'applyLabelForbidden'
|
||||
AUTH_ERROR = 'authError'
|
||||
BACKEND_ERROR = 'backendError'
|
||||
BAD_GATEWAY = 'badGateway'
|
||||
@@ -66,6 +67,7 @@ DOMAIN_CANNOT_USE_APIS = 'domainCannotUseApis'
|
||||
DOMAIN_NOT_FOUND = 'domainNotFound'
|
||||
DOMAIN_NOT_VERIFIED_SECONDARY = 'domainNotVerifiedSecondary'
|
||||
DOMAIN_POLICY = 'domainPolicy'
|
||||
DOWNLOAD_QUOTA_EXCEEDED = 'downloadQuotaExceeded'
|
||||
DUPLICATE = 'duplicate'
|
||||
EVENT_DURATION_EXCEEDS_LIMIT = 'eventDurationExceedsLimit'
|
||||
FAILED_PRECONDITION = 'failedPrecondition'
|
||||
@@ -205,7 +207,7 @@ DRIVE_ACCESS_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, FORBIDDEN
|
||||
DRIVE_COPY_THROW_REASONS = DRIVE_ACCESS_THROW_REASONS+[CANNOT_COPY_FILE, BAD_REQUEST, RESPONSE_PREPARATION_FAILURE, TEAMDRIVES_SHARING_RESTRICTION_NOT_ALLOWED,
|
||||
FIELD_NOT_WRITABLE, RATE_LIMIT_EXCEEDED, USER_RATE_LIMIT_EXCEEDED,
|
||||
STORAGE_QUOTA_EXCEEDED, TEAMDRIVE_FILE_LIMIT_EXCEEDED, TEAMDRIVE_HIERARCHY_TOO_DEEP]
|
||||
DRIVE_GET_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND]
|
||||
DRIVE_GET_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, DOWNLOAD_QUOTA_EXCEEDED]
|
||||
DRIVE3_CREATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID, INVALID_SHARING_REQUEST, OWNERSHIP_CHANGE_ACROSS_DOMAIN_NOT_PERMITTED, CANNOT_SET_EXPIRATION,
|
||||
NOT_FOUND, TEAMDRIVE_DOMAIN_USERS_ONLY_RESTRICTION, TEAMDRIVE_TEAM_MEMBERS_ONLY_RESTRICTION,
|
||||
TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION, INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
|
||||
@@ -243,10 +245,13 @@ DRIVE3_DELETE_ACL_THROW_REASONS = [BAD_REQUEST, CANNOT_REMOVE_OWNER,
|
||||
INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
|
||||
NOT_FOUND, PERMISSION_NOT_FOUND]
|
||||
DRIVE3_MODIFY_LABEL_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, NOT_FOUND, FORBIDDEN, INTERNAL_ERROR,
|
||||
FILE_NEVER_WRITABLE, APPLY_LABEL_FORBIDDEN,
|
||||
INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, INSUFFICIENT_FILE_PERMISSIONS,
|
||||
UNKNOWN_ERROR, INVALID_INPUT, BAD_REQUEST,
|
||||
LABEL_MULTIPLE_VALUES_FOR_SINGULAR_FIELD, LABEL_MUTATION_FORBIDDEN,
|
||||
LABEL_MUTATION_ILLEGAL_SELECTION, LABEL_MUTATION_UNKNOWN_FIELD]
|
||||
DOCS_ACCESS_THROW_REASONS = DRIVE_USER_THROW_REASONS+[NOT_FOUND, PERMISSION_DENIED, FORBIDDEN, INTERNAL_ERROR, INSUFFICIENT_FILE_PERMISSIONS,
|
||||
BAD_REQUEST, INVALID, INVALID_ARGUMENT, FAILED_PRECONDITION]
|
||||
GMAIL_THROW_REASONS = [SERVICE_NOT_AVAILABLE, BAD_REQUEST]
|
||||
GMAIL_LIST_THROW_REASONS = [FAILED_PRECONDITION, PERMISSION_DENIED, INVALID, INVALID_ARGUMENT]
|
||||
GMAIL_SMIME_THROW_REASONS = [SERVICE_NOT_AVAILABLE, BAD_REQUEST, INVALID_ARGUMENT, FORBIDDEN, NOT_FOUND, PERMISSION_DENIED]
|
||||
@@ -349,6 +354,8 @@ class accessNotConfigured(Exception):
|
||||
pass
|
||||
class alreadyExists(Exception):
|
||||
pass
|
||||
class applyLabelForbidden(Exception):
|
||||
pass
|
||||
class authError(Exception):
|
||||
pass
|
||||
class backendError(Exception):
|
||||
@@ -429,6 +436,8 @@ class domainNotVerifiedSecondary(Exception):
|
||||
pass
|
||||
class domainPolicy(Exception):
|
||||
pass
|
||||
class downloadQuotaExceeded(Exception):
|
||||
pass
|
||||
class duplicate(Exception):
|
||||
pass
|
||||
class eventDurationExceedsLimit(Exception):
|
||||
@@ -649,6 +658,7 @@ REASON_EXCEPTION_MAP = {
|
||||
ABUSIVE_CONTENT_RESTRICTION: abusiveContentRestriction,
|
||||
ACCESS_NOT_CONFIGURED: accessNotConfigured,
|
||||
ALREADY_EXISTS: alreadyExists,
|
||||
APPLY_LABEL_FORBIDDEN: applyLabelForbidden,
|
||||
AUTH_ERROR: authError,
|
||||
BACKEND_ERROR: backendError,
|
||||
BAD_REQUEST: badRequest,
|
||||
@@ -689,6 +699,7 @@ REASON_EXCEPTION_MAP = {
|
||||
DOMAIN_NOT_FOUND: domainNotFound,
|
||||
DOMAIN_NOT_VERIFIED_SECONDARY: domainNotVerifiedSecondary,
|
||||
DOMAIN_POLICY: domainPolicy,
|
||||
DOWNLOAD_QUOTA_EXCEEDED: downloadQuotaExceeded,
|
||||
DUPLICATE: duplicate,
|
||||
EVENT_DURATION_EXCEEDS_LIMIT: eventDurationExceedsLimit,
|
||||
FAILED_PRECONDITION: failedPrecondition,
|
||||
|
||||
@@ -81,6 +81,8 @@ CSV_OUTPUT_ROW_FILTER_MODE = 'corm'
|
||||
CSV_OUTPUT_ROW_LIMIT = 'corl'
|
||||
# Add timestamp column to CSV output file
|
||||
CSV_OUTPUT_TIMESTAMP_COLUMN = 'csv_output_timestamp_column'
|
||||
# Output sort headers
|
||||
CSV_OUTPUT_SORT_HEADERS = 'cosh'
|
||||
# CSV todrive options
|
||||
CSV_TODRIVE = 'todr'
|
||||
# Current API services
|
||||
@@ -236,6 +238,7 @@ Globals = {
|
||||
CSV_OUTPUT_ROW_FILTER: [],
|
||||
CSV_OUTPUT_ROW_FILTER_MODE: True,
|
||||
CSV_OUTPUT_ROW_LIMIT: 0,
|
||||
CSV_OUTPUT_SORT_HEADERS: [],
|
||||
CSV_OUTPUT_TIMESTAMP_COLUMN: None,
|
||||
CSV_TODRIVE: {},
|
||||
CURRENT_API_SERVICES: {},
|
||||
|
||||
@@ -150,6 +150,7 @@ API_CALLS_RETRY_DATA = 'API calls retry data\n'
|
||||
API_CHECK_CLIENT_AUTHORIZATION = 'Please make sure the Client ID: {0} is authorized for the appropriate API or scopes:\n{1}\n\nRun: gam oauth create\n'
|
||||
API_CHECK_SVCACCT_AUTHORIZATION = 'Please make sure the Service Account Client name: {0} is authorized for the appropriate API or scopes:\n{1}\n\nRun: gam user {2} check serviceaccount\n'
|
||||
API_ERROR_SETTINGS = 'API error, some settings not set'
|
||||
ARE_BOTH_REQUIRED = 'Arguments {0} and {1} are both required'
|
||||
ARE_MUTUALLY_EXCLUSIVE = 'Arguments {0} and {1} are mutually exclusive'
|
||||
AS = 'as'
|
||||
ATTENDEES_ADD = 'Add Attendees'
|
||||
|
||||
@@ -34,7 +34,8 @@ _PRODUCTS = {
|
||||
'101039': 'Assured Controls',
|
||||
'101040': 'Beyond Corp Enterprise',
|
||||
'101043': 'Google Workspace Additional Storage',
|
||||
'101047': 'Duet AI',
|
||||
'101047': 'Gemini',
|
||||
'101049': 'Education Endpoint Management',
|
||||
'Google-Apps': 'Google Workspace',
|
||||
'Google-Chrome-Device-Management': 'Google Chrome Device Management',
|
||||
'Google-Drive-storage': 'Google Drive Storage',
|
||||
@@ -61,12 +62,12 @@ _SKUS = {
|
||||
'product': '101031', 'aliases': ['gwepstaff', 'workspaceeducationplusstaff'], 'displayName': 'Google Workspace for Education Plus (Staff)'},
|
||||
'1010310010': {
|
||||
'product': '101031', 'aliases': ['gwepstudent', 'workspaceeducationplusstudent'], 'displayName': 'Google Workspace for Education Plus (Extra Student)'},
|
||||
'1010330002': {
|
||||
'product': '101033', 'aliases': ['gvpremier', 'voicepremier', 'googlevoicepremier'], 'displayName': 'Google Voice Premier'},
|
||||
'1010330003': {
|
||||
'product': '101033', 'aliases': ['gvstarter', 'voicestarter', 'googlevoicestarter'], 'displayName': 'Google Voice Starter'},
|
||||
'1010330004': {
|
||||
'product': '101033', 'aliases': ['gvstandard', 'voicestandard', 'googlevoicestandard'], 'displayName': 'Google Voice Standard'},
|
||||
'1010330002': {
|
||||
'product': '101033', 'aliases': ['gvpremier', 'voicepremier', 'googlevoicepremier'], 'displayName': 'Google Voice Premier'},
|
||||
'1010350001': {
|
||||
'product': '101035', 'aliases': ['cloudsearch'], 'displayName': 'Cloud Search'},
|
||||
'1010360001': {
|
||||
@@ -86,9 +87,13 @@ _SKUS = {
|
||||
'1010430001': {
|
||||
'product': '101043', 'aliases': ['gwas', 'plusstorage'], 'displayName': 'Google Workspace Additional Storage'},
|
||||
'1010470001': {
|
||||
'product': '101047', 'aliases': ['duetai'], 'displayName': 'Duet AI for Enterprise'},
|
||||
'product': '101047', 'aliases': ['geminient', 'duetai'], 'displayName': 'Gemini Enterprise'},
|
||||
'1010470002': {
|
||||
'product': '101047', 'aliases': ['gwlabs', 'workspacelabs'], 'displayName': 'Google Workspace Labs'},
|
||||
'1010470003': {
|
||||
'product': '101047', 'aliases': ['geminibiz'], 'displayName': 'Gemini Business'},
|
||||
'1010490001': {
|
||||
'product': '101049', 'aliases': ['eeu'], 'displayName': 'Endpoint Education Upgrade'},
|
||||
'Google-Apps': {
|
||||
'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'},
|
||||
'Google-Apps-For-Business': {
|
||||
|
||||
@@ -53,6 +53,13 @@ try:
|
||||
except ImportError: # pragma: NO COVER
|
||||
google_auth_httplib2 = None
|
||||
|
||||
try:
|
||||
from google.api_core import universe
|
||||
|
||||
HAS_UNIVERSE = True
|
||||
except ImportError:
|
||||
HAS_UNIVERSE = False
|
||||
|
||||
# Local imports
|
||||
from googleapiclient import _auth, mimeparse
|
||||
from googleapiclient._helpers import _add_query_parameter, positional
|
||||
@@ -116,12 +123,22 @@ _PAGE_TOKEN_NAMES = ("pageToken", "nextPageToken")
|
||||
# Parameters controlling mTLS behavior. See https://google.aip.dev/auth/4114.
|
||||
GOOGLE_API_USE_CLIENT_CERTIFICATE = "GOOGLE_API_USE_CLIENT_CERTIFICATE"
|
||||
GOOGLE_API_USE_MTLS_ENDPOINT = "GOOGLE_API_USE_MTLS_ENDPOINT"
|
||||
|
||||
GOOGLE_CLOUD_UNIVERSE_DOMAIN = "GOOGLE_CLOUD_UNIVERSE_DOMAIN"
|
||||
DEFAULT_UNIVERSE = "googleapis.com"
|
||||
# Parameters accepted by the stack, but not visible via discovery.
|
||||
# TODO(dhermes): Remove 'userip' in 'v2'.
|
||||
STACK_QUERY_PARAMETERS = frozenset(["trace", "pp", "userip", "strict"])
|
||||
STACK_QUERY_PARAMETER_DEFAULT_VALUE = {"type": "string", "location": "query"}
|
||||
|
||||
|
||||
class APICoreVersionError(ValueError):
|
||||
def __init__(self):
|
||||
message = (
|
||||
"google-api-core >= 2.18.0 is required to use the universe domain feature."
|
||||
)
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
# Library-specific reserved words beyond Python keywords.
|
||||
RESERVED_WORDS = frozenset(["body"])
|
||||
|
||||
@@ -436,6 +453,13 @@ def _retrieve_discovery_doc(
|
||||
return content
|
||||
|
||||
|
||||
def _check_api_core_compatible_with_credentials_universe(credentials):
|
||||
if not HAS_UNIVERSE:
|
||||
credentials_universe = getattr(credentials, "universe_domain", None)
|
||||
if credentials_universe and credentials_universe != DEFAULT_UNIVERSE:
|
||||
raise APICoreVersionError
|
||||
|
||||
|
||||
@positional(1)
|
||||
def build_from_document(
|
||||
service,
|
||||
@@ -544,6 +568,18 @@ def build_from_document(
|
||||
|
||||
# If an API Endpoint is provided on client options, use that as the base URL
|
||||
base = urllib.parse.urljoin(service["rootUrl"], service["servicePath"])
|
||||
universe_domain = None
|
||||
if HAS_UNIVERSE:
|
||||
universe_domain_env = os.getenv(GOOGLE_CLOUD_UNIVERSE_DOMAIN, None)
|
||||
universe_domain = universe.determine_domain(
|
||||
client_options.universe_domain, universe_domain_env
|
||||
)
|
||||
base = base.replace(universe.DEFAULT_UNIVERSE, universe_domain)
|
||||
else:
|
||||
client_universe = getattr(client_options, "universe_domain", None)
|
||||
if client_universe:
|
||||
raise APICoreVersionError
|
||||
|
||||
audience_for_self_signed_jwt = base
|
||||
if client_options.api_endpoint:
|
||||
base = client_options.api_endpoint
|
||||
@@ -582,6 +618,9 @@ def build_from_document(
|
||||
quota_project_id=client_options.quota_project_id,
|
||||
)
|
||||
|
||||
# Check google-api-core >= 2.18.0 if credentials' universe != "googleapis.com".
|
||||
_check_api_core_compatible_with_credentials_universe(credentials)
|
||||
|
||||
# The credentials need to be scoped.
|
||||
# If the user provided scopes via client_options don't override them
|
||||
if not client_options.scopes:
|
||||
@@ -666,7 +705,15 @@ def build_from_document(
|
||||
if use_mtls_endpoint == "always" or (
|
||||
use_mtls_endpoint == "auto" and client_cert_to_use
|
||||
):
|
||||
if HAS_UNIVERSE and universe_domain != universe.DEFAULT_UNIVERSE:
|
||||
raise MutualTLSChannelError(
|
||||
f"mTLS is not supported in any universe other than {universe.DEFAULT_UNIVERSE}."
|
||||
)
|
||||
base = mtls_endpoint
|
||||
else:
|
||||
# Check google-api-core >= 2.18.0 if credentials' universe != "googleapis.com".
|
||||
http_credentials = getattr(http, "credentials", None)
|
||||
_check_api_core_compatible_with_credentials_universe(http_credentials)
|
||||
|
||||
if model is None:
|
||||
features = service.get("features", [])
|
||||
@@ -681,6 +728,7 @@ def build_from_document(
|
||||
resourceDesc=service,
|
||||
rootDesc=service,
|
||||
schema=schema,
|
||||
universe_domain=universe_domain,
|
||||
)
|
||||
|
||||
|
||||
@@ -1043,6 +1091,9 @@ def createMethod(methodName, methodDesc, rootDesc, schema):
|
||||
def method(self, **kwargs):
|
||||
# Don't bother with doc string, it will be over-written by createMethod.
|
||||
|
||||
# Validate credentials for the configured universe.
|
||||
self._validate_credentials()
|
||||
|
||||
for name in kwargs:
|
||||
if name not in parameters.argmap:
|
||||
raise TypeError("Got an unexpected keyword argument {}".format(name))
|
||||
@@ -1352,6 +1403,7 @@ class Resource(object):
|
||||
resourceDesc,
|
||||
rootDesc,
|
||||
schema,
|
||||
universe_domain=universe.DEFAULT_UNIVERSE if HAS_UNIVERSE else "",
|
||||
):
|
||||
"""Build a Resource from the API description.
|
||||
|
||||
@@ -1369,6 +1421,8 @@ class Resource(object):
|
||||
is considered a resource.
|
||||
rootDesc: object, the entire deserialized discovery document.
|
||||
schema: object, mapping of schema names to schema descriptions.
|
||||
universe_domain: string, the universe for the API. The default universe
|
||||
is "googleapis.com".
|
||||
"""
|
||||
self._dynamic_attrs = []
|
||||
|
||||
@@ -1380,6 +1434,8 @@ class Resource(object):
|
||||
self._resourceDesc = resourceDesc
|
||||
self._rootDesc = rootDesc
|
||||
self._schema = schema
|
||||
self._universe_domain = universe_domain
|
||||
self._credentials_validated = False
|
||||
|
||||
self._set_service_methods()
|
||||
|
||||
@@ -1502,6 +1558,7 @@ class Resource(object):
|
||||
resourceDesc=methodDesc,
|
||||
rootDesc=rootDesc,
|
||||
schema=schema,
|
||||
universe_domain=self._universe_domain,
|
||||
)
|
||||
|
||||
setattr(methodResource, "__doc__", "A collection resource.")
|
||||
@@ -1546,6 +1603,27 @@ class Resource(object):
|
||||
fixedMethodName, method.__get__(self, self.__class__)
|
||||
)
|
||||
|
||||
def _validate_credentials(self):
|
||||
"""Validates client's and credentials' universe domains are consistent.
|
||||
|
||||
Returns:
|
||||
bool: True iff the configured universe domain is valid.
|
||||
|
||||
Raises:
|
||||
UniverseMismatchError: If the configured universe domain is not valid.
|
||||
"""
|
||||
credentials = getattr(self._http, "credentials", None)
|
||||
|
||||
self._credentials_validated = (
|
||||
(
|
||||
self._credentials_validated
|
||||
or universe.compare_domains(self._universe_domain, credentials)
|
||||
)
|
||||
if HAS_UNIVERSE
|
||||
else True
|
||||
)
|
||||
return self._credentials_validated
|
||||
|
||||
|
||||
def _findPageTokenName(fields):
|
||||
"""Search field names for one like a page token.
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
__version__ = "2.114.0"
|
||||
__version__ = "2.124.0"
|
||||
|
||||
Reference in New Issue
Block a user