mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-17 04:31:37 +00:00
Compare commits
169 Commits
20240530.0
...
20240918.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6ced7fff6 | ||
|
|
484238ece2 | ||
|
|
ee32bb87f0 | ||
|
|
73803acb89 | ||
|
|
a40df40f9b | ||
|
|
a33b89788c | ||
|
|
54f815e503 | ||
|
|
e54d3d274a | ||
|
|
b7a20ceb4f | ||
|
|
bbc965d38f | ||
|
|
8935cf7041 | ||
|
|
4583f6d996 | ||
|
|
92282fb493 | ||
|
|
65ea328f2a | ||
|
|
2da4833a0d | ||
|
|
631ce68126 | ||
|
|
480aca680d | ||
|
|
6e3ab6700d | ||
|
|
61319fa08e | ||
|
|
673e9f88ad | ||
|
|
f2b8200a3b | ||
|
|
0383624c72 | ||
|
|
cb03b8d9d4 | ||
|
|
e7e821ca3d | ||
|
|
6b21fdbcc6 | ||
|
|
ee326c6fe3 | ||
|
|
8945fd163c | ||
|
|
4dab0bd4bb | ||
|
|
49ec0c6df4 | ||
|
|
f3d29c47e2 | ||
|
|
41b4577665 | ||
|
|
2ca813f209 | ||
|
|
66734f07fa | ||
|
|
90844effa7 | ||
|
|
4765c6e186 | ||
|
|
d2f52fd7bf | ||
|
|
85c55c5aa8 | ||
|
|
6043411825 | ||
|
|
72ca010a5f | ||
|
|
e34f7164d8 | ||
|
|
ef975437a6 | ||
|
|
68863cd44b | ||
|
|
737deb8e39 | ||
|
|
67048fce86 | ||
|
|
97adde0f5e | ||
|
|
998bdfd40d | ||
|
|
05a04a0d23 | ||
|
|
6651ad20ef | ||
|
|
75cd22d645 | ||
|
|
00d0708d2d | ||
|
|
2d5550e09e | ||
|
|
11969364d3 | ||
|
|
b7c0a86b1f | ||
|
|
1eb1942085 | ||
|
|
7073d8b6b4 | ||
|
|
0e90d10f17 | ||
|
|
e989167267 | ||
|
|
49128d5559 | ||
|
|
d3c7af784f | ||
|
|
41dd34ec9e | ||
|
|
c565f9aa0f | ||
|
|
f40f631810 | ||
|
|
130ee7b371 | ||
|
|
4bbb97b749 | ||
|
|
3fb96aaab6 | ||
|
|
7d64ca2057 | ||
|
|
37f6a9694a | ||
|
|
77df7c5fea | ||
|
|
4fc08c78d3 | ||
|
|
c31461b9e7 | ||
|
|
1875eadbfe | ||
|
|
50ac49c713 | ||
|
|
def079d944 | ||
|
|
bc5c468581 | ||
|
|
020ddee777 | ||
|
|
3e7124946e | ||
|
|
395916bc86 | ||
|
|
e80ed0e700 | ||
|
|
8db7e32bd2 | ||
|
|
d263327997 | ||
|
|
93a6e4d835 | ||
|
|
9dab94bd7b | ||
|
|
d3a108ae9c | ||
|
|
3b39f90a0e | ||
|
|
e994c769a6 | ||
|
|
bbc974fb69 | ||
|
|
71bf658e17 | ||
|
|
8211d5df8c | ||
|
|
10e54e49a5 | ||
|
|
6b9ac2700e | ||
|
|
012616a285 | ||
|
|
2669b1bff6 | ||
|
|
2aeebd17a4 | ||
|
|
e43802e197 | ||
|
|
16b3d2b006 | ||
|
|
f777ec177c | ||
|
|
19304f95e8 | ||
|
|
5b49b8c957 | ||
|
|
f1e599d535 | ||
|
|
752b502399 | ||
|
|
8e3d562830 | ||
|
|
5b6c7a30d7 | ||
|
|
5b7e8b6e01 | ||
|
|
8bd30af109 | ||
|
|
828b196414 | ||
|
|
83117a1eca | ||
|
|
bb65265930 | ||
|
|
14ea845aa3 | ||
|
|
c1bb4bf7fa | ||
|
|
38dcdea6d5 | ||
|
|
bc222d2a91 | ||
|
|
c421904b78 | ||
|
|
f6d0f14b49 | ||
|
|
f4c6c7d6d8 | ||
|
|
cad4e7b59e | ||
|
|
e05dad2717 | ||
|
|
74bc4596ed | ||
|
|
cc3d79b3b9 | ||
|
|
4e0ae154a5 | ||
|
|
435388aa0b | ||
|
|
e66ff54c3c | ||
|
|
a7da52a485 | ||
|
|
ab65890455 | ||
|
|
f8dafa294d | ||
|
|
19ea4bbb9c | ||
|
|
53f40eb9eb | ||
|
|
793f230c30 | ||
|
|
6964f10aa3 | ||
|
|
3f6f6a191d | ||
|
|
9388b8497c | ||
|
|
28ca319632 | ||
|
|
d5ad1cb2fb | ||
|
|
c12ee6438c | ||
|
|
e18eb0931e | ||
|
|
2c0295d674 | ||
|
|
ced1e84567 | ||
|
|
5adc996f3e | ||
|
|
a3b3353e71 | ||
|
|
f084096658 | ||
|
|
d9188da059 | ||
|
|
12c150f64d | ||
|
|
6d25ada6a4 | ||
|
|
c0cd121a91 | ||
|
|
e8e508eb18 | ||
|
|
deda162375 | ||
|
|
b69601c5c2 | ||
|
|
87f9aa37b5 | ||
|
|
b74e2e1fd2 | ||
|
|
e40cbc32a6 | ||
|
|
636a49b1a6 | ||
|
|
7239f252da | ||
|
|
5d85ea63b0 | ||
|
|
cf50fcc78f | ||
|
|
eead1bd8b9 | ||
|
|
206a09aad3 | ||
|
|
eb365a3eb5 | ||
|
|
1690daccb5 | ||
|
|
233eeb0744 | ||
|
|
3f17525169 | ||
|
|
100df45d46 | ||
|
|
cb00e6de9f | ||
|
|
82585dc28a | ||
|
|
cb16747125 | ||
|
|
8632c98556 | ||
|
|
6c3a805a4d | ||
|
|
f6b949e4c1 | ||
|
|
1f9624ad5c | ||
|
|
9c9ddff973 | ||
|
|
f1636c7768 |
13
.github/actions/entitlements.plist
vendored
Normal file
13
.github/actions/entitlements.plist
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- These are required for binaries built by PyInstaller -->
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
194
.github/workflows/build.yml
vendored
194
.github/workflows/build.yml
vendored
@@ -17,6 +17,7 @@ defaults:
|
||||
working-directory: src
|
||||
|
||||
env:
|
||||
SCRATCH_COUNTER: 1
|
||||
OPENSSL_CONFIG_OPTS: no-fips --api=3.0.0
|
||||
OPENSSL_INSTALL_PATH: ${{ github.workspace }}/bin/ssl
|
||||
OPENSSL_SOURCE_PATH: ${{ github.workspace }}/src/openssl
|
||||
@@ -30,68 +31,68 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
jid: 1
|
||||
goal: build
|
||||
arch: x86_64
|
||||
openssl_archs: linux-x86_64
|
||||
- os: [self-hosted, linux, arm64]
|
||||
- os: ubuntu-20.04
|
||||
jid: 2
|
||||
goal: build
|
||||
arch: x86_64
|
||||
openssl_archs: linux-x86_64
|
||||
- os: [self-hosted, linux, arm64]
|
||||
jid: 3
|
||||
goal: build
|
||||
arch: aarch64
|
||||
openssl_archs: linux-aarch64
|
||||
- os: ubuntu-20.04
|
||||
jid: 3
|
||||
jid: 4
|
||||
goal: build
|
||||
arch: x86_64
|
||||
openssl_archs: linux-x86_64
|
||||
staticx: yes
|
||||
- os: [self-hosted, linux, arm64]
|
||||
jid: 4
|
||||
jid: 5
|
||||
goal: build
|
||||
arch: aarch64
|
||||
openssl_archs: linux-aarch64
|
||||
staticx: yes
|
||||
- os: macos-12
|
||||
jid: 5
|
||||
jid: 6
|
||||
goal: build
|
||||
arch: x86_64
|
||||
openssl_archs: darwin64-x86_64
|
||||
- os: macos-14
|
||||
jid: 6
|
||||
jid: 7
|
||||
goal: build
|
||||
arch: aarch64
|
||||
openssl_archs: darwin64-arm64
|
||||
- os: macos-14
|
||||
jid: 7
|
||||
goal: build
|
||||
arch: universal2
|
||||
openssl_archs: darwin64-arm64 darwin64-x86_64
|
||||
- os: windows-2022
|
||||
jid: 8
|
||||
jid: 9
|
||||
goal: build
|
||||
arch: Win64
|
||||
openssl_archs: VC-WIN64A
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.8"
|
||||
jid: 9
|
||||
arch: x86_64
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.9"
|
||||
jid: 10
|
||||
arch: x86_64
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.10"
|
||||
python: "3.9"
|
||||
jid: 11
|
||||
arch: x86_64
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.11"
|
||||
python: "3.10"
|
||||
jid: 12
|
||||
arch: x86_64
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.11"
|
||||
jid: 8
|
||||
arch: x86_64
|
||||
|
||||
steps:
|
||||
|
||||
@@ -114,7 +115,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
cache.tar.xz
|
||||
key: gam-${{ matrix.jid }}-20240526
|
||||
key: gam-${{ matrix.jid }}-20240916
|
||||
|
||||
- name: Untar Cache archive
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||
@@ -195,9 +196,18 @@ jobs:
|
||||
bash ./rust.sh -y
|
||||
source $HOME/.cargo/env
|
||||
# Install needed packages
|
||||
# brew update
|
||||
# brew install gpg
|
||||
brew install swig
|
||||
#brew update
|
||||
#brew install gpg
|
||||
#brew install swig
|
||||
#brew install ncurses
|
||||
|
||||
- name: MacOS import developer certificates for signing
|
||||
if: runner.os == 'macOS'
|
||||
uses: apple-actions/import-codesign-certs@v3
|
||||
with:
|
||||
keychain: signing_temp
|
||||
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
|
||||
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
|
||||
|
||||
- name: Windows Configure VCode
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
@@ -224,7 +234,9 @@ jobs:
|
||||
MAKE=make
|
||||
MAKEOPT="-j$(sysctl -n hw.logicalcpu)"
|
||||
PERL=perl
|
||||
echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV
|
||||
MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | awk -F '.' '{print $1 "." $2}')
|
||||
echo "MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}" >> $GITHUB_ENV
|
||||
echo "We are running on and targetting MacOS ${MACOSX_DEPLOYMENT_TARGET}"
|
||||
echo "PYTHON=${PYTHON_INSTALL_PATH}/bin/python3" >> $GITHUB_ENV
|
||||
elif [[ "${RUNNER_OS}" == "Linux" ]]; then
|
||||
MAKE=make
|
||||
@@ -322,21 +334,34 @@ jobs:
|
||||
-output "${GITHUB_WORKSPACE}/bin/ssl/bin/openssl"
|
||||
rm -rf ${GITHUB_WORKSPACE}/bin/ssl-darwin64-x86_64
|
||||
rm -rf ${GITHUB_WORKSPACE}/bin/ssl-darwin64-arm64
|
||||
echo "LDFLAGS=-L${OPENSSL_INSTALL_PATH}/lib" >> $GITHUB_ENV
|
||||
echo "CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1" >> $GITHUB_ENV
|
||||
echo "CFLAGS=-I${OPENSSL_INSTALL_PATH}/include -arch arm64 -arch x86_64 ${CFLAGS}" >> $GITHUB_ENV
|
||||
echo "ARCHFLAGS=-arch x86_64 -arch arm64" >> $GITHUB_ENV
|
||||
else
|
||||
cd "${GITHUB_WORKSPACE}/src/openssl-${openssl_archs}"
|
||||
# install_sw saves us ages processing man pages :-)
|
||||
$MAKE install_sw
|
||||
fi
|
||||
if [[ "${RUNNER_OS}" != "Windows" ]]; then
|
||||
echo "LDFLAGS=-L${OPENSSL_INSTALL_PATH}/lib" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1" >> $GITHUB_ENV
|
||||
case $arch in
|
||||
universal2)
|
||||
echo "CFLAGS=-I${OPENSSL_INSTALL_PATH}/include -arch arm64 -arch x86_64 ${CFLAGS}" >> $GITHUB_ENV
|
||||
echo "ARCHFLAGS=-arch x86_64 -arch arm64" >> $GITHUB_ENV
|
||||
;;
|
||||
x86_64)
|
||||
echo "CFLAGS=-I${OPENSSL_INSTALL_PATH}/include ${CFLAGS}" >> $GITHUB_ENV
|
||||
echo "ARCHFLAGS=-arch x86_64" >> $GITHUB_ENV
|
||||
;;
|
||||
aarch64)
|
||||
echo "CFLAGS=-I${OPENSSL_INSTALL_PATH}/include ${CFLAGS}" >> $GITHUB_ENV
|
||||
echo "ARCHFLAGS=-arch arm64" >> $GITHUB_ENV
|
||||
;;
|
||||
esac
|
||||
|
||||
- name: Run OpenSSL
|
||||
if: matrix.goal == 'build'
|
||||
run: |
|
||||
"${OPENSSL_INSTALL_PATH}/bin/openssl" version
|
||||
"${OPENSSL_INSTALL_PATH}/bin/openssl" version -f
|
||||
"${OPENSSL_INSTALL_PATH}/bin/openssl" version -a
|
||||
file "${OPENSSL_INSTALL_PATH}/bin/openssl"
|
||||
|
||||
- name: Get latest stable Python source
|
||||
@@ -345,12 +370,7 @@ jobs:
|
||||
cd "${GITHUB_WORKSPACE}/src"
|
||||
git clone https://github.com/python/cpython.git
|
||||
cd "${PYTHON_SOURCE_PATH}"
|
||||
# Pin Windows to 3.11.6 for the moment
|
||||
# if [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
# export LATEST_STABLE_TAG="v3.11.6"
|
||||
# else
|
||||
export LATEST_STABLE_TAG=$(git tag --list | grep -v a | grep -v rc | grep -v b | sort -Vr | head -n1)
|
||||
# fi
|
||||
git checkout "${LATEST_STABLE_TAG}"
|
||||
export COMPILED_PYTHON_VERSION=${LATEST_STABLE_TAG:1} # Trim the "v" prefix
|
||||
echo "COMPILED_PYTHON_VERSION=${COMPILED_PYTHON_VERSION}" >> $GITHUB_ENV
|
||||
@@ -370,7 +390,8 @@ jobs:
|
||||
--with-ensurepip=upgrade \
|
||||
--enable-optimizations \
|
||||
--with-lto \
|
||||
"${extra_args[@]}"
|
||||
"${extra_args[@]}" || : # exit 0
|
||||
cat config.log
|
||||
|
||||
- name: Windows Get External Python deps
|
||||
if: matrix.goal == 'build' && runner.os == 'Windows' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||
@@ -436,6 +457,7 @@ jobs:
|
||||
- name: Run Python
|
||||
run: |
|
||||
"${PYTHON}" -V
|
||||
"${PYTHON}" -c "import ssl; print(f'Using {ssl.OPENSSL_VERSION}')"
|
||||
|
||||
- name: Upgrade pip, wheel, etc
|
||||
run: |
|
||||
@@ -487,16 +509,8 @@ jobs:
|
||||
git clone https://github.com/pyinstaller/pyinstaller.git
|
||||
cd pyinstaller
|
||||
export latest_release=$(git tag --list | grep -v dev | grep -v rc | sort -Vr | head -n1)
|
||||
#V6.0.0 causes errors on staticx
|
||||
#if [[ "${staticx}" == "yes" ]]; then
|
||||
# git checkout "v5.13.2"
|
||||
#elif [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
# git checkout "v5.13.2"
|
||||
#elif [[ "${RUNNER_OS}" == "macOS" ]]; then
|
||||
# git checkout "v5.13.2"
|
||||
#else
|
||||
git checkout "${latest_release}"
|
||||
#fi
|
||||
# git checkout "${latest_release}"
|
||||
git checkout "v6.9.0"
|
||||
# remove pre-compiled bootloaders so we fail if bootloader compile fails
|
||||
rm -rvf PyInstaller/bootloader/*-*/*
|
||||
cd bootloader
|
||||
@@ -515,37 +529,43 @@ jobs:
|
||||
- name: Build GAM with PyInstaller
|
||||
if: matrix.goal != 'test'
|
||||
run: |
|
||||
if [[ "${staticx}" == "yes" ]]; then
|
||||
export distpath="./dist/gam"
|
||||
export gampath="${distpath}"
|
||||
else
|
||||
export distpath="./dist"
|
||||
export gampath="${distpath}/gam"
|
||||
fi
|
||||
export distpath="./dist/gam"
|
||||
export gampath="$distpath"
|
||||
mkdir -p -v "${gampath}"
|
||||
if [[ "${RUNNER_OS}" == "macOS" ]]; then
|
||||
export gampath=$($PYTHON -c "import os; print(os.path.realpath('$gampath'))")
|
||||
# Tell our gam.spec to use our code sign certificate
|
||||
export codesign_identity="Jay Lee"
|
||||
# brew OpenSSL gets picked up by PyInstaller
|
||||
# breaking our self-compiled version
|
||||
brew uninstall --ignore-dependencies openssl
|
||||
export PYINSTALLER_BUILD_ONEDIR=yes
|
||||
export gampath=$($PYTHON -c "import os; print(os.path.realpath('${gampath}/gam'))")
|
||||
elif [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
# Work around issue where PyInstaller picks up python3.dll from other Python versions
|
||||
# https://github.com/pyinstaller/pyinstaller/issues/7102
|
||||
export PATH="$(dirname ${PYTHON}):/usr/bin"
|
||||
export PYINSTALLER_BUILD_ONEDIR=no
|
||||
else
|
||||
export gampath=$(realpath "${gampath}")
|
||||
export PYINSTALLER_BUILD_ONEDIR=no
|
||||
fi
|
||||
export gam="${gampath}/gam"
|
||||
echo "gampath=${gampath}" >> $GITHUB_ENV
|
||||
# TEMP force everything back to one file.
|
||||
export PYINSTALLER_BUILD_ONEFILE="yes"
|
||||
export distpath="./dist/gam"
|
||||
export gampath="${distpath}"
|
||||
"${PYTHON}" -m PyInstaller --clean --noconfirm --distpath="${distpath}" gam.spec
|
||||
echo "dist results:"
|
||||
ls -alRF "$distpath"
|
||||
echo "WARNINGS FROM build/gam/warn-gam.txt"
|
||||
cat build/gam/warn-gam.txt
|
||||
echo "Analysis FROM build/gam/Analysis-00.toc"
|
||||
cat build/gam/Analysis-00.toc
|
||||
echo "EXE data FROM build/gam/EXE-00.toc"
|
||||
cat build/gam/EXE-00.toc
|
||||
if [ -x "$(command -v realpath)" ]; then
|
||||
realpath=realpath
|
||||
else
|
||||
brew install coreutils
|
||||
realpath=grealpath
|
||||
fi
|
||||
realpath=realpath
|
||||
else
|
||||
brew install coreutils
|
||||
realpath=grealpath
|
||||
fi
|
||||
export gam=$(realpath "$gam")
|
||||
if [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
export gam=$(cygpath -w "$gam")
|
||||
@@ -557,12 +577,12 @@ jobs:
|
||||
- name: Copy extra package files
|
||||
if: matrix.goal == 'build'
|
||||
run: |
|
||||
cp -v cacerts.pem $gampath
|
||||
cp -v LICENSE $gampath
|
||||
cp -v GamCommands.txt $gampath
|
||||
cp -v GamUpdate.txt $gampath
|
||||
cp -v cacerts.pem "$gampath"
|
||||
cp -v LICENSE "$gampath"
|
||||
cp -v GamCommands.txt "$gampath"
|
||||
cp -v GamUpdate.txt "$gampath"
|
||||
if [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
cp -v gam-setup.bat $gampath
|
||||
cp -v gam-setup.bat "$gampath"
|
||||
fi
|
||||
|
||||
- name: Install StaticX
|
||||
@@ -583,9 +603,21 @@ jobs:
|
||||
;;
|
||||
esac
|
||||
echo "ldlib=${ldlib}"
|
||||
$PYTHON -m staticx -l "${ldlib}" "${gam}" "${gam}-staticx"
|
||||
rm -v "${gam}"
|
||||
mv -v "${gam}-staticx" "${gam}"
|
||||
$PYTHON -m staticx -l "${ldlib}" "$gam" "${gam}-staticx"
|
||||
rm -v "$gam"
|
||||
mv -v "${gam}-staticx" "$gam"
|
||||
|
||||
- name: MacOS send GAM binary for Apple notarization
|
||||
if: runner.os == 'macOS'
|
||||
env:
|
||||
ASP_NOTARIZE: ${{ secrets.ASP_NOTARIZE }}
|
||||
run: |
|
||||
# Apple wants some kind of "package" submitted so just add gam to a .zip
|
||||
# name it something we can track and link in Apple's notarize process
|
||||
zipfilename="./gam-${RUNNER_ARCH}-${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}.zip"
|
||||
zip -r "$zipfilename" "$gampath"
|
||||
xcrun notarytool submit --apple-id "jay0lee@gmail.com" --password "$ASP_NOTARIZE" --team-id GZ85H2DRLM "$zipfilename"
|
||||
rm -v "$zipfilename"
|
||||
|
||||
- name: Basic Tests all jobs
|
||||
id: basictests
|
||||
@@ -702,7 +734,8 @@ jobs:
|
||||
done
|
||||
driveid=$($gam user $gam_user add shareddrive "${newbase}" returnidonly)
|
||||
echo "Created shared drive ${driveid}"
|
||||
$gam create user $newuser firstname GHA lastname $JID displayname "Github Actions ${JID}" password random ou "${newou}" recoveryphone 12125121110 recoveryemail jay0lee@gmail.com gha.jid $JID languages en+,en-GB-
|
||||
# 9/17/24 - temp create in root due to Google API issues creating users in new OUs
|
||||
$gam create user $newuser firstname GHA lastname $JID displayname "Github Actions ${JID}" password random recoveryphone 12125121110 recoveryemail jay0lee@gmail.com gha.jid $JID languages en+,en-GB- # ou "${newou}"
|
||||
$gam user $newuser update photo https://dummyimage.com/400x600/000/fff
|
||||
$gam user $newuser get photo
|
||||
$gam user $newuser delete photo
|
||||
@@ -721,7 +754,8 @@ jobs:
|
||||
$gam update group $newgroup add owner $gam_user
|
||||
$gam update group $newgroup add member $newuser
|
||||
$gam config enable_dasa false save
|
||||
$gam create admin $newuser _GROUPS_EDITOR_ROLE CUSTOMER # condition nonsecuritygroup
|
||||
# 9/17/24 temp disable due to Google API sluggishness to see new users for admin commands
|
||||
# $gam create admin $newuser _GROUPS_EDITOR_ROLE CUSTOMER # condition nonsecuritygroup
|
||||
$gam create admin $newgroup _HELP_DESK_ADMIN_ROLE org_unit "${newou}"
|
||||
$gam config csv_output_row_filter "assignedToUser:regex:${newuser}" print admins | $gam csv - gam delete admin "~roleAssignmentId"
|
||||
$gam config csv_output_row_filter "assignedToGroup:regex:${newgroup}" print admins | $gam csv - gam delete admin "~roleAssignmentId"
|
||||
@@ -835,15 +869,17 @@ jobs:
|
||||
$gam user $gam_user show shareddrives asadmin
|
||||
$gam user $gam_user update shareddrive "${driveid}" ou "aaaGithub Actions" # so we can delete our OU...
|
||||
$gam user $gam_user delete shareddrive "${driveid}" nukefromorbit
|
||||
ssoprofile=$($gam config debug_level 1 create inboundssoprofile name "El Goog ${newbase}" loginurl https://www.google.com logouturl https://www.google.com changepasswordurl https://www.google.com entityid ElGoog return_name_only)
|
||||
if [ ${ssoprofile} != 'inProgress' ]; then
|
||||
$gam create inboundssocredential profile "id:${ssoprofile}" generate_key
|
||||
#$gam create inboundssoassignment profile "id:${ssoprofile}" orgunit "${newou}" mode SAML_SSO
|
||||
#$gam delete inboundssoassignment "orgunit:${newou}"
|
||||
$gam delete inboundssoprofile "id:${ssoprofile}"
|
||||
fi
|
||||
echo "printer model count:"
|
||||
ssoprofile=$($gam create inboundssoprofile name "El Goog ${newbase}" loginurl https://www.google.com logouturl https://www.google.com changepasswordurl https://www.google.com entityid ElGoog return_name_only)
|
||||
$gam create inboundssocredential profile "id:${ssoprofile}" generate_key
|
||||
#$gam create inboundssoassignment profile "id:${ssoprofile}" orgunit "${newou}" mode SAML_SSO
|
||||
#$gam delete inboundssoassignment "orgunit:${newou}"
|
||||
$gam delete inboundssoprofile "id:${ssoprofile}"
|
||||
$gam print printermodels | wc -l
|
||||
$gam print printers
|
||||
printerid=$($gam create printer displayname "${newbase}" uri ipp://localhost:631 driverless description "made by $(gam_user)" ou "${newou}" nodetails | awk '{print substr($2, 1, length($2)-1)}')
|
||||
printerid=$($gam create printer displayname "${newbase}" uri ipp://localhost:631 driverless description "made by ${gam_user}" ou "${newou}" nodetails | awk '{print substr($2, 1, length($2)-1)}')
|
||||
$gam info printer "$printerid"
|
||||
$gam delete printer "$printerid"
|
||||
$gam delete ou "${newou}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GAM is a command line tool for Google Workspace admins to manage domain and user settings quickly and easily.
|
||||
|
||||

|
||||
[](https://github.com/GAM-team/GAM/actions/workflows/build.yml)
|
||||
|
||||
# Quick Start
|
||||
|
||||
|
||||
@@ -225,14 +225,14 @@ perform these steps and then you should be able to authorize and use your projec
|
||||
* Click on Grant Access
|
||||
* Enter the new admin address in Principals
|
||||
* Click in the Select a role box
|
||||
* Type orgpolicy.policies.update in the Filter box
|
||||
* Type organization policy administrator in the Filter box
|
||||
* Click Organization Policy Administrator
|
||||
* Click Save
|
||||
* In the upper left click the three lines to the left of Google Cloud and select IAM & Admin
|
||||
* Under IAM & Admin select IAM
|
||||
* Click the down arrow in the box to the right of Google Cloud
|
||||
* Click the three dots at the right and select Manage Resources
|
||||
* Click the three dots and the end of the line for the GAM project just created
|
||||
* Click the three dots at the end of the line for the GAM project just created
|
||||
* Click Settings
|
||||
* Click Organization Policies in the left column
|
||||
* Now you should be at "Policies for Gam Project"
|
||||
@@ -317,7 +317,8 @@ gam create project [admin <EmailAddress>] [project <ProjectID>]
|
||||
[sadescription <ServiceAccountDescription>]
|
||||
[(algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)|
|
||||
(localkeysize 1024|2048|4096 [validityhours <Number>])|
|
||||
(yubikey yubikey_pin yubikey_slot AUTHENTICATION|SIGNATURE yubikey_serialnumber <Number>)]
|
||||
(yubikey yubikey_pin yubikey_slot AUTHENTICATION|SIGNATURE yubikey_serialnumber <Number>)|
|
||||
nokey}
|
||||
```
|
||||
* `admin <EmailAddress>` - Google Workspace admin/GCP project manager; if omitted, you will be prompted for the address
|
||||
* `appname <String>` - Application name, defaults to `GAM`
|
||||
@@ -331,6 +332,8 @@ gam create project [admin <EmailAddress>] [project <ProjectID>]
|
||||
|
||||
You can optionally specify the type of service account key with `algorithm|localkeysize|yubikey`: [Manage Service Account keys](#manage-service-account-keys)
|
||||
|
||||
Use `nokey` if you do not want a service account key created for the project.
|
||||
|
||||
## Use an existing project for GAM authorization
|
||||
Use an existing project to create and download two files: `client_secrets.json` for the Client and `oauth2service.json` for the Service Account.
|
||||
|
||||
@@ -837,7 +840,7 @@ gam update sakey
|
||||
(algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)|
|
||||
(localkeysize 1024|2048|4096 [validityhours <Number>])|
|
||||
(yubikey yubikey_pin yubikey_slot AUTHENTICATION|SIGNATURE yubikey_serialnumber <Number>)
|
||||
gam rotate sakey replace_existing
|
||||
gam rotate sakey replace_current
|
||||
(algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)|
|
||||
(localkeysize 1024|2048|4096 [validityhours <Number>])|
|
||||
(yubikey yubikey_pin yubikey_slot AUTHENTICATION|SIGNATURE yubikey_serialnumber <Number>)
|
||||
@@ -1085,6 +1088,9 @@ You can limit both client and service account access.
|
||||
You can repeat these steps if you want to configure multiple limited users;
|
||||
substitute a unique value for `limited` in each of the steps.
|
||||
|
||||
In the Admin console, define a new Admin role with the desired privileges,
|
||||
assign it to the limited user and indicate whether it is for all Org Units or a specific Org Unit.
|
||||
|
||||
On your computer, perform these initial steps:
|
||||
|
||||
Make a subdirectory `limited` under the directory specified in `gam.cfg config_dir`
|
||||
|
||||
@@ -391,6 +391,8 @@
|
||||
<Marker> ::= <String>
|
||||
<MatterItem> ::= <UniqueID>|<String>
|
||||
<MatterState> ::= open|closed|deleted
|
||||
<MeetConferenceName> ::= conferenceRecords/<String>
|
||||
<MeetSpaceName> ::= spaces/<String> | <String>
|
||||
<MessageContent> ::=
|
||||
(message|textmessage|htmlmessage <String>)|
|
||||
(file|textfile|htmlfile <FileName> [charset <Charset>])|
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
- [CSV files](#csv-files)
|
||||
- [CSV files with redirection and select](#csv-files-with-redirection-and-select)
|
||||
- [Automatic batch processing](#automatic-batch-processing)
|
||||
- [Process Google Sheet commands and save results](#process-google-sheet-commands-and-save-results)
|
||||
|
||||
## Introduction
|
||||
Batch and CSV file processing can improve performance by executing Gam commands in parallel.
|
||||
@@ -57,7 +58,7 @@ Tbatch files can also contain the following line:
|
||||
* You have a CSV file NewStudents.csv with columns: Email,First,Last,GradYear,Password
|
||||
* You have a batch file NewStudents.bat containing these commands:
|
||||
```
|
||||
gam csv NewStudents.csv gam create user ~Email firstname ~First lastname ~Last org "/Students/~~GradYear~~" password ~Password
|
||||
gam csv NewStudents.csv gam create user "~Email" firstname "~First" lastname "~Last" org "/Students/~~GradYear~~" password "~Password"
|
||||
commit-batch
|
||||
gam update group seniors sync members ou /Students/2020
|
||||
gam update group juniors sync members ou /Students/2021
|
||||
@@ -120,7 +121,7 @@ Put a space in front of the `~`: `targetfolder " ~/Documents/GamWork"` to avoid
|
||||
* You want a note field that shows their email address as name AT domain.com
|
||||
* You have a CSV file Users.csv with columns: primaryEmail,Street,City,State,ZIP
|
||||
```
|
||||
gam csv Users.csv gam update user ~primaryEmail address type work unstructured "~~Street~~, ~~City~~, ~~State~~ ~~ZIP~~" primary note text_plain "~~primaryEmail~!~^(.+)@(.+)$~!~\1 AT \2~~"
|
||||
gam csv Users.csv gam update user "~primaryEmail" address type work unstructured "~~Street~~, ~~City~~, ~~State~~ ~~ZIP~~" primary note text_plain "~~primaryEmail~!~^(.+)@(.+)$~!~\1 AT \2~~"
|
||||
```
|
||||
* You want to do the above using a Google Sheet
|
||||
```
|
||||
@@ -130,17 +131,17 @@ gam csv gsheet <user> <fileID> "<sheetName>" gam update user "~primaryEmail" add
|
||||
## CSV files with redirection and select
|
||||
You should use the `multiprocess` option on any redirected files: `csv`, `stdout`, `stderr`.
|
||||
```
|
||||
gam redirect csv ./filelistperms.csv multiprocess csv Users.csv gam user ~primaryEmail print filelist fields id,name,mimetype,basicpermissions
|
||||
gam redirect csv - multiprocess todrive csv Users.csv gam user ~primaryEmail print filelist fields id,name,mimetype,basicpermissions
|
||||
gam redirect csv ./filelistperms.csv multiprocess csv Users.csv gam user "~primaryEmail" print filelist fields id,name,mimetype,basicpermissions
|
||||
gam redirect csv - multiprocess todrive csv Users.csv gam user "~primaryEmail" print filelist fields id,name,mimetype,basicpermissions
|
||||
```
|
||||
|
||||
If you want to select a `gam.cfg` section for the command, you can select the section at the outer `gam` and save it
|
||||
or select the section at the inner `gam`.
|
||||
```
|
||||
gam select <Section> save redirect csv ./filelistperms.csv multiprocess csv Users.csv gam user ~primaryEmail print filelist fields id,name,mimetype,basicpermissions
|
||||
gam redirect csv ./filelistperms.csv multiprocess csv Users.csv gam select <Section> user ~primaryEmail print filelist fields id,name,mimetype,basicpermissions
|
||||
gam select <Section> save redirect csv - multiprocess todrive csv Users.csv gam user ~primaryEmail print filelist fields id,name,mimetype,basicpermissions
|
||||
gam redirect csv - multiprocess todrive csv Users.csv gam select <Section> user ~primaryEmail print filelist fields id,name,mimetype,basicpermissions
|
||||
gam select <Section> save redirect csv ./filelistperms.csv multiprocess csv Users.csv gam user "~primaryEmail" print filelist fields id,name,mimetype,basicpermissions
|
||||
gam redirect csv ./filelistperms.csv multiprocess csv Users.csv gam select <Section> user "~primaryEmail" print filelist fields id,name,mimetype,basicpermissions
|
||||
gam select <Section> save redirect csv - multiprocess todrive csv Users.csv gam user "~primaryEmail" print filelist fields id,name,mimetype,basicpermissions
|
||||
gam redirect csv - multiprocess todrive csv Users.csv gam select <Section> user "~primaryEmail" print filelist fields id,name,mimetype,basicpermissions
|
||||
```
|
||||
|
||||
## Automatic batch processing
|
||||
@@ -156,3 +157,18 @@ If you want to select a `gam.cfg` section for the command, you must select and s
|
||||
```
|
||||
gam select <Section> save config auto_batch_min 1 redirect csv ./filelistperms.csv multiprocess group sales@domain.com print filelist fields id,name,mimetype,basicpermissions
|
||||
```
|
||||
|
||||
## Process Google Sheet commands and save results
|
||||
You want to process data from a Google Sheet tab and save the results to another tab in the same sheet.
|
||||
Make a Google sheet with two tabs: Commands, Results; get the File ID and the two tab IDs.
|
||||
Put your command data in the Commands tab.
|
||||
|
||||
Run your command, write the results to Results.txt
|
||||
```
|
||||
gam redirect stdout ./Results.txt multiprocess redirect stderr stdout csv gsheet user@domain.com <FileID> id:<CommandsTabID> gam ... Command
|
||||
```
|
||||
|
||||
Upload Results.txt to the Results tab of the sheet.
|
||||
```
|
||||
gam user user@domain.com update drivefile <FileID> localfile Results.txt retainname gsheet id:<ResultsTabID>
|
||||
```
|
||||
|
||||
@@ -122,7 +122,7 @@ where you get more columns than is desirable.
|
||||
* `csv_output_header_filter` - Used to select the column headers to include in the output
|
||||
* `csv_output_header_drop_filter` - Used to select the column headers to exclude from the output
|
||||
|
||||
Typically, you would use the option that involes typing the fewest column names but both options can be used.
|
||||
Typically, you would use the option that involves typing the fewest column names but both options can be used.
|
||||
When both options are used, `csv_output_header_drop_filter` is processed first, then `csv_output_header_filter`.
|
||||
|
||||
Field names are specified by regular expressions; at its simplest, you specify a complete field name.
|
||||
|
||||
@@ -178,6 +178,7 @@ Client access works when accessing Resource calendars.
|
||||
<EventType> ::=
|
||||
default|
|
||||
focustime|
|
||||
fromgmail|
|
||||
outofoffice|
|
||||
workinglocation
|
||||
<EventTypeList> ::= "<EventType>(,<EventType>)*"
|
||||
@@ -346,7 +347,7 @@ If none of the following options are selected, all events are selected.
|
||||
* `<EventSelectProperty>* <EventMatchProperty>*` - Properties used to select events
|
||||
|
||||
The Google Calendar API processes `<EventSelectProperty>*`; you may specify none or multiple properties.
|
||||
* `after|starttime|timemin <Time>` - Lower bound (inclusive) for an event's end time to filter by. If timeMax is set, timeMin must be smaller than timeMax.
|
||||
* `after|starttime|timemin <Time>` - Lower bound (exclusive) for an event's end time to filter by. If timeMax is set, timeMin must be smaller than timeMax.
|
||||
* `before|endtime|timemax <Time>` - Upper bound (exclusive) for an event's start time to filter by. If timeMin is set, timeMax must be greater than timeMin.
|
||||
* `eventtypes <EventTypeList>` - Select events based on their type.
|
||||
* `query <QueryCalendar>` - Free text search terms to find events that match these terms in any field, except for extended properties
|
||||
|
||||
@@ -47,6 +47,64 @@ This Wiki page was built directly from Jay Lee's Wiki page; my sincere thanks fo
|
||||
<ChatMessageID> ::= client-<String>
|
||||
<String> must contain only lowercase letters, numbers, and hyphens up to 56 characters in length.
|
||||
```
|
||||
```
|
||||
<ChatSpaceFieldName> ::=
|
||||
accesssettings|
|
||||
admininstalled|
|
||||
createtime|
|
||||
displayname|
|
||||
externaluserallowed|
|
||||
importmode|
|
||||
lastactivetime|
|
||||
membershipcount|
|
||||
name|
|
||||
singleuserbotdm|
|
||||
spacedetails|
|
||||
spacehistorystate|
|
||||
spacethreadingstate|threaded|
|
||||
spacetype|type|
|
||||
spaceuri
|
||||
<ChatSpaceFieldNameList> ::= "<ChatSpaceFieldName>(,<ChatSpaceFieldName>)*"
|
||||
|
||||
<ChatMemberFieldName> ::=
|
||||
createtime|
|
||||
deletetime|
|
||||
groupmember|
|
||||
member|
|
||||
name|
|
||||
role|
|
||||
state|
|
||||
<ChatMemberFieldNameList> ::= "<ChatMemberFieldName>(,<ChatMemberFieldName>)*"
|
||||
|
||||
<ChatMessageFieldName> ::=
|
||||
accessorywidgets|
|
||||
actionresponse|
|
||||
annotations|
|
||||
argumenttext|
|
||||
attachedgifs|
|
||||
attachment|
|
||||
cards|
|
||||
cardsv2|
|
||||
clientassignedmessageid|
|
||||
createtime|
|
||||
deletetime|
|
||||
deletionmetadata|
|
||||
emojireactionsummaries|
|
||||
fallbacktext|
|
||||
formattedtext|
|
||||
lastupdatetime|
|
||||
matchedurl|
|
||||
name|
|
||||
privatemessageviewer|
|
||||
quotedmessagemetadata|
|
||||
sender|
|
||||
slashcommand|
|
||||
space|
|
||||
text|
|
||||
thread|
|
||||
threadreply
|
||||
<ChatMessageFieldNameList> ::= "<ChatMessageFieldName>(,<ChatMessageFieldName>)*"
|
||||
```
|
||||
|
||||
## Set up a Chat Bot
|
||||
Since GAM 6.04.00, GAM is capable of acting as a Chat Bot and sending messages to Chat Rooms or direct messages to users. You first need to configure your Chat Bot.
|
||||
@@ -69,6 +127,7 @@ At first you'll have no spaces listed. Try [finding your bot and chatting it](ht
|
||||
### Display information about a specific chat space
|
||||
```
|
||||
gam info chatspace space <ChatSpace>
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
@@ -77,6 +136,7 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
### Display information about all chat spaces
|
||||
```
|
||||
gam show chatspaces
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
@@ -84,11 +144,12 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
|
||||
```
|
||||
gam print chatspaces [todrive <ToDriveAttribute>*]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[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.
|
||||
@@ -101,6 +162,7 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
### Display information about a specific chat member
|
||||
```
|
||||
gam info chatmember member <ChatMember>
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
@@ -110,6 +172,7 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
```
|
||||
gam show chatmembers space <ChatSpace>
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
@@ -118,6 +181,7 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
```
|
||||
gam print chatmembers [todrive <ToDriveAttribute>*] space <ChatSpace>
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
|
||||
@@ -238,6 +302,7 @@ Display the given Chat message.
|
||||
|
||||
```
|
||||
gam info chatmessage name <ChatMessage>
|
||||
[fields <ChatMessageFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
|
||||
@@ -130,7 +130,7 @@ If you have a CSV file, UpdateBrowsers.csv with two columns: deviceId,notes
|
||||
this command will add a new line of notes to the front of the existing notes:
|
||||
|
||||
```
|
||||
gam csv UpdateBrowsers.csv gam update browser ~deviceId updatenotes "~~notes~~\n#notes#"
|
||||
gam csv UpdateBrowsers.csv gam update browser "~deviceId" updatenotes "~~notes~~\n#notes#"
|
||||
```
|
||||
|
||||
## Move Chrome browsers from one OU to another
|
||||
@@ -193,7 +193,8 @@ Select the fields to be displayed:
|
||||
* `annotated` - Display these fields: deviceId,annotatedAssetId,annotatedLocation,annotatedNotes,annotatedUser
|
||||
* `basic` - Display all fields except: browsers, lastDeviceUsers, lastStatusReportTime, machinePloicies; this is the default
|
||||
* `allfields/full` - Display all fields
|
||||
* `<BrowserFieldName>* [fields <BrowserFieldNameList>]` - Displaya selected list of fields
|
||||
* `<BrowserFieldName>* [fields <BrowserFieldNameList>]` - Display a selected list of fields
|
||||
* Note that `ou, org and orgunit` are both command line options and field names; use `fields` to include them in the selected list of fields
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values:
|
||||
- `formatjson` - Display the fields in JSON format.
|
||||
@@ -232,7 +233,8 @@ Select the fields to be displayed:
|
||||
* `annotated` - Display these fields: deviceId,annotatedAssetId,annotatedLocation,annotatedNotes,annotatedUser
|
||||
* `basic` - Display all fields except: browsers, lastDeviceUsers, lastStatusReportTime, machinePloicies; this is the default
|
||||
* `allfields/full` - Display all fields
|
||||
* `<BrowserFieldName>* [fields <BrowserFieldNameList>]` - Displaya selected list of fields
|
||||
* `<BrowserFieldName>* [fields <BrowserFieldNameList>]` - Display a selected list of fields
|
||||
* Note that `ou, org and orgunit` are both command line options and field names; use `fields` to include them in the selected list of fields
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
# Chrome Installed Apps Counts
|
||||
|
||||
- [Chrome Policies](#chrome-policies)
|
||||
- [API documentation](#api-documentation)
|
||||
- [Definitions](#definitions)
|
||||
- [Quoting rules](#quoting-rules)
|
||||
- [Display Chrome installed app details](#display-chrome-installed-app-details)
|
||||
- [Display Chrome installed apps counts](#display-chrome-installed-apps-counts)
|
||||
- [Display Chrome devices with a specific installed application](#display-chrome-devices-with-a-specific-installed-application)
|
||||
- [API documentation](#api-documentation)
|
||||
- [Definitions](#definitions)
|
||||
- [Quoting rules](#quoting-rules)
|
||||
- [Display Chrome installed app details](#display-chrome-installed-app-details)
|
||||
- [Display Chrome installed apps counts](#display-chrome-installed-apps-counts)
|
||||
- [Display Chrome devices with a specific installed application](#display-chrome-devices-with-a-specific-installed-application)
|
||||
|
||||
## API documentation
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -364,7 +364,7 @@ If you have a CSV file, UpdateCrOS.csv with two columns: deviceId,notes
|
||||
this command will add a new line of notes to the front of the existing notes:
|
||||
|
||||
```
|
||||
gam csv UpdateCrOS.csv gam update cros ~deviceId updatenotes "~~notes~~\n#notes#"
|
||||
gam csv UpdateCrOS.csv gam update cros "~deviceId" updatenotes "~~notes~~\n#notes#"
|
||||
```
|
||||
|
||||
## Add ChromeOS devices to an organizational unit
|
||||
@@ -391,7 +391,7 @@ given if invalid CrOS deviceIds are specified.
|
||||
### Example: Add ChromeOS devices to a single OU
|
||||
Suppose you have a CSV file cros.csv with a single column: deviceId
|
||||
```
|
||||
gam update ou /Students/2022 add cros_csvfile cros.csv:deviceId quickcrosmove
|
||||
gam update ou /Students/2022 add croscsvfile cros.csv:deviceId quickcrosmove
|
||||
```
|
||||
|
||||
### Example: Add ChromeOS devices to multiple OUs
|
||||
@@ -856,7 +856,7 @@ gam redirect stdout ./CrOSDeviceFiles.out redirect stderr stdout csvkmd cros ./C
|
||||
Download the device files in parallel.
|
||||
|
||||
```
|
||||
gam redirect stdout ./CrOSDeviceFiles.out multiprocess redirect stderr stdout csv ./CrOSDeviceFiles.csv matchfield deviceFiles.type LOG_FILE gam cros ~deviceId get devicefile select ~deviceFiles.createTime
|
||||
gam redirect stdout ./CrOSDeviceFiles.out multiprocess redirect stderr stdout csv ./CrOSDeviceFiles.csv matchfield deviceFiles.type LOG_FILE gam cros "~deviceId" get devicefile select "~deviceFiles".createTime
|
||||
```
|
||||
|
||||
Suppose you want only the last device file for each Chromebook.
|
||||
|
||||
@@ -134,6 +134,7 @@ gam user user@domain.com check|update serviceaccount
|
||||
creationtime|
|
||||
creator|creatoruserid|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
scheduledtime|
|
||||
state|
|
||||
@@ -154,6 +155,7 @@ gam user user@domain.com check|update serviceaccount
|
||||
creator|creatoruserid|
|
||||
description|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
scheduledtime|
|
||||
state|
|
||||
@@ -179,6 +181,7 @@ gam user user@domain.com check|update serviceaccount
|
||||
duedate|
|
||||
duetime|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
maxpoints|
|
||||
scheduledtime|
|
||||
@@ -187,6 +190,7 @@ gam user user@domain.com check|update serviceaccount
|
||||
title|
|
||||
topicid|
|
||||
updatetime|
|
||||
workid|
|
||||
worktype
|
||||
<CourseWorkFieldNameList> ::= "<CourseWorkFieldName>(,<CourseWorkFieldName>)*"
|
||||
|
||||
@@ -270,10 +274,14 @@ The options `name <String>` and `teacher <UserItem>` are required when creating
|
||||
gam create|add course [id|alias <CourseAlias>] <CourseAttribute>*
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
@@ -284,10 +292,14 @@ gam create|add course [id|alias <CourseAlias>] <CourseAttribute>*
|
||||
gam update course <CourseID> <CourseAttribute>+
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
@@ -297,10 +309,14 @@ gam update course <CourseID> <CourseAttribute>+
|
||||
gam update courses <CourseEntity> <CourseAttribute>+
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
@@ -311,12 +327,25 @@ gam update courses <CourseEntity> <CourseAttribute>+
|
||||
`copyfrom <CourseID>` allows copying of course announcements, work, topics and members from one course to another.
|
||||
* Accouncements - By default, no course announcements are copied
|
||||
* `announcementstates <CourseAnnouncementStateList>` - Copy class announcements with the specified states
|
||||
* `individualstudentannouncements copy` - Copy individual student announcements; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentannouncements delete` - Delete individual student announcements
|
||||
* `individualstudentannouncements maptoall` - Map individual student announcements to all student announcements
|
||||
* Materials - By default, no course materials are copied
|
||||
* `materialstates <CourseMaterialsStateList>` - Copy class materials with the specified states
|
||||
* `individualstudentmaterials copy` - Copy individual student materials; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentmaterials delete` - Delete individual student materials
|
||||
* `individualstudentmaterials maptoall` - Map individual student materials to all student materials
|
||||
* Work - By default, no course work is copied
|
||||
* `workstates <CourseWorkStateList>` - Copy class work with the specified states
|
||||
* `individualstudentcoursework copy` - Copy individual student coursework; this is the default. You will get an error if the student is not a member of the course
|
||||
* `individualstudentcoursework delete` - Delete individual student coursework
|
||||
* `individualstudentcoursework maptoall` - Map individual student coursework to all student coursework
|
||||
* `removeduedate false` - Remove due dates before the current time; this is the default
|
||||
* `removeduedate|removeduedate true` - Remove all due dates
|
||||
* For convenience, setting `individualstudentassignments` sets all the following to the same value:
|
||||
* `individualstudentannouncements`
|
||||
* `individualstudentmaterials`
|
||||
* `individualstudentcoursework`
|
||||
* Announcements, Materials and Work Materials files
|
||||
* `copymaterialsfiles false` - Copy links to files referenced by materials in the `copyfrom` course; this is the default
|
||||
* `copymaterialsfiles|copymaterialsfiles true` - Copy files referenced by materials in the `copyfrom` course
|
||||
@@ -348,7 +377,7 @@ Drive files with `shareMode` `Each student will get a copy` don't seem to be abl
|
||||
|
||||
## Delete courses
|
||||
Classes can only be deleted when they are in the ARCHIVED state; to delete a class, you can update its state to ARCHIVED
|
||||
and then delete it or you can specify that it be archived as part of the delete command.
|
||||
and then delete it or you can specify that it be archived as parot of the delete command.
|
||||
```
|
||||
gam delete course <CourseID> [archived]
|
||||
gam delete courses <CourseEntity> [archived]
|
||||
@@ -466,8 +495,9 @@ gam print course-announcements [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
(courseannouncementids <CourseAnnouncementIDEntity>)|(announcementstates <CourseAnnouncementStateList>)*
|
||||
(orderby <CourseAnnouncementOrderByFieldName> [ascending|descending])*)
|
||||
[creatoremail] [fields <CourseAnnouncementFieldNameList>] [formatjson [quotechar <Character>]]
|
||||
[creatoremail] [fields <CourseAnnouncementFieldNameList>]
|
||||
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, the `print course-announcements` command displays course announcement information for all courses.
|
||||
|
||||
@@ -496,6 +526,8 @@ By default, all course announcement fields are displayed; use the following opti
|
||||
* `creatoremail` - Display course announcement creator email; requires an additional API call per course announcement.
|
||||
* `fields <CourseAnnouncementFieldNameList>` - Select specific fields to display.
|
||||
|
||||
Use the `countsonly` option to display the number of announcements in a course but not their details.
|
||||
|
||||
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.
|
||||
|
||||
@@ -511,8 +543,9 @@ gam print course-materials [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
(materialids <CourseMaterialIDEntity>)|(materialstates <CourseMaterialStateList>)*
|
||||
(orderby <CourseMaterialOrderByFieldName> [ascending|descending])*)
|
||||
[showcreatoremails|creatoremail] [showtopicnames] [fields <CourseMaterialFieldNameList>] [formatjson [quotechar <Character>]]
|
||||
[showcreatoremails|creatoremail] [showtopicnames] [fields <CourseMaterialFieldNameList>]
|
||||
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, the `print course-materials` command displays course materials information for all courses.
|
||||
|
||||
@@ -542,6 +575,8 @@ By default, all course materials fields are displayed; use the following options
|
||||
* `showtopicnames` - Display topic names; requires and additional API call per course.
|
||||
* `fields <CourseMaterialsFieldNameList>` - Select specific fields to display.
|
||||
|
||||
Use the `countsonly` option to display the number of course materials in a course but not their details.
|
||||
|
||||
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.
|
||||
|
||||
@@ -556,8 +591,8 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
gam print course-topics [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
(coursetopicids <CourseTopicIDEntity>)
|
||||
[formatjson [quotechar <Character>]]
|
||||
[timefilter updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, the `print course-topics` command displays course topic information for all courses.
|
||||
|
||||
@@ -582,6 +617,8 @@ To get information about course topics updated within a particular time frame, u
|
||||
* `end|endtime <Date>|<Time>` - specify the end of the time frame; if not specified, the time frame will be open ended at the end
|
||||
For the filter to apply, `timefilter` and at least one of `start|starttime` and `end|endtime` must be specified.
|
||||
|
||||
Use the `countsonly` option to display the number of topics in a course but not their details.
|
||||
|
||||
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.
|
||||
|
||||
@@ -597,8 +634,10 @@ gam print course-work [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
(workids <CourseWorkIDEntity>)|(workstates <CourseWorkStateList>)*
|
||||
(orderby <CourseWorkOrderByFieldName> [ascending|descending])*)
|
||||
[showcreatoremails] [showtopicnames] [fields <CourseWorkFieldNameList>] [formatjson [quotechar <Character>]]
|
||||
[showcreatoremails] [showtopicnames] [fields <CourseWorkFieldNameList>]
|
||||
[showstudentsaslist [<Boolean>]] [delimiter <Character>]
|
||||
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, the `print course-work` command displays course work information for all courses.
|
||||
|
||||
@@ -619,7 +658,7 @@ To get information about course work created/updated/scheduled within a particul
|
||||
* `end|endtime <Date>|<Time>` - specify the end of the time frame; if not specified, the time frame will be open ended at the end
|
||||
For the filter to apply, `timefilter` and at least one of `start|starttime` and `end|endtime` must be specified.
|
||||
|
||||
By default, all pub`lished course work for a course is displayed; use the following options to select specific course work.
|
||||
By default, all published course work for a course is displayed; use the following options to select specific course work.
|
||||
* `workids <CourseWorkIDEntity>` - Display course work with the IDs specified in `<CourseWorkIDEntity>`.
|
||||
* `workstates <CourseWorkStateList>` - Display course work with any of the specified states.
|
||||
|
||||
@@ -628,6 +667,11 @@ By default, all course work fields are displayed; use the following options to m
|
||||
* `showtopicnames` - Display topic names; requires and additional API call per course.
|
||||
* `fields <CourseWorkFieldNameList>` - Select specific fields to display.
|
||||
|
||||
By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns.
|
||||
Use options `showstudentsaslist [<Boolean>]` and `delimiter <Character>` to display the student IDs is a single column as a delimited list.
|
||||
|
||||
Use the `countsonly` option to display the number of course works in a course but not their details.
|
||||
|
||||
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.
|
||||
|
||||
@@ -644,8 +688,9 @@ gam print course-submissions [todrive <ToDriveAttribute>*]
|
||||
(workids <CourseWorkIDEntity>)|(workstates <CourseWorkStateList>)*
|
||||
(orderby <CourseWorkOrderByFieldName> [ascending|descending])*)
|
||||
(submissionids <CourseSubmissionIDEntity>)|(submissionstates <CourseSubmissionStateList>)*) [late|notlate]
|
||||
[fields <CourseSubmissionFieldNameList>] [showuserprofile] [formatjson [quotechar <Character>]]
|
||||
[fields <CourseSubmissionFieldNameList>] [showuserprofile]
|
||||
[timefilter creationtime|updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, the `print course-submissions` command displays course submission information for all course work for all courses.
|
||||
|
||||
@@ -670,7 +715,7 @@ By default, all course submissions for a course work is displayed; use the follo
|
||||
* `late` - Display course submissions marked late.
|
||||
* `notlate` - Display course submissions not marked late.
|
||||
|
||||
To get information about course submissionss created/updated within a particular time frame, use the following options.
|
||||
To get information about course submissions created/updated within a particular time frame, use the following options.
|
||||
* `timefilter creationtime|updatetime` - select which event to filter
|
||||
* `start|starttime <Date>|<Time>` - specify the start of the time frame; if not specified, the time frame will be open ended at the start
|
||||
* `end|endtime <Date>|<Time>` - specify the end of the time frame; if not specified, the time frame will be open ended at the end
|
||||
@@ -683,6 +728,8 @@ By default, only the numeric userId is displayed; use the `showuserprofile` opti
|
||||
You can only get profile information if the scope `https://www.googleapis.com/auth/classroom.profile.emails` is enabled
|
||||
for service account access; verify with `gam <UserTypeEntity> update serviceaccount`.
|
||||
|
||||
Use the `countsonly` option to display the number of submissions in a course but not their details.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ gam redirect stdout ./Invites.out redirect stderr stdout csvkmd users CourseStud
|
||||
```
|
||||
This command will invite all students to their courses in parallel
|
||||
```
|
||||
gam redirect stdout ./Invites.out multiprocess redirect stderr stdout multiprocess csv CourseStudent.csv gam user ~Student create classroominvitation role student course ~Course
|
||||
gam redirect stdout ./Invites.out multiprocess redirect stderr stdout multiprocess csv CourseStudent.csv gam user "~Student" create classroominvitation role student course "~Course"
|
||||
```
|
||||
## Accept classroom invitations by user
|
||||
Accept classroom invitations for users.
|
||||
|
||||
@@ -237,10 +237,10 @@ seniors@domain.org,/Students/ClassOf2018
|
||||
juniors@domain.org,/Students/ClassOf2019
|
||||
...
|
||||
```
|
||||
This allows you to do: `gam csv GradeOU.csv gam update cigroup ~Grade sync members ou ~OU`
|
||||
This allows you to do: `gam csv GradeOU.csv gam update cigroup "~Grade" sync members ou "~OU"`
|
||||
But suppose that at each grade level there are additional group members that are groups of faculty/staff; e.g., senioradvisors@domain.org.
|
||||
In this scenario, you can't do the `update cigroup sync` command as the members that are groups will be deleted; the `usersonly` option allows
|
||||
the `update cigroup sync` command to work: `gam csv GradeOU.csv gam update cigroup ~Grade sync members usersonly ou ~OU`
|
||||
the `update cigroup sync` command to work: `gam csv GradeOU.csv gam update cigroup "~Grade" sync members usersonly ou "~OU"`
|
||||
The users from the OU are matched against the user members of the group and adds/deletes are done as necessary to synchronize them;
|
||||
the group members of the group are unaffected.
|
||||
|
||||
|
||||
@@ -200,12 +200,17 @@ Data fields identified in a `csvkmd` argument.
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
my_forms |
|
||||
my_google_files |
|
||||
my_non_google_files |
|
||||
my_presentations |
|
||||
my_publishable_items |
|
||||
my_sheets |
|
||||
my_shortcuts |
|
||||
my_slides |
|
||||
my_3p_shortcuts |
|
||||
my_items |
|
||||
my_top_files |
|
||||
|
||||
@@ -44,14 +44,14 @@ the sub-command lines and the initial command with a numeric return code.
|
||||
$ gam redirect stdout usernames.csv multiprocess redirect stderr stdout csv users.csv gam info user "~primaryEmail" quick name
|
||||
2021-08-01T19:50:38.151-07:00,0/6,Using 6 processes...
|
||||
$ more ~/.gam/gam.log
|
||||
2021-08-01T19:50:38.120-07:00,*,/Users/admin/bin/gamadv-xtd3/gam redirect stdout usernames.csv multiprocess redirect stderr stdout csv users.csv showcmds false gam info user ~primaryEmail quick name
|
||||
2021-08-01T19:50:38.120-07:00,*,/Users/admin/bin/gamadv-xtd3/gam redirect stdout usernames.csv multiprocess redirect stderr stdout csv users.csv showcmds false gam info user "~primaryEmail" quick name
|
||||
2021-08-01T19:50:39.144-07:00,0,gam info user testuser2 quick name
|
||||
2021-08-01T19:50:39.358-07:00,0,gam info user testuser3 quick name
|
||||
2021-08-01T19:50:39.358-07:00,0,gam info user testuser1 quick name
|
||||
2021-08-01T19:50:39.401-07:00,0,gam info user testuser5 quick name
|
||||
2021-08-01T19:50:39.459-07:00,56,gam info user testuserx quick name
|
||||
2021-08-01T19:50:39.470-07:00,0,gam info user testuser4 quick name
|
||||
2021-08-01T19:50:39.483-07:00,0,/Users/admin/bin/gamadv-xtd3/gam redirect stdout usernames.csv multiprocess redirect stderr stdout csv users.csv showcmds false gam info user ~primaryEmail quick name
|
||||
2021-08-01T19:50:39.483-07:00,0,/Users/admin/bin/gamadv-xtd3/gam redirect stdout usernames.csv multiprocess redirect stderr stdout csv users.csv showcmds false gam info user "~primaryEmail" quick name
|
||||
```
|
||||
|
||||
## Command Progress
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
- [Promote a domain to be primary](#promote-a-domain-to-be-primary)
|
||||
- [Delete a domain](#delete-a-domain)
|
||||
- [Display domains](#display-domains)
|
||||
- [Display domains count](#display-domains-count)
|
||||
- [Create and delete domain aliases](#create-and-delete-domain-aliases)
|
||||
- [Display domain aliases](#display-domain-aliases)
|
||||
- [Display domain aliases count](#display-domain-aliases-count)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/admin-sdk/directory/reference/rest/v1/domains
|
||||
@@ -30,15 +32,18 @@ gam delete domain <DomainName>
|
||||
```
|
||||
## Display domains
|
||||
```
|
||||
gam info domain [<DomainName>] [formatjson]
|
||||
gam show domains [formatjson]
|
||||
gam info domain [<DomainName>]
|
||||
[formatjson]
|
||||
gam show domains
|
||||
[formatjson]
|
||||
```
|
||||
For `info`, if `<DomainName>` is omitted, information about the primary domain will be displayed.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam print domains [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]
|
||||
gam print domains [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the information as columns of fields.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
@@ -49,6 +54,13 @@ When using the `formatjson` option, double quotes are used extensively in the da
|
||||
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.
|
||||
|
||||
## Display domains count
|
||||
Display the number of domains.
|
||||
```
|
||||
gam print|show domains
|
||||
showitemcountonly
|
||||
```
|
||||
|
||||
## Create and delete domain aliases
|
||||
```
|
||||
gam create domainalias|aliasdomain <DomainAlias> <DomainName>
|
||||
@@ -56,13 +68,16 @@ gam delete domainalias|aliasdomain <DomainAlias>
|
||||
```
|
||||
## Display domain aliases
|
||||
```
|
||||
gam info domainalias|aliasdomain <DomainAlias> [formatjson]
|
||||
gam show domainaliases|aliasdomains [formatjson] [formatjson [quotechar <Character>]]
|
||||
gam info domainalias|aliasdomain <DomainAlias>
|
||||
[formatjson]
|
||||
gam show domainaliases|aliasdomains
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam print domainaliases|aliasdomains [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]
|
||||
gam print domainaliases|aliasdomains [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the information as columns of fields.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
@@ -73,3 +88,9 @@ When using the `formatjson` option, double quotes are used extensively in the da
|
||||
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.
|
||||
|
||||
## Display domain aliases count
|
||||
Display the number of domain aliases.
|
||||
```
|
||||
gam print|show domainaliases|aliasdomains
|
||||
showitemcountonly
|
||||
```
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Downloads
|
||||
You can download the current GAMADV-XTD3 release from the [GitHub Releases](https://github.com/taers232c/GAMADV-XTD3/releases) page. Choose one of the following:
|
||||
# Downloads-Installs
|
||||
You can download and install the current GAMADV-XTD3 release from the [GitHub Releases](https://github.com/taers232c/GAMADV-XTD3/releases) page. Choose one of the following:
|
||||
|
||||
* Executable Archive, Automatic, Linux/Mac OS/Google Cloud Shell/Raspberry Pi/ChromeOS
|
||||
- Start a terminal session and execute one of the following commands:
|
||||
@@ -23,52 +23,42 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
||||
- `gamadv-xtd3-6.wx.yz-linux-x86_64-glibc2.19.tar.xz`
|
||||
- `gamadv-xtd3-6.wx.yz-linux-x86_64-legacy.tar.xz`
|
||||
- Download the archive, extract the contents into some directory.
|
||||
- Start a terminal session and cd to the install directory.
|
||||
- Start a terminal session.
|
||||
|
||||
* Executable Archive, Manual, Raspberry Pi/ChromeOS ARM devices
|
||||
- `gamadv-xtd3-6.wx.yz-linux-arm64-glibc2.31.tar.xz`
|
||||
- `gamadv-xtd3-6.wx.yz-linux-arm64-glibc2.27.tar.xz`
|
||||
- `gamadv-xtd3-6.wx.yz-linux-arm64-glibc2.23.tar.xz`
|
||||
- Download the archive, extract the contents into some directory.
|
||||
- Start a terminal session and cd to the install directory.
|
||||
- Start a terminal session.
|
||||
|
||||
* Executable Archive, Manual, Mac OS versions Big Sur, Monterey, Ventura - M1/M2
|
||||
- `gamadv-xtd3-6.wx.yz-macos-arm64.tar.xz`
|
||||
- Download the archive, extract the contents into some directory.
|
||||
- Start a terminal session and cd to the install directory.
|
||||
- Start a terminal session.
|
||||
|
||||
* Executable Archive, Manual, Mac OS, versions Big Sur, Monterey, Ventura - Intel
|
||||
- `gamadv-xtd3-6.wx.yz-macos-x86_64.tar.xz`
|
||||
- Download the archive, extract the contents into some directory.
|
||||
- Start a terminal session and cd to the install directory.
|
||||
|
||||
* Executable Archive, Manual, Mac OS, versions prior to Big Sur
|
||||
- `gamadv-xtd3-6.wx.yz-macos-x86_64-legacy.tar`
|
||||
- Download the archive, extract the contents into some directory.
|
||||
- Start a terminal session and cd to the install directory.
|
||||
- Start a terminal session.
|
||||
|
||||
* Executable Archive, Manual, Windows 64 bit
|
||||
- `gamadv-xtd3-6.wx.yz-windows-x86_64.zip`
|
||||
- Download the archive, extract the contents into some directory.
|
||||
- Start a terminal session and cd to the install directory.
|
||||
- Start a Command Prompt/PowerShell session.
|
||||
|
||||
* Executable Installer, Manual, Windows 64 bit
|
||||
- `gamadv-xtd3-6.wx.yz-windows-x86_64.msi`
|
||||
- Download the installer and run it.
|
||||
- Start a Command Prompt/PowerShell session and cd to the install directory.
|
||||
|
||||
* Executable Archive, Manual, Windows 32 bit
|
||||
- `gamadv-xtd3-6.wx.yz-windows-x86.zip`
|
||||
- Download the archive, extract the contents into some directory.
|
||||
- Start a terminal session and cd to the install directory.
|
||||
|
||||
* Executable Installer, Manual, Windows 32 bit
|
||||
- `gamadv-xtd3-6.wx.yz-windows-x86.msi`
|
||||
- Download the installer and run it.
|
||||
- Start a Command Prompt/PowerShell session and cd to the install directory.
|
||||
- Start a Command Prompt/PowerShell session.
|
||||
|
||||
* Winget
|
||||
- `winget install taers232c.GAMADV-XTD3 --location C:\GAMADV-XTD3`
|
||||
- Specify an alternate location if desired
|
||||
- Start a Command Prompt/PowerShell session.
|
||||
|
||||
* Source, all platforms
|
||||
- `Source code(zip)`
|
||||
- `Source code(tar.gz)`
|
||||
- Download the archive, extract the contents into some directory.
|
||||
- Start a terminal/Command Prompt/PowerShell session and cd to the install directory.
|
||||
- Start a terminal/Command Prompt/PowerShell session.
|
||||
@@ -55,12 +55,17 @@
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
my_forms |
|
||||
my_google_files |
|
||||
my_non_google_files |
|
||||
my_presentations |
|
||||
my_publishable_items |
|
||||
my_sheets |
|
||||
my_shortcuts |
|
||||
my_slides |
|
||||
my_3p_shortcuts |
|
||||
my_items |
|
||||
my_top_files |
|
||||
@@ -78,7 +83,7 @@
|
||||
|
||||
<SharedDriveID> ::= <String>
|
||||
<SharedDriveName> ::= <String>
|
||||
<SharedDriveIDEntity> ::= (teamdriveid <DriveFileItem>) | (teamdriveid:<DriveFileItem>)
|
||||
<SharedDriveIDEntity> ::= (teamdriveid <SharedDriveID>) | (teamdriveid:<SharedDriveID>)
|
||||
<SharedDriveNameEntity> ::= (teamdrive <SharedDriveName>) | (teamdrive:<SharedDriveName>)
|
||||
<SharedDriveFileNameEntity> ::= (teamdrivefilename <DriveFileName>) | (teamdrivefilename:<DriveFileName>)
|
||||
|
||||
@@ -214,7 +219,7 @@ By default, all types of files and folders are displayed; you can specify a list
|
||||
<MimeTypeList> ::= "<MimeType>(,<MimeType>)*"
|
||||
```
|
||||
This is the mapping from `<MimeTypeShortcut>` to MIME type.
|
||||
* `gdoc|gdocument` - 'application/vnd.google-apps.document
|
||||
* `gdoc|gdocument` - application/vnd.google-apps.document
|
||||
* `gdrawing` - application/vnd.google-apps.drawing
|
||||
* `gfile` - application/vnd.google-apps.file
|
||||
* `gfolder|gdirectory` - application/vnd.google-apps.folder
|
||||
@@ -246,30 +251,37 @@ The options combine ownership and broad MIME type selections.
|
||||
```
|
||||
<DriveFileQueryShortcut> ::=
|
||||
all_files | all_folders | all_google_files | all_non_google_files | all_items |
|
||||
my_files | my_folders | my_google_files | my_non_google_files | my_items |
|
||||
my_docs | my_files | my_folders | my_forms | my_google_files | my_non_google_files | my_items |
|
||||
my_presentations | my_publishable_items | my_sheets | my_slides |
|
||||
my_top_files | my_top_folders | my_top_items |
|
||||
others_files | others_folders | others_google_files | others_non_google_files | others_items |
|
||||
writable_files
|
||||
```
|
||||
* all_files - "mimeType != application/vnd.google-apps.folder"
|
||||
* all_folders - "mimeType = application/vnd.google-apps.folder"
|
||||
* all_google_files - "mimeType != application/vnd.google-apps.folder and mimeType contains 'vnd.google'"
|
||||
* all_files - "mimeType != 'application/vnd.google-apps.folder'"
|
||||
* all_folders - "mimeType = 'application/vnd.google-apps.folder'"
|
||||
* all_google_files - "mimeType != 'application/vnd.google-apps.folder' and mimeType contains 'vnd.google'"
|
||||
* all_non_google_files - "not mimeType contains 'vnd.google'"
|
||||
* all_items - "" (An empty query specifies all files and folders)
|
||||
* my_files - "'me' in owners and mimeType != application/vnd.google-apps.folder"
|
||||
* my_folders - "'me' in owners and mimeType = application/vnd.google-apps.folder"
|
||||
* my_google_files - "'me' in owners and mimeType != application/vnd.google-apps.folder and mimeType contains 'vnd.google'"
|
||||
* my_docs - "'me' in owners and mimeType = 'application/vnd.google-apps.document'"
|
||||
* my_files - "'me' in owners and mimeType != 'application/vnd.google-apps.folder'"
|
||||
* my_folders - "'me' in owners and mimeType = 'application/vnd.google-apps.folder'"
|
||||
* my_forms - "'me' in owners and mimeType = 'application/vnd.google-apps.form'"
|
||||
* my_google_files - "'me' in owners and mimeType != 'application/vnd.google-apps.folder' and mimeType contains 'vnd.google'"
|
||||
* my_non_google_files - "'me' in owners and not mimeType contains 'vnd.google'"
|
||||
* my_presentations - "'me' in owners and mimeType = 'application/vnd.google-apps.presentation'"
|
||||
* my_publishable_items - "'me' in owners and (mimeType = 'application/vnd.google-apps.document' or mimeType = 'application/vnd.google-apps.form' or mimeType = 'application/vnd.google-apps.presentation' or mimeType = 'application/vnd.google-apps.spreadsheet')"
|
||||
* my_sheets - "'me' in owners and mimeType = 'application/vnd.google-apps.spreadsheet'"
|
||||
* my_slides - "'me' in owners and mimeType = 'application/vnd.google-apps.presentation'"
|
||||
* my_items - "'me' in owners"
|
||||
* my_top_files - "'me' in owners and mimeType != application/vnd.google-apps.folder and 'root' in parents"
|
||||
* my_top_folders - "'me' in owners and mimeType = application/vnd.google-apps.folder and 'root' in parents"
|
||||
* my_top_files - "'me' in owners and mimeType != 'application/vnd.google-apps.folder' and 'root' in parents"
|
||||
* my_top_folders - "'me' in owners and mimeType = 'application/vnd.google-apps.folder' and 'root' in parents"
|
||||
* my_top_items - "'me' in owners and 'root' in parents"
|
||||
* others_files - "not 'me' in owners and mimeType != application/vnd.google-apps.folder"
|
||||
* others_folders - "not 'me' in owners and mimeType = application/vnd.google-apps.folder"
|
||||
* others_google_files - "not 'me' in owners and mimeType != application/vnd.google-apps.folder and mimeType contains 'vnd.google'"
|
||||
* others_files - "not 'me' in owners and mimeType != 'application/vnd.google-apps.folder'"
|
||||
* others_folders - "not 'me' in owners and mimeType = 'application/vnd.google-apps.folder'"
|
||||
* others_google_files - "not 'me' in owners and mimeType != 'application/vnd.google-apps.folder' and mimeType contains 'vnd.google'"
|
||||
* others_non_google_files - "not 'me' in owners and not mimeType contains 'vnd.google'"
|
||||
* others_items - "not 'me' in owners"
|
||||
* writable_files - "'me' in writers and mimeType != application/vnd.google-apps.folder"
|
||||
* writable_files - "'me' in writers and mimeType != 'application/vnd.google-apps.folder'"
|
||||
|
||||
## Select based on file size
|
||||
For these filters, GAM processes then after the list of files is downloaded. You can combine these
|
||||
@@ -291,7 +303,7 @@ Use [Permission matches](#permission-matches) to limit the display to files with
|
||||
### Examples
|
||||
```
|
||||
gam user testuser show fileinfo query "name='Test File'"
|
||||
gam user testuser show fileinfo query:"name='Test Folder' and mimeType=application/vnd.google-apps.folder"
|
||||
gam user testuser show fileinfo query:"name='Test Folder' and mimeType='application/vnd.google-apps.folder'"
|
||||
gam user testuser print filelist my_non_google_files
|
||||
```
|
||||
## Select root folder
|
||||
@@ -353,9 +365,9 @@ See: [Drive Query](https://developers.google.com/drive/api/v3/search-files)
|
||||
all_files | all_folders | all_google_files | all_non_google_files | all_items
|
||||
```
|
||||
Keyword to query mappings for `<DriveFileQueryShortcut>`:
|
||||
* all_files - "mimeType != application/vnd.google-apps.folder"
|
||||
* all_folders - "mimeType = application/vnd.google-apps.folder"
|
||||
* all_google_files - "mimeType != application/vnd.google-apps.folder and mimeType contains 'vnd.google'"
|
||||
* all_files - "mimeType != 'application/vnd.google-apps.folder'"
|
||||
* all_folders - "mimeType = 'application/vnd.google-apps.folder'"
|
||||
* all_google_files - "mimeType != 'application/vnd.google-apps.folder' and mimeType contains 'vnd.google'"
|
||||
* all_non_google_files - "not mimeType contains 'vnd.google'"
|
||||
* all_items - "" (An empty query specifies all files and folders)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
|
||||
## Display File Ownership for Old files
|
||||
If the above commands fail, you can try to loop through all accounts, however this might take a long time if you are on a large Google Workspace Account.
|
||||
|
||||
If any lines are displayed, the file owner is in the `owners.0.emailAddress` column.
|
||||
```
|
||||
gam config auto_batch_min 1 multiprocessexit rc=0 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select id <DriveFileID> fields id,name,owners.emailaddress norecursion showownedby any
|
||||
gam config auto_batch_min 1 multiprocessexit rc=0 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select name <DriveFileName> fields id,name,owners.emailaddress norecursion showownedby any
|
||||
|
||||
@@ -32,6 +32,7 @@ ENTITY_IS_A_USER_ALIAS_RC = 21
|
||||
ENTITY_IS_A_GROUP_RC = 22
|
||||
ENTITY_IS_A_GROUP_ALIAS_RC = 23
|
||||
ENTITY_IS_AN_UNMANAGED_ACCOUNT_RC = 24
|
||||
ORGUNIT_NOT_EMPTY_RC = 25
|
||||
CHECK_USER_GROUPS_ERROR_RC = 29
|
||||
ORPHANS_COLLECTED_RC = 30
|
||||
# Warnings/Errors
|
||||
@@ -61,4 +62,14 @@ TARGET_DRIVE_SPACE_ERROR_RC = 74
|
||||
USER_REQUIRED_TO_CHANGE_PASSWORD_ERROR_RC = 75
|
||||
USER_SUSPENDED_ERROR_RC = 76
|
||||
NO_CSV_DATA_TO_UPLOAD_RC = 77
|
||||
NO_SA_ACCESS_CONTEXT_MANAGER_EDITOR_ROLE_RC = 78
|
||||
ACCESS_POLICY_ERROR_RC = 79
|
||||
YUBIKEY_CONNECTION_ERROR_RC = 80
|
||||
YUBIKEY_INVALID_KEY_TYPE_RC = 81
|
||||
YUBIKEY_INVALID_SLOT_RC = 82
|
||||
YUBIKEY_INVALID_PIN_RC = 83
|
||||
YUBIKEY_APDU_ERROR_RC = 84
|
||||
YUBIKEY_VALUE_ERROR_RC = 85
|
||||
YUBIKEY_MULTIPLE_CONNECTED_RC = 86
|
||||
YUBIKEY_NOT_FOUND_RC = 87
|
||||
```
|
||||
|
||||
@@ -8,7 +8,498 @@ Automatic update to the latest version on Linux/Mac OS/Google Cloud Shell/Raspbe
|
||||
By default, a folder, `gamadv-xtd3`, is created in the default or specified path and the files are downloaded into that folder.
|
||||
Add the `-s` option to the end of the above commands to suppress creating the `gamadv-xtd3` folder; the files are downloaded directly into the default or specified path.
|
||||
|
||||
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
|
||||
See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
||||
|
||||
### 7.00.02
|
||||
|
||||
Added option `showlastmodification` to `gam <UserTypeEntity> print|show filecounts` that adds
|
||||
the following fields to the output: `lastModifiedFileId,lastModifiedFileName,lastModifyingUser,lastModifiedTime`;
|
||||
these are for the most recently modified file.
|
||||
|
||||
Added option `keepforever [<Boolean>]` to `gam <UserTypeEntity> update filerevisions` that allows setting
|
||||
`Keep forever` in revisions.
|
||||
|
||||
Upgraded to Python 3.12.6 where possible.
|
||||
|
||||
### 7.00.01
|
||||
|
||||
Added option `shownames` to `gam <UserTypeEntity> print|show sheet` that causes GAM
|
||||
to make an additional API call to get and display the sheet file name that is not supplied by the Sheets API.
|
||||
|
||||
### 7.00.00
|
||||
|
||||
Merged GAM-Team version
|
||||
|
||||
### 6.81.02
|
||||
|
||||
Updated `gam update group postmaster@domain.com` to handle the error that is generated.
|
||||
|
||||
### 6.81.01
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> create meetspace` that caused errors
|
||||
due to Developer Preview options being included.
|
||||
|
||||
### 6.81.00
|
||||
|
||||
Added support for groups when defining Chrome policies.
|
||||
|
||||
Added support for the Meet API.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Meet
|
||||
|
||||
Added option `countsonly` to the following course commands that displays
|
||||
the number of items in a course but not the details of the items.
|
||||
```
|
||||
gam print course-announcements
|
||||
gam print course-materials
|
||||
gam print course-submissions
|
||||
gam print course-topics
|
||||
gam print course-work
|
||||
```
|
||||
|
||||
### 6.80.21
|
||||
|
||||
Updated `gam <UserTypeEntity> archive messages` to handle the following error:
|
||||
```
|
||||
googleapiclient.errors.MediaUploadSizeError: Media larger than: 26214400
|
||||
```
|
||||
|
||||
### 6.80.20
|
||||
|
||||
Updated `gam report usage user` and `gam report users` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
```
|
||||
|
||||
### 6.80.19
|
||||
|
||||
Fixed bug in `gam create inboundssoprofile` that caused a trap due to
|
||||
an unexpected API result.
|
||||
|
||||
Updated `gam create inboundssoprofile ... returnnameonly` to return `inProgress` if the API
|
||||
does not return a complete result.
|
||||
|
||||
Upgraded to OpenSSL 3.3.2 where possible.
|
||||
|
||||
### 6.80.18
|
||||
|
||||
Updated `gam print|show admins` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
|
||||
### 6.80.17
|
||||
|
||||
Updated `gam <UserTypeEntity> modify messages` to improve error handling.
|
||||
|
||||
### 6.80.16
|
||||
|
||||
Fixed bug in `gam print vaultcounts` that caused a trap.
|
||||
|
||||
### 6.80.15
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print filelist ... countsrowfilter` that caused a trap.
|
||||
|
||||
Added option `continueoninvalidquery [<Boolean>]` to `gam <UserTypeEntity> print filelist|filecounts` that can be used
|
||||
in special cases where a query of the form `query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels"
|
||||
causes Google to issue an error saying that the query is invalid when, in fact, it is but the user does not have a
|
||||
license that suppprts drive file labels. When `continueoninvalidquery` is true, GAM prints an error message and
|
||||
proceeds to the next user rather that terminating as it does now. Of course, if the query really is invalid, you will
|
||||
get the message for every user.
|
||||
|
||||
### 6.80.14
|
||||
|
||||
Updated `gam <UserTypeEntity> print messages|threads` to display all default headers
|
||||
even if no messages are to be displayed. This eliminates error messages of the following form
|
||||
that occurred because only the headers `User,threadId,id` were displayed.
|
||||
```
|
||||
WARNING: csv_output_row_filter column "^Date$" does not match any output columns
|
||||
```
|
||||
|
||||
### 6.80.13
|
||||
|
||||
Added `my_publishable_items` to `<DriveFileQueryShortcut>` that can be used in
|
||||
`gam <UserTypeEntity> print filerevisions` to select only those items that can be
|
||||
published to the web: documents, forms, presentations(slides), spreadsheets. With row filtering,
|
||||
this allows identification of files that have been published outside your domain.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Files-Display#display-files-published-to-the-web
|
||||
|
||||
### 6.80.12
|
||||
|
||||
Updated `gam print vaultcounts` to correctly display accounts with errors.
|
||||
|
||||
### 6.80.11
|
||||
|
||||
Updated `gam <UserTypeEntity> delete|purge|trash|untrash <DriveFileEntity> shortcutandtarget`
|
||||
that when `<DriveFileEntity` is a shortcut, to have GAM validate that the shortcut and target can be
|
||||
successfully processed before proceeding.
|
||||
|
||||
### 6.80.10
|
||||
|
||||
Added option `followshortcuts [<Boolean>]` to `gam <UserTypeEntity> print|show fileinfo|filepath <DriveFileEntity>`
|
||||
that when true and `<DriveFileEntity` is a shortcut, causes GAM to display information about the target of the shortcut rather than the shortcut itself.
|
||||
|
||||
Added option `shortcutandtarget [<Boolean>]` to `gam <UserTypeEntity> delete|purge|trash|untrash <DriveFileEntity>`
|
||||
that when true and `<DriveFileEntity` is a shortcut, causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
### 6.80.09
|
||||
|
||||
Added options `allschemas|(schemas|custom|customschemas <SchemaNameList>)` to `gam print group-members`
|
||||
that display any custom schema values for the group members.
|
||||
|
||||
### 6.80.08
|
||||
|
||||
Updated `gam print|show oushareddrives` to display the Shared Drive ID, name and orgUnitPath as
|
||||
individual, separate entities in the output.
|
||||
|
||||
### 6.80.07
|
||||
|
||||
Updated `dateheaderformat iso` in `gam <UserTypeEntity> info|print|show messages` to include a colon
|
||||
between the hours and minutes in the timezone portion of the string as in all other time strings.
|
||||
|
||||
### 6.80.06
|
||||
|
||||
Added option `tdreturnidonly [<Boolean>]` to `<ToDriveAttribute>` that when true (the default), causes GAM to display
|
||||
only the uploaded file ID to stdout. This can be captured and used in subsequent commands, `tdfileid <DriveFileID>` that will update the same file.
|
||||
|
||||
### 6.80.05
|
||||
|
||||
Added option `individualstudentcoursework copy|delete|maptoall` to `gam create|update course ... copyfrom`
|
||||
that controls how individual student coursework in the `copyfrom` course is processed.
|
||||
* `individualstudentcoursework copy` - Copy individual student coursework; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentcoursework delete` - Delete individual student coursework
|
||||
* `individualstudentcoursework maptoall` - Map individual student coursework to all student coursework
|
||||
|
||||
For convenience, setting `individualstudentassignments` sets all of the following to the same value:
|
||||
* `individualstudentannouncements`
|
||||
* `individualstudentmaterials`
|
||||
* `individualstudentcoursework`
|
||||
|
||||
### 6.80.04
|
||||
|
||||
Cleaned up progress messages in `gam create|update course ... copyfrom`.
|
||||
|
||||
### 6.80.03
|
||||
|
||||
Added option `stripcrsfromname` to `gam <UserTypeEntity> print driveactivity` that causes carriage returns,
|
||||
linefeeds and nulls to be stripped from file names.
|
||||
|
||||
### 6.80.02
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print filecounts` that adds
|
||||
additional columns of data to the CSV file output.
|
||||
|
||||
Added options `individualstudentannouncements copy|delete|maptoall` and `individualstudentmaterials copy|delete|maptoall`
|
||||
to `gam create|update course ... copyfrom` that controls how individual student announcements and materials in the `copyfrom` course are processed.
|
||||
* `individualstudentannouncements copy` - Copy individual student announcements; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentannouncements delete` - Delete individual student announcements
|
||||
* `individualstudentannouncements maptoall` - Map individual student announcements to all student announcements
|
||||
* `individualstudentmaterials copy` - Copy individual student materials; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentmaterials delete` - Delete individual student materials
|
||||
* `individualstudentmaterials maptoall` - Map individual student materials to all student materials
|
||||
|
||||
### 6.80.01
|
||||
|
||||
Added options `showstudentsaslist [<Boolean>]` and `delimiter <Character>` to `gam print course-work`.
|
||||
By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns.
|
||||
Use these options to display the student IDs in a single column as a delimited list.
|
||||
|
||||
Updated `gam <UserTypeEntity> vacation [<Boolean>]` to make `<Boolean>` optional; this allows changes
|
||||
to other fields without affecting the current responder state.
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show vacation` to avoid a trap when invalid start or end dates
|
||||
have been entered in the Gmail user interface. Invalid dates are represented as `1970-01-01`.
|
||||
|
||||
### 6.80.00
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print users ... license ... formatjson` that caused a trap.
|
||||
|
||||
Upgraded to Python 3.12.5 where possible.
|
||||
|
||||
### 6.79.12
|
||||
|
||||
Fixed bug in `gam user admin@domain.com print chatspaces asadmin` that caused the following error:
|
||||
```
|
||||
Chat Admin: admin@domain.com(asadmin), Print Failed: This method doesn't support non-admin user authentication. Authenticate with an admin account.
|
||||
```
|
||||
|
||||
### 6.79.11
|
||||
|
||||
Fixed bug in `gam <UserItem> print|show chatmembers` where the `filter <String>` was not applied.
|
||||
|
||||
### 6.79.10
|
||||
|
||||
Updated commands to handle a trap that occurs when oauth2service.json specifies a YubiKey but the YubiKey is not inserted.
|
||||
|
||||
### 6.79.09
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print teamdriveacls` that adds
|
||||
additional columns of data to the CSV file output. This can be used when ACLs for selected users are to be
|
||||
replaced with a different user email address.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Shared-Drives#bulk-change-user1-shared-drive-access-to-user2
|
||||
|
||||
### 6.79.08
|
||||
|
||||
Clarified action to perform messages when creating/deleting/updating licenses.
|
||||
|
||||
### 6.79.07
|
||||
|
||||
Added option `totalonly` to `gam <UserTypeEntity> print|show groups` that displays
|
||||
the user email address and the total number of groups to which it belongs. This is in
|
||||
contrast to `countsonly` that has to make an additional API call per group per user to get the user's role.
|
||||
When `countsonly` is specified, an additional column `Total` is displayed that is the sum
|
||||
of the role counts.
|
||||
|
||||
### 6.79.06
|
||||
|
||||
Fixed bug in `gam calendars <CalendarEntity> update event ... removeattendee <EmailAddress>` that caused a trap
|
||||
if the event had no attendees.
|
||||
|
||||
### 6.79.05
|
||||
|
||||
Updated `gam <UserTypeEntity> empty drivetrash <SharedDriveEntity>` to handle this error that
|
||||
occurs when the user is not a Manager of the Shared Drive.
|
||||
```
|
||||
ERROR: 403: insufficientFilePermissions - The user does not have sufficient permissions for this file.
|
||||
```
|
||||
|
||||
### 6.79.04
|
||||
|
||||
Added options `filename <FileName>` and `movetoou <OrgUnitItem>` to `gam check ou <OrgUnitItem>`
|
||||
that causes GAM to create a batch file of GAM commands that will move any remaining items
|
||||
in `ou <OrgUnitItem>` to `movetoou <OrgUnitItem>`; executing the batch file will then allow
|
||||
`ou <OrgUnitItem>` to be deleted if desired.
|
||||
|
||||
### 6.79.03
|
||||
|
||||
Added column|field `assignedToUnknown` to `gam print|show admins` that will be True when
|
||||
the API `assignedTo` value can not be converted to an email address; it will be False when
|
||||
the email address is determinable.
|
||||
|
||||
### 6.79.02
|
||||
|
||||
Updated `gam print admins` to handle the following error that occurs when a service account admin no longer exists.
|
||||
```
|
||||
ERROR: 404: notFound - Requested entity was not found.
|
||||
```
|
||||
|
||||
### 6.79.01
|
||||
|
||||
Updated commands that take `<RoleItem>` as an argument to take the value in any case,
|
||||
e.g., _SEED_ADMIN_ROLE or _seed_admin_role.
|
||||
|
||||
### 6.79.00
|
||||
|
||||
Updated code to work around a Cryptography library change that caused service account private key creation to fail.
|
||||
|
||||
### 6.78.00
|
||||
|
||||
Added command to check if an OU contains items; this is useful when tryng to delete an OU
|
||||
as it must not contain any items in order to be deleted.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Organizational-Units#check-organizational-unit-for-contained-items
|
||||
|
||||
### 6.77.18
|
||||
|
||||
Added option `showitemcountonly` to `gam print domainaliases` that causes GAM to display the
|
||||
number of domain aliasess on stdout; no CSV file is written.
|
||||
|
||||
### 6.77.17
|
||||
|
||||
Added option `showitemcountonly` to `gam print domains` that causes GAM to display the
|
||||
number of domains on stdout; no CSV file is written.
|
||||
|
||||
### 6.77.16
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print filelist` that caused a trap.
|
||||
|
||||
### 6.77.15
|
||||
|
||||
Updated `gam calendars <CalendarEntity> import event icaluid <iCalUID> json <JSONdata>` to handle API
|
||||
constraints on recurring events.
|
||||
|
||||
### 6.77.14
|
||||
|
||||
Fixed bug in `gam calendars <CalendarEntity> import event icaluid <iCalUID> json <JSONdata>` that caused an error.
|
||||
|
||||
### 6.77.13
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show filecounts` to reflect that Shared Drives now
|
||||
have a capacity of 500000 files/folders/shortcuts.
|
||||
|
||||
|
||||
### 6.77.12
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print chatspaces todrive` that caused an error.
|
||||
|
||||
### 6.77.11
|
||||
|
||||
Added option `convertmbtogb` to `gam report usage customer|user` and
|
||||
`gam report customer|user` that causes GAM to convert parameters expressed in megabytes
|
||||
(name ends with _in_mb) to gigabytes (name converted to _in_gb) with two decimal places.
|
||||
|
||||
### 6.77.10
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> get profilephoto` where data written to stdout, e.g. `> filename`,
|
||||
was not properly base64 encoded.
|
||||
|
||||
### 6.77.09
|
||||
|
||||
Added option `usertokencounts` to `gam <UserTypeEntity> print|show tokens` that causes GAM to display
|
||||
each user and their number of access tokens; there are no details.
|
||||
|
||||
### 6.77.08
|
||||
|
||||
Fixed bugs in `gam <UserTypeEntity> delete chatmember <ChatSpace> ... group <GroupItem>`
|
||||
and `gam <UserTypeEntity> sync chatmember <ChatSpace> ... groups <GroupEntity>` that caused an error.
|
||||
|
||||
### 6.77.07
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> create chatmember <ChatSpace> ... group <GroupItem>` that caused an error.
|
||||
|
||||
### 6.77.06
|
||||
|
||||
Updated `gam update ou <OrgUnitItem> ... parent <OrgUnitItem>` to handle the following error
|
||||
that occurs when `parent <OrgUnitItem>` is the same as or a sub-OU of `ou <OrgUnitItem>`.
|
||||
```
|
||||
ERROR: 412: conditionNotMet - OrgUnit hierarchy has cycle
|
||||
```
|
||||
|
||||
### 6.77.05
|
||||
|
||||
Added option `onlyusers <UserTypeEntity>` to `gam <UserTypeEntity> claim ownership <DriveFileEntity>`
|
||||
that causes GAM to only claim ownership of files/folders owned by `onlyusers <UserTypeEntity>`.
|
||||
This option is multually exclusive with `skipusers <UserTypeEntity>`.
|
||||
|
||||
### 6.77.04
|
||||
|
||||
Fixed bug in `gam report users ... range <Date> <Date>` where an extraneous API call
|
||||
was made if a date was reached where no API data was available.
|
||||
|
||||
### 6.77.03
|
||||
|
||||
Thanks to jay, added the following Colab License SKUs:
|
||||
```
|
||||
1010500001 - Colab Pro
|
||||
1010500002 - Colab Pro+
|
||||
```
|
||||
|
||||
Thanks to Jay, updated `gam print|show admins` to properly display addresses
|
||||
of service accounts with admin role assignments.
|
||||
|
||||
Added option `limitdatechanges <Integer>` to `gam report users|customers`.
|
||||
|
||||
If no report is available for the specified date, can an earlier date be used?
|
||||
* `limitdatechanges -1' - Back up to earlier dates to find report data; this is the default.
|
||||
* `limitdatechanges 0 | nodatechange' - Do not report on an earlier date if no report data is available for the specified date.
|
||||
* `limitdatechanges N' - Back up to earlier dates to find report data; do not back up more than N times.
|
||||
|
||||
By default, when `gam report user user <UserItem>` is specified and no report data is available, there is no output.
|
||||
If `csv_output_users_audit = true` in `gam.cfg`, then a row with columns `email,date` will be displayed
|
||||
where `date` is the earliest date for which report data was requested.
|
||||
|
||||
### 6.77.02
|
||||
|
||||
Cleaned up problems with some of the new Chat API asadmin commands.
|
||||
Some remaining problems may require a Google fix.
|
||||
|
||||
### 6.77.01
|
||||
|
||||
Thanks to Jay, added column `verificationCodesCount` to `gam <UserTypeEntity> print backupcodes`
|
||||
that displays the number of available backup codes in addtion to the codes.
|
||||
|
||||
Added option `countsonly` that displays only the number of available backup codes but not the codes themselves.
|
||||
|
||||
Thanks to Jay, added option `nokey` to `gam create project` that creates a project with no service account key, `oauth2service.json`.
|
||||
|
||||
### 6.77.00
|
||||
|
||||
Added option `individualstudentassignments copy|delete|maptoall` to `gam create|update course ... copyfrom`
|
||||
that controls how individual student assignments in the `copyfrom` course are processed.
|
||||
* `individualstudentassignments copy` - Copy individual student assignments; this is the default. You will get an error if the student is not a member of the course.
|
||||
* `individualstudentassignments delete` - Delete individual student assignments
|
||||
* `individualstudentassignments maptoall` - Map individual student assignments to all student assignments
|
||||
|
||||
Upgraded to Python 3.12.4 where possible.
|
||||
|
||||
Added option `asadmin` to the following Chat commands that allows admin access.
|
||||
These commands are in Developer Preview, your project must have Developer Preview enabled for the Chat API
|
||||
in order to use these commands.
|
||||
```
|
||||
gam <UserItem> delete chatspace asadmin
|
||||
gam <UserItem> update chatspace asadmin
|
||||
gam <UserItem> info chatspace asadmin
|
||||
gam <UserItem> print|show chatspaces asadmin
|
||||
gam <UserItem> create chatmember asadmin
|
||||
gam <UserItem> delete|remove chatmember asadmin
|
||||
gam <UserItem> update|modify chatmember asadmin
|
||||
gam <UserItem> sync chatmembers asadmin
|
||||
gam <UserItem> info chatmember asadmin
|
||||
gam <UserItem> print|show chatmembers|asadmin
|
||||
```
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Chat#developer-preview-admin-access
|
||||
|
||||
Added `use_chat_admin_access` Boolean variable to `gam.cfg`.
|
||||
```
|
||||
* When False, GAM uses user access when making all Chat API calls. For calls that support admin access,
|
||||
this can be overridden with the asadmin command line option.
|
||||
* When True, GAM uses admin access for Chat API calls that support admin access; other calls will use user access.
|
||||
* Default: False
|
||||
```
|
||||
|
||||
### 6.76.15
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print|show filesharecounts summary only summaryuser <String>`
|
||||
that printed an erroneous row if `<UserTypeEntity>` specified a single user and `<String>` matched
|
||||
the user's email address.
|
||||
|
||||
### 6.76.14
|
||||
|
||||
Added the following Gemini License SKUs:
|
||||
```
|
||||
1010470004 - Gemini Education
|
||||
1010470005 - Gemini Education Premium
|
||||
```
|
||||
|
||||
### 6.76.13
|
||||
|
||||
Updated `gam <UserTypeEntity> show fileinfo ... showlabels` and `gam <UserTypeEntity> print filelist ... showlabels`
|
||||
to retry these errors that occur when trying to get the drive labels for a file/folder.
|
||||
```
|
||||
ERROR: 500: unknownError - Unknown Error.
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
```
|
||||
|
||||
Upgraded to OpenSSL 3.3.1 where possible.
|
||||
|
||||
### 6.76.12
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print|show chatspaces` that caused the following error:
|
||||
```
|
||||
ERROR: Got an unexpected keyword argument orderBy
|
||||
```
|
||||
|
||||
### 6.76.11
|
||||
|
||||
Thanks to Jay, added `gam report vault`.
|
||||
|
||||
Thanks to Jay, added the following Gemini SKUs:
|
||||
```
|
||||
1010470006 - AI Security
|
||||
1010470007 - AI Meetings and Messaging
|
||||
```
|
||||
|
||||
Updated `gam <UserTypeEntity> print filelist ... showshareddrivepermissions` to display
|
||||
progress messages to stderr as a separate API call must be made for every file/folder on the Shared Drive
|
||||
to get its permissions. As this can take a long time, the progress messages indicate that progress is being made.
|
||||
|
||||
### 6.76.10
|
||||
|
||||
Added `fromgmail` to `<EventType>` that can be used in `gam calendars <CalendarEntity> print|show events ... eventtype fromgmail`.
|
||||
|
||||
* See: https://workspaceupdates.googleblog.com/2024/05/google-calendar-api-event-type-fromgmail.html
|
||||
|
||||
### 6.76.09
|
||||
|
||||
@@ -4716,7 +5207,7 @@ converting `<SMTPDateHeader>` values to the `gam.cfg timezone`.
|
||||
|
||||
Updated option `dateheaderformat iso|rfc2822|<String>` to `gam <UserTypeEntity> print|show messages|threads` that allows
|
||||
reformatting of the message `Date` header value from RFC2822 format to the the following:
|
||||
* `iso` - Format is `%Y-%m-%dT%H:%M:%S%z`
|
||||
* `iso` - Format is `%Y-%m-%dT%H:%M:%S%:z`
|
||||
* `rfc2822` - Format is `%a, %d %b %Y %H:%M:%S %z`
|
||||
* `<String>` - Format according to: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes
|
||||
|
||||
|
||||
@@ -136,6 +136,11 @@ gam update group|groups <GroupEntity> create|add [<GroupRole>]
|
||||
[preview] [actioncsv]
|
||||
<UserItem>|<UserTypeEntity>
|
||||
```
|
||||
To add a group as a memmber of another group, just specify its email address.
|
||||
```
|
||||
gam update group group1@domain.com add member group2@domain.com
|
||||
```
|
||||
|
||||
When `<UserTypeEntity>` specifies a group or groups:
|
||||
* `usersonly` - Only the user members from the specified groups are added
|
||||
* `groupsonly` - Only the group members from the specified groups are added
|
||||
@@ -187,6 +192,11 @@ gam update group|groups <GroupEntity> delete|remove [<GroupRole>]
|
||||
```
|
||||
`<GroupRole>` is ignored, deletions take place regardless of role.
|
||||
|
||||
To remove a group as a memmber of another group, just specify its email address.
|
||||
```
|
||||
gam update group group1@domain.com remove group2@domain.com
|
||||
```
|
||||
|
||||
When `<UserTypeEntity>` specifies a group or groups:
|
||||
* `usersonly` - Only the user members from the specified groups are deleted
|
||||
* `groupsonly` - Only the group members from the specified groups are deleted
|
||||
@@ -279,6 +289,7 @@ If `actioncsv` is specified, a CSV file with columns `group,email,role,action,me
|
||||
that shows the actions performed when updating the group.
|
||||
|
||||
The option `additionalmembers [<GroupRole>] <EmailAddressEntity>` can be used to specify members in addition to those specified with `<UserTypeEntity>`.
|
||||
If a <GroupRole> is specified, it must match the same role as the one used for the group sync.
|
||||
|
||||
For example,
|
||||
```
|
||||
@@ -304,10 +315,10 @@ seniors@domain.org,/Students/ClassOf2023
|
||||
juniors@domain.org,/Students/ClassOf2024
|
||||
...
|
||||
```
|
||||
This allows you to do: `gam csv GradeOU.csv gam update group ~Grade sync members ou ~OU`
|
||||
This allows you to do: `gam csv GradeOU.csv gam update group "~Grade" sync members ou "~OU"`
|
||||
But suppose that at each grade level there are additional group members that are groups of faculty/staff; e.g., senioradvisors@domain.org.
|
||||
In this scenario, you can't do the `update group sync` command as the members that are groups will be deleted; the `usersonly` option allows
|
||||
the `update group sync` command to work: `gam csv GradeOU.csv gam update group ~Grade sync members usersonly ou ~OU`
|
||||
the `update group sync` command to work: `gam csv GradeOU.csv gam update group "~Grade" sync members usersonly ou "~OU"`
|
||||
The users from the OU are matched against the user members of the group and adds/deletes are done as necessary to synchronize them;
|
||||
the group members of the group are unaffected.
|
||||
|
||||
@@ -586,6 +597,7 @@ gam print group-members [todrive <ToDriveAttribute>*]
|
||||
[types <GroupTypeList>]
|
||||
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
|
||||
[userfields <UserFieldNameList>]
|
||||
[allschemas|(schemas|custom|customschemas <SchemaNameList>)]
|
||||
[(recursive [noduplicates])|includederivedmembership] [nogroupemail]
|
||||
[peoplelookup|(peoplelookupuser <EmailAddress>)]
|
||||
[unknownname <String>] [cachememberinfo [Boolean]]
|
||||
@@ -650,7 +662,10 @@ these options specify which fields to display:
|
||||
* `<MembersFieldName>*` - Individual field names
|
||||
* `fields <MembersFieldNameList>` - A comma separated list of field names
|
||||
* `delivery|deliverysettings` - Specify this field to get delivery information; an additional API call per member is required
|
||||
* `userfields <UserFieldNameList>` - For members that are users, display these user fields; an additional API call per member is required
|
||||
|
||||
For members that are users, you can specify additional information to display; an additional API call per member is required
|
||||
* `userfields <UserFieldNameList>` - Display specific user fields
|
||||
* `allschemas|(schemas|custom|customschemas <SchemaNameList>)` - Display all or specific custom schema values
|
||||
|
||||
The additional API calls can be reduced with the `cachememberinfo` option; a single API call is made for each user/group
|
||||
and the data is cached to eliminate to need to repeat the API call; this consumes more memory but dramatically reduces the number of API calls.
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
- [Definitions](#definitions)
|
||||
- [GUI API Group settings mapping](#gui-api-group-settings-mapping)
|
||||
- [GUI API Group access type settings mapping](#gui-api-group-access-type-settings-mapping)
|
||||
- [whoCanViewMembership and whoCanDiscoverGroup interactions](#whocanviewmembership-and-whocandiscovergroup-interactions)
|
||||
- [Manage groups](#manage-groups)
|
||||
- [Update a group's settings with JSON data](#update-a-groups-settings-with-json-data)
|
||||
- [Display information about specific groups](#display-information-about-specific-groups)
|
||||
@@ -303,6 +304,46 @@ Restricted
|
||||
whoCanViewMembership ALL_MEMBERS_CAN_VIEW
|
||||
```
|
||||
|
||||
## whoCanViewMembership and whoCanDiscoverGroup interactions
|
||||
Some combinations of these two settings are not allowed:
|
||||
```
|
||||
gam update group group@domain.com whoCanViewMembership ALL_IN_DOMAIN_CAN_VIEW whoCanDiscoverGroup ANYONE_CAN_DISCOVER
|
||||
Group: group@domain.com, Updated
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_OWNERS_CAN_VIEW whoCanDiscoverGroup ANYONE_CAN_DISCOVER
|
||||
Group: group@domain.com, Update Failed: Failed request validation in update settings: DONT_USE_OR_ELSE_WHO_CAN_MANAGE_MEMBERS_CANNOT_BE_BROADER_THAN_WHO_CAN_VIEW_MEMBERSHIP
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_MANAGERS_CAN_VIEW whoCanDiscoverGroup ANYONE_CAN_DISCOVER
|
||||
Group: group@domain.com, Updated
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_MEMBERS_CAN_VIEW whoCanDiscoverGroup ANYONE_CAN_DISCOVER
|
||||
Group: group@domain.com, Updated
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_IN_DOMAIN_CAN_VIEW whoCanDiscoverGroup ALL_IN_DOMAIN_CAN_DISCOVER
|
||||
Group: group@domain.com, Updated
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_OWNERS_CAN_VIEW whoCanDiscoverGroup ALL_IN_DOMAIN_CAN_DISCOVER
|
||||
Group: group@domain.com, Update Failed: Failed request validation in update settings: DONT_USE_OR_ELSE_WHO_CAN_MANAGE_MEMBERS_CANNOT_BE_BROADER_THAN_WHO_CAN_VIEW_MEMBERSHIP
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_MANAGERS_CAN_VIEW whoCanDiscoverGroup ALL_IN_DOMAIN_CAN_DISCOVER
|
||||
Group: group@domain.com, Updated
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_MEMBERS_CAN_VIEW whoCanDiscoverGroup ALL_IN_DOMAIN_CAN_DISCOVER
|
||||
Group: group@domain.com, Updated
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_IN_DOMAIN_CAN_VIEW whoCanDiscoverGroup ALL_MEMBERS_CAN_DISCOVER
|
||||
Group: group@domain.com, Update Failed: Failed request validation in update settings: WHO_CAN_VIEW_MEMBERSHIP_CANNOT_BE_BROADER_THAN_WHO_CAN_SEE_GROUP
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_OWNERS_CAN_VIEW whoCanDiscoverGroup ALL_MEMBERS_CAN_DISCOVER
|
||||
Group: group@domain.com, Update Failed: Failed request validation in update settings: DONT_USE_OR_ELSE_WHO_CAN_MANAGE_MEMBERS_CANNOT_BE_BROADER_THAN_WHO_CAN_VIEW_MEMBERSHIP
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_MANAGERS_CAN_VIEW whoCanDiscoverGroup ALL_MEMBERS_CAN_DISCOVER
|
||||
Group: group@domain.com, Updated
|
||||
|
||||
gam update group group@domain.com whoCanViewMembership ALL_MEMBERS_CAN_VIEW whoCanDiscoverGroup ALL_MEMBERS_CAN_DISCOVER
|
||||
Group: group@domain.com, Updated
|
||||
```
|
||||
|
||||
## Manage groups
|
||||
|
||||
These commands allow you to create, update and delete groups.
|
||||
@@ -343,7 +384,7 @@ Getting Group Settings for testgroup4@domain.com (4/4)
|
||||
```
|
||||
Perform your experiments and then restore the original settings.
|
||||
```
|
||||
$ gam csv ./groups.csv quotechar "'" gam update group ~email json ~JSON-settings
|
||||
$ gam csv ./groups.csv quotechar "'" gam update group "~email" json "~JSON-settings"
|
||||
Using 4 processes...
|
||||
Group: testgroup1@domain.com, Updated
|
||||
Group: testgroup2@domain.com, Updated
|
||||
@@ -543,7 +584,7 @@ gam print grouptree <GroupEntity> [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
By default, the group parent emails and names are displayed in multiple indexed columns.
|
||||
Use options `showparentsaslist [<Boolean>]` and `delimiter <Character>` to display
|
||||
the group parent emails and names in two columns as delimited lists .
|
||||
the group parent emails and names in two columns as delimited lists.
|
||||
|
||||
#### Examples
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ To run all commands properly, GAMADV-XTD3 requires three things:
|
||||
Use these steps if you have never used any version of GAM in your domain. They will create a GAM project
|
||||
and all necessary authentications.
|
||||
|
||||
* Download: [Downloads](Downloads)
|
||||
* Download: [Downloads-Installs](Downloads-Installs)
|
||||
* Configuration: [GAM Configuration](gam.cfg)
|
||||
* Install: [How to Install Advanced GAM](How-to-Install-Advanced-GAM)
|
||||
|
||||
@@ -47,7 +47,7 @@ and all necessary authentications.
|
||||
Use these steps if you have used any version of GAM in your domain. They will update your GAM project
|
||||
and all necessary authentications.
|
||||
|
||||
* Download: [Downloads](Downloads)
|
||||
* Download: [Downloads-Installs](Downloads-Installs)
|
||||
* Configuration: [GAM Configuration](gam.cfg)
|
||||
* Upgrade: [How to Upgrade from Standard GAM](How-to-Upgrade-from-Standard-GAM)
|
||||
|
||||
@@ -56,7 +56,7 @@ Use these steps if you already use GAMADV-X or GAMADV-XTD or GAMADV-XTD3. The up
|
||||
or authentications because new features have been included.
|
||||
|
||||
* Updates: [GAM Updates]
|
||||
* Download: [Downloads](Downloads)
|
||||
* Download: [Downloads-Installs](Downloads-Installs)
|
||||
|
||||
You can install multiple versions of GAM and GAMADV-XTD3 in different parallel directories.
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
Use these steps if you have never used any version of GAM in your domain. They will create your GAM project
|
||||
and all necessary authentications.
|
||||
|
||||
- [Downloads](Downloads)
|
||||
- [GAM Configuration](gam.cfg)
|
||||
- [Downloads-Installs](Downloads-Installs)
|
||||
- [Linux and MacOS and Google Cloud Shell](#linux-and-mac-os-and-google-cloud-shell)
|
||||
- [Windows](#windows)
|
||||
- [GAM Configuration](gam.cfg)
|
||||
|
||||
## Linux and MacOS and Google Cloud Shell
|
||||
|
||||
@@ -25,6 +25,11 @@ probably want to select a non-hidden location. This example assumes that the GAM
|
||||
configuration directory will be /Users/admin/GAMConfig; If you've chosen another directory,
|
||||
substitute that value in the directions.
|
||||
|
||||
Make the directory:
|
||||
```
|
||||
mkdir -p /Users/admin/GAMConfig
|
||||
```
|
||||
|
||||
Add the following line:
|
||||
```
|
||||
export GAMCFGDIR="/Users/admin/GAMConfig"
|
||||
@@ -37,14 +42,7 @@ to one of these files based on your shell:
|
||||
~/.profile
|
||||
```
|
||||
|
||||
You need to enable this setting in the environment. The easiest way is probably to close your terminal and open a new session. This will load the environment variables, including the one you just added. Test this by issuing this command:
|
||||
```
|
||||
echo $GAMCFGDIR
|
||||
```
|
||||
|
||||
This should print the name of the directory you used above.
|
||||
|
||||
Alternatively, without starting a new session, load the new variable in this session directly: issue the following command replacing `<Filename>` with the name of the file you edited:
|
||||
Issue the following command replacing `<Filename>` with the name of the file you edited:
|
||||
```
|
||||
source <Filename>
|
||||
```
|
||||
@@ -54,11 +52,6 @@ You need to make sure the GAM configuration directory actually exists. Test that
|
||||
ls -l $GAMCFGDIR
|
||||
```
|
||||
|
||||
If this gives you an error, make the directory:
|
||||
```
|
||||
mkdir -p $GAMCFGDIR
|
||||
```
|
||||
|
||||
### Set a working directory
|
||||
|
||||
You should establish a GAM working directory; you will store your GAM related
|
||||
@@ -66,7 +59,11 @@ data in this folder and execute GAM commands from this folder. You should not us
|
||||
/Users/admin/bin/gamadv-xtd3 or /Users/admin/GAMConfig for this purpose.
|
||||
This example assumes that the GAM working directory will be /Users/admin/GAMWork; If you've chosen
|
||||
another directory, substitute that value in the directions.
|
||||
* Make the /Users/admin/GAMWork directory before proceeding.
|
||||
|
||||
Make the directory:
|
||||
```
|
||||
mkdir -p /Users/admin/GAMWork
|
||||
```
|
||||
|
||||
### Set an alias
|
||||
You should set an alias to point to /Users/admin/bin/gamadv-xtd3/gam so you can operate from the /Users/admin/GAMWork directory.
|
||||
@@ -98,31 +95,33 @@ ln -s "/Users/admin/bin/gamadv-xtd3/gam" /usr/local/bin/gam
|
||||
|
||||
### Initialize GAMADV-XTD3; this should be the first GAMADV-XTD3 command executed.
|
||||
```
|
||||
admin@server:~$ cd /Users/admin/bin/gamadv-xtd3
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam config drive_dir /Users/admin/GAMWork verify
|
||||
admin@server:/Users/admin$ gam config drive_dir /Users/admin/GAMWork verify
|
||||
Created: /Users/admin/GAMConfig
|
||||
Created: /Users/admin/GAMConfig/gamcache
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Initialized
|
||||
Section: DEFAULT
|
||||
activity_max_results = 100
|
||||
...
|
||||
[long list of all config settings that should match the directories you specified]
|
||||
cache_dir = /Users/admin/GAMConfig/gamcache
|
||||
...
|
||||
config_dir = /Users/admin/GAMConfig
|
||||
...
|
||||
drive_dir = /Users/admin/GAMWork
|
||||
...
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Verify initialization, this was a successful installation.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ls -l $GAMCFGDIR
|
||||
admin@server:/Users/admin$ ls -l $GAMCFGDIR
|
||||
total 48
|
||||
-rw-r-----+ 1 admin staff 1069 Mar 3 09:23 gam.cfg
|
||||
drwxr-x---+ 2 admin staff 68 Mar 3 09:23 gamcache
|
||||
-rw-rw-rw-+ 1 admin staff 0 Mar 3 09:23 oauth2.txt.lock
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Create your project with local browser
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ gam create project
|
||||
admin@server:/Users/admin$ gam create project
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Item: client_secrets_json, Value: /Users/admin/GAMConfig/client_secrets.json, Not Found
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Item: oauth2service_json, Value: /Users/admin/GAMConfig/oauth2service.json, Not Found
|
||||
|
||||
@@ -186,12 +185,12 @@ Enter your Client Secret: CLIENTSECRET
|
||||
6. Go back to your browser and click OK to close the "OAuth client" popup if it's still open.
|
||||
That's it! Your GAM Project is created and ready to use.
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Create your project without local browser (Google Cloud Shell for instance)
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ gam config no_browser true save
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ gam create project
|
||||
admin@server:/Users/admin$ gam config no_browser true save
|
||||
admin@server:/Users/admin$ gam create project
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Item: client_secrets_json, Value: /Users/admin/GAMConfig/client_secrets.json, Not Found
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Item: oauth2service_json, Value: /Users/admin/GAMConfig/oauth2service.json, Not Found
|
||||
|
||||
@@ -254,7 +253,7 @@ Enter your Client Secret: CLIENTSECRET
|
||||
6. Go back to your browser and click OK to close the "OAuth client" popup if it's still open.
|
||||
That's it! Your GAM Project is created and ready to use.
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Enable GAMADV-XTD3 client access
|
||||
|
||||
@@ -262,7 +261,7 @@ You select a list of scopes, GAM uses a browser to get final authorization from
|
||||
writes the credentials into the file oauth2.txt.
|
||||
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam oauth create
|
||||
admin@server:/Users/admin$ gam oauth create
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
@@ -343,14 +342,14 @@ Enter verification code or paste "Unable to connect" URL from other computer (on
|
||||
The authentication flow has completed.
|
||||
Client OAuth2 File: /Users/admin/GAMConfig/oauth2.txt, Created
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
|
||||
If clicking on the link in the instructions does not work (i.e. you get a 404 or 400 error message, instead of something about 'unable to connect') the URL in the link is too long. Most likely, you have selected all scopes. Try again with fewer scopes until it works. (there is no harm in repeatedly trying)
|
||||
|
||||
### Enable GAMADV-XTD3 service account access.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam user admin@domain.com check serviceaccount
|
||||
admin@server:/Users/admin$ gam user admin@domain.com check serviceaccount
|
||||
$ gam user admin@domain.com check serviceaccount
|
||||
System time status
|
||||
Your system time differs from www.googleapis.com by less than 1 second PASS
|
||||
@@ -405,7 +404,7 @@ 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.
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
The link shown in the error message should take you directly to the authorization screen.
|
||||
If not, make sure that you are logged in as a domain admin, then re-enter the link.
|
||||
@@ -415,7 +414,7 @@ If not, make sure that you are logged in as a domain admin, then re-enter the li
|
||||
Wait a moment and then perform the following command; it it still fails, wait a bit longer, it can sometimes take serveral minutes
|
||||
for the authorization to complete.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam user admin@domain.com check serviceaccount
|
||||
admin@server:/Users/admin$ gam user admin@domain.com check serviceaccount
|
||||
System time status:
|
||||
Your system time differs from www.googleapis.com by less than 1 second PASS
|
||||
Service Account Private Key Authentication:
|
||||
@@ -459,14 +458,14 @@ All scopes PASSED!
|
||||
|
||||
Service Account Client name: SVCACCTID is fully authorized.
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Update gam.cfg with some basic values
|
||||
* `customer_id` - Having this data keeps Gam from having to make extra API calls
|
||||
* `domain` - This allows you to omit the domain portion of email addresses
|
||||
* `timezone local` - Gam will convert all UTC times to your local timezone
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam info domain
|
||||
admin@server:/Users/admin$ gam info domain
|
||||
Customer ID: C01234567
|
||||
Primary Domain: domain.com
|
||||
Customer Creation Time: 2007-06-06T15:47:55.444Z
|
||||
@@ -474,15 +473,18 @@ Primary Domain Verified: True
|
||||
Default Language: en
|
||||
...
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam config customer_id C01234567 domain domain.com timezone local save verify
|
||||
admin@server:/Users/admin$ gam config customer_id C01234567 domain domain.com timezone local save verify
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Saved
|
||||
Section: DEFAULT
|
||||
activity_max_results = 100
|
||||
...
|
||||
[long list of all config settings that should match the data you specified]
|
||||
customer_id = C01234567
|
||||
...
|
||||
domain = domain.com
|
||||
...
|
||||
timezone = local
|
||||
...
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
|
||||
## Windows
|
||||
@@ -538,22 +540,24 @@ At this point, you should restart Command Prompt so that it has the updated path
|
||||
|
||||
### Initialize GAMADV-XTD3; this should be the first GAMADV-XTD3 command executed.
|
||||
```
|
||||
C:>cd C:\GAMADV-XTD3
|
||||
C:\GAMADV-XTD3>gam config drive_dir C:\GAMWork verify
|
||||
C:\>gam config drive_dir C:\GAMWork verify
|
||||
Created: C:\GAMConfig
|
||||
Created: C:\GAMConfig\gamcache
|
||||
Config File: C:\GAMConfig\gam.cfg, Initialized
|
||||
Section: DEFAULT
|
||||
activity_max_results = 100
|
||||
...
|
||||
[long list of all config settings that should match the directories you specified]
|
||||
cache_dir = C:\GAMConfig\gamcache
|
||||
...
|
||||
config_dir = C:\GAMConfig
|
||||
...
|
||||
drive_dir = C:\GAMWork
|
||||
...
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Verify initialization, this was a successful installation.
|
||||
```
|
||||
C:\GAMADV-XTD3>dir %GAMCFGDIR%
|
||||
C:\>dir %GAMCFGDIR%
|
||||
Volume in drive C has no label.
|
||||
Volume Serial Number is 663F-DA8B
|
||||
|
||||
@@ -566,12 +570,12 @@ C:\GAMADV-XTD3>dir %GAMCFGDIR%
|
||||
03/03/2017 10:15 AM 0 oauth2.txt.lock
|
||||
2 File(s) 15,769 bytes
|
||||
3 Dir(s) 110,532,562,944 bytes free
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
|
||||
### Create your project with local browser
|
||||
```
|
||||
C:\GAMADV-XTD3>gam create project
|
||||
C:\>gam create project
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Item: client_secrets_json, Value: C:\GAMConfig\client_secrets.json, Not Found
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Item: oauth2service_json, Value: C:\GAMConfig\oauth2service.json, Not Found
|
||||
|
||||
@@ -635,12 +639,12 @@ Enter your Client Secret: CLIENTSECRET
|
||||
6. Go back to your browser and click OK to close the "OAuth client" popup if it's still open.
|
||||
That's it! Your GAM Project is created and ready to use.
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Create your project without local browser (headless server for instance)
|
||||
```
|
||||
C:\GAMADV-XTD3>gam config no_browser true save
|
||||
C:\GAMADV-XTD3>gam create project
|
||||
C:\>gam config no_browser true save
|
||||
C:\>gam create project
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Item: client_secrets_json, Value: C:\GAMConfig\client_secrets.json, Not Found
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Item: oauth2service_json, Value: C:\GAMConfig\oauth2service.json, Not Found
|
||||
|
||||
@@ -703,7 +707,7 @@ Enter your Client Secret: CLIENTSECRET
|
||||
6. Go back to your browser and click OK to close the "OAuth client" popup if it's still open.
|
||||
That's it! Your GAM Project is created and ready to use.
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Enable GAMADV-XTD3 client access
|
||||
|
||||
@@ -711,7 +715,7 @@ You select a list of scopes, GAM uses a browser to get final authorization from
|
||||
writes the credentials into the file oauth2.txt.
|
||||
|
||||
```
|
||||
C:\GAMADV-XTD3>gam oauth create
|
||||
C:\>gam oauth create
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
@@ -792,11 +796,11 @@ Enter verification code or paste "Unable to connect" URL from other computer (on
|
||||
The authentication flow has completed.
|
||||
Client OAuth2 File: C:\GAMConfig\oauth2.txt, Created
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Enable GAMADV-XTD3 service account access.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam user admin@domain.com check serviceaccount
|
||||
C:\>gam user admin@domain.com check serviceaccount
|
||||
System time status
|
||||
Your system time differs from www.googleapis.com by less than 1 second PASS
|
||||
Service Account Private Key Authentication
|
||||
@@ -850,7 +854,7 @@ 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.
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
The link shown in the error message should take you directly to the authorization screen.
|
||||
If not, make sure that you are logged in as a domain admin, then re-enter the link.
|
||||
@@ -860,7 +864,7 @@ If not, make sure that you are logged in as a domain admin, then re-enter the li
|
||||
Wait a moment and then perform the following command; it it still fails, wait a bit longer, it can sometimes take serveral minutes
|
||||
for the authorization to complete.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam user admin@domain.com check serviceaccount
|
||||
C:\>gam user admin@domain.com check serviceaccount
|
||||
System time status:
|
||||
Your system time differs from www.googleapis.com by less than 1 second PASS
|
||||
Service Account Private Key Authentication:
|
||||
@@ -904,14 +908,14 @@ All scopes PASSED!
|
||||
|
||||
Service Account Client name: SVCACCTID is fully authorized.
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Update gam.cfg with some basic values
|
||||
* `customer_id` - Having this data keeps Gam from having to make extra API calls
|
||||
* `domain` - This allows you to omit the domain portion of email addresses
|
||||
* `timezone local` - Gam will convert all UTC times to your local timezone
|
||||
```
|
||||
C:\GAMADV-XTD3>gam info domain
|
||||
C:\>gam info domain
|
||||
Customer ID: C01234567
|
||||
Primary Domain: domain.com
|
||||
Customer Creation Time: 2007-06-06T15:47:55.444Z
|
||||
@@ -919,13 +923,16 @@ Primary Domain Verified: True
|
||||
Default Language: en
|
||||
...
|
||||
|
||||
C:\GAMADV-XTD3>gam config customer_id C01234567 domain domain.com timezone local save verify
|
||||
C:\>gam config customer_id C01234567 domain domain.com timezone local save verify
|
||||
Config File: C:\GAMConfig\gam.cfg, Saved
|
||||
Section: DEFAULT
|
||||
activity_max_results = 100
|
||||
...
|
||||
[long list of all config settings that should match the directories you specified]
|
||||
customer_id = C01234567
|
||||
...
|
||||
domain = domain.com
|
||||
...
|
||||
timezone = local
|
||||
...
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Updating GAMADV-XTD3
|
||||
Use these steps to update your version of GAMADV-XTD3.
|
||||
|
||||
- [Downloads](Downloads)
|
||||
- [GAM Configuration](gam.cfg)
|
||||
- [Downloads-Installs](Downloads-Installs)
|
||||
- [Linux and MacOS and Google Cloud Shell](#linux-and-mac-os-and-google-cloud-shell)
|
||||
- [Windows](#windows)
|
||||
- [GAM Configuration](gam.cfg)
|
||||
|
||||
## Linux and MacOS and Google Cloud Shell
|
||||
|
||||
@@ -13,7 +13,7 @@ Use these steps to update your version of GAMADV-XTD3.
|
||||
This example assumes that GAMADV-XTD3 has been installed in /Users/admin/bin/gamadv-xtd3.
|
||||
If you've installed GAMADV-XTD3 in another directory, substitute that value in the directions when downloading.
|
||||
|
||||
See: [Downloads](Downloads)
|
||||
See: [Downloads-Installs](Downloads-Installs)
|
||||
|
||||
In these examples, your Google Super admin is shown as admin@domain.com; replace with the
|
||||
actual email adddress.
|
||||
@@ -301,7 +301,7 @@ admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
This example assumes that GAMADV-XTD3 has been installed in C:\GAMADV-XTD3.
|
||||
If you've installed GAMADV-XTD3 in another directory, substitute that value in the directions when downloading.
|
||||
|
||||
See: [Downloads](Downloads)
|
||||
See: [Downloads-Installs](Downloads-Installs)
|
||||
|
||||
In these examples, your Google Super admin is shown as admin@domain.com; replace with the
|
||||
actual email adddress.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
Use these steps if you have used any version of GAMADV-X or GAMADV-XTD in your domain.
|
||||
They will update your GAM project and all necessary authentications.
|
||||
|
||||
- [Downloads](Downloads)
|
||||
- [GAM Configuration](gam.cfg)
|
||||
- [Downloads-Installs](Downloads-Installs)
|
||||
- [Linux and MacOS and Google Cloud Shell](#linux-and-mac-os-and-google-cloud-shell)
|
||||
- [Windows](#windows)
|
||||
- [GAM Configuration](gam.cfg)
|
||||
|
||||
## Linux and MacOS and Google Cloud Shell
|
||||
|
||||
@@ -23,29 +23,32 @@ GAMADV-XTD3 uses the same configuration directory and gam.cfg file as GAMADV-X a
|
||||
### Update your alias
|
||||
You should update your alias to point to /Users/admin/bin/gamadv-xtd3/gam.
|
||||
|
||||
Add the following line:
|
||||
Add/edit the following line:
|
||||
```
|
||||
alias gam="/Users/admin/bin/gamadv-xtd3/gam"
|
||||
```
|
||||
to one of these files if you're running bash or an equivalent file if you're running some other shell:
|
||||
to one of these files based on your shell:
|
||||
```
|
||||
~/.bash_aliases
|
||||
~/.bash_profile
|
||||
~/.bashrc
|
||||
~/.zshrc
|
||||
~/.profile
|
||||
```
|
||||
|
||||
If you already have a gam alias for standard GAM and want to run it and GAMADV-XTD3, give your new alias a different name:
|
||||
Issue the following command replacing `<Filename>` with the name of the file you edited:
|
||||
```
|
||||
alias gam3="/Users/admin/bin/gamadv-xtd3/gam"
|
||||
source <Filename>
|
||||
```
|
||||
|
||||
### Do you have a browser?
|
||||
If your computer doesn't support a browser, Google Cloud Shell for instance, execute this command:
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ gam config no_browser true save
|
||||
admin@server:/Users/admin$ gam config no_browser true save
|
||||
```
|
||||
### Update your project to include the additional APIs that GAMADV-XTD3 uses.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ gam update project
|
||||
admin@server:/Users/admin$ gam update project
|
||||
|
||||
Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com
|
||||
|
||||
@@ -75,7 +78,7 @@ Enable 3 APIs
|
||||
API: groupsmigration.googleapis.com, Enabled (2/3)
|
||||
API: sheets.googleapis.com, Enabled (3/3)
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Update GAMADV-XTD3 client access.
|
||||
|
||||
@@ -90,7 +93,7 @@ gam config no_browser true oauth update
|
||||
```
|
||||
You will be given instructions on how to get the authorization on another computer and apply it locally.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam oauth update
|
||||
admin@server:/Users/admin$ 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.
|
||||
@@ -165,11 +168,11 @@ set no_browser = true in gam.cfg and re-run this command.
|
||||
Authentication successful.
|
||||
Client OAuth2 File: /Users/admin/GAMConfig/oauth2.txt, Updated
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Update GAMADV-XTD3 service account access.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam user user@domain.com check serviceaccount
|
||||
admin@server:/Users/admin$ gam user user@domain.com check serviceaccount
|
||||
System time status:
|
||||
Your system time differs by less than 1 second from Google PASS
|
||||
Service Account Private Key Authentication:
|
||||
@@ -218,7 +221,7 @@ Scopes fields will be pre-populated. Please click Authorize to allow these
|
||||
scopes access. After authorizing it may take some time for this test to pass so
|
||||
wait a few moments and then try this command again.
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
The link shown in the error message should take you directly to the authorization screen.
|
||||
If not, make sure that you are logged in as a domain admin, then re-enter the link.
|
||||
@@ -228,7 +231,7 @@ If not, make sure that you are logged in as a domain admin, then re-enter the li
|
||||
Wait a moment and then perform the following command; it it still fails, wait a bit longer, it can sometimes take serveral minutes
|
||||
for the authorization to complete.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam user user@domain.com check serviceaccount
|
||||
admin@server:/Users/admin$ gam user user@domain.com check serviceaccount
|
||||
System time status:
|
||||
Your system time differs by less than 1 second from Google PASS
|
||||
Service Account Private Key Authentication:
|
||||
@@ -271,7 +274,7 @@ Domain-wide Delegation authentication:, User: admin@domain.com, Scopes: 34
|
||||
All scopes PASSED!
|
||||
Service Account Client name: SVCACCTID is fully authorized.
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
|
||||
## Windows
|
||||
@@ -305,15 +308,17 @@ Click OK
|
||||
Exit Control Panel
|
||||
```
|
||||
|
||||
At this point, you should restart Command Prompt so that it has the updated path and environment variables.
|
||||
|
||||
### Do you have a compatible browser?
|
||||
If the computer on which you are running GAM does not have access to a browser or
|
||||
your default browser is Internet Explorer or Edge, issue this command:
|
||||
```
|
||||
C:\GAMADV-X>gam config no_browser true save
|
||||
C:\>gam config no_browser true save
|
||||
```
|
||||
### Update your project to include the additional APIs that GAMADV-XTD3 uses.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam update project
|
||||
C:\>gam update project
|
||||
|
||||
Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com
|
||||
|
||||
@@ -343,7 +348,7 @@ Enable 3 APIs
|
||||
API: groupsmigration.googleapis.com, Enabled (2/3)
|
||||
API: sheets.googleapis.com, Enabled (3/3)
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Update GAMADV-XTD3 client access.
|
||||
|
||||
@@ -361,7 +366,7 @@ You can open the file with Notepad/Wordpad, do a control-A to select the text, c
|
||||
start a browser and paste the URL (control-V) into the address bar. Authenticate and copy the Verification code
|
||||
back to your Command Prompt/PowerShell window.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam oauth update
|
||||
C:\>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.
|
||||
@@ -436,11 +441,11 @@ set no_browser = true in gam.cfg and re-run this command.
|
||||
Authentication successful.
|
||||
Client OAuth2 File: C:\GAMConfig\oauth2.txt, Updated
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Enable GAMADV-XTD3 service account access.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam user user@domain.com check serviceaccount
|
||||
C:\>gam user user@domain.com check serviceaccount
|
||||
System time status:
|
||||
Your system time differs by less than 1 second from Google PASS
|
||||
Service Account Private Key Authentication:
|
||||
@@ -489,7 +494,7 @@ Scopes fields will be pre-populated. Please click Authorize to allow these
|
||||
scopes access. After authorizing it may take some time for this test to pass so
|
||||
wait a few moments and then try this command again.
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
The link shown in the error message should take you directly to the authorization screen.
|
||||
If not, make sure that you are logged in as a domain admin, then re-enter the link.
|
||||
@@ -499,7 +504,7 @@ If not, make sure that you are logged in as a domain admin, then re-enter the li
|
||||
Wait a moment and then perform the following command; it it still fails, wait a bit longer, it can sometimes take serveral minutes
|
||||
for the authorization to complete.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam user user@domain.com check serviceaccount
|
||||
C:\>gam user user@domain.com check serviceaccount
|
||||
System time status:
|
||||
Your system time differs by less than 1 second from Google PASS
|
||||
Service Account Private Key Authentication:
|
||||
@@ -542,5 +547,5 @@ Domain-wide Delegation authentication:, User: admin@domain.com, Scopes: 34
|
||||
All scopes PASSED!
|
||||
Service Account Client name: SVCACCTID is fully authorized.
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
Use these steps if you have used any version of GAM in your domain. They will update your GAM project
|
||||
and all necessary authentications.
|
||||
|
||||
- [Downloads](Downloads)
|
||||
- [GAM Configuration](gam.cfg)
|
||||
- [Downloads-Installs](Downloads-Installs)
|
||||
- [Linux and MacOS and Google Cloud Shell](#linux-and-mac-os-and-google-cloud-shell)
|
||||
- [Windows](#windows)
|
||||
- [GAM Configuration](gam.cfg)
|
||||
|
||||
## Linux and MacOS and Google Cloud Shell
|
||||
|
||||
@@ -25,6 +25,11 @@ probably want to select a non-hidden location. This example assumes that the GAM
|
||||
configuration directory will be /Users/admin/GAMConfig; If you've chosen another directory,
|
||||
substitute that value in the directions.
|
||||
|
||||
Make the directory:
|
||||
```
|
||||
mkdir -p /Users/admin/GAMConfig
|
||||
```
|
||||
|
||||
Add the following line:
|
||||
```
|
||||
export GAMCFGDIR="/Users/admin/GAMConfig"
|
||||
@@ -42,7 +47,10 @@ Issue the following command replacing `<Filename>` with the name of the file you
|
||||
source <Filename>
|
||||
```
|
||||
|
||||
* Make the /Users/admin/GAMConfig directory before proceeding.
|
||||
You need to make sure the GAM configuration directory actually exists. Test that like this:
|
||||
```
|
||||
ls -l $GAMCFGDIR
|
||||
```
|
||||
|
||||
### Set a working directory
|
||||
|
||||
@@ -51,10 +59,15 @@ data in this folder and execute GAM commands from this folder. You should not us
|
||||
/Users/admin/bin/gamadv-xtd3 or /Users/admin/GAMConfig for this purpose.
|
||||
This example assumes that the GAM working directory will be /Users/admin/GAMWork; If you've chosen
|
||||
another directory, substitute that value in the directions.
|
||||
* Make the /Users/admin/GAMWork directory before proceeding.
|
||||
|
||||
Make the directory:
|
||||
```
|
||||
mkdir -p /Users/admin/GAMWork
|
||||
```
|
||||
|
||||
### Set an alias
|
||||
You should set an alias to point to /Users/admin/bin/gamadv-xtd3/gam so you can operate from the /Users/admin/GAMWork directory.
|
||||
Aliases aren't available in scripts, so you may want to set a symlink instead, see below.
|
||||
|
||||
Add the following line:
|
||||
```
|
||||
@@ -69,32 +82,44 @@ to one of these files based on your shell:
|
||||
~/.profile
|
||||
```
|
||||
|
||||
If you already have an alias for standard GAM but are no longer going to run it, delete these lines:
|
||||
```
|
||||
function gam() { "/Users/admin/bin/gam/gam" "$@" ; }"
|
||||
alias gam="/Users/admin/bin/gam/gam"
|
||||
```
|
||||
|
||||
If you already have an alias for standard GAM and want to run it and GAMADV-XTD3, give your old alias a different name:
|
||||
```
|
||||
function gamstd() { "/Users/admin/bin/gam/gam" "$@" ; }"
|
||||
alias gamstd="/Users/admin/bin/gam/gam"
|
||||
```
|
||||
|
||||
Issue the following command replacing `<Filename>` with the name of the file you edited:
|
||||
```
|
||||
source <Filename>
|
||||
```
|
||||
|
||||
If you already have a gam alias for standard GAM and want to run it and GAMADV-XTD3, give your new alias a different name:
|
||||
### Set a symlink
|
||||
Set a symlink in `/usr/local/bin` (or some other location on $PATH) to point to GAM.
|
||||
```
|
||||
alias gam3="/Users/admin/bin/gamadv-xtd3/gam"
|
||||
ln -s "/Users/admin/bin/gamadv-xtd3/gam" /usr/local/bin/gam
|
||||
```
|
||||
|
||||
Set environment variable OLDGAMPATH to point to the existing Gam directory; /Users/admin/bin/gam will be used in this example.
|
||||
If your existing Gam is in another directory, substitute that value in the directions.
|
||||
```
|
||||
admin@server:~$ cd /Users/admin/bin/gamadv-xtd3
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ export OLDGAMPATH=/Users/admin/bin/gam
|
||||
admin@server:/Users/admin$ export OLDGAMPATH=/Users/admin/bin/gam
|
||||
```
|
||||
Verify that OLDGAMPATH points to the correct location.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ls -l $OLDGAMPATH/*.json
|
||||
admin@server:/Users/admin$ ls -l $OLDGAMPATH/*.json
|
||||
-rw-r-----@ 1 admin staff 553 Feb 26 10:39 /Users/admin/bin/gam/client_secrets.json
|
||||
-rw-r-----@ 1 admin staff 2377 Feb 26 10:39 /Users/admin/bin/gam/oauth2service.json
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Initialize GAMADV-XTD3; this should be the first GAMADV-XTD3 command executed.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam config drive_dir /Users/admin/GAMWork verify
|
||||
admin@server:/Users/admin$ gam config drive_dir /Users/admin/GAMWork verify
|
||||
Created: /Users/admin/GAMConfig
|
||||
Created: /Users/admin/GAMConfig/gamcache
|
||||
Copied: /Users/admin/bin/gam/oauth2service.json, To: /Users/admin/GAMConfig/oauth2service.json
|
||||
@@ -102,128 +127,19 @@ Copied: /Users/admin/bin/gam/oauth2.txt, To: /Users/admin/GAMConfig/oauth2.txt
|
||||
Copied: /Users/admin/bin/gam/client_secrets.json, To: /Users/admin/GAMConfig/client_secrets.json
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Initialized
|
||||
Section: DEFAULT
|
||||
activity_max_results = 100
|
||||
admin_email = ''
|
||||
api_calls_rate_check = false
|
||||
api_calls_rate_limit = 100
|
||||
api_calls_tries_limit = 10
|
||||
auto_batch_min = 0
|
||||
bail_on_internal_error_tries = 2
|
||||
batch_size = 50
|
||||
cacerts_pem = ''
|
||||
...
|
||||
cache_dir = /Users/admin/GAMConfig/gamcache
|
||||
cache_discovery_only = true
|
||||
channel_customer_id = ''
|
||||
charset = utf-8
|
||||
classroom_max_results = 0
|
||||
client_secrets_json = client_secrets.json ; /Users/admin/GAMConfig/client_secrets.json
|
||||
clock_skew_in_seconds = 10
|
||||
cmdlog = ''
|
||||
cmdlog_max_backups = 5
|
||||
cmdlog_max_kilo_bytes = 1000
|
||||
...
|
||||
config_dir = /Users/admin/GAMConfig
|
||||
contact_max_results = 100
|
||||
csv_input_column_delimiter = ,
|
||||
csv_input_quote_char = '"'
|
||||
csv_input_row_drop_filter = ''
|
||||
csv_input_row_drop_filter_mode = anymatch
|
||||
csv_input_row_filter = ''
|
||||
csv_input_row_filter_mode = allmatch
|
||||
csv_input_row_limit = 0
|
||||
csv_output_column_delimiter = ,
|
||||
csv_output_convert_cr_nl = false
|
||||
csv_output_field_delimiter = ' '
|
||||
csv_output_header_drop_filter = ''
|
||||
csv_output_header_filter = ''
|
||||
csv_output_header_force = ''
|
||||
csv_output_line_terminator = lf
|
||||
csv_output_quote_char = '"'
|
||||
csv_output_row_drop_filter = ''
|
||||
csv_output_row_drop_filter_mode = anymatch
|
||||
csv_output_row_filter = ''
|
||||
csv_output_row_filter_mode = allmatch
|
||||
csv_output_row_limit = 0
|
||||
csv_output_subfield_delimiter = '.'
|
||||
csv_output_timestamp_column = ''
|
||||
csv_output_users_audit = false
|
||||
customer_id = my_customer
|
||||
debug_level = 0
|
||||
device_max_results = 200
|
||||
domain = ''
|
||||
...
|
||||
drive_dir = /Users/admin/GAMWork
|
||||
drive_max_results = 1000
|
||||
drive_v3_native_names = true
|
||||
email_batch_size = 50
|
||||
enable_dasa = false
|
||||
event_max_results = 250
|
||||
extra_args = ''
|
||||
inter_batch_wait = 0
|
||||
license_max_results = 100
|
||||
license_skus = ''
|
||||
member_max_results = 200
|
||||
message_batch_size = 50
|
||||
message_max_results = 500
|
||||
mobile_max_results = 100
|
||||
multiprocess_pool_limit = 0
|
||||
never_time = Never
|
||||
no_browser = false
|
||||
no_cache = false
|
||||
no_update_check = true
|
||||
no_verify_ssl = false
|
||||
num_tbatch_threads = 2
|
||||
num_threads = 5
|
||||
oauth2_txt = oauth2.txt ; /Users/admin/GAMConfig/oauth2.txt
|
||||
oauth2service_json = oauth2service.json ; /Users/admin/GAMConfig/oauth2service.json
|
||||
people_max_results = 100
|
||||
print_agu_domains = ''
|
||||
print_cros_ous = ''
|
||||
print_cros_ous_and_children = ''
|
||||
process_wait_limit = 0
|
||||
quick_cros_move = false
|
||||
quick_info_user = false
|
||||
reseller_id = ''
|
||||
retry_api_service_not_available = false
|
||||
section = ''
|
||||
show_api_calls_retry_data = false
|
||||
show_commands = false
|
||||
show_convert_cr_nl = false
|
||||
show_counts_min = 1
|
||||
show_gettings = true
|
||||
show_gettings_got_nl = false
|
||||
show_multiprocess_info = false
|
||||
smtp_fqdn = ''
|
||||
smtp_host = ''
|
||||
smtp_password = ''
|
||||
smtp_username = ''
|
||||
timezone = utc
|
||||
tls_max_version = ''
|
||||
tls_min_version = 'TLSv1_2'
|
||||
todrive_clearfilter = false
|
||||
todrive_clientaccess = false
|
||||
todrive_conversion = true
|
||||
todrive_localcopy = false
|
||||
todrive_locale = ''
|
||||
todrive_nobrowser = false
|
||||
todrive_noemail = true
|
||||
todrive_parent = root
|
||||
todrive_sheet_timeformat = ''
|
||||
todrive_sheet_timestamp = false
|
||||
todrive_timeformat = ''
|
||||
todrive_timestamp = false
|
||||
todrive_timezone = ''
|
||||
todrive_upload_nodata = true
|
||||
todrive_user = ''
|
||||
truncate_client_id = false
|
||||
update_cros_ou_with_id = false
|
||||
use_projectid_as_name = false
|
||||
user_max_results = 500
|
||||
user_service_account_access_only = false
|
||||
...
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Verify initialization, this was a successful installation.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ls -l $GAMCFGDIR
|
||||
admin@server:/Users/admin$ ls -l $GAMCFGDIR
|
||||
total 48
|
||||
-rw-r-----+ 1 admin staff 553 Mar 3 09:23 client_secrets.json
|
||||
-rw-r-----+ 1 admin staff 1069 Mar 3 09:23 gam.cfg
|
||||
@@ -232,21 +148,21 @@ drwxr-x---+ 2 admin staff 68 Mar 3 09:23 gamcache
|
||||
-rw-r-----+ 1 admin staff 5104 Mar 3 09:23 oauth2.txt
|
||||
-rw-rw-rw-+ 1 admin staff 0 Mar 3 09:23 oauth2.txt.lock
|
||||
-rw-r-----+ 1 admin staff 2377 Mar 3 09:23 oauth2service.json
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
If the verification looks like this, then you'll have to copy client_secrets.json and oauth2service.json manually.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ls -l $GAMCFGDIR
|
||||
admin@server:/Users/admin$ ls -l $GAMCFGDIR
|
||||
total 40
|
||||
-rw-r-----+ 1 admin admin 1427 Nov 1 11:38 gam.cfg
|
||||
drwxr-x---+ 16 admin admin 544 Nov 2 07:25 gamcache
|
||||
-rw-r--r--+ 1 admin admin 10 Nov 2 15:31 lastupdatecheck.txt
|
||||
-rw-rw-rw-+ 1 admin admin 0 Sep 19 17:28 oauth2.txt.lock
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ cp -p $OLDGAMPATH/client_secrets.json $GAMCFGDIR/
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ cp -p $OLDGAMPATH/oauth2service.json $GAMCFGDIR/
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ cp -p $OLDGAMPATH/oauth2.txt $GAMCFGDIR/
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ls -l $GAMCFGDIR
|
||||
admin@server:/Users/admin$ cp -p $OLDGAMPATH/client_secrets.json $GAMCFGDIR/
|
||||
admin@server:/Users/admin$ cp -p $OLDGAMPATH/oauth2service.json $GAMCFGDIR/
|
||||
admin@server:/Users/admin$ cp -p $OLDGAMPATH/oauth2.txt $GAMCFGDIR/
|
||||
admin@server:/Users/admin$ ls -l $GAMCFGDIR
|
||||
total 40
|
||||
-rw-r-----+ 1 admin staff 553 Mar 3 09:23 client_secrets.json
|
||||
-rw-r-----+ 1 admin staff 1069 Mar 3 09:23 gam.cfg
|
||||
@@ -258,7 +174,7 @@ drwxr-x---+ 2 admin staff 68 Mar 3 09:23 gamcache
|
||||
```
|
||||
### Update your project with local browser to include the additional APIs that GAMADV-XTD3 uses.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ gam update project
|
||||
admin@server:/Users/admin$ gam update project
|
||||
|
||||
Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com
|
||||
|
||||
@@ -288,12 +204,12 @@ Enable 3 APIs
|
||||
API: groupsmigration.googleapis.com, Enabled (2/3)
|
||||
API: sheets.googleapis.com, Enabled (3/3)
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Update your project without local browser (Google Cloud Shell for instance) to include the additional APIs that GAMADV-XTD3 uses
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ gam config no_browser true save
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ gam update project
|
||||
admin@server:/Users/admin$ gam config no_browser true save
|
||||
admin@server:/Users/admin$ gam update project
|
||||
|
||||
Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com
|
||||
|
||||
@@ -322,7 +238,7 @@ Enable 3 APIs
|
||||
API: groupsmigration.googleapis.com, Enabled (2/3)
|
||||
API: sheets.googleapis.com, Enabled (3/3)
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Enable GAMADV-XTD3 client access
|
||||
|
||||
@@ -332,17 +248,17 @@ You select a list of scopes, GAM uses a browser to get final authorization from
|
||||
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
|
||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin$ 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.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.3 64-bit final
|
||||
MacOS Sonoma 14.4.1 x86_64
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam oauth create
|
||||
admin@server:/Users/admin$ gam oauth create
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
@@ -423,11 +339,11 @@ Enter verification code or paste "Unable to connect" URL from other computer (on
|
||||
The authentication flow has completed.
|
||||
Client OAuth2 File: /Users/admin/GAMConfig/oauth2.txt, Created
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Enable GAMADV-XTD3 service account access.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam user admin@domain.com check serviceaccount
|
||||
admin@server:/Users/admin$ gam user admin@domain.com check serviceaccount
|
||||
$ gam user admin@domain.com check serviceaccount
|
||||
System time status
|
||||
Your system time differs from www.googleapis.com by less than 1 second PASS
|
||||
@@ -482,7 +398,7 @@ 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.
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
The link shown in the error message should take you directly to the authorization screen.
|
||||
If not, make sure that you are logged in as a domain admin, then re-enter the link.
|
||||
@@ -492,7 +408,7 @@ If not, make sure that you are logged in as a domain admin, then re-enter the li
|
||||
Wait a moment and then perform the following command; it it still fails, wait a bit longer, it can sometimes take serveral minutes
|
||||
for the authorization to complete.
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam user admin@domain.com check serviceaccount
|
||||
admin@server:/Users/admin$ gam user admin@domain.com check serviceaccount
|
||||
System time status:
|
||||
Your system time differs from www.googleapis.com by less than 1 second PASS
|
||||
Service Account Private Key Authentication:
|
||||
@@ -536,14 +452,14 @@ All scopes PASSED!
|
||||
|
||||
Service Account Client name: SVCACCTID is fully authorized.
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
### Update gam.cfg with some basic values
|
||||
* `customer_id` - Having this data keeps Gam from having to make extra API calls
|
||||
* `domain` - This allows you to omit the domain portion of email addresses
|
||||
* `timezone local` - Gam will convert all UTC times to your local timezone
|
||||
```
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam info domain
|
||||
admin@server:/Users/admin$ gam info domain
|
||||
Customer ID: C01234567
|
||||
Primary Domain: domain.com
|
||||
Customer Creation Time: 2007-06-06T15:47:55.444Z
|
||||
@@ -551,7 +467,7 @@ Primary Domain Verified: True
|
||||
Default Language: en
|
||||
...
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam config customer_id C01234567 domain domain.com timezone local save verify
|
||||
admin@server:/Users/admin$ gam config customer_id C01234567 domain domain.com timezone local save verify
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Saved
|
||||
Section: DEFAULT
|
||||
activity_max_results = 100
|
||||
@@ -668,7 +584,7 @@ Section: DEFAULT
|
||||
user_max_results = 500
|
||||
user_service_account_access_only = false
|
||||
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$
|
||||
admin@server:/Users/admin$
|
||||
```
|
||||
|
||||
## Windows
|
||||
@@ -728,12 +644,11 @@ At this point, you should restart Command Prompt so that it has the updated path
|
||||
Set environment variable OLDGAMPATH to point to the existing Gam directory; C:\GAM will be used in this example.
|
||||
If your existing Gam is in another directory, substitute that value in the directions.
|
||||
```
|
||||
C:>cd C:\GAMADV-XTD3
|
||||
C:\GAMADV-XTD3>set OLDGAMPATH=C:\GAM
|
||||
C:\>set OLDGAMPATH=C:\GAM
|
||||
```
|
||||
### Verify that OLDGAMPATH points to the correct location.
|
||||
```
|
||||
C:\GAMADV-XTD3>dir %OLDGAMPATH%\*.json
|
||||
C:\>dir %OLDGAMPATH%\*.json
|
||||
Volume in drive C has no label.
|
||||
Volume Serial Number is 663F-DA8B
|
||||
|
||||
@@ -748,8 +663,7 @@ C:\GAMADV-XTD3>dir %OLDGAMPATH%\*.json
|
||||
```
|
||||
### Initialize GAMADV-XTD3; this should be the first GAMADV-XTD3 command executed.
|
||||
```
|
||||
C:>cd C:\GAMADV-XTD3
|
||||
C:\GAMADV-XTD3>gam config drive_dir C:\GAMWork verify
|
||||
C:\>gam config drive_dir C:\GAMWork verify
|
||||
Created: C:\GAMConfig
|
||||
Created: C:\GAMConfig\gamcache
|
||||
Copied: C:\GAM\oauth2service.json, To: C:\GAMConfig\oauth2service.json
|
||||
@@ -871,11 +785,11 @@ Section: DEFAULT
|
||||
user_max_results = 500
|
||||
user_service_account_access_only = false
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Verify initialization, this was a successful installation.
|
||||
```
|
||||
C:\GAMADV-XTD3>dir %GAMCFGDIR%
|
||||
C:\>dir %GAMCFGDIR%
|
||||
Volume in drive C has no label.
|
||||
Volume Serial Number is 663F-DA8B
|
||||
|
||||
@@ -892,11 +806,11 @@ C:\GAMADV-XTD3>dir %GAMCFGDIR%
|
||||
03/03/2017 10:15 AM 2,377 oauth2service.json
|
||||
6 File(s) 15,769 bytes
|
||||
3 Dir(s) 110,532,562,944 bytes free
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
If the verification looks like this, then you'll have to copy client_secrets.json and oauth2service.json manually.
|
||||
```
|
||||
C:\GAMADV-XTD3>dir %GAMCFGDIR%
|
||||
C:\>dir %GAMCFGDIR%
|
||||
Volume in drive C has no label.
|
||||
Volume Serial Number is 663F-DA8B
|
||||
|
||||
@@ -911,13 +825,13 @@ C:\GAMADV-XTD3>dir %GAMCFGDIR%
|
||||
3 File(s) 1,135 bytes
|
||||
3 Dir(s) 110,532,562,944 bytes free
|
||||
|
||||
C:\GAMADV-XTD3>copy %OLDGAMPATH%\client_secrets.json %HOMEPATH%\.gam\
|
||||
C:\>copy %OLDGAMPATH%\client_secrets.json %GAMCFGDIR%
|
||||
1 file(s) copied.
|
||||
|
||||
C:\GAMADV-XTD3>copy %OLDGAMPATH%\oauth2service.json %HOMEPATH%\.gam\
|
||||
C:\>copy %OLDGAMPATH%\oauth2service.json %GAMCFGDIR%
|
||||
1 file(s) copied.
|
||||
|
||||
C:\GAMADV-XTD3>dir %GAMCFGDIR%
|
||||
C:\>dir %GAMCFGDIR%
|
||||
Volume in drive C has no label.
|
||||
Volume Serial Number is 663F-DA8B
|
||||
|
||||
@@ -936,7 +850,7 @@ C:\GAMADV-XTD3>dir %GAMCFGDIR%
|
||||
```
|
||||
### Update your project with local browser to include the additional APIs that GAMADV-XTD3 uses.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam update project
|
||||
C:\>gam update project
|
||||
|
||||
Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com
|
||||
|
||||
@@ -963,12 +877,12 @@ Enable 3 APIs
|
||||
API: groupsmigration.googleapis.com, Enabled (2/3)
|
||||
API: sheets.googleapis.com, Enabled (3/3)
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Update your project without local browser (headless server for instance) to include the additional APIs that GAMADV-XTD3 uses
|
||||
```
|
||||
C:\GAMADV-XTD3>gam config no_browser true save
|
||||
C:\GAMADV-XTD3>gam update project
|
||||
C:\>gam config no_browser true save
|
||||
C:\>gam update project
|
||||
|
||||
Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com
|
||||
|
||||
@@ -997,7 +911,7 @@ Enable 3 APIs
|
||||
API: groupsmigration.googleapis.com, Enabled (2/3)
|
||||
API: sheets.googleapis.com, Enabled (3/3)
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Enable GAMADV-XTD3 client access
|
||||
|
||||
@@ -1006,17 +920,17 @@ Create oauth2.txt; it must be deleted and recreated because it is in a different
|
||||
You select a list of scopes, GAM uses a browser to get final authorization from Google for these scopes and
|
||||
writes the credentials into the file oauth2.txt.
|
||||
```
|
||||
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
|
||||
C:\GAMADV-XTD3>gam version
|
||||
C:\>del C:\GAMConfig\oauth2.txt
|
||||
C:\>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.3 64-bit final
|
||||
Python 3.12.5 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
Path: C:\GAMADV-XTD3
|
||||
Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
C:\GAMADV-XTD3>gam oauth create
|
||||
C:\>gam oauth create
|
||||
|
||||
[*] 0) Calendar API (supports readonly)
|
||||
[*] 1) Chrome Browser Cloud Management API (supports readonly)
|
||||
@@ -1097,12 +1011,12 @@ Enter verification code or paste "Unable to connect" URL from other computer (on
|
||||
The authentication flow has completed.
|
||||
Client OAuth2 File: C:\GAMConfig\oauth2.txt, Created
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
|
||||
### Enable GAMADV-XTD3 service account access.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam user admin@domain.com check serviceaccount
|
||||
C:\>gam user admin@domain.com check serviceaccount
|
||||
System time status
|
||||
Your system time differs from www.googleapis.com by less than 1 second PASS
|
||||
Service Account Private Key Authentication
|
||||
@@ -1156,7 +1070,7 @@ 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.
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
The link shown in the error message should take you directly to the authorization screen.
|
||||
If not, make sure that you are logged in as a domain admin, then re-enter the link.
|
||||
@@ -1166,7 +1080,7 @@ If not, make sure that you are logged in as a domain admin, then re-enter the li
|
||||
Wait a moment and then perform the following command; it it still fails, wait a bit longer, it can sometimes take serveral minutes
|
||||
for the authorization to complete.
|
||||
```
|
||||
C:\GAMADV-XTD3>gam user admin@domain.com check serviceaccount
|
||||
C:\>gam user admin@domain.com check serviceaccount
|
||||
System time status:
|
||||
Your system time differs from www.googleapis.com by less than 1 second PASS
|
||||
Service Account Private Key Authentication:
|
||||
@@ -1210,14 +1124,14 @@ All scopes PASSED!
|
||||
|
||||
Service Account Client name: SVCACCTID is fully authorized.
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
### Update gam.cfg with some basic values
|
||||
* `customer_id` - Having this data keeps Gam from having to make extra API calls
|
||||
* `domain` - This allows you to omit the domain portion of email addresses
|
||||
* `timezone local` - Gam will convert all UTC times to your local timezone
|
||||
```
|
||||
C:\GAMADV-XTD3>gam info domain
|
||||
C:\>gam info domain
|
||||
Customer ID: C01234567
|
||||
Primary Domain: domain.com
|
||||
Customer Creation Time: 2007-06-06T15:47:55.444Z
|
||||
@@ -1225,7 +1139,7 @@ Primary Domain Verified: True
|
||||
Default Language: en
|
||||
...
|
||||
|
||||
C:\GAMADV-XTD3>gam config customer_id C01234567 domain domain.com timezone local save verify
|
||||
C:\>gam config customer_id C01234567 domain domain.com timezone local save verify
|
||||
Config File: C:\GAMConfig\gam.cfg, Saved
|
||||
Section: DEFAULT
|
||||
activity_max_results = 100
|
||||
@@ -1344,5 +1258,5 @@ Section: DEFAULT
|
||||
user_max_results = 500
|
||||
user_service_account_access_only = false
|
||||
|
||||
C:\GAMADV-XTD3>
|
||||
C:\>
|
||||
```
|
||||
|
||||
@@ -53,6 +53,8 @@ use the `returnnameonly` option to have GAM display just the profile name of the
|
||||
This will be useful in scripts that create|update a profile and then want to perform subsequent GAM commands that
|
||||
reference the profile.
|
||||
|
||||
If `returnnameonly is specified, `inProgress` is returned if the API does not return a complete result.
|
||||
|
||||
```
|
||||
gam delete inboundssoprofile <SSOProfileItem>
|
||||
```
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
| Cloud Identity Free | 101001 |
|
||||
| Cloud Identity Premium | 101005 |
|
||||
| Cloud Search | 101035 |
|
||||
| Colab | 101050 |
|
||||
| Education Endpoint Management | 101049 |
|
||||
| Gemini | 101047 |
|
||||
| Google Chrome Device Management | Google-Chrome-Device-Management |
|
||||
@@ -39,6 +40,8 @@
|
||||
|
||||
| License Name | License SKU | Abbreviation |
|
||||
|--------------|-------------|---------------|
|
||||
| AI Meetings and Messaging | 1010470007 | aimeetingsandmessaging |
|
||||
| AI Security | 1010470006 | aisecurity |
|
||||
| AppSheet Core | 1010380001 | appsheetcore |
|
||||
| AppSheet Enterprise Standard | 1010380002 | appsheetstandard |
|
||||
| AppSheet Enterprise Plus | 1010380003 | appsheetplus |
|
||||
@@ -47,12 +50,16 @@
|
||||
| Cloud Identity Free | 1010010001 | cloudidentity |
|
||||
| Cloud Identity Premium | 1010050001 | cloudidentitypremium |
|
||||
| Cloud Search | 1010350001 | cloudsearch |
|
||||
| Colab Pro | 1010500001 | colabpro |
|
||||
| Colab Pro+ | 1010500002 | colabpro+ | colabproplus |
|
||||
| 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 Education | 1010470004 | geminiedu |
|
||||
| Gemini Education Premium | 1010470005 | geminiedupremium |
|
||||
| Gemini Enterprise | 1010470001 | geminient | duetai |
|
||||
| Google Apps Message Security | Google-Apps-For-Postini | postini |
|
||||
| Google Chrome Device Management | Google-Chrome-Device-Management | cdm |
|
||||
@@ -119,6 +126,7 @@
|
||||
101043 |
|
||||
101047 |
|
||||
101049 |
|
||||
101050 |
|
||||
Google-Apps |
|
||||
Google-Chrome-Device-Management |
|
||||
Google-Drive-storage |
|
||||
@@ -136,6 +144,8 @@
|
||||
4tb | drive4tb | googledrivestorage4tb | Google-Drive-storage-4TB |
|
||||
8tb | drive8tb | googledrivestorage8tb | Google-Drive-storage-8TB |
|
||||
16tb | drive16tb | googledrivestorage16tb | Google-Drive-storage-16TB |
|
||||
aimeetingsandmessaging | 1010470007 | AI Meetings and Messaging |
|
||||
aisecurity | 1010470006 | AI Security |
|
||||
appsheetcore | 1010380001 | AppSheet Core |
|
||||
appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard |
|
||||
appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus |
|
||||
@@ -145,8 +155,12 @@
|
||||
cloudidentity | identity | 1010010001 | Cloud Identity |
|
||||
cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium |
|
||||
cloudsearch | 1010350001 | Cloud Search |
|
||||
colabpro | 1010500001 | Colab Pro |
|
||||
colabpro+ | colabproplus | 1010500002 | Colab Pro+ |
|
||||
eeu | 1010490001 | SKU Endpoint Education Upgrade |
|
||||
geminibiz | 1010470003 | Gemini Business |
|
||||
geminiedu | 1010470004 | Gemini Education |
|
||||
geminiedupremium| 1010470005 | Gemini Education Premium |
|
||||
geminient| duetai | 1010470001 | Gemini Enterprise |
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
|
||||
41
docs/List.md
41
docs/List.md
@@ -1,6 +1,6 @@
|
||||
# List
|
||||
|
||||
The list command is used to verify collections of objects. See GamDataSelection.txt/
|
||||
The list command is used to verify collections of objects.
|
||||
|
||||
## Commands
|
||||
```
|
||||
@@ -8,3 +8,42 @@ gam list [todrive <ToDriveAttribute>*] <EntityList> [data <CrOSTypeEntity>|<User
|
||||
gam <CrOSTypeEntity>|<UserTypeEntity> list [todrive <ToDriveAttribute>*] [data <EntityList> [delimiter <Character>]]
|
||||
```
|
||||
|
||||
Allow mapping of keyfield value in csvkmd selectors.
|
||||
<CSVkmdSelector> ::= csvkmd <FileName> [charset <Charset>]
|
||||
keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <String>]
|
||||
(matchfield <FieldName> <RegularExpression>)*
|
||||
[datafield <FieldName>(:<FieldName)* [delimiter <String>]]
|
||||
|
||||
You want to update the membership of a collection of parent groups at your school, the data is coming from a database in a fixed format.
|
||||
Example 1, CSV File GroupP1P2.csv, exactly the data you want, keypattern and keyvalue are not required
|
||||
Group,P1Email,P2Email
|
||||
2017-parents@domain.com,g1member11@domain.com,g1member12@domain.com
|
||||
2017-parents@domain.com,g1member21@domain.com,g1member22@domain.com
|
||||
2018-parents@domain.com,g2member11@domain.com,g2member11@domain.com
|
||||
2018-parents@domain.com,g2member21@domain.com,g2member22@domain.com
|
||||
...
|
||||
For each row, the value from the Group column is used as the group name.
|
||||
Verify data selection: gam list csvkmd GroupP1P2.csv keyfield Group datafield P1Email:P2Email data csvdata P1Email:P2Email
|
||||
Execute: gam update groups csvkmd GroupP1P2.csv keyfield Group datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|
||||
|
||||
Example 2, CSV File GradYearP1P2.csv, you have to convert GradYear to group name GradYear-parents@domain.com, keyvalue is required
|
||||
GradYear,P1Email,P2Email
|
||||
2017,g1member11@domain.com,g1member12@domain.com
|
||||
2017,g1member21@domain.com,g1member22@domain.com
|
||||
2018,g2member11@domain.com,g2member11@domain.com
|
||||
2018,g2member21@domain.com,g2member22@domain.com
|
||||
...
|
||||
For each row, the value from the GradYear column replaces the keyField name in the keyvalue argument and that value is used as the group name.
|
||||
Verify data selection: gam list csvkmd GradYearP1P2.csv keyfield GradYear keyvalue GradYear-parents@domain.com datafield P1Email:P2Email data csvdata P1Email:P2Email
|
||||
Execute: gam update groups csvkmd GradYearP1P2.csv keyfield GradYear keyvalue GradYear-parents@domain.com datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|
||||
|
||||
Example 3, CSV File GradYearP1P2.csv, you have to convert GradYear to group name 'LastTwoDigitsOfGradYear-parents@domain.com', keypattern and keyvalue are required.
|
||||
GradYear,P1Email,P2Email
|
||||
2017,g1member11@domain.com,g1member12@domain.com
|
||||
2017,g1member21@domain.com,g1member22@domain.com
|
||||
2018,g2member11@domain.com,g2member11@domain.com
|
||||
2018,g2member21@domain.com,g2member22@domain.com
|
||||
...
|
||||
For each row, the value from the GradYear column is matched against the keypattern, the matched segments are substituted into the keyvalue argument and that value is used as the group name.
|
||||
Verify data selection: gam list csvkmd GradYearP1P2.csv keyfield GradYear keypattern '20(..)' keyvalue '\1-parents@domain.com' datafield P1Email:P2Email data csvdata P1Email:P2Email
|
||||
Execute: gam update groups csvkmd GradYearP1P2.csv keyfield GradYear keypattern '20(..)' keyvalue '\1-parents@domain.com' datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|
||||
|
||||
@@ -171,9 +171,9 @@ If the pattern `{{Section}}` appears in `<FileName>`, it will be replaced with t
|
||||
### Examples - redirect CSV
|
||||
Suppose that you have a CSV file CourseList.csv with a column labeled CourseId that contains course Ids. You want a single CSV file with participant information for these courses.
|
||||
```
|
||||
gam redirect csv ./CourseInfo.csv multiprocess csv CourseList.csv gam print course-participants course ~CourseId
|
||||
gam redirect csv ./CourseInfo.csv multiprocess csv CourseList.csv gam print course-participants course "~CourseId"
|
||||
```
|
||||
`redirect csv ./CourseInfo.csv multiprocess` causes gam to collect output from all of the processes started by `csv CourseList.csv gam print course-participants course ~CourseId` and produces a single CSV file CourseInfo.csv.
|
||||
`redirect csv ./CourseInfo.csv multiprocess` causes gam to collect output from all of the processes started by `csv CourseList.csv gam print course-participants course "~CourseId"` and produces a single CSV file CourseInfo.csv.
|
||||
|
||||
Generate a list of CrOS devices and update an existing sheet in a Google spreadsheet. The file ID and sheet IDs are preserved so other appplications can access the data using the file ID and sheet ID.
|
||||
By setting 'tdtimestamp true`, the file name will the updated to reflect the time of execution, but the file ID will not change.
|
||||
@@ -183,23 +183,23 @@ gam redirect csv - todrive tdtitle "CrOS" tdtimestamp true tdfileid 12345-mizZ6Q
|
||||
|
||||
For a collection of users, generate a list of files shared with anyone; combine the output for all users into a single file.
|
||||
```
|
||||
gam redirect csv - multiprocess todrive tdtitle AnyoneShares-All csv Users.csv gam user ~primaryEmail print filelist fields id,name,permissions pm type anyone em
|
||||
gam redirect csv - multiprocess todrive tdtitle AnyoneShares-All csv Users.csv gam user "~primaryEmail" print filelist fields id,name,permissions pm type anyone em
|
||||
```
|
||||
|
||||
For a collection of users, generate a list of files shared with anyone; generate a separate file for each user.
|
||||
The two forms of the command are equivalent.
|
||||
```
|
||||
gam csv Users.csv gam redirect csv - todrive tdtitle "AnyoneShares-~~primaryEmail~~" user ~primaryEmail print filelist fields id,name,permissions pm type anyone em
|
||||
gam csv Users.csv gam redirect csv - todrive tdtitle "AnyoneShares-~~primaryEmail~~" user "~primaryEmail" print filelist fields id,name,permissions pm type anyone em
|
||||
|
||||
gam csv Users.csv gam user ~primaryEmail print filelist fields id,name,permissions pm type anyone em todrive tdtitle "AnyoneShares-~~primaryEmail~~"
|
||||
gam csv Users.csv gam user "~primaryEmail" print filelist fields id,name,permissions pm type anyone em todrive tdtitle "AnyoneShares-~~primaryEmail~~"
|
||||
```
|
||||
|
||||
### Examples - Redirect stdout
|
||||
The output from each of the `gam info user ~primaryEmail` commands will be combined into the single file Users.txt.
|
||||
The output from each of the `gam info user "~primaryEmail"` commands will be combined into the single file Users.txt.
|
||||
The value of `show_multiprocess_info` from `gam.cfg` controls whether information identifying the processes is also shown.
|
||||
|
||||
```
|
||||
$ gam config show_multiprocess_info false redirect stdout ./Users.txt multiprocess csv Users.csv gam info user ~primaryEmail
|
||||
$ gam config show_multiprocess_info false redirect stdout ./Users.txt multiprocess csv Users.csv gam info user "~primaryEmail"
|
||||
$ more Users.txt
|
||||
User: testuser1@domain.com (1/1)
|
||||
Settings:
|
||||
@@ -214,9 +214,9 @@ User: testuser2@domain.com@ (1/1)
|
||||
Full Name: Test User2
|
||||
...
|
||||
|
||||
$ gam config show_multiprocess_info true redirect stdout ./Users.txt multiprocess csv Users.csv gam info user ~primaryEmail
|
||||
$ gam config show_multiprocess_info true redirect stdout ./Users.txt multiprocess csv Users.csv gam info user "~primaryEmail"
|
||||
$ more Users.txt
|
||||
stdout: 0, Start: 2017-01-26T11:35:00.897773-08:00, RC: 0, Cmd: /Users/admin/gam config show_multiprocess_info true redirect stdout ./Users.txt multiprocess csv Users.csv gam info user ~primaryEmail
|
||||
stdout: 0, Start: 2017-01-26T11:35:00.897773-08:00, RC: 0, Cmd: /Users/admin/gam config show_multiprocess_info true redirect stdout ./Users.txt multiprocess csv Users.csv gam info user "~primaryEmail"
|
||||
stdout: 1, Start: 2017-01-26T11:35:00.902709-08:00, RC: 0, Cmd: gam info user testuser1@domain.com
|
||||
User: testuser1@domain.com (1/1)
|
||||
Settings:
|
||||
@@ -233,5 +233,5 @@ User: testuser2@domain.com@ (1/1)
|
||||
Full Name: Test User2
|
||||
...
|
||||
stdout: 2, End: 2017-01-26T11:35:02.849646-08:00, RC: 0, Cmd: gam info user testuser2@domain.com
|
||||
stdout: 0, End: 2017-01-26T11:35:02.907141-08:00, RC: 0, Cmd: /Users/admin/gam config show_multiprocess_info true redirect stdout ./Users.txt multiprocess csv Users.csv gam info user ~primaryEmail
|
||||
stdout: 0, End: 2017-01-26T11:35:02.907141-08:00, RC: 0, Cmd: /Users/admin/gam config show_multiprocess_info true redirect stdout ./Users.txt multiprocess csv Users.csv gam info user "~primaryEmail"
|
||||
```
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
- [Print organizational units](#print-organizational-units)
|
||||
- [Display organizational unit counts](#display-organizational-unit-counts)
|
||||
- [Display indented organizational unit tree](#display-indented-organizational-unit-tree)
|
||||
- [Check organizational unit for contained items](#check-organizational-unit-for-contained-items)
|
||||
- [Special case handling for large number of organizational units](#special-case-handling-for-large-number-of-organizational-units)
|
||||
|
||||
## API documentation
|
||||
@@ -270,6 +271,56 @@ gam show orgtree [fromparent <OrgUnitItem>] [batchsuborgs [<Boolean>]]
|
||||
By default, Gam displays the organizational unit tree starting at /.
|
||||
* `fromparent <OrgUnitItem>` - Display the organizational unit tree starting at `<OrgUnitItem>`.
|
||||
|
||||
## Check organizational unit for contained items
|
||||
An organizational unit can be deleted only when it contains no items:
|
||||
* Chrome Browsers
|
||||
* ChromeOS Devices
|
||||
* Shared Drives
|
||||
* Sub Org Units
|
||||
* Users
|
||||
|
||||
This command counts those items and displays a CSV file with the item counts.
|
||||
* All counts are zero - A return code of 0 is returned and the `empty` column is `True`
|
||||
* Some count is greater than 0 - A return code of 25 is returned and the `empty` column is `False`
|
||||
|
||||
Only items directly within the OU are counted, items in sub-OUs are not counted.
|
||||
```
|
||||
<OrgUnitCheckName> ::=
|
||||
browsers|
|
||||
devices|
|
||||
shareddrives|
|
||||
subous|
|
||||
users
|
||||
<OrgUnitCheckNameList> ::= "<OrgUnitCheckName>(,<OrgUnitCheckName>)*"
|
||||
|
||||
gam check org|ou <OrgUnitItem> [todrive <ToDriveAttribute>*]
|
||||
[<OrgUnitCheckName>*|(fields <OrgUnitCheckNameList>)]
|
||||
[filename <FileName>] [movetoou <OrgUnitItem>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, GAM checks each of the five items; you can select specfic fields
|
||||
with `<OrgUnitCheckName>*` or `fields <OrgUnitCheckNameList>`.
|
||||
|
||||
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.
|
||||
|
||||
If `movetoou <OrgUnitItem>` is specified, GAM will create a batch file of GAM commands that will move any remaining items
|
||||
in `ou <OrgUnitItem>` to `movetoou <OrgUnitItem>`.
|
||||
|
||||
By default, the batch file will be named `CleanOuBatch.txt` and will be created in `gam.cfg/drive_dir`.
|
||||
This can be overridden with `filename <FileName>`.
|
||||
|
||||
You can inspect the file and execute it if desired; substitute actual filenames as desired.
|
||||
```
|
||||
gam redirect stdout CleanOuLog.txt multiproces redirect stderr stdout batch CleanOuBatch.txt
|
||||
```
|
||||
|
||||
## Special case handling for large number of organizational units
|
||||
|
||||
By default, the `print orgs` and `show orgtree` commands issue a single API call to get the
|
||||
|
||||
@@ -9,8 +9,9 @@ Thank you.
|
||||
* Gabriel Clifton - https://docs.google.com/document/d/1p32QOBTr89GaG7RfCafSbFuhlUQ9r3qBM_666E0xvQM/edit
|
||||
* Goldy Arora - https://www.goldyarora.com/license-notifier/
|
||||
* Iain Macleod - https://docs.google.com/document/d/1QxWAPdhROcx70OXLpSD9Trh3vs-nJKSMiaMZCTwOOTg/edit?pli=1#heading=h.2a2azzpy36k0
|
||||
* James Seymour - https://sites.google.com/jis.edu.bn/gam-commands/home
|
||||
* Kevin Melillo - https://github.com/KevinMelilloIEEE/gam-script
|
||||
* James Seymour - https://sites.google.com/view/gam--commands/
|
||||
* Kevin Melillo - https://github.com/KevinMelilloIEEE/gam-script
|
||||
* Korey Rideout - https://chatgpt.com/g/g-PTxxnVPMG-gam-assist - A helpful tool to assist with, GAM (+Advance) and GYB commands to assist with syntax for Google Workspace Administrators.
|
||||
* Paul Ogier (Taming.Tech) - GAMADV-XTD3 Course on Udemy https://taming.tech/GAMCourse
|
||||
* Paul Ogier (Taming.Tech) - GAMADV-XTD3 Tutorials https://www.youtube.com/watch?v=g9LDeyXQNLI&list=PL_dLiK09pJVhKJxZHNk9CHK0q5hkZ856w
|
||||
* Paul Ogier (Taming.Tech) - https://taming.tech/taming-gam-a-practical-guide-to-gam-and-gamadv-xtd3/
|
||||
|
||||
@@ -97,7 +97,7 @@ In the `print/show drivefileacls` and `create/delete permissions` commands you c
|
||||
* `expirationend <Time>` - For types user and group, will the permission expire before or on <Time>.
|
||||
* `deleted <Boolean>` - For types user and groups, has the user or group been deleted.
|
||||
* `inherited <Boolean>` - For Shared Drive files/folders, is the permission inherited
|
||||
* `pmtype member|file` - For Shared Drive files/folders, is the permission derived from membership or explicitly granted.
|
||||
* `pmtype member|file` - For Shared Drive files/folders, is the permission derived from membership or explicitly granted.
|
||||
* `em|endmatch` - End of permission match definition
|
||||
|
||||
## File Selection Examples
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
- [API documentation](#api-documentation)
|
||||
- [Collections of Users](Collections-of-Users)
|
||||
- [Definitions](#definitions)
|
||||
- [Special quoting](#special-quoting)
|
||||
- [Activity reports](#activity-reports)
|
||||
- [Find Shared Drives with no activity](#find-shared-drives-with-no-activity)
|
||||
- [Customer and user reports parameters](#customer-and-user-reports-parameters)
|
||||
@@ -24,6 +25,17 @@
|
||||
never|
|
||||
now|today
|
||||
```
|
||||
## Special quoting
|
||||
If you are going to use `config csv_output_row_filter` when printing reports,
|
||||
you'll need special quoting in the filter because of the `:` characters in the parameter names.
|
||||
|
||||
See: https://github.com/taers232c/GAMADV-XTD3/wiki/CSV-Output-Filtering#quoting-rules
|
||||
|
||||
For example:
|
||||
```
|
||||
config csv_output_row_filter "'\"accounts:used_quota_in_mb\":count>15000'"
|
||||
```
|
||||
|
||||
## Activity reports
|
||||
```
|
||||
<ActivityApplicationName> ::=
|
||||
@@ -49,7 +61,8 @@
|
||||
rules|
|
||||
saml|
|
||||
token|tokens|oauthtoken|
|
||||
useraccounts
|
||||
useraccounts|
|
||||
vault
|
||||
|
||||
gam report <ActivityApplicationName> [todrive <ToDriveAttributes>*]
|
||||
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select <UserTypeEntity>)]
|
||||
@@ -187,6 +200,7 @@ gam report usage customer [todrive <ToDriveAttribute>*]
|
||||
thismonth|(previousmonths <Integer>)]
|
||||
[skipdates <Date>[:<Date>](,<Date>[:<Date>])*] [skipdaysofweek <DayOfWeek>(,<DayOfWeek>)*]
|
||||
[fields|parameters <String>]
|
||||
[convertmbtogb]
|
||||
```
|
||||
Limit the time period.
|
||||
* `start <Date>` - Default value is 30 days prior to `end <Date>`
|
||||
@@ -195,6 +209,9 @@ Limit the time period.
|
||||
* `thismonth` - The current calendar month up to the current time
|
||||
* `previousmonths <Integer>` - A number in the range 1 to 6 indicating calendar months previous to the current month
|
||||
|
||||
Option `convertmbtogb` causes GAM to convert parameters expressed in megabytes
|
||||
(name ends with _in_mb) to gigabytes (name converted to _in_gb) with two decimal places.
|
||||
|
||||
### Example
|
||||
Jay provided this example.
|
||||
```
|
||||
@@ -233,9 +250,10 @@ Customer reports are generally available up to two days before the current date.
|
||||
gam report customers|customer|domain [todrive <ToDriveAttributes>*]
|
||||
[(date <Date>)|(range <Date> <Date>)|
|
||||
yesterday|today|thismonth|(previousmonths <Integer>)]
|
||||
[nodatechange|(fulldatarequired all|<CustomerServiceNameList>)]
|
||||
[(nodatechange | limitdatechanges <Integer>) | (fulldatarequired all|<CustomerServiceNameList>)]
|
||||
[(fields|parameters <String>)|(services <CustomerServiceNameList>)]
|
||||
[noauthorizedapps]
|
||||
[convertmbtogb]
|
||||
```
|
||||
Specify the report date; the default is today's date.
|
||||
* `date <Date>` - A single date; there is one API call
|
||||
@@ -245,8 +263,13 @@ Specify the report date; the default is today's date.
|
||||
* `thismonth` - The current calendar month up to the current time; there is an API call per date
|
||||
* `previousmonths <Integer>` - A number in the range 1 to 6 indicating calendar months previous to the current month; there is an API call per date
|
||||
|
||||
Option `convertmbtogb` causes GAM to convert parameters expressed in megabytes
|
||||
(name ends with _in_mb) to gigabytes (name converted to _in_gb) with two decimal places.
|
||||
|
||||
If no report is available for the specified date, can an earlier date be used?
|
||||
* `nodatechange` - Do not report on an earlier date if no report is available for the specified date.
|
||||
* `limitdatechanges -1' - Back up to earlier dates to find report data; this is the default.
|
||||
* `limitdatechanges 0 | nodatechange' - Do not report on an earlier date if no report data is available for the specified date.
|
||||
* `limitdatechanges N' - Back up to earlier dates to find report data; do not back up more than N times.
|
||||
|
||||
If only partial report data is available for the specified date and applications, can an earlier date be used?
|
||||
* `fulldatarequired all` - Back up to an earlier date to get complete data until all applications have full report data
|
||||
@@ -295,6 +318,7 @@ gam report usage user [todrive]
|
||||
thismonth|(previousmonths <Integer>)]
|
||||
[skipdates <Date>[:<Date>](,<Date>[:<Date>])*] [skipdaysofweek <DayOfWeek>(,<DayOfWeek>)*]
|
||||
[fields|parameters <String>]
|
||||
[convertmbtogb]
|
||||
```
|
||||
Select the users for whom information is desired.
|
||||
* `user all` - All users, the default; there is one API call
|
||||
@@ -310,6 +334,9 @@ Limit the time period.
|
||||
* `thismonth` - The current calendar month up to the current time
|
||||
* `previousmonths <Integer>` - A number in the range 1 to 6 indicating calendar months previous to the current month
|
||||
|
||||
Option `convertmbtogb` causes GAM to convert parameters expressed in megabytes
|
||||
(name ends with _in_mb) to gigabytes (name converted to _in_gb) with two decimal places.
|
||||
|
||||
## User reports
|
||||
User reports are generally available up to four days before the current date.
|
||||
```
|
||||
@@ -327,11 +354,12 @@ gam report users|user [todrive <ToDriveAttributes>*]
|
||||
[allverifyuser <UserItem>]
|
||||
[(date <Date>)|(range <Date> <Date>)|
|
||||
yesterday|today|thismonth|(previousmonths <Integer>)]
|
||||
[nodatechange|(fulldatarequired all|<UserServiceNameList>)]
|
||||
[(nodatechange | limitdatechanges <Integer>) | (fulldatarequired all|<UserServiceNameList>)]
|
||||
[filtertime.* <Time>] [filter|filters <String>]
|
||||
[(fields|parameters <String>)|(services <UserServiceNameList>)]
|
||||
[aggregatebydate|aggregatebyuser [Boolean]]
|
||||
[maxresults <Number>]
|
||||
[convertmbtogb]
|
||||
```
|
||||
Select the users for whom information is desired.
|
||||
* `user all` - All users, the default; there is one API call
|
||||
@@ -351,13 +379,22 @@ Specify the report date; the default is today's date.
|
||||
* `thismonth` - The current calendar month up to the current time; there is an API call per date
|
||||
* `previousmonths <Integer>` - A number in the range 1 to 6 indicating calendar months previous to the current month; there is an API call per date
|
||||
|
||||
Option `convertmbtogb` causes GAM to convert parameters expressed in megabytes
|
||||
(name ends with _in_mb) to gigabytes (name converted to _in_gb) with two decimal places.
|
||||
|
||||
If no report is available for the specified date, can an earlier date be used?
|
||||
* `nodatechange` - Do not report on an earlier date if no report is available for the specified date.
|
||||
* `limitdatechanges -1' - Back up to earlier dates to find report data; this is the default.
|
||||
* `limitdatechanges 0 | nodatechange' - Do not report on an earlier date if no report data is available for the specified date.
|
||||
* `limitdatechanges N' - Back up to earlier dates to find report data; do not back up more than N times.
|
||||
|
||||
If only partial report data is available for the specified date and applications, can an earlier date be used?
|
||||
* `fulldatarequired all` - Back up to an earlier date to get complete data until all applications have full report data
|
||||
* `fulldatarequired <UserServiceNameList>` - Back up to an earlier date to get complete data until all applications in `<UserServiceNameList>` have full report data
|
||||
|
||||
By default, when `user <UserItem>` is specified and no report data is available, there is no output.
|
||||
If `csv_output_users_audit = true` in `gam.cfg`, then a row with columns `email,date` will be displayed
|
||||
where `date` is the earliest date for which report data was requested.
|
||||
|
||||
Apply filters.
|
||||
* `filter|filters <String>` - `<String>` is a comma separated list of filter expressions.
|
||||
|
||||
@@ -390,6 +427,10 @@ Report on users Google Drive usage.
|
||||
```
|
||||
gam report users parameters accounts:drive_used_quota_in_mb,accounts:total_quota_in_mb,accounts:used_quota_in_mb,accounts:used_quota_in_percentage
|
||||
```
|
||||
Report on users total storage usage.
|
||||
```
|
||||
gam report users parameters accounts:drive_used_quota_in_mb,accounts:gmail_used_quota_in_mb,accounts:gplus_photos_used_quota_in_mb,accounts:total_quota_in_mb,accounts:used_quota_in_mb,accounts:used_quota_in_percentage
|
||||
```
|
||||
Report on email activity for individual users.
|
||||
```
|
||||
$ gam report users select users testuser1,testuser2,testuser3 fields gmail:num_emails_received,gmail:num_emails_sent range 2023-07-01 2023-07-07
|
||||
|
||||
@@ -59,17 +59,23 @@ 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 |
|
||||
aimeetingsandmessaging | 1010470007 | AI Meetings and Messaging |
|
||||
aisecurity | 1010470006 | AI Security |
|
||||
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 |
|
||||
bce | beyondcorp | beyondcorpenterprise | cep | chromeenterprisepremium | 1010400001 | Chrome Enterprise Premium |
|
||||
cdm | chrome | googlechromedevicemanagement | Google-Chrome-Device-Management |
|
||||
cloudidentity | identity | 1010010001 | Cloud Identity |
|
||||
cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium |
|
||||
cloudsearch | 1010350001 | Cloud Search |
|
||||
colabpro | 1010500001 | Colab Pro |
|
||||
colabpro+ | colabproplus | 1010500002 | Colab Pro+ |
|
||||
eeu | 1010490001 | SKU Endpoint Education Upgrade |
|
||||
geminibiz | 1010470003 | Gemini Business |
|
||||
geminiedu | 1010470004 | Gemini Education |
|
||||
geminiedupremium| 1010470005 | Gemini Education Premium |
|
||||
geminient| duetai | 1010470001 | Gemini Enterprise |
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
|
||||
@@ -452,7 +452,7 @@ gam show resources
|
||||
[formatjson]
|
||||
```
|
||||
Optional data may be displayed for the resource:
|
||||
* `acls` - Display the resource calendar ACLs
|
||||
* `acls` - Display the resource calendar ACLs. This adds Scope and Role values.
|
||||
* `calendar` - Display the resource calendar settings
|
||||
|
||||
Option `noselfowner` suppresses the display of ACLs that reference the calendar itself as its owner.
|
||||
@@ -467,7 +467,7 @@ gam print resources [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
Optional data may be displayed for the resource:
|
||||
* `acls` - Display the resource calendar ACLs
|
||||
* `acls` - Display the resource calendar ACLs. This adds columns: id, role, scope.type, scope.value
|
||||
* `calendar` - Display the resource calendar settings
|
||||
|
||||
Option `noselfowner` suppresses the display of ACLs that reference the calendar itself as its owner.
|
||||
@@ -519,13 +519,17 @@ count = & gam print resources showitemcountonly
|
||||
These commands operate on a single resource calendar.
|
||||
```
|
||||
gam resource <ResourceID> add acls|calendaracls <CalendarACLRole> <CalendarACLScopeEntity>
|
||||
[sendnotifications <Boolean>]
|
||||
gam resource <ResourceID> update acls|calendaracls <CalendarACLRole> <CalendarACLScopeEntity>
|
||||
[sendnotifications <Boolean>]
|
||||
gam resource <ResourceID> delete acls|calendaracls [<CalendarACLRole>] <CalendarACLScopeEntity>
|
||||
```
|
||||
These commands operate on multiple resource calendars.
|
||||
```
|
||||
gam resources <ResourceEntity> add acls|calendaracls <CalendarACLRole> <CalendarACLScopeEntity>
|
||||
[sendnotifications <Boolean>]
|
||||
gam resources <ResourceEntity> update acls|calendaracls <CalendarACLRole> <CalendarACLScopeEntity>
|
||||
[sendnotifications <Boolean>]
|
||||
gam resources <ResourceEntity> delete acls|calendaracls [<CalendarACLRole>] <CalendarACLScopeEntity>
|
||||
```
|
||||
## Display resource calendar ACLs
|
||||
|
||||
@@ -15,24 +15,38 @@ GAMADV-XTD3 version 6.50.00 or higher is required.
|
||||
## Setup Steps
|
||||
1. Create a [GCP project](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
|
||||
|
||||
2. Create [a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) which will be used by GAMADV-XTD3. Continue steps 2 and 3 without granting the new service account any special access to the project and without granting users access to the service account.
|
||||
2. Create [a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) which will be used by GAMADV-XTD3.
|
||||
* Enter a value in `Service account name`
|
||||
* Enter text in `Service account description`
|
||||
* Click `Create` and `Continue`
|
||||
* Click `Continue` under `Grant this service account access to project`
|
||||
* Click `Done` under `Grant users access to this service account`
|
||||
|
||||
3. Grant the service account rights to generate authentication tokens.
|
||||
* go to [console.cloud.google.com](https://console.cloud.google.com).
|
||||
* go to "IAM & Admin" > Service accounts
|
||||
* click on the service account you created (not the default service account).
|
||||
* copy the email address of your service account to the clipboard.
|
||||
* click on the Permissions tab.
|
||||
* click "Grant Access".
|
||||
* In the "New principals text box, paste the service account email you copied.
|
||||
* Give your service account the "Service Account Key Admin", "Service Account Token Creator" and "View Service Accounts" roles.
|
||||
* Go to [console.cloud.google.com](https://console.cloud.google.com).
|
||||
* Go to `IAM & Admin` > `Service accounts`
|
||||
* Click on the service account you created (not the default service account).
|
||||
* Copy the email address of your service account to the clipboard.
|
||||
* Click on the `Permissions` tab.
|
||||
* Click `Grant Access`.
|
||||
* In the `New principals` text box, paste the service account email you copied.
|
||||
* Give your service account the `Service Account Token Creator` and `View Service Accounts` roles.
|
||||
* Click `Save`
|
||||
|
||||
4. [Create a Windows or Linux virtual machine](https://cloud.google.com/compute/docs/instances/create-start-instance).
|
||||
4. [Create a Windows or Linux virtual machine](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances).
|
||||
* Scroll down and start at Create a VM and attach the service account
|
||||
* Click `Go to VM instances`
|
||||
* Click `Create Instance`
|
||||
* Enter a value for `Name`
|
||||
* Configure `Manage Tags and Labels`
|
||||
* You can choose a region physically close to you though you may be limited in your choices if you want to use the free tier.
|
||||
* GAMADV-XTD3 can run on the minimal `e2-micro` [free tier VM](https://cloud.google.com/free/docs/free-cloud-features#compute) though performance may suffer. If you are performing batch operations, raising the CPU count will help performance. If you have a very large and busy Workspace instance downloading reports or Drive file lists may require more RAM.
|
||||
* [DO NOT use the default service account](https://cloud.google.com/iam/docs/best-practices-service-accounts#single-purpose). Choose the service account you created above instead.
|
||||
* Set `Service account` under `Identity and API access/API and identity management`; choose the service account you created above.
|
||||
* Select `Set access for each API`
|
||||
* Enable `Cloud Platform`
|
||||
* GAMADV-XTD3 does not use a significant amount of storage, unless you have specific storage needs the default disk size should suffice.
|
||||
* leave other VM instance settings at their defaults unless you know what you are doing.
|
||||
* Leave other VM instance settings at their defaults unless you know what you are doing.
|
||||
* Click `Create`
|
||||
|
||||
5. Install GAMADV-XTD3 on the VM
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/How-to-Install-Advanced-GAM
|
||||
|
||||
@@ -12,7 +12,11 @@
|
||||
- [Delete a Shared Drive](#delete-a-shared-drive)
|
||||
- [Change Shared Drive visibility](#change-shared-drive-visibility)
|
||||
- [Display Shared Drives](#display-shared-drives)
|
||||
- [Display List of Shared Drives in an Organizational Unit other than /](#display-list-of-shared-drives-in-an-organizational-unit-other-than-)
|
||||
- [Display List of Shared Drives in an Organizational Unit](#display-list-of-shared-drives-in-an-organizational-unit)
|
||||
- [Display all Shared Drives with no organizers](#display-all-shared-drives-with-no-organizers)
|
||||
- [Display all Shared Drives with a specific organizer](#display-all-shared-drives-with-a-specific-organizer)
|
||||
- [Display all Shared Drives without a specific organizer](#display-all-shared-drives-without-a-specific-organizer)
|
||||
- [Manage Shared Drive access](#manage-shared-drive-access)
|
||||
- [Transfer Shared Drive access](#transfer-shared-drive-access)
|
||||
- [Display Shared Drive access](#display-shared-drive-access)
|
||||
@@ -72,6 +76,22 @@
|
||||
<OrgUnitPath> ::= /|(/<String>)+
|
||||
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
createddate|createdtime|
|
||||
folder|
|
||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||
modifieddate|modifiedtime|
|
||||
name|
|
||||
name_natural|
|
||||
quotabytesused|quotaused|
|
||||
recency|
|
||||
sharedwithmedate|sharedwithmetime|
|
||||
starred|
|
||||
title|
|
||||
title_natural|
|
||||
viewedbymedate|viewedbymetime
|
||||
|
||||
<DriveFileACLRole> ::=
|
||||
manager|organizer|owner|
|
||||
contentmanager|fileorganizer|
|
||||
@@ -371,45 +391,42 @@ Print information about all Shared Drives in the organization.
|
||||
gam print teamdrives
|
||||
gam user admin@domain.com print teamdrives adminaccess
|
||||
```
|
||||
Print information about all Shared Drives in the organization with no organizers.
|
||||
```
|
||||
gam print teamdrives query "organizerCount = 0"
|
||||
gam user admin@domain.com print teamdrives adminaccess teamdriveadminquery "organizerCount = 0"
|
||||
```
|
||||
Print information about Shared Drives that have admin@domain.com as a member.
|
||||
```
|
||||
gam user admin@domain.com print teamdrives
|
||||
```
|
||||
## Display all Shared Drives with no organizers
|
||||
```
|
||||
gam print teamdrives query "organizerCount = 0"
|
||||
```
|
||||
|
||||
## Display all Shared Drives with a specific organizer
|
||||
Substitute actual email address for `organizer@domain.com`.
|
||||
```
|
||||
gam config csv_output_header_filter "id,name" print teamdriveacls pm emailaddress organizer@domain.com role organizer em pma process pmselect
|
||||
```
|
||||
|
||||
## Display all Shared Drives without a specific organizer
|
||||
Substitute actual email address for `organizer@domain.com`.
|
||||
```
|
||||
gam config csv_output_header_filter "id,name" print teamdriveacls pm emailaddress organizer@domain.com role organizer em pma skip pmselect
|
||||
```
|
||||
|
||||
## Display List of Shared Drives in an Organizational Unit other than /
|
||||
Get the orgUnitID of OU / and use it (without the id:) in the print|show command. Adjust fields as desired.
|
||||
```
|
||||
gam info ou / nousers
|
||||
gam show teamdrives query "orgUnitId!='00gjdgxs2p9cxyz'" fields id,name,orgunit,createdtime
|
||||
gam print teamdrives query "orgUnitId!='00gjdgxs2p9cxyz'" fields id,name,orgunit,createdtime
|
||||
```
|
||||
|
||||
## Display List of Shared Drives in an Organizational Unit
|
||||
To use this command you must add the `Cloud Identity API` to your project and authorize
|
||||
the appropriate scope: `Cloud Identity OrgUnits API`.
|
||||
|
||||
You'll have to do `gam update project` and `gam oauth create` to enable this command.
|
||||
|
||||
Get the orgUnitID of the desired OU and use it (without the id:) in the print|show command. Adjust fields as desired.
|
||||
```
|
||||
gam show oushareddrives
|
||||
[ou|org|orgunit <OrgUnitPath>]
|
||||
[formatjson]
|
||||
gam info ou <OrgUnitPath> nousers
|
||||
gam show teamdrives query "orgUnitId='03ph8a2z21rexy'" fields id,name,orgunit,createdtime
|
||||
gam print teamdrives query "orgUnitId='03ph8a2z21rexy'" fields id,name,orgunit,createdtime
|
||||
```
|
||||
If `ou|org|orgunit <OrgUnitPath>` is not specified, `/` is used.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam print oushareddrives [todrive <ToDriveAttribute>*]
|
||||
[ou|org|orgunit <OrgUnitPath>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
If `ou|org|orgunit <OrgUnitPath>` is not specified, `/` is used.
|
||||
|
||||
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.
|
||||
|
||||
## Manage Shared Drive access
|
||||
These commands are used to manage the ACLs on Shared Drives themselves, not the files/folders on the Shared Drives.
|
||||
@@ -509,7 +526,7 @@ Find all the organizers and file organizers on the Golgafrincham shared drive in
|
||||
```
|
||||
|
||||
By default, all Shared Drives specified are displayed; use the following option to select a subset of those Shared Drives.
|
||||
* `<PermissionMatch>* [<PermissionMatchAction>] pmselect` - Use permission matching to select Shared Drives
|
||||
* `<PermissionMatch>* [<PermissionMatchAction>] pmselect` - Use permission matching to select Shared Drives; all ACLs are displayed for the selected Shared Drives
|
||||
|
||||
By default, all ACLS are displayed; use the following option to select a subset of the ACLS to display.
|
||||
* `<PermissionMatch>* [<PermissionMatchAction>]` - Use permission matching to display a subset of the ACLs for each Shared Drive; this only applies when `pmselect` is not specified
|
||||
@@ -548,7 +565,7 @@ By default, all Shared Drives are displayed; use the following options to select
|
||||
* `teamdriveadminquery|query <QueryTeamDrive>` - Use a query to select Shared Drives
|
||||
* `matchname <RegularExpression>` - Retrieve Shared Drives with names that match a pattern.
|
||||
* `orgunit|org|ou <OrgUnitPath>` - Only Shared Drives in the specified Org Unit are selected
|
||||
* `<PermissionMatch>* [<PermissionMatchAction>] pmselect` - Use permission matching to select Shared Drives
|
||||
* `<PermissionMatch>* [<PermissionMatchAction>] pmselect` - Use permission matching to select Shared Drives; all ACLs are displayed for the selected Shared Drives
|
||||
|
||||
By default, Shared Drives with no permissions are not displayed; use the `shownopermissionsdrives` to control whether
|
||||
Shared Drives with no permissions are displayed.
|
||||
@@ -580,10 +597,12 @@ Print ACLs for all Shared Drives in the organization created after November 1, 2
|
||||
```
|
||||
gam print teamdriveacls teamdriveadminquery "createdTime > '2017-11-01T00:00:00'"
|
||||
```
|
||||
|
||||
Print ACLs for all Shared Drives in the organization with foo@bar.com as an organizer.
|
||||
```
|
||||
gam print teamdriveacls user foo@bar.com role organizer
|
||||
```
|
||||
|
||||
Print ACLs for all Shared Drives in the organization with foo@bar.com or groups that contain foo@bar.com as a reader.
|
||||
```
|
||||
gam print teamdriveacls user foo@bar.com role reader checkgroups
|
||||
|
||||
@@ -191,6 +191,7 @@ direct the uploaded file to a particular user and location and add a timestamp t
|
||||
(tdnotify [<Boolean>])|
|
||||
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
||||
(tdretaintitle [<Boolean>])|
|
||||
(tdreturnidonly [<Boolean>])|
|
||||
(tdshare <EmailAddress> commenter|reader|writer)*|
|
||||
(tdsheet (id:<Number>)|<String>)|
|
||||
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
|
||||
@@ -238,6 +239,11 @@ If `tdfileid <DriveFileID>` is not specified, a new file is created.
|
||||
* `tdcellwrap clip|overflow|wrap` - The Spreadsheet cell wrapping strategy.
|
||||
* `tdcellnumberformat text|number` - The Spreadsheet number format.
|
||||
|
||||
## Report action, capture file ID
|
||||
* `tdreturnidonly` - If False, a message is written to stdout with the uploaded file URL; if True, only the uploaded file ID is written to stdout
|
||||
|
||||
The ID can be captured and used in subsequent commands, `tdfileid <DriveFileID>` that will update the same file.
|
||||
|
||||
## 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. 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`.
|
||||
@@ -304,15 +310,15 @@ gam redirect csv - todrive tdtitle "CrOS" tdtimestamp true tdfileid 12345-mizZ6Q
|
||||
|
||||
For a collection of users, generate a list of files shared with anyone; combine the output for all users into a single file.
|
||||
```
|
||||
gam redirect csv - multiprocess todrive tdtitle AnyoneShares-All csv Users.csv gam user ~primaryEmail print filelist fields id,name,permissions pm type anyone em
|
||||
gam redirect csv - multiprocess todrive tdtitle AnyoneShares-All csv Users.csv gam user "~primaryEmail" print filelist fields id,name,permissions pm type anyone em
|
||||
```
|
||||
|
||||
For a collection of users, generate a list of files shared with anyone; generate a separate file for each user.
|
||||
The two forms of the command are equivalent.
|
||||
```
|
||||
gam csv Users.csv gam redirect csv - todrive tdtitle "AnyoneShares-~~primaryEmail~~" user ~primaryEmail print filelist fields id,name,permissions pm type anyone em
|
||||
gam csv Users.csv gam redirect csv - todrive tdtitle "AnyoneShares-~~primaryEmail~~" user "~primaryEmail" print filelist fields id,name,permissions pm type anyone em
|
||||
|
||||
gam csv Users.csv gam user ~primaryEmail print filelist fields id,name,permissions pm type anyone em todrive tdtitle "AnyoneShares-~~primaryEmail~~"
|
||||
gam csv Users.csv gam user "~primaryEmail" print filelist fields id,name,permissions pm type anyone em todrive tdtitle "AnyoneShares-~~primaryEmail~~"
|
||||
```
|
||||
|
||||
Suppose you have a spreadsheet with sheets `Monday` ... `Friday`, `Backup Monday` ... `Backup Friday` and `Latest`.
|
||||
|
||||
@@ -31,8 +31,10 @@ Exit Status of 0 indicates no errors, and backup codes are sent to stdout.
|
||||
|
||||
Exit status of 60 indicates no errors, and that no backup codes are available for this user.
|
||||
```
|
||||
gam <UserTypeEntity> print backupcodes|verificationcodes [todrive <ToDriveAttributes>*] [delimiter <Character>]
|
||||
gam <UserTypeEntity> print backupcodes|verificationcodes [todrive <ToDriveAttributes>*]
|
||||
[delimiter <Character>] [countsonly]
|
||||
```
|
||||
Gam displays the information in CSV form.
|
||||
GAM displays the information in CSV form.
|
||||
|
||||
* `delimiter <Character>` - Separate `verificationCodes` entries with `<Character>`; the default value is `csv_output_field_delimiter` from `gam.cfg`.
|
||||
* `countsonly` - Display only the number of available backup codes but not the codes themselves.
|
||||
|
||||
@@ -243,6 +243,7 @@
|
||||
<EventType> ::=
|
||||
default|
|
||||
focustime|
|
||||
fromgmail|
|
||||
outofoffice|
|
||||
workinglocation
|
||||
<EventTypeList> ::= "<EventType>(,<EventType>)*"
|
||||
@@ -428,7 +429,7 @@ If none of the following options are selected, all events are selected.
|
||||
* `<EventSelectProperty>* <EventMatchProperty>*` - Properties used to select events
|
||||
|
||||
The Google Calendar API processes `<EventSelectProperty>*`; you may specify none or multiple properties.
|
||||
* `after|starttime|timemin <Time>` - Lower bound (inclusive) for an event's end time to filter by. If timeMax is set, timeMin must be smaller than timeMax.
|
||||
* `after|starttime|timemin <Time>` - Lower bound (exclusive) for an event's end time to filter by. If timeMax is set, timeMin must be smaller than timeMax.
|
||||
* `before|endtime|timemax <Time>` - Upper bound (exclusive) for an event's start time to filter by. If timeMin is set, timeMax must be greater than timeMin.
|
||||
* `eventtypes <EventTypeList>` - Select events based on their type.
|
||||
* `query <QueryCalendar>` - Free text search terms to find events that match these terms in any field, except for extended properties
|
||||
@@ -460,6 +461,7 @@ and must have the specified values.
|
||||
* `matchfield location <RegularExpression>` - The location must match `<RegularExpression>`
|
||||
* `matchfield organizeremail <RegularExpression>` - The organizer email address must match `<RegularExpression>`
|
||||
* `matchfield organizername <RegularExpression>` - The orgainzer name must match `<RegularExpression>`
|
||||
* `matchfield organizerself <Boolean>` - The user must be/not be the organizer of the event
|
||||
* `matchfield status <RegularExpression>` - The summary must match `<RegularExpression>`. The API documented values are:
|
||||
* `confirmed`
|
||||
* `tentative`
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Users - Chat
|
||||
- [API documentation](#api-documentation)
|
||||
- [Introduction](#introduction)
|
||||
- [Developer Preview Admin Access](#developer-preview-admin-access)
|
||||
- [Set up a Chat Bot](#set-up-a-chat-bot)
|
||||
- [Definitions](#definitions)
|
||||
- [Manage Chat Spaces](#manage-chat-spaces)
|
||||
@@ -19,6 +20,7 @@
|
||||
* 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
|
||||
* https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search
|
||||
|
||||
## Introduction
|
||||
These features were added in version 6.60.00.
|
||||
@@ -27,12 +29,57 @@ To use these commands you must update your service account authorization.
|
||||
```
|
||||
gam user user@domain.com update serviceaccount
|
||||
|
||||
[*] 3) Chat API - Memberships (supports readonly)
|
||||
[*] 4) Chat API - Messages (supports readonly)
|
||||
[*] 5) Chat API - Spaces (supports readonly)
|
||||
[*] 6) Chat API - Spaces Delete
|
||||
[*] 4) Chat API - Memberships (supports readonly)
|
||||
[*] 6) Chat API - Messages (supports readonly)
|
||||
[*] 7) Chat API - Spaces (supports readonly)
|
||||
[*] 9) Chat API - Spaces Delete
|
||||
|
||||
```
|
||||
|
||||
## Developer Preview Admin Access
|
||||
The Chat API Developer Preview allows an admin to perform certain actions
|
||||
on all Chat Spaces. These commands were added in version 6.77.00.
|
||||
|
||||
You must be enrolled in the Developer Preview program for the CHAT API to use these commands.
|
||||
|
||||
```
|
||||
gam <UserItem> delete chatspace asadmin
|
||||
gam <UserItem> update chatspace asadmin
|
||||
gam <UserItem> info chatspace asadmin
|
||||
gam <UserItem> print|show chatspaces asadmin
|
||||
gam <UserItem> create chatmember asadmin
|
||||
gam <UserItem> delete|remove chatmember asadmin
|
||||
gam <UserItem> update|modify chatmember asadmin
|
||||
gam <UserItem> sync chatmembers asadmin
|
||||
gam <UserItem> info chatmember asadmin
|
||||
gam <UserItem> print|show chatmembers|asadmin
|
||||
```
|
||||
To use these commands you must update your service account authorization.
|
||||
```
|
||||
gam user user@domain.com update serviceaccount
|
||||
|
||||
[*] 5) Chat API - Memberships Admin (supports readonly)
|
||||
[*] 8) Chat API - Spaces Admin (supports readonly)
|
||||
[*] 10) Chat API - Spaces Delete Admin
|
||||
```
|
||||
|
||||
Added `use_chat_admin_access` Boolean variable to `gam.cfg`.
|
||||
```
|
||||
* When False, GAM uses user access when making all Chat API calls. For calls that support admin access,
|
||||
this can be overridden with the asadmin command line option.
|
||||
* When True, GAM uses admin access for Chat API calls that support admin access; other calls will use user access.
|
||||
* Default: False
|
||||
```
|
||||
|
||||
If your account is not enrolled in the Chat API Developer Preview, you will see errors like this:
|
||||
```
|
||||
$ gam user admin@domain.com show chatspaces asadmin
|
||||
Getting all Chat Spaces that match query (customer = "customers/my_customer" AND spaceType = "SPACE") for admin@domain.com(asadmin)
|
||||
Chat Admin: admin@domain.com(asadmin), Show Failed: Method not found.
|
||||
```
|
||||
|
||||
To enroll in the Developer Preview program, see: https://developers.google.com/workspace/preview
|
||||
|
||||
Google requires that you have a Chat Bot configured in order to use the Chat API; set up a Chat Bot as described in the next section.
|
||||
|
||||
## Set up a Chat Bot
|
||||
@@ -81,6 +128,65 @@ Google requires that you have a Chat Bot configured in order to use the Chat API
|
||||
<ChatMessageID> ::= client-<String>
|
||||
<String> must contain only lowercase letters, numbers, and hyphens up to 56 characters in length.
|
||||
```
|
||||
```
|
||||
<ChatSpaceFieldName> ::=
|
||||
accesssettings|
|
||||
admininstalled|
|
||||
createtime|
|
||||
displayname|
|
||||
externaluserallowed|
|
||||
importmode|
|
||||
lastactivetime|
|
||||
membershipcount|
|
||||
name|
|
||||
singleuserbotdm|
|
||||
spacedetails|
|
||||
spacehistorystate|
|
||||
spacethreadingstate|threaded|
|
||||
spacetype|type|
|
||||
spaceuri
|
||||
<ChatSpaceFieldNameList> ::= "<ChatSpaceFieldName>(,<ChatSpaceFieldName>)*"
|
||||
|
||||
<ChatMemberFieldName> ::=
|
||||
createtime|
|
||||
deletetime|
|
||||
groupmember|
|
||||
member|
|
||||
name|
|
||||
role|
|
||||
state|
|
||||
<ChatMemberFieldNameList> ::= "<ChatMemberFieldName>(,<ChatMemberFieldName>)*"
|
||||
|
||||
<ChatMessageFieldName> ::=
|
||||
accessorywidgets|
|
||||
actionresponse|
|
||||
annotations|
|
||||
argumenttext|
|
||||
attachedgifs|
|
||||
attachment|
|
||||
cards|
|
||||
cardsv2|
|
||||
clientassignedmessageid|
|
||||
createtime|
|
||||
deletetime|
|
||||
deletionmetadata|
|
||||
emojireactionsummaries|
|
||||
fallbacktext|
|
||||
formattedtext|
|
||||
lastupdatetime|
|
||||
matchedurl|
|
||||
name|
|
||||
privatemessageviewer|
|
||||
quotedmessagemetadata|
|
||||
sender|
|
||||
slashcommand|
|
||||
space|
|
||||
text|
|
||||
thread|
|
||||
threadreply
|
||||
<ChatMessageFieldNameList> ::= "<ChatMessageFieldName>(,<ChatMessageFieldName>)*"
|
||||
|
||||
```
|
||||
|
||||
## Manage Chat Spaces
|
||||
### Create a chat space
|
||||
@@ -128,7 +234,7 @@ The `restricted|audience` options are in Developer Preview and will not be gener
|
||||
By default, details about the chatmessage are displayed.
|
||||
* `returnidonly` - Display the chatmessage name only
|
||||
|
||||
### Update a chat space
|
||||
### Update a user's chat space
|
||||
```
|
||||
gam <UserTypeEntity> update chatspace <ChatSpace>
|
||||
[restricted|(audience <String>)]|
|
||||
@@ -146,15 +252,39 @@ They are in Developer Preview and will not be generally available.
|
||||
By default, Gam displays the information about the created chatspace as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### Delete a chat space
|
||||
### Update a chat space, asadmin
|
||||
```
|
||||
gam <UserItem> update chatspace asadmin <ChatSpace>
|
||||
[restricted|(audience <String>)]|
|
||||
([displayname <String>]
|
||||
[type space]
|
||||
[description <String>] [guidelines|rules <String>]
|
||||
[history <Boolean>])
|
||||
[formatjson]
|
||||
```
|
||||
A groupchat space can be upgraded to a space by specifying `type space` and `displayname <String>`.
|
||||
|
||||
The `restricted|audience` options can not be combined with options `displayname,type,description,guidelines,history`.
|
||||
They are in Developer Preview and will not be generally available.
|
||||
|
||||
By default, Gam displays the information about the created chatspace as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### Delete a user's chat space
|
||||
```
|
||||
gam <UserTypeEntity> delete chatspace <ChatSpace>
|
||||
```
|
||||
|
||||
### Delete a chat space, asadmin
|
||||
```
|
||||
gam <UserItem> delete chatspace asadmin <ChatSpace>
|
||||
```
|
||||
|
||||
## Display Chat Spaces
|
||||
### Display information about a specific chat space for a user
|
||||
```
|
||||
gam <UserTypeEntity> info chatspace <ChatSpace>
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
@@ -163,6 +293,7 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
### Display information about a direct message chat space between two users
|
||||
```
|
||||
gam <UserTypeEntity> info chatspacedm <UserItem>
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
@@ -172,16 +303,24 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
```
|
||||
gam <UserTypeEntity> show chatspaces
|
||||
[types <ChatSpaceTypeList>]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, chat spaces of all types are displayed.
|
||||
* `types <ChatSpaceTypeList>` - Display specific types of spaces.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print chatspaces [todrive <ToDriveAttribute>*]
|
||||
[types <ChatSpaceTypeList>]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, chat spaces of all types are displayed.
|
||||
* `types <ChatSpaceTypeList>` - Display specific types of spaces.
|
||||
|
||||
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.
|
||||
|
||||
@@ -191,7 +330,7 @@ When using the `formatjson` option, double quotes are used extensively in the da
|
||||
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.
|
||||
|
||||
### Display information about all chat spaces
|
||||
### Display information about all user's chat spaces
|
||||
```
|
||||
# Local file
|
||||
gam config auto_batch_min 1 redirect csv ./AllChatSpaces.csv multiprocess redirect stdout - multiprocess redirect stderr stdout all users print chatspaces
|
||||
@@ -212,8 +351,56 @@ When using the `formatjson` option, double quotes are used extensively in the da
|
||||
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.
|
||||
|
||||
### Display information about a specific chat space, asadmin
|
||||
```
|
||||
gam <UserItem> info chatspace asadmin <ChatSpace>
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### Display information about all chat spaces, asadmin
|
||||
For query and orderby information, see: https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search
|
||||
|
||||
Only spaces of `<ChatSpaceType>` `space` are displayed; spaces of `<ChatSpaceType>` `groupchat` and `directmessage` are not displayed.
|
||||
```
|
||||
gam <UserItem> show chatspaces asadmin
|
||||
[query <String>] [querytime<String> <Time>]
|
||||
[orderby <ChatSpaceAdminOrderByFieldName> [ascending|descending]]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, all chat spaces of type SPACE are displayed.
|
||||
* `query <String> [querytime<String> <Time>]` - Display selected chat spaces
|
||||
* See: https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam <UserItem> print chatspaces asadmin [todrive <ToDriveAttribute>*]
|
||||
[query <String>] [querytime<String> <Time>]
|
||||
[orderby <ChatSpaceAdminOrderByFieldName> [ascending|descending]]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, all chat spaces of type SPACE are displayed.
|
||||
* `query <String> [querytime<String> <Time>]` - Display selected chat spaces
|
||||
* See: https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search
|
||||
|
||||
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.
|
||||
|
||||
|
||||
## Manage Chat Members
|
||||
### Add members to a chat space
|
||||
### Add members to a user's chat space
|
||||
```
|
||||
gam <UserTypeEntity> create chatmember <ChatSpace>
|
||||
[type human|bot] [role member|manager]
|
||||
@@ -225,7 +412,7 @@ By default, Gam displays the information about the chatmember as an indented lis
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
* `returnidonly` - Display the chatmember name only
|
||||
|
||||
### Delete members from a chat space
|
||||
### Delete members from a user's chat space
|
||||
Delete members by specifying a chat space and user/group email addresses.
|
||||
```
|
||||
gam <UserTypeEntity> delete chatmember <ChatSpace>
|
||||
@@ -233,12 +420,37 @@ gam <UserTypeEntity> delete chatmember <ChatSpace>
|
||||
(group <GroupItem>)|(groups <GroupEntity>))+
|
||||
```
|
||||
|
||||
Delete members by specifying chatmember names.
|
||||
Delete members from a user's chat space by specifying chatmember names.
|
||||
```
|
||||
gam <UserTypeEntity> remove chatmember members <ChatMemberList>
|
||||
```
|
||||
|
||||
### Update members role
|
||||
### Add members to a chat space, asadmin
|
||||
```
|
||||
gam <UserItem> create chatmember asadmin <ChatSpace>
|
||||
[type human|bot] [role member|manager]
|
||||
(user <UserItem>)* (members <UserTypeEntity>)*
|
||||
(group <GroupItem>)* (groups <GroupEntity>)*
|
||||
[formatjson|returnidonly]
|
||||
```
|
||||
By default, Gam displays the information about the chatmember as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
* `returnidonly` - Display the chatmember name only
|
||||
|
||||
### Delete members from a chat space, asadmin
|
||||
Delete members by specifying a chat space and user/group email addresses.
|
||||
```
|
||||
gam <UserItem> delete chatmember asadmin <ChatSpace>
|
||||
((user <UserItem>)|(members <UserTypeEntity>)|
|
||||
(group <GroupItem>)|(groups <GroupEntity>))+
|
||||
```
|
||||
|
||||
Delete members from a chat space by specifying chatmember names, asadmin
|
||||
```
|
||||
gam <UserItem> remove chatmember members asadmin <ChatMemberList>
|
||||
```
|
||||
|
||||
### Update a members role in a user's chat space
|
||||
Update members by specifying a chat space, user/group email addresses and role.
|
||||
```
|
||||
gam <UserTypeEntity> update chatmember <ChatSpace>
|
||||
@@ -252,31 +464,98 @@ gam <UserTypeEntity> modify chatmember
|
||||
members <ChatMemberList>
|
||||
```
|
||||
|
||||
### Update a members role in a chat space, asadmin
|
||||
Update members by specifying a chat space, user/group email addresses and role.
|
||||
```
|
||||
gam <UserItem> update chatmember asadmin <ChatSpace>
|
||||
role member|manager
|
||||
((user <UserItem>)|(members <UserTypeEntity>))+
|
||||
```
|
||||
Update members by specifying chatmember names and role.
|
||||
```
|
||||
gam <UserItem> modify chatmember asadmin
|
||||
role member|manager
|
||||
members <ChatMemberList>
|
||||
```
|
||||
|
||||
## Display Chat Members
|
||||
### Display information about a specific chat members
|
||||
### Display information about a user's specific chat members
|
||||
```
|
||||
gam <UserTypeEntity> info chatmember members <ChatMemberList>
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### Display information about all chat members in a chat space
|
||||
### Display information about members in a user's chat spaces
|
||||
```
|
||||
gam <UserTypeEntity> show chatmembers <ChatSpace>
|
||||
gam <UserTypeEntity> show chatmembers
|
||||
<ChatSpace>* [types <ChatSpaceTypeList>]
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
|
||||
By default, members for all of a user's chat spaces of all types are displayed.
|
||||
* `<ChatSpace>` - Display members for a specific chat space
|
||||
* `types <ChatSpaceTypeList>` - Display members for specific types of spaces.
|
||||
|
||||
By default, all JOINED user members in a chat space are displayed.
|
||||
* `showinvited` - Display `INVITED` members.
|
||||
* `showgroups` - Display group members,
|
||||
* `filter <String>` - Filter memberships by a member's `role `and `member.type`.
|
||||
* To filter by role, set role to ROLE_MEMBER or ROLE_MANAGER.
|
||||
* To filter by type, set member.type to HUMAN or BOT.
|
||||
* To filter by both role and type, use the AND operator.
|
||||
* To filter by either role or type, use the OR operator.
|
||||
|
||||
For example, the following filters are valid:
|
||||
```
|
||||
role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
||||
member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
||||
```
|
||||
The following filters are invalid:
|
||||
```
|
||||
member.type = "HUMAN" AND member.type = "BOT"
|
||||
role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
||||
```
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print chatmembers [todrive <ToDriveAttribute>*] <ChatSpace>
|
||||
gam <UserTypeEntity> print chatmembers [todrive <ToDriveAttribute>*]
|
||||
<ChatSpace>* [types <ChatSpaceTypeList>]
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
|
||||
By default, members for all of a user's chat spaces of all types are displayed.
|
||||
* `<ChatSpace>` - Display members for a specific chat space
|
||||
* `types <ChatSpaceTypeList>` - Display members for specific types of spaces.
|
||||
|
||||
By default, all JOINED user members in a chat space are displayed.
|
||||
* `showinvited` - Display `INVITED` members.
|
||||
* `showgroups` - Display group members,
|
||||
* `filter <String>` - Filter memberships by a member's `role `and `member.type`.
|
||||
* To filter by role, set role to ROLE_MEMBER or ROLE_MANAGER.
|
||||
* To filter by type, set member.type to HUMAN or BOT.
|
||||
* To filter by both role and type, use the AND operator.
|
||||
* To filter by either role or type, use the OR operator.
|
||||
|
||||
For example, the following filters are valid:
|
||||
```
|
||||
role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
||||
member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
||||
```
|
||||
The following filters are invalid:
|
||||
```
|
||||
member.type = "HUMAN" AND member.type = "BOT"
|
||||
role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
@@ -286,25 +565,95 @@ When using the `formatjson` option, double quotes are used extensively in the da
|
||||
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.
|
||||
|
||||
By default, only `JOINED` members are displayed; use `showinvited` to also display `INVITED` members.
|
||||
### Display information about specific chat members, asadmin
|
||||
```
|
||||
gam <UserItem> info chatmember asadmin members <ChatMemberList>
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
Use `filter <String>` to filter memberships by a member's `role `and `member.type`.
|
||||
* To filter by role, set role to ROLE_MEMBER or ROLE_MANAGER.
|
||||
* To filter by type, set member.type to HUMAN or BOT.
|
||||
* To filter by both role and type, use the AND operator.
|
||||
* To filter by either role or type, use the OR operator.
|
||||
### Display information about members all chat spaces, asadmin
|
||||
For query and orderby information, see: https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search
|
||||
```
|
||||
gam <UserItem> show chatmembers asadmin
|
||||
<ChatSpace>* [query <String>] [querytime<String> <Time>]
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
|
||||
For example, the following queries are valid:
|
||||
By default, members for all chat spaces of type SPACE are displayed.
|
||||
* `<ChatSpace>` - Display members for a specific chat space
|
||||
* `query <String> [querytime<String> <Time>]` - Display members for selected chat spaces
|
||||
* See: https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search
|
||||
|
||||
By default, all JOINED user members in a chat space are displayed.
|
||||
* `showinvited` - Display `INVITED` members.
|
||||
* `showgroups` - Display group members,
|
||||
* `filter <String>` - Filter memberships by a member's `role `and `member.type`.
|
||||
* To filter by role, set role to ROLE_MEMBER or ROLE_MANAGER.
|
||||
* To filter by type, set member.type to HUMAN or BOT.
|
||||
* To filter by both role and type, use the AND operator.
|
||||
* To filter by either role or type, use the OR operator.
|
||||
|
||||
For example, the following filters are valid:
|
||||
```
|
||||
role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
||||
member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
||||
```
|
||||
The following queries are invalid:
|
||||
The following filters are invalid:
|
||||
```
|
||||
member.type = "HUMAN" AND member.type = "BOT"
|
||||
role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
||||
```
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam <UserItem> print chatmembers asadmin [todrive <ToDriveAttribute>*]
|
||||
<ChatSpace>* [query <String>] [querytime<String> <Time>]
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
|
||||
By default, members for all chat spaces of type SPACE are displayed.
|
||||
* `<ChatSpace>` - Display members for a specific chat space
|
||||
* `query <String> [querytime<String> <Time>]` - Display members for selected chat spaces
|
||||
* See: https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search
|
||||
|
||||
By default, all JOINED user members in a chat space are displayed.
|
||||
* `showinvited` - Display `INVITED` members.
|
||||
* `showgroups` - Display group members,
|
||||
* `filter <String>` - Filter memberships by a member's `role `and `member.type`.
|
||||
* To filter by role, set role to ROLE_MEMBER or ROLE_MANAGER.
|
||||
* To filter by type, set member.type to HUMAN or BOT.
|
||||
* To filter by both role and type, use the AND operator.
|
||||
* To filter by either role or type, use the OR operator.
|
||||
|
||||
For example, the following filters are valid:
|
||||
```
|
||||
role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
||||
member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
||||
```
|
||||
The following filters are invalid:
|
||||
```
|
||||
member.type = "HUMAN" AND member.type = "BOT"
|
||||
role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
### Delete a user from their `space` and `groupchat` spaces
|
||||
There is no way to delete a user from a directmessage space.
|
||||
```
|
||||
@@ -397,6 +746,7 @@ Display a specific Chat message.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> info chatmessage name <ChatMessage>
|
||||
[fields <ChatMessageFieldNameList>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
@@ -409,16 +759,20 @@ gam user user@domain.com info chatmessage name spaces/AAAADi-pvqc/messages/PKJrx
|
||||
|
||||
### Display information about all chat messages in a chat space
|
||||
```
|
||||
gam <UserTypeEntity> show chatmessages <ChatSpace>
|
||||
gam <UserTypeEntity> show chatmessages
|
||||
<ChatSpace>+
|
||||
[showdeleted [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMessageFieldNameList>]
|
||||
[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 chatmessages [todrive <ToDriveAttribute>*] <ChatSpace>
|
||||
gam <UserTypeEntity> print chatmessages [todrive <ToDriveAttribute>*]
|
||||
<ChatSpace>+
|
||||
[showdeleted [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMessageFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
||||
@@ -482,7 +836,8 @@ gam user user@domain.com info chatevent name spaces/AAAAsUhqjkg/spaceEvents/MTcx
|
||||
|
||||
### Display information about all chat events in a chat space
|
||||
```
|
||||
gam <UserTypeEntity> show chatevents <ChatSpace>
|
||||
gam <UserTypeEntity> show chatevents
|
||||
<ChatSpace>+
|
||||
filter <String>
|
||||
[formatjson]
|
||||
```
|
||||
@@ -490,7 +845,8 @@ 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>
|
||||
gam <UserTypeEntity> print chatevents [todrive <ToDriveAttribute>*]
|
||||
<ChatSpace>+
|
||||
filter <String>
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
|
||||
@@ -70,7 +70,7 @@ Google has introduced Drive Activity API v2; it adds time and action filtering a
|
||||
Drive Activity API v1 has been deprecated.
|
||||
* https://developers.google.com/drive/activity/v2/migrating
|
||||
```
|
||||
gam <UserTypeEntity> print|show driveactivity [v2] [todrive <ToDriveAttributes>*]
|
||||
gam <UserTypeEntity> print driveactivity [v2] [todrive <ToDriveAttributes>*]
|
||||
[(fileid <DriveFileID>)|(folderid <DriveFolderID>)|
|
||||
(drivefilename <DriveFileName>)|(drivefoldername <DriveFolderName>)|
|
||||
(query <QueryDriveFile>)]
|
||||
@@ -79,7 +79,7 @@ gam <UserTypeEntity> print|show driveactivity [v2] [todrive <ToDriveAttributes>*
|
||||
[action|actions [not] <DriveActivityActionList>]
|
||||
[consolidationstrategy legacy|none]
|
||||
[idmapfile <FileName>|(gsheet <UserGoogleSheet>) [charset <String>] [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[stripcrsfromname] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Drive Activity API v2 is used; the `v2` option is ignored.
|
||||
|
||||
@@ -128,6 +128,9 @@ must be present in the file; the column `name.fullName` will be used if present.
|
||||
|
||||
If you don't use the `idmapfile` option, Gam makes an additional API call per user to get the name and email address.
|
||||
|
||||
The `stripcrsfromname` option strips nulls, carriage returns and linefeeds from drive file names.
|
||||
Use this option if you discover filenames containing these special characters; it is not common.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ gam <UserTypeEntity> delete emptydrivefolders
|
||||
[<SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
```
|
||||
By default, empty folders on My Drive are deleted. Use `select <DriveFileEntity>`
|
||||
By default, empty folders on My Drive are deleted(purged). Use `select <DriveFileEntity>`
|
||||
to select a Shared Drive or an alternate starting point folder on My Drive or a Shared Drive.
|
||||
|
||||
By default, folder path components are separated by `/`; use `pathdelimiter <Character>` to use `<Character>` as the separator.
|
||||
|
||||
@@ -28,9 +28,10 @@
|
||||
- [Display file list](#display-file-list)
|
||||
- [File selection by name and entity shortcuts for Display file list](#file-selection-by-name-and-entity-shortcuts-for-display-file-list)
|
||||
- [File selection starting point for Display file list](#file-selection-starting-point-for-display-file-list)
|
||||
- [File selection with a particular drive label](#file-selection-with-a-particular-drive-label)
|
||||
- [File selection with or without a particular drive label](#file-selection-with-or-without-a-particular-drive-label)
|
||||
- [Handle empty file lists](#handle-empty-file-lists)
|
||||
- [Display disk usage](#display-disk-usage)
|
||||
- [Display files published to the web](#display-files-published-to-the-web)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/drive/api/v3/reference/files
|
||||
@@ -55,6 +56,16 @@
|
||||
never|
|
||||
now|today
|
||||
|
||||
<SharedDriveID> ::= <String>
|
||||
<SharedDriveName> ::= <String>
|
||||
<SharedDriveIDEntity> ::= (teamdriveid <SharedDriveID>) | (teamdriveid:<SharedDriveID>)
|
||||
<SharedDriveNameEntity> ::= (teamdrive <SharedDriveName>) | (teamdrive:<SharedDriveName>)
|
||||
<SharedDriveFileNameEntity> ::= (teamdrivefilename <DriveFileName>) | (teamdrivefilename:<DriveFileName>)
|
||||
|
||||
<SharedDriveEntity> ::=
|
||||
<SharedDriveIDEntity> |
|
||||
<SharedDriveNameEntity>
|
||||
|
||||
<MimeTypeShortcut> ::=
|
||||
gdoc|gdocument|
|
||||
gdrawing|
|
||||
@@ -401,7 +412,7 @@ gam <UserTypeEntity> show fileinfo <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[showdrivename] [showshareddrivepermissions]
|
||||
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
|
||||
[showparentsidsaslist]
|
||||
[showparentsidsaslist] [followshortcuts [<Boolean>]]
|
||||
[stripcrsfromname]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> info drivefile <DriveFileEntity>
|
||||
@@ -411,7 +422,7 @@ gam <UserTypeEntity> info drivefile <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[showdrivename] [showshareddrivepermissions]
|
||||
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
|
||||
[showparentsidsaslist]
|
||||
[showparentsidsaslist] [followshortcuts [<Boolean>]]
|
||||
[stripcrsfromname]
|
||||
[formatjson]
|
||||
```
|
||||
@@ -475,6 +486,9 @@ gam user user@domain.com show fileinfo <DriveFileEntity> fields id,name,mimetype
|
||||
The `stripcrsfromname` option strips nulls, carriage returns and linefeeds from drive file names.
|
||||
Use this option if you discover filenames containing these special characters; it is not common.
|
||||
|
||||
Starting in version 6.80.10, the option `followshortcuts [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to display information about the target of the shortcut rather than the shortcut itself.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
@@ -485,10 +499,12 @@ gam <UserTypeEntity> show filepath <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[stripcrsfromname]
|
||||
[folderpathonly [<Boolean>]] [fullpath] [pathdelimiter <Character>]
|
||||
[followshortcuts [<Boolean>]]
|
||||
gam <UserTypeEntity> print filepath <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[stripcrsfromname] [oneitemperrow]
|
||||
[fullpath] [folderpathonly [<Boolean>]] [pathdelimiter <Character>]
|
||||
[followshortcuts [<Boolean>]]
|
||||
```
|
||||
Use `returnpathonly` to display just the file path of the files in `<DriveFileEntity>`.
|
||||
|
||||
@@ -506,6 +522,9 @@ Use this option if you discover filenames containing these special characters; i
|
||||
By default, when printing file paths, all paths for a file are displayed on the same row; use `oneitemperrow` to
|
||||
have each file path displayed on a separate row.
|
||||
|
||||
Starting in version 6.80.10, the option `followshortcuts [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to display path information for the target of the shortcut rather than the shortcut itself.
|
||||
|
||||
## Select files for Display file counts, list, tree
|
||||
Most GAM commands that deal with files require a `<DriveFileEntity>` to be specified; the command
|
||||
then processes those files. The `filecounts`, `filelist` and `filetree` commands don't process files, they just list them.
|
||||
@@ -531,15 +550,22 @@ See: [Drive File Selection](Drive-File-Selection) for details of `<DriveFileName
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
my_forms |
|
||||
my_google_files |
|
||||
my_non_google_files |
|
||||
my_presentations |
|
||||
my_publishable_items |
|
||||
my_sheets |
|
||||
my_shortcuts |
|
||||
my_slides |
|
||||
my_3p_shortcuts |
|
||||
my_items |
|
||||
my_forms |
|
||||
my_top_files |
|
||||
my_top_folders |
|
||||
my_top_items |
|
||||
others_files |
|
||||
others_folders |
|
||||
others_forms |
|
||||
@@ -658,6 +684,7 @@ Print or show file counts by MIME type and/or file name.
|
||||
gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
@@ -666,11 +693,13 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize]
|
||||
[showsize] [showmimetypesize] [showlastmodification]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
gam <UserTypeEntity> show filecounts
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
@@ -679,16 +708,29 @@ gam <UserTypeEntity> show filecounts
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize]
|
||||
[showsize] [showmimetypesize] [showlastmodification]
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
```
|
||||
|
||||
By default, print filecounts displays counts of all files owned by the specified [`<UserTypeEntity>`](Collections-of-Users).
|
||||
|
||||
The option `continueoninvalidquery [<Boolean>] can be used in special cases where a query of the form
|
||||
`query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels" causes Google to issue an error
|
||||
saying that the query is invalid when, in fact, it is but the user does not have a license that suppprts drive file labels.
|
||||
When `continueoninvalidquery` is true, GAM prints an error message and proceeds to the next user rather that terminating
|
||||
as it does now. Of course, if the query really is invalid, you will get the message for every user.
|
||||
|
||||
The `showsize` option displays the total size (in bytes) of the files counted.
|
||||
|
||||
The showmimetypesize' displays the total size (in bytes) of each MIME type counted.
|
||||
|
||||
The option `showlastmodification` displays the following fields:
|
||||
`lastModifiedFileId,lastModifiedFileName,lastModifyingUser,lastModifiedTime`;
|
||||
these are for the most recently modified file.
|
||||
|
||||
For print filecouts, add additional columns of data from the command line to the output:
|
||||
* `addcsvdata <FieldName> <String>` - Add additional columns of data from the command line to the output
|
||||
|
||||
See [Select files for Display file counts, list, tree](#select-files-for-display-file-counts-list-tree)
|
||||
|
||||
Use the `excludetrashed` option to suppress counting files in the trash.
|
||||
@@ -1006,6 +1048,7 @@ Display a list of file/folder details in CSV format.
|
||||
gam <UserTypeEntity> print|show filelist [todrive <ToDriveAttribute>*]
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[choose <DriveFileNameEntity>|<DriveFileEntityShortcut>]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
@@ -1032,6 +1075,12 @@ gam <UserTypeEntity> print|show filelist [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
By default, `print filelist` displays all files owned by the specified [`<UserTypeEntity>`](https://github.com/taers232c/GAMADV-XTD3/wiki/Collections-of-Users)
|
||||
|
||||
The option `continueoninvalidquery [<Boolean>] can be used in special cases where a query of the form
|
||||
`query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels" causes Google to issue an error
|
||||
saying that the query is invalid when, in fact, it is but the user does not have a license that suppprts drive file labels.
|
||||
When `continueoninvalidquery` is true, GAM prints an error message and proceeds to the next user rather that terminating
|
||||
as it does now. Of course, if the query really is invalid, you will get the message for every user.
|
||||
|
||||
When `allfields` is specified (or no fields are specified), use `showshareddrivepermissions` to display permissions
|
||||
when shared drives are queried/selected. In this case, the Drive API returns the permission IDs
|
||||
but not the permissions themselves so GAM makes an additional API call per file to get the permissions.
|
||||
@@ -1475,7 +1524,7 @@ testuser@domain.com,Bottom Folder 11,1,My Drive/Top Folder/Middle Folder 1/Botto
|
||||
testuser@domain.com,Bottom Sheet 11,1,My Drive/Top Folder/Middle Folder 1/Bottom Folder 11/Bottom Sheet 11
|
||||
```
|
||||
|
||||
## File selection with a particular drive label
|
||||
## File selection with or without a particular drive label
|
||||
The Drive API doesn't support querying for a drive label, so GAM must do the filtering.
|
||||
|
||||
Get the label id.
|
||||
@@ -1485,9 +1534,13 @@ gam show drivelabels
|
||||
|
||||
Find the label with properties:title: XXX where XXX is the desired label title, then get its id: value
|
||||
|
||||
List the files.
|
||||
List the files with the label
|
||||
```
|
||||
gam config csv_output_row_filter "labelInfo.labels.0.id:regex:PutLabelIdHere" user user@domain.com print filelist fields id,name,labelinfo includelabels PutLabelIdHere
|
||||
gam config csv_output_row_filter "labels:count>0" user user@domain.com print filelist fields id,name,mimetype showlabels ids includelabels PutLabelIdHere
|
||||
```
|
||||
List the files without the label
|
||||
```
|
||||
gam config csv_output_row_filter "labels:count=0" user user@domain.com print filelist fields id,name,mimetype showlabels ids includelabels PutLabelIdHere
|
||||
```
|
||||
|
||||
Adjust the `fields` list as desired.
|
||||
@@ -1501,8 +1554,8 @@ Getting all Drive Files/Folders that match query ('me' in owners and name contai
|
||||
Got 0 Drive Files/Folders that matched query ('me' in owners and name contains 'abcd') for user@domain.com...
|
||||
$ more Files.csv
|
||||
Owner
|
||||
$ gam csv Files.csv gam user ~Owner show fileinfo ~id permissions
|
||||
Command: /Users/admin/bin/gam csv Files.csv gam user ~Owner show fileinfo >>>~id<<< permissions
|
||||
$ gam csv Files.csv gam user "~Owner" show fileinfo "~id" permissions
|
||||
Command: /Users/admin/bin/gam csv Files.csv gam user "~Owner" show fileinfo >>>~id<<< permissions
|
||||
|
||||
ERROR: Header "id" not found in CSV headers of "Owner".
|
||||
Help: Syntax in file /Users/admin/bin/gam/GamCommands.txt
|
||||
@@ -1516,7 +1569,7 @@ Getting all Drive Files/Folders that match query ('me' in owners and name contai
|
||||
Got 0 Drive Files/Folders that matched query ('me' in owners and name contains 'abcd') for user@domain.com...
|
||||
$ more Files.csv
|
||||
Owner,id,name
|
||||
$ gam csv Files.csv gam user ~Owner show fileinfo ~id permissions
|
||||
$ gam csv Files.csv gam user "~Owner" show fileinfo "~id" permissions
|
||||
$
|
||||
```
|
||||
|
||||
@@ -1613,40 +1666,67 @@ Use the `show` option to control the display of data:
|
||||
|
||||
### Examples
|
||||
```
|
||||
$ gam redirect csv ./MyDriveUsage.csv user testsimple@domain.com print diskusage mydrive
|
||||
User: testsimple@domain.com, Print 1 Drive Disk Usage
|
||||
$ gam redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage mydrive
|
||||
User: user@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,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
|
||||
user@domain.com,user@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
user@domain.com,user@domain.com,456YenC8f12ALfndaQ1NHc0RtUG92Y1BIUUl4bjVBRmNkWG5oakNqVVFDcXJWOHNmdFlwZmc,Classroom,True,False,False,0,0,15,9,6840,17,0,My Drive/Classroom
|
||||
user@domain.com,user@domain.com,0B3YenC8f12ALfmRuX3I4WFlqaTRnMGhXNkVvWV9UUG1zRDQwY1BwVkJhUGx5WHVIcjJKZUU,TestUpdate,True,False,False,2,3420,0,2,3420,0,1,My Drive/Classroom/TestUpdate
|
||||
user@domain.com,user@domain.com,1MT5xJ897oYa0Q2OuzBDfLHvig6k_b0EKaovVA2imGYcnrmqZu5hjlJkEPMH-rHKj4qDyy9_j,TS Course,True,False,False,0,0,0,0,0,0,1,My Drive/Classroom/TS Course
|
||||
user@domain.com,user@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,0,My Drive/XferFolder
|
||||
testsimple@domain.com,testsimple@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
user@domain.com,user@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,0,My Drive/XferFolder
|
||||
user@domain.com,user@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
|
||||
$ gam config csv_output_row_filter "depth:count<1" redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage mydrive
|
||||
User: user@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
|
||||
user@domain.com,user@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
user@domain.com,user@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
|
||||
user@domain.com,user@domain.com,1bHS_Tp77W3KSGRNSs_jP1RhAJhIGRCaI,XferFolder,True,False,False,1,1024,0,1,1024,0,0,My Drive/XferFolder
|
||||
user@domain.com,user@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
|
||||
$ gam redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage mydrive show summaryandtrash
|
||||
User: user@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,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
user@domain.com,user@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
user@domain.com,user@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
|
||||
$ gam redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage shareddriveid 0AL5LiIe4dqxZUk9PVA show summaryandtrash
|
||||
User: user@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
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
|
||||
user@domain.com,0125LiIe4dqxZUk9PVA,TS Shared Drive 1,False,False,16,6144,7,42,73799,25,-1,SharedDrives/TS Shared Drive 1
|
||||
user@domain.com,Trash,Trash,True,True,1,1024,0,1,1024,0,-1,Trash
|
||||
```
|
||||
|
||||
## Display files published to the web
|
||||
Ths requires version 6.80.13 or later.
|
||||
|
||||
You can display files published to the web.
|
||||
```
|
||||
# Get the published files
|
||||
gam config csv_output_header_filter "Owner,id,revisions.0.published,revisions.0.publishedOutsideDomain" csv_output_row_filter "revisions.0.published:boolean:true" auto_batch_min 1 num_threads 20 redirect csv ./PublishedDocs.csv multiprocess redirect stderr - multiprocess <UserTypeEntity> print filerevisions my_publishable_items select last 1
|
||||
# Get the files name, MIMEtype and path
|
||||
gam redirect csv ./PublishedDocsWithName.csv multiprocess redirect stderr - multiprocess csv ./PublishedDocs.csv gam user "~Owner" print filelist select "~id" fields id,name,mimetype fullpath addcsvdata published "~revisions.0.published" addcsvdata publishedOutsideDomain "~revisions.0.publishedOutsideDomain"
|
||||
```
|
||||
|
||||
You can display files published to the web internally for your domain only.
|
||||
```
|
||||
# Get the internally only published files
|
||||
gam config csv_output_header_filter "Owner,id,revisions.0.published,revisions.0.publishedOutsideDomain" csv_output_row_filter "revisions.0.published:boolean:true,revisions.0.publishedOutsideDomain:boolean:false" auto_batch_min 1 num_threads 20 redirect csv ./PublishedDocs.csv multiprocess redirect stderr - multiprocess <UserTypeEntity> print filerevisions my_publishable_items select last 1
|
||||
# Get the files name, MIMEtype and path
|
||||
gam redirect csv ./PublishedDocsWithName.csv multiprocess redirect stderr - multiprocess csv ./PublishedDocs.csv gam user "~Owner" print filelist select "~id" fields id,name,mimetype fullpath addcsvdata published "~revisions.0.published" addcsvdata publishedOutsideDomain "~revisions.0.publishedOutsideDomain"
|
||||
```
|
||||
|
||||
You can display files published to the web externally outside of your domain.
|
||||
```
|
||||
# Get the externally published files
|
||||
gam config csv_output_header_filter "Owner,id,revisions.0.published,revisions.0.publishedOutsideDomain" csv_output_row_filter "revisions.0.published:boolean:true,revisions.0.publishedOutsideDomain:boolean:true" auto_batch_min 1 num_threads 20 redirect csv ./PublishedDocs.csv multiprocess redirect stderr - multiprocess <UserTypeEntity> print filerevisions my_publishable_items select last 1
|
||||
# Get the files name, MIMEtype and path
|
||||
gam redirect csv ./PublishedDocsWithName.csv multiprocess redirect stderr - multiprocess csv ./PublishedDocs.csv gam user "~Owner" print filelist select "~id" fields id,name,mimetype fullpath addcsvdata published "~revisions.0.published" addcsvdata publishedOutsideDomain "~revisions.0.publishedOutsideDomain"
|
||||
```
|
||||
|
||||
@@ -284,7 +284,7 @@ mary@domain.com, Mary Smith
|
||||
|
||||
# Create the student folders on the Shared Drive
|
||||
gam redirect csv ./StudentFolders.csv multiprocess csv Students.csv gam user admin@domain.com create drivefile mimetype gfolder drivefilename "~~Name~~ Digital Portfolio" parentid <TeamDriveID> csv addcsvdata primaryEmail "~primaryEmail"
|
||||
# Add ACLs granting the students write access to their folders; ~User refers to admin@domain.com
|
||||
# Add ACLs granting the students write access to their folders; "~User" refers to admin@domain.com
|
||||
gam csv StudentFolders.csv gam user "~User" add drivefileacl "~id" user "~primaryEmail" role fileorganizer
|
||||
# Add a shortcut to the folder on the student's My Drive
|
||||
gam csv StudentFolders.csv gam user "~primaryEmail" create drivefileshortcut "~id" parentid root
|
||||
@@ -519,6 +519,7 @@ You can update a specific sheet within a Google spreadsheet or add a new sheet t
|
||||
* `addsheet <String>` - Specify a sheet name to be added to the Google Sheets file
|
||||
* `charset <Charset>` - Specify the character set of the local file; if not specified, the value of `charset` from `gam.cfg` will be used
|
||||
* `columndelimiter <Character>` - Columns are separated by `<Character>`; if not specified, the value of `csv_input_column_delimiter` from `gam.cfg` will be used
|
||||
|
||||
If you want the Google spreadsheet to retain its name, specify: `retainname localfile LocalFile.csv`.
|
||||
|
||||
By default, the user, file name, updated file name and id values are displayed on stdout.
|
||||
@@ -543,6 +544,7 @@ gam <UserTypeEntity> get drivefile <DriveFileEntity> [revision <DriveFileRevisio
|
||||
[(format <FileFormatList>)|(gsheet|csvsheet <SheetEntity>)] [exportsheetaspdf <String>]
|
||||
[targetfolder <FilePath>] [targetname <FileName>|-]
|
||||
[donotfollowshortcuts [<Boolean>]] [overwrite [<Boolean>]] [showprogress [<Boolean>]]
|
||||
[acknowledgeabuse [<Boolean>]]
|
||||
```
|
||||
By default, Google Docs/Sheets/Slides are converted to Open Office format when downloaded. If you want a
|
||||
different format for these files or are downloading a different type of file, you must specify the format.
|
||||
@@ -612,36 +614,54 @@ When getting a drivefile, you can show download progress information with the `s
|
||||
* `showprogress true` - Show download progress information
|
||||
* `showprogress false` - Do not show download progress information
|
||||
|
||||
You may get the following error from Google when trying to download a file:
|
||||
```
|
||||
Download Failed: This file has been identified as malware or spam and cannot be downloaded.
|
||||
```
|
||||
Use the `acknowledgeabuse` option to control downloading the file.
|
||||
* `acknowledgeabuse` - Download the file; `the user is acknowledging the risk of downloading known malware or other abusive files`
|
||||
* `acknowledgeabuse true` - Download the file; `the user is acknowledging the risk of downloading known malware or other abusive files`
|
||||
* `acknowledgeabuse false` - Do not download the file; this is the default
|
||||
|
||||
### Example: Download a CSV file and execute a Gam command on its contents
|
||||
Suppose you have a Google Sheets file UserSheet with multiple sheets, one of which is named NewUsers; it has a column labelled primaryEmail.
|
||||
|
||||
The following command will download the sheet and show the name for each user in the column.
|
||||
```
|
||||
gam user user@domain.com get drivefile drivefilename UserSheet csvsheet NewUsers targetname - | gam redirect stdout - multiprocess csv - gam info user ~primaryEmail name nogroups nolicenses
|
||||
gam user user@domain.com get drivefile drivefilename UserSheet csvsheet NewUsers targetname - | gam redirect stdout - multiprocess csv - gam info user "~primaryEmail" name nogroups nolicenses
|
||||
```
|
||||
* The `redirect stdout - multiprocess` option produces clean output from the multiple processes
|
||||
|
||||
## Trash files
|
||||
Move a file or folder to the trash. If a folder is moved to the trash, all of its child files and folders are moved to the trash.
|
||||
```
|
||||
gam <UserTypeEntity> trash drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> trash
|
||||
gam <UserTypeEntity> trash drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> trash [shortcutandtarget [<Boolean>]]
|
||||
```
|
||||
|
||||
Starting in version 6.80.10, the option `shortcutandtarget [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
## Untrash files
|
||||
Remove a file or folder from the trash. If a folder is removed from the trash, all of its child files and folders are removed from the trash.
|
||||
```
|
||||
gam <UserTypeEntity> untrash drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> untrash
|
||||
gam <UserTypeEntity> untrash drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> untrash [shortcutandtarget [<Boolean>]]
|
||||
```
|
||||
|
||||
Starting in version 6.80.10, the option `shortcutandtarget [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
## Purge files
|
||||
Purging a file permanently deletes it; it can not be recovered. If a folder is purged, all of its child files and folders are purged.
|
||||
```
|
||||
gam <UserTypeEntity> purge drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> purge
|
||||
gam <UserTypeEntity> purge drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> delete|del drivefile <DriveFileEntity> purge [shortcutandtarget [<Boolean>]]
|
||||
```
|
||||
|
||||
Starting in version 6.80.10, the option `shortcutandtarget [<Boolean>]` that when true and `<DriveFileEntity` is a shortcut,
|
||||
causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
## Download Google Documents as JSON
|
||||
```
|
||||
gam <UserTypeEntity> get document <DriveFileEntity>
|
||||
|
||||
@@ -63,6 +63,10 @@ gam <UserTypeEntity> transfer ownership <DriveFileEntity> <UserItem>
|
||||
(orderby <DriveOrderByFieldName> [ascending|descending])*
|
||||
[preview] [filepath] [pathdelimiter <Character>] [buildtree] [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
`<DriveFileEntity>` specifies a file/folder owned by the source user `<UserTypeEntity>`.
|
||||
|
||||
The target user is specified by `<UserItem>`.
|
||||
|
||||
By default, there is no change of parents for the transferred files/folders, they remain in their current location.
|
||||
* `<DriveFileParentAttribute>` - Specify a parent folder in the My Drive of the target user `<UserItem>`.
|
||||
|
||||
@@ -92,7 +96,7 @@ point to control the students further access to the files.
|
||||
```
|
||||
gam <UserTypeEntity> claim ownership <DriveFileEntity>
|
||||
[<DriveFileParentAttribute>] [includetrashed]
|
||||
[skipids <DriveFileEntity>] [skipusers <UserTypeEntity>] [subdomains <DomainNameEntity>]
|
||||
[skipids <DriveFileEntity>] [onlyusers|skipusers <UserTypeEntity>] [subdomains <DomainNameEntity>]
|
||||
[restricted [<Boolean>]] [writerscanshare|writerscantshare [<Boolean>]]
|
||||
[keepuser | (retainrole reader|commenter|writer|editor|none)] [noretentionmessages]
|
||||
(orderby <DriveOrderByFieldName> [ascending|descending])*
|
||||
@@ -107,8 +111,11 @@ By default, files in the trash are not transferred.
|
||||
Specify order of file processing.
|
||||
* `(orderby <DriveOrderByFieldName> [ascending|descending])*`
|
||||
|
||||
These options handle special cases where you want to prevent ownership from being transferred for selected files/folders.
|
||||
This option handles special cases where you want to prevent ownership from being transferred for selected files/folders.
|
||||
* `skipids <DriveFileEntity>` - Do not transfer ownership for files/folders with the specified IDs.
|
||||
|
||||
These mutually exclusive options handle special cases where you want to prevent ownership from being transferred based on the current file/folder owner.
|
||||
* `onlyusers <UserTypeEntity>` - Only transfer ownership for files/folders owned by the specified users.
|
||||
* `skipusers <UserTypeEntity>` - Do not transfer ownership for files/folders owned by the specified users.
|
||||
|
||||
By default, only files owned by users in the same domain as the claiming user have their ownership transferred.
|
||||
|
||||
@@ -25,6 +25,22 @@
|
||||
<UniqueID> ::= id:<String>
|
||||
<UserItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
createddate|createdtime|
|
||||
folder|
|
||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||
modifieddate|modifiedtime|
|
||||
name|
|
||||
name_natural|
|
||||
quotabytesused|quotaused|
|
||||
recency|
|
||||
sharedwithmedate|sharedwithmetime|
|
||||
starred|
|
||||
title|
|
||||
title_natural|
|
||||
viewedbymedate|viewedbymetime
|
||||
|
||||
<DrivePermissionsFieldName> ::=
|
||||
additionalroles|
|
||||
allowfilediscovery|
|
||||
|
||||
@@ -85,6 +85,8 @@ gam <UserTypeEntity> update filerevisions <DriveFileEntity> select <DriveFileRev
|
||||
```
|
||||
When `select <DriveFileRevisionIDEntity>` is omitted, all revisions are updated.
|
||||
|
||||
* `keepforever true` - Keep revision forever, even if it is no longer the head revision
|
||||
* `keepforever false` - Do not keep revision forever
|
||||
* `published true` - Publish these revision to the web
|
||||
* `published false` - Do not publish these revision to the web
|
||||
* `publishauto true` - Automaticaly publish subsequent revisions to the web
|
||||
|
||||
@@ -19,6 +19,22 @@
|
||||
<EmailAddress> ::= <String>@<DomainName>
|
||||
<UniqueID> ::= id:<String>
|
||||
<UserItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
createddate|createdtime|
|
||||
folder|
|
||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||
modifieddate|modifiedtime|
|
||||
name|
|
||||
name_natural|
|
||||
quotabytesused|quotaused|
|
||||
recency|
|
||||
sharedwithmedate|sharedwithmetime|
|
||||
starred|
|
||||
title|
|
||||
title_natural|
|
||||
viewedbymedate|viewedbymetime
|
||||
```
|
||||
## GAM Data Transfers
|
||||
```
|
||||
|
||||
@@ -87,3 +87,8 @@ Show forwarding addresses for all users with forwarding on.
|
||||
gam config auto_batch_min 1 num_threads 5 redirect csv ./FowardEnabledUsers.csv multiprocess redirect stdout - multiprocess redirect stderr stdout all users print forward enabledonly
|
||||
gam redirect csv ./FowardEnabledUsersForwardingAddresses.csv multiprocess redirect stdout - multiprocess redirect stderr stdout csv ./FowardEnabledUsers.csv gam user "~User" print forwardingaddresses
|
||||
```
|
||||
|
||||
Show forwarding addresses that are not your domain for all users with forwarding on.
|
||||
```
|
||||
gam config csv_output_row_drop_filter "forwardTo:regex:yourdomain.com" auto_batch_min 1 num_threads 20 redirect csv ./NonDomainForwards.csv multiprocess redirect stdout - multiprocess redirect stderr stdout all users print forward enabledonly
|
||||
```
|
||||
@@ -244,7 +244,7 @@ gam <UserTypeEntity> draft message
|
||||
* `file|htmlfile <FileName> [charset <Charset>]` - Read the message from `<FileName>`
|
||||
* `gdoc|ghtml <UserGoogleDoc>` - Read the message from `<UserGoogleDoc>`
|
||||
* `gcsdoc|gcshtml <StorageBucketObjectName>` - Read the message from the Google Cloud Storage file `<StorageBucketObjectName>`
|
||||
* `emlfile <FileName> [charset <Charset>]` - Read the message from the EML message file `<FileName>`. SMTP headers specified in the command will replace those in the message file. The default `chatser` is `ascii`.
|
||||
* `emlfile <FileName> [charset <Charset>]` - Read the message from the EML message file `<FileName>`. SMTP headers specified in the command will replace those in the message file. The default `charset` is `ascii`.
|
||||
|
||||
The `<SMTPDateHeader> <Time>` argument requires `<Time>` values which will be converted to RFC2822 dates. If you have these headers with values that
|
||||
are not in `<Time>` format, use the argument `header <SMTPDateHeader> <String>`.
|
||||
@@ -261,7 +261,7 @@ Your HTML message will contain lines like this:
|
||||
<img src="cid:image2"/>
|
||||
```
|
||||
|
||||
Your command line will have: `embedimage file1.jpg image1` embedimage file2.jpg image2`
|
||||
Your command line will have: `embedimage file1.jpg image1 embedimage file2.jpg image2`
|
||||
|
||||
## Import messages
|
||||
Import a message into a user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP.
|
||||
@@ -440,7 +440,7 @@ gam <UserTypeEntity> delete messages|threads
|
||||
gam <UserTypeEntity> modify messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
|
||||
(addlabel <LabelName>)* (removelabel <LabelName>)*
|
||||
((addlabel <LabelName>)|(removelabel <LabelName>))+
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> spam messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
@@ -583,7 +583,7 @@ By default, the Message ID and these SMTP headers are displayed: `Date, Subject,
|
||||
Use these options to customize the display.
|
||||
|
||||
By default, the `<SMTPDateHeader>` values are displayed in RFC2822 format; the `dateheaderformat iso|rfc2822|<String>` option allows reformatting it:
|
||||
* `iso` - Format is `%Y-%m-%dT%H:%M:%S%z`
|
||||
* `iso` - Format is `%Y-%m-%dT%H:%M:%S%:z`
|
||||
* `rfc2822` - Format is `%a, %d %b %Y %H:%M:%S %z`
|
||||
* `<String>` - Format according to: https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
|
||||
If the `Date` header value can't be parsed as RFC2822, it is left unchanged.
|
||||
|
||||
@@ -210,11 +210,13 @@ gam config csv_output_row_filter "signature:boolean:false"
|
||||
|
||||
## Manage vacation
|
||||
```
|
||||
gam <UserTypeEntity> vacation <Boolean> subject <String>
|
||||
gam <UserTypeEntity> vacation [<Boolean>] [subject <String>]
|
||||
[<VacationMessageContent> (replace <Tag> <UserReplacement>)*]
|
||||
[html [<Boolean>]] [contactsonly [<Boolean>]] [domainonly [<Boolean>]]
|
||||
[start|startdate <Date>|Started] [end|enddate <Date>|NotSpecified]
|
||||
```
|
||||
The initial `<Boolean>` can be omitted to allow updates to other fields without affecting the current responder state.
|
||||
|
||||
`<VacationMessageContent>` is the vacation message, there are four ways to specify it:
|
||||
* `message|textmessage|htmlmessage <String>` - Use `<String>` as the vacation message
|
||||
* `file|htmlfile <FileName> [charset <Charset>]` - Read the vacation message from `<FileName>`
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
- [Display group details in CSV format](#display-group-details-in-csv-format)
|
||||
- [Display group counts as an indented list](#display-group-counts-as-an-indented-list)
|
||||
- [Display group counts in CSV format](#display-group-counts-in-csv-format)
|
||||
- [Display total group counts as an indented list](#display-total-group-counts-as-an-indented-list)
|
||||
- [Display total group counts in CSV format](#display-total-group-counts-in-csv-format)
|
||||
- [Display group addresses in CSV format](#display-group-addresses-in-csv-format)
|
||||
- [Display groups and their parents](#display-groups-and-their-parents)
|
||||
- [Add a target user to the same groups as a source user](#add-a-target-user-to-the-same-groups-as-a-source-user)
|
||||
@@ -81,7 +83,7 @@ $ gam csvkmd users UserGroupRole.csv keyfield User print groups
|
||||
User,Group,Role,Status,Delivery
|
||||
|
||||
# Add users to groups
|
||||
$ gam redirect stdout - multiprocess csv UserGroupRole.csv gam user ~User add group ~Role ~Delivery ~Group
|
||||
$ gam redirect stdout - multiprocess csv UserGroupRole.csv gam user "~User" add group "~Role" "~Delivery" "~Group"
|
||||
Using 5 processes...
|
||||
User: testuser1@domain.com, Add to 1 Group
|
||||
Group: testgroup1@domain.com, Owner: testuser1@domain.com, Added
|
||||
@@ -249,7 +251,7 @@ testuser2@domain.com,testgroup2@domain.com,MANAGER,ACTIVE,DAILY
|
||||
testuser3@domain.com,testgroup2@domain.com,OWNER,ACTIVE,DIGEST
|
||||
|
||||
# Update roles/delivery settings
|
||||
$ gam redirect stdout - multiprocess csv UserGroupRoleNew.csv gam user ~User update group ~Role ~Delivery ~Group
|
||||
$ gam redirect stdout - multiprocess csv UserGroupRoleNew.csv gam user "~User" update group "~Role" "~Delivery" "~Group"
|
||||
Using 3 processes...
|
||||
User: testuser2@domain.com, Update to 1 Group
|
||||
Group: testgroup2@domain.com, Manager: testuser2@domain.com, Updated
|
||||
@@ -357,7 +359,7 @@ testuser3@domain.com,testgroup1@domain.com,MEMBER,ACTIVE,ALL_MAIL
|
||||
testuser3@domain.com,testgroup2@domain.com,OWNER,ACTIVE,ALL_MAIL
|
||||
|
||||
# Update roles/delivery settings
|
||||
$ gam redirect stdout - multiprocess csv UserGroupRole.csv gam user ~User update group ~Role ~Delivery ~Group
|
||||
$ gam redirect stdout - multiprocess csv UserGroupRole.csv gam user "~User" update group "~Role" "~Delivery" "~Group"
|
||||
Using 5 processes...
|
||||
User: testuser2@domain.com, Update to 1 Group
|
||||
Group: testgroup1@domain.com, Member: testuser2@domain.com, Updated
|
||||
@@ -461,6 +463,10 @@ gam <UserTypeEntity> show groups
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
[roles <GroupRoleList>] countsonly
|
||||
```
|
||||
By default, all groups to which a member belongs are displayed, these options allow selection of subsets of groups:
|
||||
* `domain <DomainName>` - Limit display to groups in the domain `<DomainName>` of which they are a member
|
||||
* `customerid <CustomerID>` - For resellers, display all groups in a resold workspace of which they are a member
|
||||
* `roles <GroupRoleList>` - Limit display to those groups for which the user has a specific role
|
||||
|
||||
### Display group counts in CSV format
|
||||
There is one row per user displaying the number of groups, by role, to which a user belongs.
|
||||
@@ -476,6 +482,33 @@ By default, all groups to which a member belongs are displayed, these options al
|
||||
* `customerid <CustomerID>` - For resellers, display all groups in a resold workspace of which they are a member
|
||||
* `roles <GroupRoleList>` - Limit display to those groups for which the user has a specific role
|
||||
|
||||
### Display total group counts as an indented list
|
||||
There is one row per user displaying the number of groups to which a user belongs.
|
||||
|
||||
There is one API call per user to get the total group count.
|
||||
```
|
||||
gam <UserTypeEntity> show groups
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
totalonly
|
||||
```
|
||||
By default, all groups to which a member belongs are displayed, these options allow selection of subsets of groups:
|
||||
* `domain <DomainName>` - Limit display to groups in the domain `<DomainName>` of which they are a member
|
||||
* `customerid <CustomerID>` - For resellers, display all groups in a resold workspace of which they are a member
|
||||
|
||||
|
||||
### Display total group counts in CSV format
|
||||
There is one row per user displaying the total number of groups to which a user belongs.
|
||||
|
||||
There is one API call per user to get the total group count.
|
||||
```
|
||||
gam <UserTypeEntity> print groups [todrive <ToDriveAttribute>*]
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
totalonly
|
||||
```
|
||||
By default, all groups to which a member belongs are displayed, these options allow selection of subsets of groups:
|
||||
* `domain <DomainName>` - Limit display to groups in the domain `<DomainName>` of which they are a member
|
||||
* `customerid <CustomerID>` - For resellers, display all groups in a resold workspace of which they are a member
|
||||
|
||||
### Display group addresses in CSV format
|
||||
There is one row per user showing the number and list of groups to which a user directly belongs.
|
||||
```
|
||||
|
||||
@@ -17,6 +17,8 @@ To use these commands you must add the 'Looker Studio API' to your project and u
|
||||
```
|
||||
gam update project
|
||||
gam user user@domain.com check serviceaccount
|
||||
...
|
||||
[*] 35) Looker Studio API (supports readonly)
|
||||
```
|
||||
## Definitions
|
||||
* [`<UserTypeEntity>`](Collections-of-Users)
|
||||
|
||||
174
docs/Users-Meet.md
Normal file
174
docs/Users-Meet.md
Normal file
@@ -0,0 +1,174 @@
|
||||
# Users - Meet
|
||||
- [API documentation](#api-documentation)
|
||||
- [Query documentation](#query-documentation)
|
||||
- [Introduction](#introduction)
|
||||
- [Definitions](#definitions)
|
||||
- [Manage Meet Spaces](#manage-meet-spaces)
|
||||
- [Display Meet Conferences](#display-meet-conferences)
|
||||
- [Display Meet Participants](#display-meet-participants)
|
||||
- [Display Meet Recordings](#display-meet-recordings)
|
||||
- [Display Meet Transcripts](#display-meet-transcripts)
|
||||
|
||||
## API documentation
|
||||
* https://developers.google.com/meet/api/reference/rest/v2
|
||||
* https://developers.google.com/meet/api/reference/rest/v2/spaces
|
||||
* https://developers.google.com/meet/api/reference/rest/v2/conferenceRecords
|
||||
* https://developers.google.com/meet/api/reference/rest/v2/conferenceRecords.participants
|
||||
* https://developers.google.com/meet/api/reference/rest/v2/conferenceRecords.recordings
|
||||
* https://developers.google.com/meet/api/reference/rest/v2/conferenceRecords.transcripts
|
||||
|
||||
## Query documentation
|
||||
* https://developers.google.com/meet/api/reference/rest/v2/conferenceRecords/list
|
||||
* https://developers.google.com/meet/api/reference/rest/v2/conferenceRecords.participants/list
|
||||
|
||||
## Introduction
|
||||
These features were added in version 6.81.00.
|
||||
|
||||
To use these commands you must add the 'Meet API' to your project and update your service account authorization.
|
||||
```
|
||||
gam update project
|
||||
gam user user@domain.com update serviceaccount
|
||||
...
|
||||
[*] 36) Meet API (supports readonly)
|
||||
|
||||
```
|
||||
## Definitions
|
||||
* [`<UserTypeEntity>`](Collections-of-Users)
|
||||
```
|
||||
<MeetConferenceName> ::= conferenceRecords/<String>
|
||||
<MeetSpaceName> ::= spaces/<String> | <String>
|
||||
<MeetSpaceOptions> ::=
|
||||
accesstype open|trusted|restricted |
|
||||
entrypointaccess all|creatorapponly
|
||||
```
|
||||
|
||||
## Manage Meet Spaces
|
||||
### Create a meet space
|
||||
```
|
||||
gam <UserTypeEntity> create meetspace
|
||||
<MeetSpaceOptions>*
|
||||
[formatjson|returnidonly]
|
||||
```
|
||||
By default, Gam displays the information about the created meetspace as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
* `returnidonly` - Display the meetspace name only
|
||||
|
||||
### Update a meet space
|
||||
```
|
||||
gam <UserTypeEntity> update meetspace <MeetSpaceName>
|
||||
<MeetSpaceOptions>*
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information about the created meetspace as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### Display information about a specific meet space for a user
|
||||
```
|
||||
gam <UserTypeEntity> info meetspace <MeetSpaceName>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### End a meet space conference
|
||||
```
|
||||
gam <UserTypeEntity> end meetconference <MeetSpaceName>
|
||||
```
|
||||
|
||||
## Display Meet Conferences
|
||||
```
|
||||
gam <UserItem> show meetconferences
|
||||
[space <MeetSpaceName>] [code <String>]
|
||||
[andquery|orquery <String>] [querytime<String> <Time>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, conferences are shown for all of a user's meet spaces. To limit the display use:
|
||||
* `space <MeetSpaceName>` - Display conferences for a specifc space by giving its name
|
||||
* `code <String>` - Display conferences for a specifc space by giving its code
|
||||
|
||||
By default, Gam displays the information about the meet conferences as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam <UserItem> print meetconferences [todrive <ToDriveAttribute>*]
|
||||
[space <MeetSpaceName>] [code <String>]
|
||||
[andquery|orquery <String>] [querytime<String> <Time>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, conferences are shown for all of a user's meet spaces. To limit the display use:
|
||||
* `space <MeetSpaceName>` - Display conferences for a specifc space by giving its name
|
||||
* `code <String>` - Display conferences for a specifc space by giving its code
|
||||
|
||||
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.
|
||||
|
||||
|
||||
## Display Meet Participants
|
||||
```
|
||||
gam <UserItem> show meetparticipants <MeetConferenceName>
|
||||
[query <String>] [querytime<String> <Time>]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information about the meet participants as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam <UserItem> print meetparticipants <MeetConferenceName> [todrive <ToDriveAttribute>*]
|
||||
[query <String>] [querytime<String> <Time>]
|
||||
[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.
|
||||
|
||||
|
||||
## Display Meet Recordings
|
||||
```
|
||||
gam <UserItem> show meetrecordings <MeetConferenceName>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information about the meet recordings as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam <UserItem> print meetrecordings <MeetConferenceName> [todrive <ToDriveAttribute>*]
|
||||
[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.
|
||||
|
||||
|
||||
## Display Meet Transcripts
|
||||
```
|
||||
gam <UserItem> show meettranscripts <MeetConferenceName>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information about the meet transcripts as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam <UserItem> print meettranscripts <MeetConferenceName> [todrive <ToDriveAttribute>*]
|
||||
[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.
|
||||
|
||||
@@ -59,6 +59,7 @@ gam user user@domain.com check serviceaccount
|
||||
|
||||
```
|
||||
<JSONData> ::= (json [charset <Charset>] <String>) | (json file <FileName> [charset <Charset>]) |
|
||||
<QueryContact> ::= <String>
|
||||
|
||||
<PeopleResourceName> ::= people/<String>
|
||||
<PeopleResourceNameList> ::= "<PeopleResourceName>(,<PeopleResourceName>)*"
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
- [Display Shared Drive access](#display-shared-drive-access)
|
||||
- [Display Shared Drive access for specific Shared Drives](#display-shared-drive-access-for-specific-shared-drives)
|
||||
- [Display Shared Drive access for selected Shared Drives](#display-shared-drive-access-for-selected-shared-drives)
|
||||
- [Change User1 Shared Drive access to User2](#change-user1-shared-drive-access-to-user2)
|
||||
- [Change single User1 Shared Drive access to User2](#change-single-user1-shared-drive-access-to-user2)
|
||||
- [Bulk change User1 Shared Drive access to User2](#bulk-change-user1-shared-drive-access-to-user2)
|
||||
- [Display empty folders on a Shared Drive](#display-empty-folders-on-a-shared-drive)
|
||||
- [Delete empty folders on a Shared Drive](#delete-empty-folders-on-a-shared-drive)
|
||||
- [Empty the trash on a Shared Drive](#empty-the-trash-on-a-shared-drive)
|
||||
@@ -73,6 +74,22 @@
|
||||
<OrgUnitPath> ::= /|(/<String>)+
|
||||
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
createddate|createdtime|
|
||||
folder|
|
||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||
modifieddate|modifiedtime|
|
||||
name|
|
||||
name_natural|
|
||||
quotabytesused|quotaused|
|
||||
recency|
|
||||
sharedwithmedate|sharedwithmetime|
|
||||
starred|
|
||||
title|
|
||||
title_natural|
|
||||
viewedbymedate|viewedbymetime
|
||||
|
||||
<DriveFileACLRole> ::=
|
||||
manager|organizer|owner|
|
||||
contentmanager|fileorganizer|
|
||||
@@ -375,7 +392,6 @@ When deleting permissions from JSON data, permissions with role `owner` true are
|
||||
These commands are used to display the ACLs on Shared Drives themselves, not the files/folders on the Shared Drives.
|
||||
|
||||
## Display Shared Drive access for specific Shared Drives
|
||||
These commands must be issued by a user with Shared Drive permission role organizer.
|
||||
```
|
||||
gam <UserTypeEntity> show drivefileacls <DriveFileEntity>
|
||||
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
|
||||
@@ -404,7 +420,6 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
## Display Shared Drive access for selected Shared Drives
|
||||
These commands must be issued by a user with Shared Drive permission role organizer.
|
||||
```
|
||||
gam <UserTypeEntity> show teamdriveacls
|
||||
adminaccess [teamdriveadminquery|query <QueryTeamDrive>]
|
||||
@@ -421,6 +436,10 @@ gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default,only Shared Drives with `<UserTypeEntity>` as a member are displayed. To display all
|
||||
Shared Drives in the workspace, `<UserTypeEntity>` should specify a super admin and the `adminaccess`
|
||||
option shoud be used.
|
||||
|
||||
By default, all Shared Drives are displayed; use the following options to select a subset of Shared Drives:
|
||||
* `teamdriveadminquery|query <QueryTeamDrive>` - Use a query to select Shared Drives
|
||||
* `matchname <RegularExpression>` - Retrieve Shared Drives with names that match a pattern.
|
||||
@@ -448,14 +467,27 @@ gam <UserTypeEntity> print emptydrivefolders [todrive <ToDriveAttribute>*]
|
||||
select <SharedDriveEntity>
|
||||
```
|
||||
|
||||
## Change User1 Shared Drive access to User2
|
||||
## Change single User1 Shared Drive access to User2
|
||||
```
|
||||
# Get Shared Drives for User1
|
||||
gam redirect csv ./U1SharedDrives.csv user user1@domain.com print shareddriveacls pm emailaddress user1@domain.com em oneitemperrow
|
||||
# For each of those Shared Drives, delete User1 access
|
||||
gam redirect stdout ./DeleteU1SharedDriveAccess.txt multiprocess redirect stderr stdout gam delete drivefileacl "~id" "~permission.emailAddress"
|
||||
gam redirect stdout ./DeleteU1SharedDriveAccess.txt multiprocess redirect stderr stdout csv ./U1SharedDrives.csv gam delete drivefileacl "~id" "~permission.emailAddress"
|
||||
# For each of those Shared Drives, add User2 with the same role that User1 had
|
||||
gam redirect stdout ./AddU2SharedDriveAccess.txt multiprocess redirect stderr stdout gam create drivefileacl "~id" user user2@domain.com role "~permission.role"
|
||||
gam redirect stdout ./AddU2SharedDriveAccess.txt multiprocess redirect stderr stdout csv ./U1SharedDrives.csv gam create drivefileacl "~id" user user2@domain.com role "~permission.role"
|
||||
```
|
||||
|
||||
## Bulk change User1 Shared Drive access to User2
|
||||
This requires GAM version 6.79.09 or higher.
|
||||
|
||||
Make a CSV file Users.csv with two email address columns: User,Replace
|
||||
```
|
||||
# Get Shared Drives for all Users in CSV file
|
||||
gam redirect csv ./U1SharedDrives.csv multiprocess csv Users.csv gam user "~User" print shareddriveacls pm emailaddress "~User" em oneitemperrow addscvdata Replace "~Replace"
|
||||
# For each of those Shared Drives, delete User access
|
||||
gam redirect stdout ./DeleteU1SharedDriveAccess.txt multiprocess redirect stderr stdout csv ./U1SharedDrives.csv gam delete drivefileacl "~id" "~permission.emailAddress"
|
||||
# For each of those Shared Drives, add Replace with the same role that User had
|
||||
gam redirect stdout ./AddU2SharedDriveAccess.txt multiprocess redirect stderr stdout csv ./U1SharedDrives.csv gam create drivefileacl "~id" user "~Replace" role "~permission.role"
|
||||
```
|
||||
|
||||
## Delete empty folders on a Shared Drive
|
||||
|
||||
@@ -21,6 +21,7 @@ gam <UserTypeEntity> signout
|
||||
Turn off 2-Step Verification for a user.
|
||||
If successful, this call will turn off 2-Step Verification and also remove all registered second steps on the user account.
|
||||
This call will fail if **any** of the following is true:
|
||||
* the user is suspended
|
||||
* the user is not enrolled in 2-Step Verification.
|
||||
* the user has 2-Step Verification enforced.
|
||||
* the user is enrolled in the Advanced Protection Program.
|
||||
|
||||
@@ -133,7 +133,7 @@ CSV file Sheet.csv contains:
|
||||
User,spreadsheetId,JSON
|
||||
user@domain.com,1MOq6umgWSM7NF8-CQ-Aj3_n1DIu_GvyCcuLxxxxxx,'[{"range": "Sheet1!A1:C1", "values": [["1", "2", "3"]], "majorDimension": "ROWS"}, {"range": "Sheet1!A3:C3", "values": [["10/01/2017 10:30:00", true, "6"]], "majorDimension": "ROWS"}]'
|
||||
|
||||
gam csv Sheet.csv quotechar "'" gam user ~User update sheetranges ~spreadsheetId json ~JSON userentered includevaluesinresponse
|
||||
gam csv Sheet.csv quotechar "'" gam user "~User" update sheetranges "~spreadsheetId" json "~JSON" userentered includevaluesinresponse
|
||||
```
|
||||
## Create spreadsheets
|
||||
```
|
||||
@@ -203,6 +203,17 @@ File Sheet.json contains:
|
||||
gam user testuser@domain.com update sheet <DriveFileItem> json file Sheet.json
|
||||
```
|
||||
|
||||
Rename a tab/sheet in a spreadsheet.
|
||||
```
|
||||
Get the sheet IDs.
|
||||
gam user testuser@domain.com info sheet <DriveFileItem> fields sheets
|
||||
Get the desired sheetId from the output.
|
||||
File Sheet.json contains:
|
||||
{"requests": [{"updateSheetProperties": {"properties": {"sheetId": 1234567890, "title": "New Title"}, "fields": "title"}}]}
|
||||
|
||||
gam user testuser@domain.com update sheet <DriveFileItem> json file Sheet.json
|
||||
```
|
||||
|
||||
Delete a column from a tab in a spreadsheet.
|
||||
```
|
||||
Get the sheet IDs.
|
||||
@@ -220,18 +231,24 @@ gam user testuser@domain.com update sheet <DriveFileItem> json file Sheet.json
|
||||
gam <UserTypeEntity> info|show sheet <DriveFileEntity>
|
||||
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||
[includegriddata [<Boolean>]]
|
||||
[includegriddata [<Boolean>]] [shownames]
|
||||
[formatjson]
|
||||
```
|
||||
By default, the Sheets API does not return the sheet file name, use the `shownames` option to have GAM
|
||||
make an additional API call to get and display the sheet file name.
|
||||
|
||||
The output is formatted for human readability. Use the following option to produce JSON output for program parsing.
|
||||
* `formatjson` - Display output in JSON format.
|
||||
```
|
||||
gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||
[includegriddata [<Boolean>]]
|
||||
[includegriddata [<Boolean>]] [shownames]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, the Sheets API does not return the sheet file name, use the `shownames` option to have GAM
|
||||
make an additional API call to get and display the sheet file name.
|
||||
|
||||
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.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
- [Definitions](#definitions)
|
||||
- [Delete a user's token](#delete-a-users-token)
|
||||
- [Display individual user's tokens](#display-individual-users-tokens)
|
||||
- [Display individual user's token counts](#display-individual-users-token-counts)
|
||||
- [Display aggregated user's tokens](#display-aggregated-users-tokens)
|
||||
|
||||
## API documentation
|
||||
@@ -27,6 +28,9 @@ gam <UserTypeEntity> show tokens|token|3lo|oauth [clientid <ClientID>]
|
||||
gam print tokens|token [todrive <ToDriveAttributes>*] [clientid <ClientID>]
|
||||
[orderby clientid|id|appname|displaytext] [delimiter <Character>]
|
||||
[<UserTypeEntity>]
|
||||
gam show tokens|token [clientid <ClientID>]
|
||||
[orderby clientid|id|appname|displaytext] [delimiter <Character>]
|
||||
[<UserTypeEntity>]
|
||||
```
|
||||
By default, all client tokens for a user are displayed, use `clientid <ClientID>` to display a specific client token.
|
||||
|
||||
@@ -43,6 +47,26 @@ This example shows which domain users have the Google Apps Sync for Microsoft Ou
|
||||
gam all users print token clientid 1095133494869.apps.googleusercontent.com
|
||||
```
|
||||
|
||||
## Display individual user's token counts
|
||||
```
|
||||
gam <UserTypeEntity> print tokens|token [todrive <ToDriveAttributes>*] [clientid <ClientID>]
|
||||
usertokencounts
|
||||
gam <UserTypeEntity> show tokens|token|3lo|oauth [clientid <ClientID>]
|
||||
usertokencounts
|
||||
gam print tokens|token [todrive <ToDriveAttributes>*] [clientid <ClientID>]
|
||||
usertokencounts
|
||||
[<UserTypeEntity>]
|
||||
gam show tokens|token [clientid <ClientID>]
|
||||
usertokencounts
|
||||
[<UserTypeEntity>]
|
||||
```
|
||||
|
||||
### Example
|
||||
This example shows which domain users have any access tokens.
|
||||
```
|
||||
gam config csv_output_row_filter "tokenCount:count>0" all users print tokens usertokencounts
|
||||
```
|
||||
|
||||
## Display aggregated user's tokens
|
||||
```
|
||||
gam <UserTypeEntity> print tokens|token [todrive <ToDriveAttributes>*] [clientid <ClientID>]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Users
|
||||
- [API documentation](#api-documentation)
|
||||
- [Name guidelines](#name-guidelines)
|
||||
- [Query documentation](#query-documentation)
|
||||
- [Name guidelines](#name-guidelines)
|
||||
- [Quoting rules](#quoting-rules)
|
||||
- [Python Regular Expressions](Python-Regular-Expressions) Match function and Search function
|
||||
- [Definitions](#definitions)
|
||||
@@ -46,12 +46,12 @@
|
||||
* 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
|
||||
|
||||
## Query documentation
|
||||
* https://developers.google.com/admin-sdk/directory/v1/guides/search-users
|
||||
|
||||
## Name guidelines
|
||||
* https://support.google.com/a/answer/9193374
|
||||
|
||||
## Quoting rules
|
||||
Items in a list can be separated by commas or spaces; if an item itself contains a comma, a space or a single quote, special quoting must be used.
|
||||
Typically, you will enclose the entire list in double quotes and quote each item in the list as detailed below.
|
||||
@@ -239,7 +239,7 @@ queries "`"orgUnitPath=\'/Students/Lower\ School/2027\'`",`"orgUnitPath=\'/Stude
|
||||
protocol aim|gtalk|icq|jabber|msn|net_meeting|qq|
|
||||
skype|yahoo|(custom_protocol <String>) <String>
|
||||
notprimary|primary)|
|
||||
(keyword mission|occupation|outlook|(custom <string>) <String>)|
|
||||
(keyword mission|occupation|outlook|(custom <String>) <String>)|
|
||||
(location [type default|desk|<String>] area <String>
|
||||
[building|buildingid <String>] [floor|floorname <String>]
|
||||
[section|floorsection <String>] [desk|deskcode <String>] endlocation)|
|
||||
@@ -250,7 +250,7 @@ queries "`"orgUnitPath=\'/Students/Lower\ School/2027\'`",`"orgUnitPath=\'/Stude
|
||||
[description <String>] [domain <String>]
|
||||
[fulltimeequivalent <Integer>]
|
||||
notprimary|primary)|
|
||||
(otheremail home|other|work|<String> <String>)|
|
||||
(otheremail home|other|work|(custom <String>)|<String> <String>)|
|
||||
(phone [type assistant|callback|car|company_main|grand_central|home|
|
||||
home_fax|isdn|main|mobile|other|other_fax|pager|radio|telex|tty_tdd|
|
||||
work|work_fax|work_mobile|work_pager|(custom <String>)]
|
||||
@@ -262,10 +262,10 @@ queries "`"orgUnitPath=\'/Students/Lower\ School/2027\'`",`"orgUnitPath=\'/Stude
|
||||
[primary <Boolean>] endposix)|
|
||||
(relation admin_assistant|assistant|brother|child|domestic_partner|
|
||||
dotted-line_manager|exec_assistant|father|friend|manager|mother|
|
||||
parent|partner|referred_by|relative|sister|spouse|<String> <String>)|
|
||||
parent|partner|referred_by|relative|sister|spouse|(custom <String>)|<String> <String>)|
|
||||
(sshkeys key <String> [expires <Integer>] endssh)|
|
||||
(website app_install_page|blog|ftp|home|home_page|other|
|
||||
profile|reservations|resume|work|<String> <URL>
|
||||
profile|reservations|resume|work|(custom <String>)|<String> <URL>
|
||||
notprimary|primary)
|
||||
|
||||
<UserClearAttribute> ::=
|
||||
@@ -464,7 +464,7 @@ If you specify `scalarnonempty`, empty values will be suppressed. This is most u
|
||||
|
||||
For example, to suppress errors when empty values would cause an error or are simply undesirable:
|
||||
```
|
||||
GeoData.Region scalarnonempty ~region GeoData.State scalarnonempty ~state GeoData.City scalarnonempty ~city
|
||||
GeoData.Region scalarnonempty "~region" GeoData.State scalarnonempty "~state" GeoData.City scalarnonempty "~city"
|
||||
```
|
||||
### Multivalued fields
|
||||
```
|
||||
@@ -541,7 +541,7 @@ When creating a user, you can send a message with the account details to an emai
|
||||
If you create a user with `random password`, the `lograndompassword <FileName>` option causes GAM
|
||||
to append the user email address and random password to `<FileName>`. If `<FileName>` is `-`, the data is written to stdout.
|
||||
|
||||
Option `ignorenullpassword` causes GAM to ignore options like `password ""` or `password ~password` where the
|
||||
Option `ignorenullpassword` causes GAM to ignore options like `password ""` or `password "~password"` where the
|
||||
CSV entry `password` is null; it must appear in the command before any null passwords.
|
||||
If `ignorenullpassword` and a null password are entered, the user will be assigned a random password.
|
||||
|
||||
@@ -570,8 +570,8 @@ OU needs to be already set with forced 2FA, else you can't create backup codes i
|
||||
These three commands should be run in sequence, as commands two and three are reliant on the previous command being run.
|
||||
```
|
||||
gam redirect stdout CreateUsers.log multiprocess redirect stderr stdout csv CreateUsers.csv gam create user "~useremail" firstname "~firstname" lastname "~lastname" ou "~ou" password random notify "~~notifyemail"
|
||||
gam redirect stdout UpdateUsers.log multiprocess redirect stderr stdout csv CreateUsers.csv gam user ~useremail update backupcodes
|
||||
gam redirect stdout SendBackupCodes.log multiprocess redirect stderr stdout csv CreateUsers.csv gam user ~useremail print backupcodes | gam csv - gam sendemail "~notifyemail" subject "Backup codes for 2FA login" message "~verificationCodes"
|
||||
gam redirect stdout UpdateUsers.log multiprocess redirect stderr stdout csv CreateUsers.csv gam user "~useremail" update backupcodes
|
||||
gam redirect stdout SendBackupCodes.log multiprocess redirect stderr stdout csv CreateUsers.csv gam user "~useremail" print backupcodes | gam csv - gam sendemail "~notifyemail" subject "Backup codes for 2FA login" message "~verificationCodes"
|
||||
```
|
||||
|
||||
## Specify a user's attributes with JSON data
|
||||
@@ -713,19 +713,19 @@ The user aliases in `alias|aliases <EmailAddressList>` will be created.
|
||||
|
||||
For example, you are given a CSV file Users.csv with these headers: email,firstname,lastname,password,ou,altemail
|
||||
```
|
||||
gam csv Users.csv gam update user ~email firstname ~firstname lastname ~lastname password ~password ou ~ou createifnotfound notify ~altemail
|
||||
gam csv Users.csv gam update user "~email" firstname "~firstname" lastname "~lastname" password "~password" ou "~ou" createifnotfound notify "~altemail"
|
||||
```
|
||||
The existing users (including their passwords) will be updated and the new users will be created; if `notify` is specified, a notification email message is sent as in (#create-a-user).
|
||||
|
||||
If you don't want to update the passwords of the existing users but must supply a password for newly created users, use the `notfoundpassword` option.
|
||||
```
|
||||
gam csv Users.csv gam update user ~email firstname ~firstname lastname ~lastname notfoundpassword ~password ou ~ou createifnotfound notify ~altemail
|
||||
gam csv Users.csv gam update user "~email" firstname "~firstname" lastname "~lastname" notfoundpassword "~password" ou "~ou" createifnotfound notify "~altemail"
|
||||
```
|
||||
The existing users (but not their passwords) will be updated and the new users will be created; if `notify` is specified, a notification email message is sent as in (#create-a-user).
|
||||
|
||||
If you don't want to force a password change of the existing users but do want newly created users to change their password, use the `setchangepasswordoncreate` option.
|
||||
```
|
||||
gam csv Users.csv gam update user ~email firstname ~firstname lastname ~lastname notfoundpassword ~password ou ~ou createifnotfound notify ~altemail setchangepasswordoncreate true
|
||||
gam csv Users.csv gam update user "~email" firstname "~firstname" lastname "~lastname" notfoundpassword "~password" ou "~ou" createifnotfound notify "~altemail" setchangepasswordoncreate true
|
||||
```
|
||||
|
||||
## Update a user's name
|
||||
@@ -742,7 +742,7 @@ assigned a unique random password, specify `password uniquerandom`.
|
||||
If you update a user with `password random|uniquerandom`, the `lograndompassword <FileName>` option causes GAM
|
||||
to append the user email address and random password to `<FileName>`. If `<FileName` is `-`, the data is written to stdout.
|
||||
|
||||
Option `ignorenullpassword` causes GAM to ignore options like `password ""` or `password ~password` or `notfoundpassword ~password` where the
|
||||
Option `ignorenullpassword` causes GAM to ignore options like `password ""` or `password "~password"` or `notfoundpassword "~password"` where the
|
||||
CSV entry `password` is null; it must appear in the command before any null passwords.
|
||||
This option would typically be used when processing CSV files where only selected user's passwords are being updated.
|
||||
|
||||
@@ -813,7 +813,7 @@ $ gam redirect csv ./phones.csv group group@domain.com print users phones format
|
||||
```
|
||||
Edit phones.csv and change the work number; update.
|
||||
```
|
||||
$ gam csv ./phones.csv quotechar "'" gam update user ~primaryEmail json ~JSON
|
||||
$ gam csv ./phones.csv quotechar "'" gam update user "~primaryEmail" json "~JSON"
|
||||
```
|
||||
## Update a user's OU based on group membership
|
||||
This option would typically be used when an external service creates a Google user and assigns it to a group but does not place it in an OU.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
\# Version and Help
|
||||
# Version and Help
|
||||
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAMADV-XTD3 6.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.3 64-bit final
|
||||
MacOS Sonoma 14.4.1 x86_64
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
Time: 2023-06-02T21:10:00-07:00
|
||||
@@ -15,10 +15,10 @@ 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.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.3 64-bit final
|
||||
MacOS Sonoma 14.4.1 x86_64
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
Your system time differs from www.googleapis.com by less than 1 second
|
||||
@@ -27,17 +27,17 @@ 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.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.3 64-bit final
|
||||
MacOS Sonoma 14.4.1 x86_64
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
Time: 2023-06-02T21:10:00-07:00
|
||||
Your system time differs from admin.googleapis.com by less than 1 second
|
||||
OpenSSL 3.1.1 30 May 2023
|
||||
cryptography 41.0.1
|
||||
filelock 3.12.3
|
||||
filelock 3.12.5
|
||||
google-api-python-client 2.88.0
|
||||
google-auth-httplib2 0.1.0
|
||||
google-auth-oauthlib 1.0.0
|
||||
@@ -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.76.09
|
||||
Latest: 7.00.02
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +72,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
6.76.09
|
||||
7.00.02
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -82,10 +82,10 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 6.76.09 - https://github.com/taers232c/GAMADV-XTD3
|
||||
GAM 7.00.02 - https://github.com/taers232c/GAMADV-XTD3
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.3 64-bit final
|
||||
MacOS Sonoma 14.4.1 x86_64
|
||||
Python 3.12.5 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
Time: 2023-06-02T21:10:00-07:00
|
||||
|
||||
@@ -155,6 +155,8 @@ Service Account Access
|
||||
* [Users - Group Membership](Users-Group-Membership)
|
||||
* [Users - Keep](Users-Keep)
|
||||
* [Users - Looker Studio](Users-Looker-Studio)
|
||||
* [Users - Meet](Users-Meet)
|
||||
* [Users - Classroom - Profile](Users-Classroom-Profile)
|
||||
* [Users - People - Contacts & Profiles](Users-People-Contacts-Profiles)
|
||||
* [Users - Photo](Users-Photo)
|
||||
* [Users - Profile Sharing](Users-Profile-Sharing)
|
||||
|
||||
@@ -589,6 +589,12 @@ update_cros_ou_with_id
|
||||
Set to true if you are getting the following error:
|
||||
`400: invalidInput - Invalid Input: Inconsistent Orgunit id and path in request`
|
||||
Default: False
|
||||
use_chat_admin_access
|
||||
When False, GAM uses user access when making Chat API calls. For calls that support admin access,
|
||||
this can be overridden with the asadmin command line option.
|
||||
When True, GAM uses admin access for Chat API calls that support admin access;
|
||||
other calls will use user access.
|
||||
Default: False
|
||||
use_classroom_owner_access
|
||||
How is classroom member information obtained and how are classroom members deleted.
|
||||
Client access does not provide complete information about non-domain students/teachers.
|
||||
@@ -1033,24 +1039,24 @@ goo,gooadmin
|
||||
```
|
||||
For each of the domains, you want to get user information about the domain administrator.
|
||||
```
|
||||
$gam csv InfoAdmins.csv gam select ~Section info user "~AdminUser" nolicenses
|
||||
$gam csv InfoAdmins.csv gam select "~Section" info user "~AdminUser" nolicenses
|
||||
```
|
||||
For each of the domains, you also want to list the Google Drive files for the domain administrator.
|
||||
```
|
||||
$gam csv InfoAdmins.csv gam select ~Section user "~AdminUser" print filelist id
|
||||
$gam csv InfoAdmins.csv gam select "~Section" user "~AdminUser" print filelist id
|
||||
```
|
||||
Suppose you have two CSV files, NewFooUsers.csv and NewGooUsers.csv, with the columns: Email,FirstName,LastName,Password.
|
||||
You will use these files to create new users in the foo.com and goo.com domains.
|
||||
|
||||
To process the files sequentially, there are two forms:
|
||||
```
|
||||
$gam select foo save csv NewFooUsers.csv gam create user ~Email firstname ~FirstName lastname ~LastName password ~Password
|
||||
$gam select goo save csv NewGooUsers.csv gam create user ~Email firstname ~FirstName lastname ~LastName password ~Password
|
||||
$gam select foo save csv NewFooUsers.csv gam create user "~Email" firstname "~FirstName" lastname "~LastName" password "~Password"
|
||||
$gam select goo save csv NewGooUsers.csv gam create user "~Email" firstname "~FirstName" lastname "~LastName" password "~Password"
|
||||
```
|
||||
You could also do:
|
||||
```
|
||||
$gam csv NewFooUsers.csv gam select foo create user ~Email firstname ~FirstName lastname ~LastName password ~Password
|
||||
$gam csv NewGooUsers.csv gam select goo create user ~Email firstname ~FirstName lastname ~LastName password ~Password
|
||||
$gam csv NewFooUsers.csv gam select foo create user "~Email" firstname "~FirstName" lastname "~LastName" password "~Password"
|
||||
$gam csv NewGooUsers.csv gam select goo create user "~Email" firstname "~FirstName" lastname "~LastName" password "~Password"
|
||||
```
|
||||
In the first form, the select/save before csv sets the default section which then applies to each gam instance.
|
||||
|
||||
@@ -1060,11 +1066,11 @@ To process the files in parallel in separate shells, you have to use the second
|
||||
|
||||
In shell number 1, do:
|
||||
```
|
||||
$gam csv NewFooUsers.csv gam select foo create user ~Email firstname ~FirstName lastname ~LastName password ~Password
|
||||
$gam csv NewFooUsers.csv gam select foo create user "~Email" firstname "~FirstName" lastname "~LastName" password "~Password"
|
||||
```
|
||||
In shell number 2, do:
|
||||
```
|
||||
$gam csv NewGooUsers.csv gam select goo create user ~Email firstname ~FirstName lastname ~LastName password ~Password
|
||||
$gam csv NewGooUsers.csv gam select goo create user "~Email" firstname "~FirstName" lastname "~LastName" password "~Password"
|
||||
```
|
||||
The gam loop command and the select and redirect arguments can be combined to perform powerful operations in a single command line.
|
||||
```
|
||||
@@ -1080,23 +1086,23 @@ For each of the domains, you want to get user information about the domain admin
|
||||
to stdout, so you'll redirect stdout. In the first case, you want all of the output in a single file so stdout is
|
||||
redirected to a file before the csv command.
|
||||
```
|
||||
$gam redirect stdout InfoDomainAdmins.lst multiprocess csv InfoDomains.csv gam select ~Section info user "~AdminUser" nolicenses
|
||||
$gam redirect stdout InfoDomainAdmins.lst multiprocess csv InfoDomains.csv gam select "~Section" info user "~AdminUser" nolicenses
|
||||
```
|
||||
In the second case, you want the output for each domain administrator in a separate file so stdout is redirected after
|
||||
the csv command.
|
||||
```
|
||||
$gam csv InfoDomains.csv select ~Section redirect stdout Info-~~Domain~~-Admin.lst info user "~AdminUser" nolicenses
|
||||
$gam csv InfoDomains.csv select "~Section" redirect stdout Info-~~Domain~~-Admin.lst info user "~AdminUser" nolicenses
|
||||
```
|
||||
For each of the domains, you also want to list the Google Drive files for the domain administrator. GAM writes this information
|
||||
to a csv file, so you'll redirect csv output. In the first case, you want all of the output in a single file so csv output is
|
||||
redirected to a file before the csv command.
|
||||
```
|
||||
$gam redirect csv FilesDomainAdmins.csv multiprocess csv InfoDomains.csv gam select ~Section user "~AdminUser" print filelist id
|
||||
$gam redirect csv FilesDomainAdmins.csv multiprocess csv InfoDomains.csv gam select "~Section" user "~AdminUser" print filelist id
|
||||
```
|
||||
In the second case, you want the output for each domain administrator in a separate file so csv output is redirected after
|
||||
the csv command.
|
||||
```
|
||||
$gam csv InfoDomains.csv select ~Section redirect csv Files-~~Domain~~-Admin.csv user "~AdminUser" print filelist id
|
||||
$gam csv InfoDomains.csv select "~Section" redirect csv Files-~~Domain~~-Admin.csv user "~AdminUser" print filelist id
|
||||
```
|
||||
|
||||
## Multiple Users-Projects on One Computer
|
||||
|
||||
@@ -244,6 +244,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
101043 |
|
||||
101047 |
|
||||
101049 |
|
||||
101050 |
|
||||
Google-Apps |
|
||||
Google-Chrome-Device-Management |
|
||||
Google-Drive-storage |
|
||||
@@ -259,6 +260,8 @@ 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 |
|
||||
aimeetingsandmessaging | 1010470007 | AI Meetings and Messaging |
|
||||
aisecurity | 1010470006 | AI Security |
|
||||
appsheetcore | 1010380001 | AppSheet Core |
|
||||
appsheetstandard | appsheetenterprisestandard | 1010380002 | AppSheet Enterprise Standard |
|
||||
appsheetplus | appsheetenterpriseplus | 1010380003 | AppSheet Enterprise Plus |
|
||||
@@ -268,8 +271,12 @@ If an item contains spaces, it should be surrounded by ".
|
||||
cloudidentity | identity | 1010010001 | Cloud Identity |
|
||||
cloudidentitypremium | identitypremium | 1010050001 | Cloud Identity Premium |
|
||||
cloudsearch | 1010350001 | Cloud Search |
|
||||
colabpro | 1010500001 | Colab Pro |
|
||||
colabpro+ | colabproplus | 1010500002 | Colab Pro+ |
|
||||
eeu | 1010490001 | SKU Endpoint Education Upgrade |
|
||||
geminibiz | 1010470003 | Gemini Business |
|
||||
geminiedu | 1010470004 | Gemini Education |
|
||||
geminiedupremium| 1010470005 | Gemini Education Premium |
|
||||
geminient| duetai | 1010470001 | Gemini Enterprise |
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
@@ -620,6 +627,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
(tdnotify [<Boolean>])|
|
||||
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
||||
(tdretaintitle [<Boolean>])|
|
||||
(tdreturnidonly [<Boolean>])|
|
||||
(tdshare <EmailAddress> commenter|reader|writer)*|
|
||||
(tdsheet (id:<Number>)|<String>)|
|
||||
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
|
||||
@@ -1046,12 +1054,17 @@ Specify a collection of items by directly specifying them; the item type is dete
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
my_forms |
|
||||
my_google_files |
|
||||
my_non_google_files |
|
||||
my_presentations |
|
||||
my_publishable_items |
|
||||
my_sheets |
|
||||
my_shortcuts |
|
||||
my_slides |
|
||||
my_3p_shortcuts |
|
||||
my_items |
|
||||
my_top_files |
|
||||
@@ -1066,6 +1079,7 @@ Specify a collection of items by directly specifying them; the item type is dete
|
||||
others_3p_shortcuts |
|
||||
others_items |
|
||||
writable_files
|
||||
|
||||
<DriveFileEntityShortcut> ::=
|
||||
alldrives |
|
||||
mydrive_any |
|
||||
@@ -1081,6 +1095,7 @@ Specify a collection of items by directly specifying them; the item type is dete
|
||||
sharedwithme_all |
|
||||
sharedwithme_mydrive |
|
||||
sharedwithme_notmydrive
|
||||
|
||||
<DriveFileEntity> ::=
|
||||
<DriveFileIDEntity> |
|
||||
<DriveFileNameEntity> |
|
||||
@@ -1341,7 +1356,8 @@ gam create project [admin <EmailAddress>] [project <ProjectID>]
|
||||
[sadescription <ServiceAccountDescription>]
|
||||
[(algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)|
|
||||
(localkeysize 1024|2048|4096 [validityhours <Number>])|
|
||||
(yubikey yubikey_pin yubikey_slot AUTHENTICATION|SIGNATURE yubikey_serialnumber <Number>)]
|
||||
(yubikey yubikey_pin yubikey_slot AUTHENTICATION|SIGNATURE yubikey_serialnumber <Number>)|
|
||||
nokey]
|
||||
gam use project [<EmailAddress>] [<ProjectID>]
|
||||
gam use project [admin <EmailAddress>] [project <ProjectID>]
|
||||
[saname <ServiceAccountName>] [sadisplayname <ServiceAccountDisplayName>]
|
||||
@@ -1580,6 +1596,7 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
|
||||
<EventType> ::=
|
||||
default|
|
||||
focustime|
|
||||
fromgmail|
|
||||
outofoffice|
|
||||
workinglocation
|
||||
<EventTypeList> ::= "<EventType>(,<EventType>)*"
|
||||
@@ -1983,12 +2000,13 @@ gam revoke browsertoken <BrowserTokenPermanentID>
|
||||
org|
|
||||
orgunit|
|
||||
orgunitpath|
|
||||
ou|
|
||||
revoketime|
|
||||
revokerid|
|
||||
state|
|
||||
token|
|
||||
tokenpermanentid
|
||||
<BrowserTokenFieldNameList> ::= "<BrowseTokenFieldName>(,<BrowserTokenFieldName>)*"
|
||||
<BrowserTokenFieldNameList> ::= "<BrowserTokenFieldName>(,<BrowserTokenFieldName>)*"
|
||||
|
||||
gam show browsertokens
|
||||
([ou|org|orgunit|browserou <OrgUnitPath>] [(query <QueryBrowserToken>)|(queries <QueryBrowserTokenList>)))
|
||||
@@ -2019,20 +2037,55 @@ gam print browsertokens [todrive <ToDriveAttribute>*]
|
||||
|
||||
gam setup chat
|
||||
|
||||
<ChatSpaceFieldName> ::=
|
||||
accesssettings|
|
||||
admininstalled|
|
||||
createtime|
|
||||
displayname|
|
||||
externaluserallowed|
|
||||
importmode|
|
||||
lastactivetime|
|
||||
membershipcount|
|
||||
name|
|
||||
singleuserbotdm|
|
||||
spacedetails|
|
||||
spacehistorystate|
|
||||
spacethreadingstate|threaded|
|
||||
spacetype|type|
|
||||
spaceuri
|
||||
<ChatSpaceFieldNameList> ::= "<ChatSpaceFieldName>(,<ChatSpaceFieldName>)*"
|
||||
|
||||
gam info chatspace <ChatSpace>
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
gam show chatspaces
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
gam print chatspaces [todrive <ToDriveAttribute>*]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
<ChatMemberFieldName> ::=
|
||||
createtime|
|
||||
deletetime|
|
||||
groupmember|
|
||||
member|
|
||||
name|
|
||||
role|
|
||||
state|
|
||||
<ChatMemberFieldNameList> ::= "<ChatMemberFieldName>(,<ChatMemberFieldName>)*"
|
||||
|
||||
gam info chatmember member <ChatMember>
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
gam show chatmembers <ChatSpace>
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
gam print chatmembers [todrive <ToDriveAttribute>*] <ChatSpace>
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam create chatmessage <ChatSpace>
|
||||
@@ -2044,7 +2097,37 @@ gam update chatmessage name <ChatMessage>
|
||||
<ChatContent>
|
||||
gam delete chatmessage name <ChatMessage>
|
||||
|
||||
<ChatMessageFieldName> ::=
|
||||
accessorywidgets|
|
||||
actionresponse|
|
||||
annotations|
|
||||
argumenttext|
|
||||
attachedgifs|
|
||||
attachment|
|
||||
cards|
|
||||
cardsv2|
|
||||
clientassignedmessageid|
|
||||
createtime|
|
||||
deletetime|
|
||||
deletionmetadata|
|
||||
emojireactionsummaries|
|
||||
fallbacktext|
|
||||
formattedtext|
|
||||
lastupdatetime|
|
||||
matchedurl|
|
||||
name|
|
||||
privatemessageviewer|
|
||||
quotedmessagemetadata|
|
||||
sender|
|
||||
slashcommand|
|
||||
space|
|
||||
text|
|
||||
thread|
|
||||
threadreply
|
||||
<ChatMessageFieldNameList> ::= "<ChatMessageFieldName>(,<ChatMessageFieldName>)*"
|
||||
|
||||
gam info chatmessage name <ChatMessage>
|
||||
[fields <ChatMessageFieldNameList>]
|
||||
[formatjson]
|
||||
|
||||
gam info chatevent name <ChatEvent>
|
||||
@@ -2516,19 +2599,21 @@ gam create chromepolicyimage <ChromePolicyImageSchemaName> <FileName>
|
||||
|
||||
gam update chromepolicy [convertcrnl]
|
||||
(<SchemaName> ((<Field> <Value>)+ | <JSONData>))+
|
||||
ou|org|orgunit <OrgUnitItem> [(printerid <PrinterID>)|(appid <AppID>)]
|
||||
((ou|orgunit <OrgUnitItem>)|(cigroup <GroupItem>))
|
||||
[(printerid <PrinterID>)|(appid <AppID>)]
|
||||
gam delete chromepolicy
|
||||
(<SchemaName> [<JSONData>])+
|
||||
ou|org|orgunit <OrgUnitItem> [(printerid <PrinterID>)|(appid <AppID>)]
|
||||
((ou|orgunit <OrgUnitItem>)|(cigroup <GroupItem>))
|
||||
[(printerid <PrinterID>)|(appid <AppID>)]
|
||||
gam show chromepolicies
|
||||
ou|org|orgunit <OrgUnitItem> [(printerid <PrinterID>)|(appid <AppID>)]
|
||||
[filter <String>] [namespace <NamespaceList>]
|
||||
[show all|direct|inherited]
|
||||
((ou|orgunit <OrgUnitItem> [show all|direct|inherited])|(cigroup <GroupItem>))
|
||||
[(printerid <PrinterID>)|(appid <AppID>)]
|
||||
(filter <StringList>)* (namespace <NamespaceList>)*
|
||||
[formatjson]
|
||||
gam print chromepolicies [todrive <ToDriveAttribute>*]
|
||||
ou|org|orgunit <OrgUnitItem> [(printerid <PrinterID>)|(appid <AppID>)]
|
||||
[filter <String>] [namespace <NamespaceList>]
|
||||
[show all|direct|inherited]
|
||||
((ou|orgunit <OrgUnitItem> [show all|direct|inherited])|(cigroup <GroupItem>))
|
||||
[(printerid <PrinterID>)|(appid <AppID>)]
|
||||
(filter <StringList>)* (namespace <NamespaceList>)*
|
||||
[[formatjson [quotechar <Character>]]
|
||||
|
||||
<ChromePolicySchemaFieldName> ::=
|
||||
@@ -2862,41 +2947,58 @@ gam <UserTypeEntity> show contactdelegates [shownames] [csv]
|
||||
gam create|add course [id|alias <CourseAlias>] <CourseAttribute>*
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
[markpublishedasdraft [<Boolean>]]
|
||||
[members none|all|students|teachers]]
|
||||
[logdrivefileids [<Boolean>]]
|
||||
|
||||
gam update course <CourseID> <CourseAttribute>+
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
[markpublishedasdraft [<Boolean>]]
|
||||
[members none|all|students|teachers]]
|
||||
[logdrivefileids [<Boolean>]]
|
||||
gam delete course <CourseID> [archive|archived]
|
||||
|
||||
gam update courses <CourseEntity> <CourseAttribute>+
|
||||
[copyfrom <CourseID>
|
||||
[announcementstates <CourseAnnouncementStateList>]
|
||||
[individualstudentannouncements copy|delete|maptoall]
|
||||
[materialstates <CourseMaterialStateList>]
|
||||
[individualstudentmaterials copy|delete|maptoall]
|
||||
[workstates <CourseWorkStateList>]
|
||||
[individualstudentcoursework copy|delete|maptoall]
|
||||
[removeduedate [<Boolean>]]
|
||||
[mapsharemodestudentcopy edit|none|view]
|
||||
[individualstudentassignments copy|delete|maptoall]
|
||||
[copymaterialsfiles [<Boolean>]]
|
||||
[copytopics [<Boolean>]]
|
||||
[markdraftaspublished [<Boolean>]]
|
||||
[markpublishedasdraft [<Boolean>]]
|
||||
[members none|all|students|teachers]]
|
||||
[logdrivefileids [<Boolean>]]
|
||||
|
||||
gam delete course <CourseID> [archive|archived]
|
||||
gam delete courses <CourseEntity> [archive|archived]
|
||||
|
||||
gam course <CourseID> create|add alias <CourseAlias>
|
||||
@@ -2957,6 +3059,7 @@ gam print course-participants [todrive <ToDriveAttribute>*]
|
||||
creationtime|
|
||||
creator|creatoruserid|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
scheduledtime|
|
||||
state|
|
||||
@@ -2977,6 +3080,7 @@ gam print course-participants [todrive <ToDriveAttribute>*]
|
||||
creator|creatoruserid|
|
||||
description|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
scheduledtime|
|
||||
state|
|
||||
@@ -3019,6 +3123,7 @@ gam print course-participants [todrive <ToDriveAttribute>*]
|
||||
duedate|
|
||||
duetime|
|
||||
id|
|
||||
individualstudentsoptions|
|
||||
materials|
|
||||
maxpoints|
|
||||
scheduledtime|
|
||||
@@ -3041,35 +3146,36 @@ gam print course-announcements [todrive <ToDriveAttribute>*]
|
||||
(announcementids <CourseAnnouncementIDEntity>)|((announcementstates <CourseAnnouncementStateList>)*
|
||||
(orderby <CourseAnnouncementOrderByFieldName> [ascending|descending])*)
|
||||
[showcreatoremails|creatoremail] [fields <CourseAnnouncementFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
gam print course-materials [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
(materialids <CourseMaterialIDEntity>)|((materialstates <CourseMaterialStateList>)*
|
||||
(orderby <CourseMaterialOrderByFieldName> [ascending|descending])*)
|
||||
[showcreatoremails|creatoremail] [showtopicnames] [fields <CourseMaterialFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
gam print course-submissions [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
(workids <CourseWorkIDEntity>)|((workstates <CourseWorkStateList>)*
|
||||
(orderby <CourseWorkOrderByFieldName> [ascending|descending])*)
|
||||
(submissionids <CourseSubmissionIDEntity>)|((submissionstates <CourseSubmissionStateList>)*) [late|notlate]
|
||||
[fields <CourseSubmissionFieldNameList>]
|
||||
[formatjson [quotechar <Character>]] [showuserprofile]
|
||||
[timefilter creationtime|updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
gam print course-topics [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
[topicids <CourseTopicIDEntity>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[timefilter updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
gam print course-works [todrive <ToDriveAttribute>*]
|
||||
(course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
||||
(workids <CourseWorkIDEntity>)|((workstates <CourseWorkStateList>)*
|
||||
(orderby <CourseWorkOrderByFieldName> [ascending|descending])*)
|
||||
[showcreatoremails|creatoremail] [showtopicnames] [fields <CourseWorkFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[showstudentsaslist [<Boolean>]] [delimiter <Character>]
|
||||
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
||||
[countsonly] [formatjson [quotechar <Character>]]
|
||||
|
||||
# Classroom - Invitations
|
||||
|
||||
@@ -3198,15 +3304,22 @@ gam info domain [<DomainName>]
|
||||
[formatjson]
|
||||
gam print domains [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show domains [formatjson]
|
||||
[showitemcountonly]
|
||||
gam show domains
|
||||
[formatjson]
|
||||
[showitemcountonly]
|
||||
|
||||
gam create|add domainalias|aliasdomain <DomainAlias> <DomainName>
|
||||
gam delete domainalias|aliasdomain <DomainAlias>
|
||||
|
||||
gam info domainalias|aliasdomain <DomainAlias> [formatjson]
|
||||
gam info domainalias|aliasdomain <DomainAlias>
|
||||
[formatjson]
|
||||
gam print domainaliases|aliasdomains [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show domainaliases|aliasdomains [formatjson]
|
||||
[showitemcountonly]
|
||||
gam show domainaliases|aliasdomains
|
||||
[formatjson]
|
||||
[showitemcountonly]
|
||||
|
||||
# Domain - Contacts and Global Address List
|
||||
|
||||
@@ -3428,11 +3541,11 @@ gam [<UserTypeEntity>] show drivelabels
|
||||
[formatjson] [adminaccess|asadmin]
|
||||
`
|
||||
gam [<UserTypeEntity>] create drivelabelpermission <DriveLabelNameEntity>
|
||||
(user <UserItem>) | (group <GroupItem) | (audience <String>)
|
||||
(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>)
|
||||
(user <UserItem>) | (group <GroupItem>) | (audience <String>)
|
||||
[adminaccess|asadmin]
|
||||
gam [<UserTypeEntity>] remove drivelabelpermission <DriveLabelPermissionNameEntity>
|
||||
[adminaccess|asadmin]
|
||||
@@ -3707,6 +3820,7 @@ gam print group-members [todrive <ToDriveAttribute>*]
|
||||
[types <GroupTypeList>]
|
||||
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
|
||||
[userfields <UserFieldNameList>]
|
||||
[allschemas|(schemas|custom|customschemas <SchemaNameList>)]
|
||||
[(recursive [noduplicates])|includederivedmembership] [nogroupemail]
|
||||
[peoplelookup|(peoplelookupuser <EmailAddress>)]
|
||||
[unknownname <String>] [cachememberinfo [Boolean]]
|
||||
@@ -4131,6 +4245,19 @@ gam print orgs|ous [todrive <ToDriveAttribute>*]
|
||||
[showitemcountonly]
|
||||
gam show orgtree [fromparent <OrgUnitItem>] [batchsuborgs [<Boolean>]]
|
||||
|
||||
<OrgUnitCheckName> ::=
|
||||
browsers|
|
||||
devices|
|
||||
shareddrives|
|
||||
subous|
|
||||
users
|
||||
<OrgUnitCheckNameList> ::= "<OrgUnitCheckName>(,<OrgUnitCheckName>)*"
|
||||
|
||||
gam check ou|org <OrgUnitItem> [todrive <ToDriveAttribute>*]
|
||||
[<OrgUnitCheckName>*|(fields <OrgUnitCheckNameList>)]
|
||||
[filename <FileName>] [movetoou <OrgUnitItem>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
# Printers
|
||||
|
||||
<PrinterAttribute> ::=
|
||||
@@ -4192,11 +4319,13 @@ gam report usage user [todrive <ToDriveAttribute>*]
|
||||
thismonth|(previousmonths <Integer>)]
|
||||
[skipdates <Date>[:<Date>](,<Date>[:<Date>])*] [skipdaysofweek <DayOfWeek>(,<DayOfWeek>)*]
|
||||
[fields|parameters <String>]
|
||||
[convertmbtogb]
|
||||
gam report usage customer [todrive <ToDriveAttribute>*]
|
||||
[([start|startdate <Date>] [end|enddate <Date>])|(range <Date> <Date>)|
|
||||
thismonth|(previousmonths <Integer>)]
|
||||
[skipdates <Date>[:<Date>](,<Date>[:<Date>])*] [skipdaysofweek <DayOfWeek>(,<DayOfWeek>)*]
|
||||
[fields|parameters <String>]
|
||||
[convertmbtogb]
|
||||
|
||||
<ActivityApplicationName> ::=
|
||||
access|accesstransparency|
|
||||
@@ -4221,7 +4350,8 @@ gam report usage customer [todrive <ToDriveAttribute>*]
|
||||
rules|
|
||||
saml|
|
||||
token|tokens|oauthtoken|
|
||||
useraccounts
|
||||
useraccounts|
|
||||
vault
|
||||
|
||||
gam report <ActivityApplicationName> [todrive <ToDriveAttribute>*]
|
||||
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select <UserTypeEntity>)]
|
||||
@@ -4253,8 +4383,9 @@ gam report <ActivityApplicationName> [todrive <ToDriveAttribute>*]
|
||||
gam report customers|customer|domain [todrive <ToDriveAttribute>*]
|
||||
[(date <Date>)|(range <Date> <Date>)|
|
||||
yesterday|today|thismonth|(previousmonths <Integer>)]
|
||||
[nodatechange | (fulldatarequired all|<CustomerServiceNameList>)]
|
||||
[(nodatechange | limitdatechanges <Integer>) | (fulldatarequired all|<CustomerServiceNameList>)]
|
||||
[(fields|parameters <String>)|(services <CustomerServiceNameList>)] [noauthorizedapps]
|
||||
[convertmbtogb]
|
||||
|
||||
<UserServiceName> ::=
|
||||
accounts|
|
||||
@@ -4270,11 +4401,12 @@ gam report users|user [todrive <ToDriveAttribute>*]
|
||||
[allverifyuser <UserItem>]
|
||||
[(date <Date>)|(range <Date> <Date>)|
|
||||
yesterday|today|thismonth|(previousmonths <Integer>)]
|
||||
[nodatechange | (fulldatarequired all|<UserServiceNameList>)]
|
||||
[(nodatechange | limitdatechanges <Integer>) | (fulldatarequired all|<UserServiceNameList>)]
|
||||
[filtertime.* <Time>] [filter|filters <String>]
|
||||
[(fields|parameters <String>)|(services <UserServiceNameList>)]
|
||||
[aggregatebydate|aggregatebyuser [Boolean]]
|
||||
[maxresults <Number>]
|
||||
[convertmbtogb]
|
||||
|
||||
# Reseller
|
||||
|
||||
@@ -4823,6 +4955,7 @@ gam print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
|
||||
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
|
||||
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show teamdriveacls
|
||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||
@@ -4852,6 +4985,7 @@ gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
<PermissionMatch>* [<PermissionMatchAction>] [pmselect]
|
||||
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||
[shownopermissionsdrives false|true|only]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam <UserTypeEntity> show teamdriveacls
|
||||
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
|
||||
@@ -5252,7 +5386,7 @@ gam download storagefile <StorageBucketObjectName>
|
||||
(note clear|([text_html|text_plain] <String>|
|
||||
(file|htmlfile <FileName> [charset <Charset>])|
|
||||
(gdoc|ghtml <UserGoogleDoc>)))|
|
||||
(org|ou|orgunitpath <OrgUnitPath>|<OrgUnitID>)
|
||||
(ou|org|orgunitpath <OrgUnitPath>|<OrgUnitID>)
|
||||
(password (random [<Integer>])|(uniquerandom [<Integer>])|blocklogin|<Password>)|
|
||||
(recoveryemail <EmailAddress>)|
|
||||
(recoveryphone <string>)|
|
||||
@@ -5348,7 +5482,7 @@ gam update user <UserItem> [ignorenullpassword] <UserAttribute>*
|
||||
[columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]
|
||||
[fields <FieldNameList>] [keyfield <FieldName>] [datafield <FieldName>]]
|
||||
[immutableous <OrgUnitEntity>]|
|
||||
[clearschema <SchemaName> | <SchemaNameField>]
|
||||
[clearschema <SchemaName>|<SchemaNameField>]
|
||||
[createifnotfound] [notfoundpassword (random [<Integer>])|blocklogin|<Password>]
|
||||
(groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
|
||||
[alias|aliases <EmailAddressList>]
|
||||
@@ -5416,7 +5550,7 @@ gam <UserTypeEntity> update users [ignorenullpassword] <UserAttribute>*
|
||||
[verifynotinvitable] [noactionifalias]
|
||||
[updateprimaryemail <RegularExpression> <EmailReplacement>]
|
||||
[updateoufromgroup <CSVFileInput> [keyfield <FieldName>] [datafield <FieldName>]]
|
||||
[clearschema <SchemaName> | <SchemaNameField>]
|
||||
[clearschema <SchemaName>|<SchemaNameField>]
|
||||
[createifnotfound] [notfoundpassword (random [<Integer>])|blocklogin|<Password>]
|
||||
(groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
|
||||
[alias|aliases <EmailAddressList>]
|
||||
@@ -5553,7 +5687,7 @@ gam <UserTypeEntity> update backupcodes|verificationcodes
|
||||
gam <UserTypeEntity> delete backupcodes|verificationcodes
|
||||
gam <UserTypeEntity> show backupcodes|verificationcodes
|
||||
gam <UserTypeEntity> print backupcodes|verificationcodes [todrive <ToDriveAttribute>*]
|
||||
[delimiter <Character>]
|
||||
[delimiter <Character>] [countsonly]
|
||||
|
||||
# Users - Calendars
|
||||
|
||||
@@ -5930,7 +6064,7 @@ gam <UserTypeEntity> print focustime|outofoffice|workinglocation
|
||||
[showdayofweek]
|
||||
[formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]
|
||||
|
||||
# Users Chat
|
||||
# Users - Chat
|
||||
|
||||
<ChatContent> ::=
|
||||
((text <String>)|
|
||||
@@ -5970,15 +6104,60 @@ gam <UserTypeEntity> update chatspace <ChatSpace>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> delete chatspace <ChatSpace>
|
||||
|
||||
gam <UserItem> update chatspace asadmin <ChatSpace>
|
||||
[restricted|(audience <String>)]|
|
||||
([displayname <String>]
|
||||
[type space]
|
||||
[description <String>] [guidelines|rules <String>]
|
||||
[history <Boolean>])
|
||||
[formatjson]
|
||||
gam <UserItem> delete chatspace asadmin <ChatSpace>
|
||||
|
||||
<ChatSpaceFieldName> ::=
|
||||
accesssettings|
|
||||
admininstalled|
|
||||
createtime|
|
||||
displayname|
|
||||
externaluserallowed|
|
||||
importmode|
|
||||
lastactivetime|
|
||||
membershipcount|
|
||||
name|
|
||||
singleuserbotdm|
|
||||
spacedetails|
|
||||
spacehistorystate|
|
||||
spacethreadingstate|threaded|
|
||||
spacetype|type|
|
||||
spaceuri
|
||||
<ChatSpaceFieldNameList> ::= "<ChatSpaceFieldName>(,<ChatSpaceFieldName>)*"
|
||||
|
||||
gam <UserTypeEntity> info chatspace <ChatSpace>
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> info chatspacedm <UserItem>
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> show chatspaces
|
||||
[types <ChatSpaceTypeList>]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print chatspaces [todrive <ToDriveAttribute>*]
|
||||
[types <ChatSpaceTypeList>]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserItem> info chatspace asadmin <ChatSpace>
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserItem> show chatspaces asadmin
|
||||
[query <String>] [querytime<String> <Time>]
|
||||
[orderby <ChatSpaceAdminOrderByFieldName> [ascending|descending]]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserItem> print chatspaces asadmin [todrive <ToDriveAttribute>*]
|
||||
[query <String>] [querytime<String> <Time>]
|
||||
[orderby <ChatSpaceAdminOrderByFieldName> [ascending|descending]]
|
||||
[fields <ChatSpaceFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> create chatmember <ChatSpace>
|
||||
@@ -5996,14 +6175,75 @@ gam <UserTypeEntity> update chatmember <ChatSpace>
|
||||
gam <UserTypeEntity> modify chatmember
|
||||
role member|manager
|
||||
members <ChatMemberList>
|
||||
gam <UserTypeEntity> sync chatmembers <ChatSpace>
|
||||
[role member|manager] [type human|bot]
|
||||
[addonly|removeonly]
|
||||
[preview [actioncsv]]
|
||||
(users <UserTypeEntity>)* (groups <GroupEntity>)*
|
||||
|
||||
gam <UserTypeEntity> info chatmember members <ChatMemberList>
|
||||
gam <UserItem> create chatmember asadmin <ChatSpace>
|
||||
[type human|bot] [role member|manager]
|
||||
(user <UserItem>)* (members <UserTypeEntity>)*
|
||||
(group <GroupItem>)* (groups <GroupEntity>)*
|
||||
[formatjson|returnidonly]
|
||||
gam <UserItem> remove chatmember asadmin members <ChatMemberList>
|
||||
gam <UserItem> delete chatmember asadmin <ChatSpace>
|
||||
((user <UserItem>)|(members <UserTypeEntity>)|
|
||||
(group <GroupItem>)|(groups <GroupEntity>))+
|
||||
gam <UserItem> update chatmember asadmin <ChatSpace>
|
||||
role member|manager
|
||||
((user <UserItem>)|(members <UserTypeEntity>))+
|
||||
gam <UserItem> modify chatmember asadmin
|
||||
role member|manager
|
||||
members <ChatMemberList>
|
||||
gam <UserItem> sync chatmembers asadmin <ChatSpace>
|
||||
[role member|manager] [type human|bot]
|
||||
[addonly|removeonly]
|
||||
[preview [actioncsv]]
|
||||
(users <UserTypeEntity>)* (groups <GroupEntity>)*
|
||||
|
||||
<ChatMemberFieldName> ::=
|
||||
createtime|
|
||||
deletetime|
|
||||
groupmember|
|
||||
member|
|
||||
name|
|
||||
role|
|
||||
state|
|
||||
<ChatMemberFieldNameList> ::= "<ChatMemberFieldName>(,<ChatMemberFieldName>)*"
|
||||
|
||||
gam <UserTypeEntity> info chatmember
|
||||
members <ChatMemberList>
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> show chatmembers <ChatSpace>
|
||||
gam <UserTypeEntity> show chatmembers
|
||||
<ChatSpace>* [types <ChatSpaceTypeList>]
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print chatmembers [todrive <ToDriveAttribute>*] <ChatSpace>
|
||||
gam <UserTypeEntity> print chatmembers [todrive <ToDriveAttribute>*]
|
||||
<ChatSpace>* [types <ChatSpaceTypeList>]
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserItem> info chatmember asadmin
|
||||
members <ChatMemberList>
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserItem> show chatmembers asadmin
|
||||
<ChatSpace>* [query <String>] [querytime<String> <Time>]
|
||||
[orderby <ChatSpaceAdminOrderByFieldName> [ascending|descending]]
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserItem> print chatmembers asadmin [todrive <ToDriveAttribute>*]
|
||||
<ChatSpace>* [query <String>] [querytime<String> <Time>]
|
||||
[orderby <ChatSpaceAdminOrderByFieldName> [ascending|descending]]
|
||||
[showinvited [<Boolean>]] [showgroups [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMemberFieldNameList>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> create chatmessage <ChatSpace>
|
||||
@@ -6015,21 +6255,57 @@ gam <UserTypeEntity> update chatmessage name <ChatMessage>
|
||||
<ChatContent>
|
||||
gam <UserTypeEntity> delete chatmessage name <ChatMessage>
|
||||
|
||||
<ChatMessageFieldName> ::=
|
||||
accessorywidgets|
|
||||
actionresponse|
|
||||
annotations|
|
||||
argumenttext|
|
||||
attachedgifs|
|
||||
attachment|
|
||||
cards|
|
||||
cardsv2|
|
||||
clientassignedmessageid|
|
||||
createtime|
|
||||
deletetime|
|
||||
deletionmetadata|
|
||||
emojireactionsummaries|
|
||||
fallbacktext|
|
||||
formattedtext|
|
||||
lastupdatetime|
|
||||
matchedurl|
|
||||
name|
|
||||
privatemessageviewer|
|
||||
quotedmessagemetadata|
|
||||
sender|
|
||||
slashcommand|
|
||||
space|
|
||||
text|
|
||||
thread|
|
||||
threadreply
|
||||
<ChatMessageFieldNameList> ::= "<ChatMessageFieldName>(,<ChatMessageFieldName>)*"
|
||||
|
||||
gam <UserTypeEntity> info chatmessage name <ChatMessage>
|
||||
[fields <ChatMessageFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> show chatmessages <ChatSpace>
|
||||
gam <UserTypeEntity> show chatmessages
|
||||
<ChatSpace>+
|
||||
[showdeleted [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMessageFieldNameList>]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print chatmessages [todrive <ToDriveAttribute>*] <ChatSpace>
|
||||
gam <UserTypeEntity> print chatmessages [todrive <ToDriveAttribute>*]
|
||||
<ChatSpace>+
|
||||
[showdeleted [<Boolean>]] [filter <String>]
|
||||
[fields <ChatMessageFieldNameList>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> info chatevent name <ChatEvent>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> show chatevents <ChatSpace>
|
||||
gam <UserTypeEntity> show chatevents
|
||||
<ChatSpace>+
|
||||
filter <String>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print chatevents [todrive <ToDriveAttribute>*] <ChatSpace>
|
||||
gam <UserTypeEntity> print chatevents [todrive <ToDriveAttribute>*]
|
||||
<ChatSpace>+
|
||||
filter <String>
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
@@ -6242,11 +6518,12 @@ gam <UserTypeEntity> get drivefile <DriveFileEntity> [revision <DriveFileRevisio
|
||||
[(format <FileFormatList>)|(gsheet|csvsheet <SheetEntity>)] [exportsheetaspdf <String>]
|
||||
[targetfolder <FilePath>] [targetname <FileName>|-]
|
||||
[donotfollowshortcuts [<Boolean>]] [overwrite [<Boolean>]] [showprogress [<Boolean>]]
|
||||
[acknowledgeabuse [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> delete drivefile <DriveFileEntity> [purge|untrash|trash]
|
||||
gam <UserTypeEntity> purge drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> trash drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> untrash drivefile <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete drivefile <DriveFileEntity> [purge|untrash|trash] [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> purge drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> trash drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
gam <UserTypeEntity> untrash drivefile <DriveFileEntity> [shortcutandtarget [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> info drivefile <DriveFileEntity>
|
||||
[returnidonly]
|
||||
@@ -6255,7 +6532,7 @@ gam <UserTypeEntity> info drivefile <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[showdrivename] [showshareddrivepermissions]
|
||||
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
|
||||
[showparentsidsaslist]
|
||||
[showparentsidsaslist] [followshortcuts [<Boolean>]]
|
||||
[stripcrsfromname]
|
||||
[formatjson]
|
||||
|
||||
@@ -6476,7 +6753,7 @@ gam <UserTypeEntity> transfer ownership <DriveFileEntity> <UserItem>
|
||||
[todrive <ToDriveAttribute>*]
|
||||
gam <UserTypeEntity> claim ownership <DriveFileEntity>
|
||||
[<DriveFileParentAttribute>] [includetrashed]
|
||||
[skipids <DriveFileEntity>] [skipusers <UserTypeEntity>] [subdomains <DomainNameEntity>]
|
||||
[skipids <DriveFileEntity>] [onlyusers|skipusers <UserTypeEntity>] [subdomains <DomainNameEntity>]
|
||||
[restricted [<Boolean>]] [writerscanshare|writerscantshare [<Boolean>]]
|
||||
[keepuser | (retainrole commenter|reader|writer|editor|fileorganizer|none)] [noretentionmessages]
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
@@ -6738,7 +7015,7 @@ gam <UserTypeEntity> show fileinfo <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[showdrivename] [showshareddrivepermissions]
|
||||
[(showlabels details|ids)|(includelabels <DriveLabelIDList>)]
|
||||
[showparentsidsaslist]
|
||||
[showparentsidsaslist] [followshortcuts [<Boolean>]]
|
||||
[stripcrsfromname]
|
||||
[formatjson]
|
||||
|
||||
@@ -6747,14 +7024,17 @@ gam <UserTypeEntity> show filepath <DriveFileEntity>
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[stripcrsfromname]
|
||||
[fullpath] [folderpathonly [<Boolean>]] [pathdelimiter <Character>]
|
||||
[followshortcuts [<Boolean>]]
|
||||
gam <UserTypeEntity> print filepath <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
(orderby <DriveFileOrderByFieldName> [ascending|descending])*
|
||||
[stripcrsfromname] [oneitemperrow]
|
||||
[fullpath] [folderpathonly [<Boolean>]] [pathdelimiter <Character>]
|
||||
[followshortcuts [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
@@ -6763,20 +7043,22 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize]
|
||||
[showsize] [showmimetypesize] [showlastmodification]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
gam <UserTypeEntity> show filecounts
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <SharedDriveEntity>]
|
||||
[anyowner|(showownedby any|me|others)]
|
||||
[showmimetype [not] <MimeTypeList>] [`<showmimetype category <MimeTypeNameList>]
|
||||
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||
[filenamematchpattern <RegularExpression>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize]
|
||||
[showsize] [showmimetypesize] [showlastmodification]
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
|
||||
gam <UserTypeEntity> print filesharecounts [todrive <ToDriveAttribute>*]
|
||||
@@ -6830,6 +7112,7 @@ gam <UserTypeEntity> print fileparenttree <DriveFileEntity> [todrive <ToDriveAtt
|
||||
gam <UserTypeEntity> print filelist [todrive <ToDriveAttribute>*]
|
||||
[((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>)
|
||||
(querytime<String> <Time>)*]
|
||||
[continueoninvalidquery [<Boolean>]]
|
||||
[choose <DriveFileNameEntity>|<DriveFileEntityShortcut>]
|
||||
[corpora <CorporaAttribute>]
|
||||
[select <DriveFileEntity> [selectsubquery <QueryDriveFile>]
|
||||
@@ -6877,7 +7160,7 @@ gam <UserTypeEntity> print diskusage <DriveFileEntity> [todrive <ToDriveAttribut
|
||||
upload
|
||||
<DriveActivityActionList> ::= "<DriveActivityAction>(,<DriveActivityAction>)*"
|
||||
|
||||
gam <UserTypeEntity> print|show driveactivity [todrive <ToDriveAttribute>*]
|
||||
gam <UserTypeEntity> print driveactivity [todrive <ToDriveAttribute>*]
|
||||
[(fileid <DriveFileID>) | (folderid <DriveFolderID>) |
|
||||
(drivefilename <DriveFileName>) | (drivefoldername <DriveFolderName>) | (query <QueryDriveFile>)]
|
||||
[([start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>])|(range <Date>|<Time> <Date>)|<Time>|
|
||||
@@ -6885,7 +7168,7 @@ gam <UserTypeEntity> print|show driveactivity [todrive <ToDriveAttribute>*]
|
||||
[action|actions [not] <DriveActivityActionList>]
|
||||
[consolidationstrategy legacy|none]
|
||||
[idmapfile <CSVFileInput> endcsv]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[stripcrsfromname] [formatjson [quotechar <Character>]]
|
||||
|
||||
<DriveSettingsFieldName> ::=
|
||||
appinstalled|
|
||||
@@ -7178,7 +7461,7 @@ gam <UserTypeEntity> delete messages|threads
|
||||
gam <UserTypeEntity> modify messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
|
||||
(addlabel <LabelName>)* (removelabel <LabelName>)*
|
||||
((addlabel <LabelName>)|(removelabel <LabelName>))+
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> spam messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
@@ -7265,7 +7548,7 @@ gam <UserTypeEntity> show signature|sig [compact|format|html]
|
||||
gam <UserTypeEntity> print signature [compact]
|
||||
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*]
|
||||
|
||||
gam <UserTypeEntity> vacation <Boolean> subject <String>
|
||||
gam <UserTypeEntity> vacation [<Boolean>] [subject <String>]
|
||||
[<VacationMessageContent> (replace <Tag> <UserReplacement>)*]
|
||||
[html [<Boolean>]] [contactsonly [<Boolean>]] [domainonly [<Boolean>]]
|
||||
[start|startdate <Date>|Started] [end|enddate <Date>|NotSpecified]
|
||||
@@ -7356,10 +7639,10 @@ gam <UserTypeEntity> check group|groups
|
||||
[roles <GroupRoleList>] [includederivedmembership] [csv] <GroupEntity>
|
||||
gam <UserTypeEntity> print groups [todrive <ToDriveAttribute>*]
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
[roles <GroupRoleList>] [countsonly|nodetails]
|
||||
[roles <GroupRoleList>] [countsonly|totalonly|nodetails]
|
||||
gam <UserTypeEntity> show groups
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
[roles <GroupRoleList>] [countsonly|nodetails]
|
||||
[roles <GroupRoleList>] [countsonly|totalonly|nodetails]
|
||||
gam <UserTypeEntity> print grouptree [todrive <ToDriveAttribute>*]
|
||||
[(domain <DomainName>)|(customerid <CustomerID>)]
|
||||
[roles <GroupRoleList>]
|
||||
@@ -7514,6 +7797,52 @@ gam <UserTypeEntity> show lookerstudiopermissions
|
||||
[role editor|owner|viewer]
|
||||
[formatjson]
|
||||
|
||||
# Users - Meet
|
||||
|
||||
<MeetConferenceName> ::= conferenceRecords/<String>
|
||||
<MeetSpaceName> ::= spaces/<String> | <String>
|
||||
<MeetSpaceOptions> ::=
|
||||
accesstype open|trusted|restricted |
|
||||
entrypointaccess all|creatorapponly
|
||||
|
||||
gam <UserTypeEntity> create meetspace
|
||||
<MeetSpaceOptions>*
|
||||
[formatjson]
|
||||
|
||||
gam <UserTypeEntity> update meetspace <MeetSpaceName>
|
||||
<MeetSpaceOptions>*
|
||||
[formatjson]
|
||||
|
||||
gam <UserTypeEntity> info meetspace <MeetSpaceName>
|
||||
[formatjson]
|
||||
|
||||
gam <UserTypeEntity> end meetconference <MeetSpaceName>
|
||||
|
||||
gam <UserItem> show meetconferences
|
||||
[space <MeetSpaceName>] [code <String>]
|
||||
[andquery|orquery <String>] [querytime<String> <Time>]
|
||||
[formatjson]
|
||||
gam <UserItem> print meetconferences [todrive <ToDriveAttribute>*]
|
||||
[andquery|orquery <String>] [querytime<String> <Time>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserItem> show meetparticipants <MeetConferenceName>
|
||||
[query <String>] [querytime<String> <Time>]
|
||||
[formatjson]
|
||||
gam <UserItem> print meetparticipants <MeetConferenceName> [todrive <ToDriveAttribute>*]
|
||||
[query <String>] [querytime<String> <Time>]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserItem> show meetrecordings <MeetConferenceName>
|
||||
[formatjson]
|
||||
gam <UserItem> print meetrecordings <MeetConferenceName> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserItem> show meettranscripts <MeetConferenceName>
|
||||
[formatjson]
|
||||
gam <UserItem> print meettranscripts <MeetConferenceName> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
# Users - Contacts and Profiles
|
||||
|
||||
<PeopleContactAttribute> ::=
|
||||
@@ -7916,12 +8245,12 @@ gam <UserTypeEntity> update sheet <DriveFileEntity>
|
||||
gam <UserTypeEntity> info|show sheet <DriveFileEntity>
|
||||
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||
[includegriddata [<Boolean>]]
|
||||
[includegriddata [<Boolean>]] [shownames]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||
[includegriddata [<Boolean>]]
|
||||
[includegriddata [<Boolean>]] [shownames]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
See: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values#ValueRange
|
||||
@@ -7960,11 +8289,18 @@ gam <UserTypeEntity> show sheetrange <DriveFileEntity>
|
||||
gam <UserTypeEntity> delete tokens clientid <ClientID>
|
||||
|
||||
gam <UserTypeEntity> print tokens|token [todrive <ToDriveAttribute>*] [clientid <ClientID>]
|
||||
[aggregateby|orderby clientid|id|appname|displaytext] [delimiter <Character>]
|
||||
[usertokencounts|(aggregateusersby|orderby clientid|id|appname|displaytext)]
|
||||
[delimiter <Character>]
|
||||
gam <UserTypeEntity> show tokens|token|3lo|oauth [clientid <ClientID>]
|
||||
[aggregateby|orderby clientid|id|appname|displaytext]
|
||||
[usertokencounts|(aggregateusersby|orderby clientid|id|appname|displaytext)]
|
||||
[delimiter <Character>]
|
||||
gam print tokens|token [todrive <ToDriveAttribute>*] [clientid <ClientID>]
|
||||
[aggregateby|orderby clientid|id|appname|displaytext] [delimiter <Character>]
|
||||
[usertokencounts|(aggregateusersby|orderby clientid|id|appname|displaytext)]
|
||||
[delimiter <Character>]
|
||||
[<UserTypeEntity>]
|
||||
gam show tokens|token [clientid <ClientID>]
|
||||
[usertokencounts|(aggregateusersby|orderby clientid|id|appname|displaytext)]
|
||||
[delimiter <Character>]
|
||||
[<UserTypeEntity>]
|
||||
|
||||
# Users - YouTube
|
||||
|
||||
@@ -1,7 +1,494 @@
|
||||
7.00.02
|
||||
|
||||
Added option `showlastmodification` to `gam <UserTypeEntity> print|show filecounts` that adds
|
||||
the following fields to the output: `lastModifiedFileId,lastModifiedFileName,lastModifyingUser,lastModifiedTime`;
|
||||
these are for the most recently modified file.
|
||||
|
||||
Added option `keepforever [<Boolean>]` to `gam <UserTypeEntity> update filerevisions` that allows setting
|
||||
`Keep forever` in revisions.
|
||||
|
||||
Upgraded to Python 3.12.6 where possible.
|
||||
|
||||
7.00.01
|
||||
|
||||
Added option `shownames` to `gam <UserTypeEntity> print|show sheet` that causes GAM
|
||||
to make an additional API call to get and display the sheet file name that is not supplied by the Sheets API.
|
||||
|
||||
7.00.00
|
||||
|
||||
Merged GAM-Team version
|
||||
|
||||
6.81.02
|
||||
|
||||
Updated `gam update group postmaster@domain.com` to handle the error that is generated.
|
||||
|
||||
6.81.01
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> create meetspace` that caused errors
|
||||
due to Developer Preview options being included.
|
||||
|
||||
6.81.00
|
||||
|
||||
Added support for groups when defining Chrome policies.
|
||||
|
||||
Added support for the Meet API.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Meet
|
||||
|
||||
Added option `countsonly` to the following course commands that displays
|
||||
the number of items in a course but not the details of the items.
|
||||
```
|
||||
gam print course-announcements
|
||||
gam print course-materials
|
||||
gam print course-submissions
|
||||
gam print course-topics
|
||||
gam print course-work
|
||||
```
|
||||
|
||||
6.80.21
|
||||
|
||||
Updated `gam <UserTypeEntity> archive messages` to handle the following error:
|
||||
```
|
||||
googleapiclient.errors.MediaUploadSizeError: Media larger than: 26214400
|
||||
```
|
||||
|
||||
6.80.20
|
||||
|
||||
Updated `gam report usage user` and `gam report users` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
```
|
||||
|
||||
6.80.19
|
||||
|
||||
Fixed bug in `gam create inboundssoprofile` that caused a trap due to
|
||||
an unexpected API result.
|
||||
|
||||
Updated `gam create inboundssoprofile ... returnnameonly` to return `inProgress` if the API
|
||||
does not return a complete result.
|
||||
|
||||
Upgraded to OpenSSL 3.3.2 where possible.
|
||||
|
||||
6.80.18
|
||||
|
||||
Updated `gam print|show admins` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
```
|
||||
|
||||
6.80.17
|
||||
|
||||
Updated `gam <UserTypeEntity> modify messages` to improve error handling.
|
||||
|
||||
6.80.16
|
||||
|
||||
Fixed bug in `gam print vaultcounts` that caused a trap.
|
||||
|
||||
6.80.15
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print filelist ... countsrowfilter` that caused a trap.
|
||||
|
||||
Added option `continueoninvalidquery [<Boolean>]` to `gam <UserTypeEntity> print filelist|filecounts` that can be used
|
||||
in special cases where a query of the form `query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels"
|
||||
causes Google to issue an error saying that the query is invalid when, in fact, it is but the user does not have a
|
||||
license that suppprts drive file labels. When `continueoninvalidquery` is true, GAM prints an error message and
|
||||
proceeds to the next user rather that terminating as it does now. Of course, if the query really is invalid, you will
|
||||
get the message for every user.
|
||||
|
||||
6.80.14
|
||||
|
||||
Updated `gam <UserTypeEntity> print messages|threads` to display all default headers
|
||||
even if no messages are to be displayed. This eliminates error messages of the following form
|
||||
that occurred because only the headers `User,threadId,id` were displayed.
|
||||
```
|
||||
WARNING: csv_output_row_filter column "^Date$" does not match any output columns
|
||||
```
|
||||
|
||||
6.80.13
|
||||
|
||||
Added `my_publishable_items` to `<DriveFileQueryShortcut>` that can be used in
|
||||
`gam <UserTypeEntity> print filerevisions` to select only those items that can be
|
||||
published to the web: documents, forms, presentations(slides), spreadsheets. With row filtering,
|
||||
this allows identification of files that have been published outside your domain.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Files-Display#display-files-published-to-the-web
|
||||
|
||||
6.80.12
|
||||
|
||||
Updated `gam print vaultcounts` to correctly display accounts with errors.
|
||||
|
||||
6.80.11
|
||||
|
||||
Updated `gam <UserTypeEntity> delete|purge|trash|untrash <DriveFileEntity> shortcutandtarget`
|
||||
that when `<DriveFileEntity` is a shortcut, to have GAM validate that the shortcut and target can be
|
||||
successfully processed before proceeding.
|
||||
|
||||
6.80.10
|
||||
|
||||
Added option `followshortcuts [<Boolean>]` to `gam <UserTypeEntity> print|show fileinfo|filepath <DriveFileEntity>`
|
||||
that when true and `<DriveFileEntity` is a shortcut, causes GAM to display information about the target of the shortcut rather than the shortcut itself.
|
||||
|
||||
Added option `shortcutandtarget [<Boolean>]` to `gam <UserTypeEntity> delete|purge|trash|untrash <DriveFileEntity>`
|
||||
that when true and `<DriveFileEntity` is a shortcut, causes GAM to process the shortcut and the target of the shortcut.
|
||||
|
||||
6.80.09
|
||||
|
||||
Added options `allschemas|(schemas|custom|customschemas <SchemaNameList>)` to `gam print group-members`
|
||||
that display any custom schema values for the group members.
|
||||
|
||||
6.80.08
|
||||
|
||||
Updated `gam print|show oushareddrives` to display the Shared Drive ID, name and orgUnitPath as
|
||||
individual, separate entities in the output.
|
||||
|
||||
6.80.07
|
||||
|
||||
Updated `dateheaderformat iso` in `gam <UserTypeEntity> info|print|show messages` to include a colon
|
||||
between the hours and minutes in the timezone portion of the string as in all other time strings.
|
||||
|
||||
6.80.06
|
||||
|
||||
Added option `tdreturnidonly [<Boolean>]` to `<ToDriveAttribute>` that when true (the default), causes GAM to display
|
||||
only the uploaded file ID to stdout. This can be captured and used in subsequent commands, `tdfileid <DriveFileID>` that will update the same file.
|
||||
|
||||
6.80.05
|
||||
|
||||
Added option `individualstudentcoursework copy|delete|maptoall` to `gam create|update course ... copyfrom`
|
||||
that controls how individual student coursework in the `copyfrom` course is processed.
|
||||
* `individualstudentcoursework copy` - Copy individual student coursework; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentcoursework delete` - Delete individual student coursework
|
||||
* `individualstudentcoursework maptoall` - Map individual student coursework to all student coursework
|
||||
|
||||
For convenience, setting `individualstudentassignments` sets all of the following to the same value:
|
||||
*`individualstudentannouncements`
|
||||
*`individualstudentmaterials`
|
||||
*`individualstudentcoursework`
|
||||
|
||||
6.80.04
|
||||
|
||||
Cleaned up progress messages in `gam create|update course ... copyfrom`.
|
||||
|
||||
6.80.03
|
||||
|
||||
Added option `stripcrsfromname` to `gam <UserTypeEntity> print driveactivity` that causes carriage returns,
|
||||
linefeeds and nulls to be stripped from file names.
|
||||
|
||||
6.80.02
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print filecounts` that adds
|
||||
additional columns of data to the CSV file output.
|
||||
|
||||
Added options `individualstudentannouncements copy|delete|maptoall` and `individualstudentmaterials copy|delete|maptoall`
|
||||
to `gam create|update course ... copyfrom` that controls how individual student announcements and materials in the `copyfrom` course are processed.
|
||||
* `individualstudentannouncements copy` - Copy individual student announcements; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentannouncements delete` - Delete individual student announcements
|
||||
* `individualstudentannouncements maptoall` - Map individual student announcements to all student announcements
|
||||
* `individualstudentmaterials copy` - Copy individual student materials; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentmaterials delete` - Delete individual student materials
|
||||
* `individualstudentmaterials maptoall` - Map individual student materials to all student materials
|
||||
|
||||
6.80.01
|
||||
|
||||
Added options `showstudentsaslist [<Boolean>]` and `delimiter <Character>` to `gam print course-work`.
|
||||
By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns.
|
||||
Use these options to display the student IDs in a single column as a delimited list.
|
||||
|
||||
Updated `gam <UserTypeEntity> vacation [<Boolean>]` to make `<Boolean>` optional; this allows changes
|
||||
to other fields without affecting the current responder state.
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show vacation` to avoid a trap when invalid start or end dates
|
||||
have been entered in the Gmail user interface. Invalid dates are represented as `1970-01-01`.
|
||||
|
||||
6.80.00
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print users ... license ... formatjson` that caused a trap.
|
||||
|
||||
Upgraded to Python 3.12.5 where possible.
|
||||
|
||||
6.79.12
|
||||
|
||||
Fixed bug in `gam user admin@domain.com print chatspaces asadmin` that caused the following error:
|
||||
```
|
||||
Chat Admin: admin@domain.com(asadmin), Print Failed: This method doesn't support non-admin user authentication. Authenticate with an admin account.
|
||||
```
|
||||
|
||||
6.79.11
|
||||
|
||||
Fixed bug in `gam <UserItem> print|show chatmembers` where the `filter <String>` was not applied.
|
||||
|
||||
6.79.10
|
||||
|
||||
Updated commands to handle a trap that occurs when oauth2service.json specifies a YubiKey but the YubiKey is not inserted.
|
||||
|
||||
6.79.09
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print teamdriveacls` that adds
|
||||
additional columns of data to the CSV file output. This can be used when ACLs for selected users are to be
|
||||
replaced with a different user email address.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Shared-Drives#bulk-change-user1-shared-drive-access-to-user2
|
||||
|
||||
6.79.08
|
||||
|
||||
Clarified action to perform messages when creating/deleting/updating licenses.
|
||||
|
||||
6.79.07
|
||||
|
||||
Added option `totalonly` to `gam <UserTypeEntity> print|show groups` that displays
|
||||
the user email address and the total number of groups to which it belongs. This is in
|
||||
contrast to `countsonly` that has to make an additional API call per group per user to get the user's role.
|
||||
When `countsonly` is specified, an additional column `Total` is displayed that is the sum
|
||||
of the role counts.
|
||||
|
||||
6.79.06
|
||||
|
||||
Fixed bug in `gam calendars <CalendarEntity> update event ... removeattendee <EmailAddress>` that caused a trap
|
||||
if the event had no attendees.
|
||||
|
||||
6.79.05
|
||||
|
||||
Updated `gam <UserTypeEntity> empty drivetrash <SharedDriveEntity>` to handle this error that
|
||||
occurs when the user is not a Manager of the Shared Drive.
|
||||
```
|
||||
ERROR: 403: insufficientFilePermissions - The user does not have sufficient permissions for this file.
|
||||
```
|
||||
|
||||
6.79.04
|
||||
|
||||
Added options `filename <FileName>` and `movetoou <OrgUnitItem>` to `gam check ou <OrgUnitItem>`
|
||||
that causes GAM to create a batch file of GAM commands that will move any remaining items
|
||||
in `ou <OrgUnitItem>` to `movetoou <OrgUnitItem>`; executing the batch file will then allow
|
||||
`ou <OrgUnitItem>` to be deleted if desired.
|
||||
|
||||
6.79.03
|
||||
|
||||
Added column|field `assignedToUnknown` to `gam print|show admins` that will be True when
|
||||
the API `assignedTo` value can not be converted to an email address; it will be False when
|
||||
the email address is determinable.
|
||||
|
||||
6.79.02
|
||||
|
||||
Updated `gam print admins` to handle the following error that occurs when a service account admin no longer exists.
|
||||
```
|
||||
ERROR: 404: notFound - Requested entity was not found.
|
||||
```
|
||||
|
||||
6.79.01
|
||||
|
||||
Updated commands that take `<RoleItem>` as an argument to take the value in any case,
|
||||
e.g., _SEED_ADMIN_ROLE or _seed_admin_role.
|
||||
|
||||
6.79.00
|
||||
|
||||
Updated code to work around a Cryptography library change that caused service account private key creation to fail.
|
||||
|
||||
6.78.00
|
||||
|
||||
Added command to check if an OU contains items; this is useful when tryng to delete an OU
|
||||
as it must not contain any items in order to be deleted.
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Organizational-Units#check-organizational-unit-for-contained-items
|
||||
|
||||
6.77.18
|
||||
|
||||
Added option `showitemcountonly` to `gam print domainaliases` that causes GAM to display the
|
||||
number of domain aliasess on stdout; no CSV file is written.
|
||||
|
||||
6.77.17
|
||||
|
||||
Added option `showitemcountonly` to `gam print domains` that causes GAM to display the
|
||||
number of domains on stdout; no CSV file is written.
|
||||
|
||||
6.77.16
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print filelist` that caused a trap.
|
||||
|
||||
6.77.15
|
||||
|
||||
Updated `gam calendars <CalendarEntity> import event icaluid <iCalUID> json <JSONdata>` to handle API
|
||||
constraints on recurring events.
|
||||
|
||||
6.77.14
|
||||
|
||||
Fixed bug in `gam calendars <CalendarEntity> import event icaluid <iCalUID> json <JSONdata>` that caused an error.
|
||||
|
||||
6.77.13
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show filecounts` to reflect that Shared Drives now
|
||||
have a capacity of 500000 files/folders/shortcuts.
|
||||
|
||||
6.77.12
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print chatspaces todrive` that caused an error.
|
||||
|
||||
6.77.11
|
||||
|
||||
Added option `convertmbtogb` to `gam report usage customer|user` and
|
||||
`gam report customer|user` that causes GAM to convert parameters expressed in megabytes
|
||||
(name ends with _in_mb) to gigabytes (name converted to _in_gb) with two decimal places.
|
||||
|
||||
6.77.10
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> get profilephoto` where data written to stdout, e.g. `> filename`,
|
||||
was not properly base64 encoded.
|
||||
|
||||
6.77.09
|
||||
|
||||
Added option `usertokencounts` to `gam <UserTypeEntity> print|show tokens` that causes GAM to display
|
||||
each user and their number of access tokens; there are no details.
|
||||
|
||||
6.77.08
|
||||
|
||||
Fixed bugs in `gam <UserTypeEntity> delete chatmember <ChatSpace> ... group <GroupItem>`
|
||||
and `gam <UserTypeEntity> sync chatmember <ChatSpace> ... groups <GroupEntity>` that caused an error.
|
||||
|
||||
6.77.07
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> create chatmember <ChatSpace> ... group <GroupItem>` that caused an error.
|
||||
|
||||
6.77.06
|
||||
|
||||
Updated `gam update ou <OrgUnitItem> ... parent <OrgUnitItem>` to handle the following error
|
||||
that occurs when `parent <OrgUnitItem>` is the same as or a sub-OU of `ou <OrgUnitItem>`.
|
||||
```
|
||||
ERROR: 412: conditionNotMet - OrgUnit hierarchy has cycle
|
||||
```
|
||||
|
||||
6.77.05
|
||||
|
||||
Added option `onlyusers <UserTypeEntity>` to `gam <UserTypeEntity> claim ownership <DriveFileEntity>`
|
||||
that causes GAM to only claim ownership of files/folders owned by `onlyusers <UserTypeEntity>`.
|
||||
This option is multually exclusive with `skipusers <UserTypeEntity>`.
|
||||
|
||||
6.77.04
|
||||
|
||||
Fixed bug in `gam report users ... range <Date> <Date>` where an extraneous API call
|
||||
was made if a date was reached where no API data was available.
|
||||
|
||||
6.77.03
|
||||
|
||||
Thanks to jay, added the following Colab License SKUs:
|
||||
```
|
||||
1010500001 - Colab Pro
|
||||
1010500002 - Colab Pro+
|
||||
```
|
||||
|
||||
Thanks to Jay, updated `gam print|show admins` to properly display addresses
|
||||
of service accounts with admin role assignments.
|
||||
|
||||
Added option `limitdatechanges <Integer>` to `gam report users|customers`.
|
||||
|
||||
If no report is available for the specified date, can an earlier date be used?
|
||||
* `limitdatechanges -1' - Back up to earlier dates to find report data; this is the default.
|
||||
* `limitdatechanges 0 | nodatechange' - Do not report on an earlier date if no report data is available for the specified date.
|
||||
* `limitdatechanges N' - Back up to earlier dates to find report data; do not back up more than N times.
|
||||
|
||||
By default, when `gam report user user <UserItem>` is specified and no report data is available, there is no output.
|
||||
If `csv_output_users_audit = true` in `gam.cfg`, then a row with columns `email,date` will be displayed
|
||||
where `date` is the earliest date for which report data was requested.
|
||||
|
||||
6.77.02
|
||||
|
||||
Cleaned up problems with some of the new Chat API asadmin commands.
|
||||
Some remaining problems may require a Google fix.
|
||||
|
||||
6.77.01
|
||||
|
||||
Thanks to Jay, added column `verificationCodesCount` to `gam <UserTypeEntity> print backupcodes`
|
||||
that displays the number of available backup codes in addtion to the codes.
|
||||
|
||||
Added option `countsonly` that displays only the number of available backup codes but not the codes themselves.
|
||||
|
||||
Thanks to Jay, added option `nokey` to `gam create project` that creates a project with no service account key, `oauth2service.json`.
|
||||
|
||||
6.77.00
|
||||
|
||||
Added option `individualstudentassignments copy|delete|maptoall` to `gam create|update course ... copyfrom`
|
||||
that controls how individual student assignments in the `copyfrom` course are processed.
|
||||
* `individualstudentassignments copy` - Copy individual student assignments; this is the default. You will get an error if a student is not a member of the course
|
||||
* `individualstudentassignments delete` - Delete individual student assignments
|
||||
* `individualstudentassignments maptoall` - Map individual student assignments to all student assignments
|
||||
|
||||
Upgraded to Python 3.12.4 where possible.
|
||||
|
||||
Added option `asadmin` to the following Chat commands that allows admin access.
|
||||
These commands are in Developer Preview, your project must have Developer Preview enabled for the Chat API
|
||||
in order to use these commands.
|
||||
```
|
||||
gam <UserItem> delete chatspace asadmin
|
||||
gam <UserItem> update chatspace asadmin
|
||||
gam <UserItem> info chatspace asadmin
|
||||
gam <UserItem> print|show chatspaces asadmin
|
||||
gam <UserItem> create chatmember asadmin
|
||||
gam <UserItem> delete|remove chatmember asadmin
|
||||
gam <UserItem> update|modify chatmember asadmin
|
||||
gam <UserItem> sync chatmembers asadmin
|
||||
gam <UserItem> info chatmember asadmin
|
||||
gam <UserItem> print|show chatmembers|asadmin
|
||||
```
|
||||
|
||||
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Chat#developer-preview-admin-access
|
||||
|
||||
Added `use_chat_admin_access` Boolean variable to `gam.cfg`.
|
||||
```
|
||||
* When False, GAM uses user access when making all Chat API calls. For calls that support admin access,
|
||||
this can be overridden with the asadmin command line option.
|
||||
* When True, GAM uses admin access for Chat API calls that support admin access; other calls will use user access.
|
||||
* Default: False
|
||||
```
|
||||
|
||||
6.76.15
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print|show filesharecounts summary only summaryuser <String>`
|
||||
that printed an erroneous row if `<UserTypeEntity>` specified a single user and `<String>` matched
|
||||
the user's email address.
|
||||
|
||||
6.76.14
|
||||
|
||||
Added the following Gemini License SKUs:
|
||||
```
|
||||
1010470004 - Gemini Education
|
||||
1010470005 - Gemini Education Premium
|
||||
```
|
||||
|
||||
6.76.13
|
||||
|
||||
Updated `gam <UserTypeEntity> show fileinfo ... showlabels` and `gam <UserTypeEntity> print filelist ... showlabels`
|
||||
to retry these errors that occur when trying to get the drive labels for a file/folder.
|
||||
```
|
||||
ERROR: 500: unknownError - Unknown Error.
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
```
|
||||
|
||||
Upgraded to OpenSSL 3.3.1 where possible.
|
||||
|
||||
6.76.12
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print|show chatspaces` that caused the following error:
|
||||
```
|
||||
ERROR: Got an unexpected keyword argument orderBy
|
||||
```
|
||||
|
||||
6.76.11
|
||||
|
||||
Thanks to Jay, added `gam report vault`.
|
||||
|
||||
Thanks to Jay, added the following Gemini License SKUs:
|
||||
```
|
||||
1010470006 - AI Security
|
||||
1010470007 - AI Meetings and Messaging
|
||||
```
|
||||
|
||||
Updated `gam <UserTypeEntity> print filelist ... showshareddrivepermissions` to display
|
||||
progress messages to stderr as a separate API call must be made for every file/folder on the Shared Drive
|
||||
to get its permissions. As this can take a long time, the progress messages indicate that progress is being made.
|
||||
|
||||
6.76.10
|
||||
|
||||
Added `fromgmail` to `<EventType>` that can be used in `gam calendars <CalendarEntity> print|show events ... eventtype fromgmail`.
|
||||
|
||||
* See: https://workspaceupdates.googleblog.com/2024/05/google-calendar-api-event-type-fromgmail.html
|
||||
|
||||
6.76.09
|
||||
|
||||
Updated `gam update|delete|info adminrole` to handle the following error:
|
||||
@@ -24,7 +511,7 @@ and was `Waiting for N running processes to finish before terminating`.
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print messages ... positivecountsonly` where message counts with value 0 were deiplayed.
|
||||
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print|messages` that adds
|
||||
Added option `addcsvdata <FieldName> <String>` to `gam <UserTypeEntity> print messages` that adds
|
||||
additional columns of data to the CSV file output.
|
||||
|
||||
Added option `showusagebytes` to `gam <UserTypeEntity> print|show drivesettings` that displays
|
||||
@@ -17931,4 +18418,3 @@ This isn't elegant but it's a start; you can say:
|
||||
with open(GAM_STDOUT, 'rU') as f:
|
||||
for line in f:
|
||||
sys.stdout.write(line)
|
||||
|
||||
|
||||
12
src/add_lib.py
Normal file
12
src/add_lib.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
'''
|
||||
for onedir, add_lib.py allows moving many
|
||||
library files into a lib/ directory to make
|
||||
onedir cleaner. Thanks to:
|
||||
https://medium.com/@philipp.h/reduce-clutter-when-using-pyinstaller-in -one-directory-mode-b631b9f7f89b
|
||||
'''
|
||||
|
||||
sys.path.append(os.path.join(os.getcwd(), 'lib'))
|
||||
sys._MEIPASS=os.path.join(sys._MEIPASS, 'lib')
|
||||
4880
src/chat-v1.json
Normal file
4880
src/chat-v1.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ OPTIONS:
|
||||
-u Admin user email address to use with GAM. Default is to prompt.
|
||||
-r Regular user email address. Used to test service account access to user data. Default is to prompt.
|
||||
-v Version to install (latest, prerelease, draft, 3.8, etc). Default is latest.
|
||||
-s Strip gam7 component from extracted files, files will be downloaded directly to $target_dir
|
||||
-s Strip gam component from extracted files, files will be downloaded directly to $target_dir
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ upgrade_only=false
|
||||
gamversion="latest"
|
||||
adminuser=""
|
||||
regularuser=""
|
||||
gam_x86_64_glibc_vers="2.31"
|
||||
gam_x86_64_glibc_vers="2.35 2.31"
|
||||
gam_arm64_glibc_vers="2.31"
|
||||
strip_gam="--strip-components 0"
|
||||
|
||||
@@ -141,7 +141,25 @@ case $gamos in
|
||||
;;
|
||||
[Mm]ac[Oo][sS]|[Dd]arwin)
|
||||
gamos="macos"
|
||||
gamfile="macos-universal2.tar.xz"
|
||||
case $gamarch in
|
||||
x86_64)
|
||||
fullversion=$(sw_vers -productVersion)
|
||||
osversion=${fullversion:0:2}
|
||||
case ${osversion:0:2} in
|
||||
11|12|13|14)
|
||||
gamfile="macos-x86_64.tar.xz";;
|
||||
*)
|
||||
echo_red "Sorry, this version ($fullversion) of MacOS is not supported. Exiting."
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
arm|arm64|aarch64)
|
||||
gamfile="macos-aarch64.tar.xz";;
|
||||
*)
|
||||
echo_red "ERROR: this installer currently only supports x86_64 and arm64 MacOS. Looks like you're running on $gamarch. Exiting."
|
||||
exit
|
||||
esac
|
||||
;;
|
||||
MINGW64_NT*)
|
||||
gamos="windows"
|
||||
@@ -154,7 +172,9 @@ case $gamos in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$gamversion" == "latest" -o "$gamversion" == "prerelease" -o "$gamversion" == "draft" ]; then
|
||||
if [ "$gamversion" == "latest" ]; then
|
||||
release_url="https://api.github.com/repos/GAM-team/GAM/releases/latest"
|
||||
elif [ "$gamversion" == "prerelease" -o "$gamversion" == "draft" ]; then
|
||||
release_url="https://api.github.com/repos/GAM-team/GAM/releases"
|
||||
else
|
||||
release_url="https://api.github.com/repos/GAM-team/GAM/releases/tags/v$gamversion"
|
||||
|
||||
89
src/gam.spec
89
src/gam.spec
@@ -10,14 +10,18 @@ from gam.gamlib.glverlibs import GAM_VER_LIBS
|
||||
datas = []
|
||||
for pkg in GAM_VER_LIBS:
|
||||
datas += copy_metadata(pkg, recursive=True)
|
||||
datas += [('cbcm-v1.1beta1.json', '.')]
|
||||
datas += [('contactdelegation-v1.json', '.')]
|
||||
datas += [('admin-directory_v1.1beta1.json', '.')]
|
||||
datas += [('cbcm-v1.1beta1.json', '.')]
|
||||
datas += [('chat-v1.json', '.')]
|
||||
datas += [('contactdelegation-v1.json', '.')]
|
||||
datas += [('datastudio-v1.json', '.')]
|
||||
datas += [('serviceaccountlookup-v1.json', '.')]
|
||||
datas += [('cacerts.pem', '.')]
|
||||
hiddenimports = [
|
||||
'gam.auth.yubikey',
|
||||
'gam.gamlib.yubikey',
|
||||
]
|
||||
|
||||
runtime_hooks = []
|
||||
a = Analysis(
|
||||
['gam/__main__.py'],
|
||||
pathex=[],
|
||||
@@ -26,28 +30,35 @@ a = Analysis(
|
||||
hiddenimports=hiddenimports,
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
runtime_hooks=runtime_hooks,
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=None,
|
||||
noarchive=False,
|
||||
)
|
||||
)
|
||||
print(f"datas from analysis:\n{a.datas}")
|
||||
for d in a.datas:
|
||||
if 'pyconfig' in d[0]:
|
||||
a.datas.remove(d)
|
||||
break
|
||||
print(f"datas after pyconfig cleanup:\n{a.datas}")
|
||||
pyz = PYZ(a.pure,
|
||||
a.zipped_data,
|
||||
cipher=None)
|
||||
# requires Python 3.10+ but no one should be compiling
|
||||
# GAM with older versions anyway
|
||||
target_arch = None
|
||||
codesign_identity = None
|
||||
entitlements_file = None
|
||||
match platform:
|
||||
case "darwin":
|
||||
if getenv('arch') == 'universal2':
|
||||
target_arch = "universal2"
|
||||
else:
|
||||
target_arch = None
|
||||
|
||||
codesign_identity = getenv('codesign_identity')
|
||||
if codesign_identity:
|
||||
entitlements_file = '../.github/actions/entitlements.plist'
|
||||
strip = True
|
||||
case "win32":
|
||||
target_arch = None
|
||||
@@ -62,9 +73,38 @@ upx = False
|
||||
console = True
|
||||
disable_windowed_traceback = False
|
||||
argv_emulation = False
|
||||
codesign_identity = None
|
||||
entitlements_file = None
|
||||
if not getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
|
||||
if getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
|
||||
# Build one directory
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name=name,
|
||||
debug=debug,
|
||||
bootloader_ignore_signals=bootloader_ignore_signals,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
console=console,
|
||||
# put most everyting under a lib/ subfolder
|
||||
contents_directory='lib',
|
||||
disable_windowed_traceback=disable_windowed_traceback,
|
||||
argv_emulation=argv_emulation,
|
||||
target_arch=target_arch,
|
||||
codesign_identity=codesign_identity,
|
||||
entitlements_file=entitlements_file,
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
upx_exclude=[],
|
||||
name=name,
|
||||
)
|
||||
else:
|
||||
# Build one file
|
||||
exe = EXE(
|
||||
pyz,
|
||||
@@ -85,33 +125,4 @@ if not getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
|
||||
codesign_identity=codesign_identity,
|
||||
entitlements_file=entitlements_file,
|
||||
)
|
||||
else:
|
||||
# Build one folder
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name=name,
|
||||
debug=debug,
|
||||
bootloader_ignore_signals=bootloader_ignore_signals,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
console=console,
|
||||
disable_windowed_traceback=disable_windowed_traceback,
|
||||
argv_emulation=argv_emulation,
|
||||
target_arch=target_arch,
|
||||
codesign_identity=codesign_identity,
|
||||
entitlements_file=entitlements_file,
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
upx_exclude=[],
|
||||
name=name,
|
||||
)
|
||||
|
||||
|
||||
2916
src/gam/__init__.py
2916
src/gam/__init__.py
File diff suppressed because it is too large
Load Diff
4880
src/gam/chat-v1.json
Normal file
4880
src/gam/chat-v1.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -56,6 +56,7 @@ class GamAction():
|
||||
DRAFT = 'draf'
|
||||
EMPTY = 'empt'
|
||||
ENABLE = 'enbl'
|
||||
END = 'end '
|
||||
EXISTS = 'exis'
|
||||
EXPORT = 'expo'
|
||||
EXTRACT = 'extr'
|
||||
@@ -174,6 +175,7 @@ class GamAction():
|
||||
DRAFT: ['Drafted', 'Draft'],
|
||||
EMPTY: ['Emptied', 'Empty'],
|
||||
ENABLE: ['Enabled', 'Enable'],
|
||||
END: ['Ended', 'End'],
|
||||
EXISTS: ['Exists', 'Exists'],
|
||||
EXPORT: ['Exported', 'Export'],
|
||||
EXTRACT: ['Extracted', 'Extract'],
|
||||
|
||||
@@ -34,6 +34,7 @@ CHAT_MESSAGES = 'chatmessages'
|
||||
CHAT_SPACES = 'chatspaces'
|
||||
CHAT_SPACES_ADMIN = 'chatspacesadmin'
|
||||
CHAT_SPACES_DELETE = 'chatspacesdelete'
|
||||
CHAT_SPACES_DELETE_ADMIN = 'chatspacesdeleteadmin'
|
||||
CHROMEMANAGEMENT = 'chromemanagement'
|
||||
CHROMEMANAGEMENT_APPDETAILS = 'chromemanagementappdetails'
|
||||
CHROMEMANAGEMENT_TELEMETRY = 'chromemanagementtelemetry'
|
||||
@@ -73,6 +74,7 @@ IAP = 'iap'
|
||||
KEEP = 'keep'
|
||||
LICENSING = 'licensing'
|
||||
LOOKERSTUDIO = 'datastudio'
|
||||
MEET = 'meet'
|
||||
OAUTH2 = 'oauth2'
|
||||
ORGPOLICY = 'orgpolicy'
|
||||
PEOPLE = 'people'
|
||||
@@ -82,6 +84,7 @@ PRINTERS = 'printers'
|
||||
PUBSUB = 'pubsub'
|
||||
REPORTS = 'reports'
|
||||
RESELLER = 'reseller'
|
||||
SERVICEACCOUNTLOOKUP = 'serviceaccountlookup'
|
||||
SERVICEMANAGEMENT = 'servicemanagement'
|
||||
SERVICEUSAGE = 'serviceusage'
|
||||
SHEETS = 'sheets'
|
||||
@@ -119,6 +122,12 @@ JWT_APIS = {
|
||||
ORGPOLICY: [CLOUD_PLATFORM_SCOPE],
|
||||
}
|
||||
#
|
||||
SCOPELESS_APIS = {
|
||||
CHROMEVERSIONHISTORY,
|
||||
OAUTH2,
|
||||
SERVICEACCOUNTLOOKUP,
|
||||
}
|
||||
#
|
||||
APIS_NEEDING_ACCESS_TOKEN = {
|
||||
CBCM: ['https://www.googleapis.com/auth/admin.directory.device.chromebrowsers']
|
||||
}
|
||||
@@ -178,6 +187,7 @@ PROJECT_APIS = [
|
||||
'iap.googleapis.com',
|
||||
'keep.googleapis.com',
|
||||
'licensing.googleapis.com',
|
||||
'meet.googleapis.com',
|
||||
'people.googleapis.com',
|
||||
'pubsub.googleapis.com',
|
||||
'reseller.googleapis.com',
|
||||
@@ -196,14 +206,15 @@ _INFO = {
|
||||
ANALYTICS_ADMIN: {'name': 'Analytics Admin API', 'version': 'v1beta', 'v2discovery': True},
|
||||
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_MEMBERSHIPS_ADMIN: {'name': 'Chat API - Admin 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},
|
||||
CHAT_SPACES_ADMIN: {'name': 'Chat API - Admin Spaces', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
CHAT_SPACES_DELETE: {'name': 'Chat API - Spaces Delete', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
CHAT: {'name': 'Chat API', 'version': 'v1', 'v2discovery': True, 'localjson': True},
|
||||
CHAT_EVENTS: {'name': 'Chat API - Events', 'version': 'v1', 'v2discovery': True, 'localjson': True, 'mappedAPI': CHAT},
|
||||
CHAT_MEMBERSHIPS: {'name': 'Chat API - Memberships', 'version': 'v1', 'v2discovery': True, 'localjson': True, 'mappedAPI': CHAT},
|
||||
CHAT_MEMBERSHIPS_ADMIN: {'name': 'Chat API - Memberships Admin', 'version': 'v1', 'v2discovery': True, 'localjson': True, 'mappedAPI': CHAT},
|
||||
CHAT_MESSAGES: {'name': 'Chat API - Messages', 'version': 'v1', 'v2discovery': True, 'localjson': True, 'mappedAPI': CHAT},
|
||||
CHAT_SPACES: {'name': 'Chat API - Spaces', 'version': 'v1', 'v2discovery': True, 'localjson': True, 'mappedAPI': CHAT},
|
||||
CHAT_SPACES_ADMIN: {'name': 'Chat API - Spaces Admin', 'version': 'v1', 'v2discovery': True, 'localjson': True, 'mappedAPI': CHAT},
|
||||
CHAT_SPACES_DELETE: {'name': 'Chat API - Spaces Delete', 'version': 'v1', 'v2discovery': True, 'localjson': True, 'mappedAPI': CHAT},
|
||||
CHAT_SPACES_DELETE_ADMIN: {'name': 'Chat API - Spaces Delete Admin', 'version': 'v1', 'v2discovery': True, 'localjson': True, 'mappedAPI': CHAT},
|
||||
CLASSROOM: {'name': 'Classroom API', 'version': 'v1', 'v2discovery': True},
|
||||
CHROMEMANAGEMENT: {'name': 'Chrome Management API', 'version': 'v1', 'v2discovery': True},
|
||||
CHROMEMANAGEMENT_APPDETAILS: {'name': 'Chrome Management API - AppDetails', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHROMEMANAGEMENT},
|
||||
@@ -241,6 +252,7 @@ _INFO = {
|
||||
KEEP: {'name': 'Keep API', 'version': 'v1', 'v2discovery': True},
|
||||
LICENSING: {'name': 'License Manager API', 'version': 'v1', 'v2discovery': True},
|
||||
LOOKERSTUDIO: {'name': 'Looker Studio API', 'version': 'v1', 'v2discovery': True, 'localjson': True},
|
||||
MEET: {'name': 'Meet API', 'version': 'v2', 'v2discovery': True},
|
||||
OAUTH2: {'name': 'OAuth2 API', 'version': 'v2', 'v2discovery': False},
|
||||
ORGPOLICY: {'name': 'Organization Policy API', 'version': 'v2', 'v2discovery': True},
|
||||
PEOPLE: {'name': 'People API', 'version': 'v1', 'v2discovery': True},
|
||||
@@ -250,6 +262,7 @@ _INFO = {
|
||||
PUBSUB: {'name': 'Pub / Sub API', 'version': 'v1', 'v2discovery': True},
|
||||
REPORTS: {'name': 'Reports API', 'version': 'reports_v1', 'v2discovery': True, 'mappedAPI': 'admin'},
|
||||
RESELLER: {'name': 'Reseller API', 'version': 'v1', 'v2discovery': True},
|
||||
SERVICEACCOUNTLOOKUP: {'name': 'Service Account Lookup pseudo-API', 'version': 'v1', 'v2discovery': True, 'localjson': True},
|
||||
SERVICEMANAGEMENT: {'name': 'Service Management API', 'version': 'v1', 'v2discovery': True},
|
||||
SERVICEUSAGE: {'name': 'Service Usage API', 'version': 'v1', 'v2discovery': True},
|
||||
SHEETS: {'name': 'Sheets API', 'version': 'v4', 'v2discovery': True},
|
||||
@@ -465,6 +478,10 @@ _CLIENT_SCOPES = [
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/apps.order'},
|
||||
{'name': 'Service Account Lookup pseudo-API',
|
||||
'api': SERVICEACCOUNTLOOKUP,
|
||||
'subscopes': [],
|
||||
'scope': ''},
|
||||
{'name': 'Site Verification API',
|
||||
'api': SITEVERIFICATION,
|
||||
'subscopes': [],
|
||||
@@ -485,6 +502,10 @@ _TODRIVE_CLIENT_SCOPES = [
|
||||
'api': DRIVE3,
|
||||
'subscopes': [],
|
||||
'scope': DRIVE_SCOPE},
|
||||
{'name': 'Drive File API - todrive_clientaccess',
|
||||
'api': DRIVE3,
|
||||
'subscopes': [],
|
||||
'scope': 'https://www.googleapis.com/auth/drive.file'},
|
||||
{'name': 'Gmail API - todrive_clientaccess',
|
||||
'api': GMAIL,
|
||||
'subscopes': [],
|
||||
@@ -518,10 +539,10 @@ _SVCACCT_SCOPES = [
|
||||
'api': CHAT_MEMBERSHIPS,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/chat.memberships'},
|
||||
# {'name': 'Chat API - Admin Memberships',
|
||||
# 'api': CHAT_MEMBERSHIPS_ADMIN,
|
||||
# 'subscopes': READONLY,
|
||||
# 'scope': 'https://www.googleapis.com/auth/chat.admin.memberships'},
|
||||
{'name': 'Chat API - Memberships Admin',
|
||||
'api': CHAT_MEMBERSHIPS_ADMIN,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/chat.admin.memberships'},
|
||||
{'name': 'Chat API - Messages',
|
||||
'api': CHAT_MESSAGES,
|
||||
'subscopes': READONLY,
|
||||
@@ -530,14 +551,18 @@ _SVCACCT_SCOPES = [
|
||||
'api': CHAT_SPACES,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/chat.spaces'},
|
||||
# {'name': 'Chat API - Admin Spaces',
|
||||
# 'api': CHAT_SPACES_ADMIN,
|
||||
# 'subscopes': READONLY,
|
||||
# 'scope': 'https://www.googleapis.com/auth/chat.admin.spaces'},
|
||||
{'name': 'Chat API - Spaces Admin',
|
||||
'api': CHAT_SPACES_ADMIN,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/chat.admin.spaces'},
|
||||
{'name': 'Chat API - Spaces Delete',
|
||||
'api': CHAT_SPACES_DELETE,
|
||||
'subscopes': [],
|
||||
'scope': 'https://www.googleapis.com/auth/chat.delete'},
|
||||
{'name': 'Chat API - Spaces Delete Admin',
|
||||
'api': CHAT_SPACES_DELETE_ADMIN,
|
||||
'subscopes': [],
|
||||
'scope': 'https://www.googleapis.com/auth/chat.admin.delete'},
|
||||
{'name': 'Classroom API - Course Announcements',
|
||||
'api': CLASSROOM,
|
||||
'subscopes': READONLY,
|
||||
@@ -630,6 +655,10 @@ _SVCACCT_SCOPES = [
|
||||
'api': LOOKERSTUDIO,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/datastudio'},
|
||||
{'name': 'Meet API',
|
||||
'api': MEET,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/meetings.space.created'},
|
||||
{'name': 'OAuth2 API',
|
||||
'api': OAUTH2,
|
||||
'subscopes': [],
|
||||
|
||||
@@ -292,6 +292,8 @@ TODRIVE_USER = 'todrive_user'
|
||||
TRUNCATE_CLIENT_ID = 'truncate_client_id'
|
||||
# Update CrOS org unit with orgUnitId
|
||||
UPDATE_CROS_OU_WITH_ID = 'update_cros_ou_with_id'
|
||||
# Use admin access for chat where possible
|
||||
USE_CHAT_ADMIN_ACCESS = 'use_chat_admin_access'
|
||||
# Use course owner for course access
|
||||
USE_COURSE_OWNER_ACCESS = 'use_course_owner_access'
|
||||
# Use Project ID as Project Name and App Name
|
||||
@@ -434,6 +436,7 @@ Defaults = {
|
||||
TODRIVE_USER: '',
|
||||
TRUNCATE_CLIENT_ID: FALSE,
|
||||
UPDATE_CROS_OU_WITH_ID: FALSE,
|
||||
USE_CHAT_ADMIN_ACCESS: FALSE,
|
||||
USE_COURSE_OWNER_ACCESS: FALSE,
|
||||
USE_PROJECTID_AS_NAME: FALSE,
|
||||
USER_MAX_RESULTS: '500',
|
||||
@@ -595,6 +598,7 @@ VAR_INFO = {
|
||||
TODRIVE_USER: {VAR_TYPE: TYPE_STRING, VAR_LIMITS: (0, None)},
|
||||
TRUNCATE_CLIENT_ID: {VAR_TYPE: TYPE_BOOLEAN},
|
||||
UPDATE_CROS_OU_WITH_ID: {VAR_TYPE: TYPE_BOOLEAN},
|
||||
USE_CHAT_ADMIN_ACCESS: {VAR_TYPE: TYPE_BOOLEAN},
|
||||
USE_COURSE_OWNER_ACCESS: {VAR_TYPE: TYPE_BOOLEAN},
|
||||
USE_PROJECTID_AS_NAME: {VAR_TYPE: TYPE_BOOLEAN},
|
||||
USER_MAX_RESULTS: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (1, 500)},
|
||||
|
||||
@@ -651,6 +651,16 @@ class GamCLArgs():
|
||||
ARG_LICENSES = 'licenses'
|
||||
ARG_MATTER = 'matter'
|
||||
ARG_MATTERS = 'matters'
|
||||
ARG_MEETSPACE = 'meetspace'
|
||||
ARG_MEETSPACES = 'meetspaces'
|
||||
ARG_MEETCONFERENCE = 'meetconference'
|
||||
ARG_MEETCONFERENCES = 'meetconferences'
|
||||
ARG_MEETPARTICIPANT = 'meetparticipant'
|
||||
ARG_MEETPARTICIPANTS = 'meetparticipants'
|
||||
ARG_MEETRECORDING = 'meetrecording'
|
||||
ARG_MEETRECORDINGS = 'meetrecordings'
|
||||
ARG_MEETTRANSCRIPT = 'meettranscript'
|
||||
ARG_MEETTRANSCRIPTS = 'meettranscripts'
|
||||
ARG_MEMBER = 'member'
|
||||
ARG_MEMBERS = 'members'
|
||||
ARG_MESSAGE = 'message'
|
||||
@@ -672,6 +682,8 @@ class GamCLArgs():
|
||||
ARG_ORG = 'org'
|
||||
ARG_ORGS = 'orgs'
|
||||
ARG_ORGTREE = 'orgtree'
|
||||
ARG_ORGUNIT = 'orgunit'
|
||||
ARG_ORGUNITS = 'orgunits'
|
||||
ARG_ORGUNITSHAREDDRIVE = 'orgunitshareddrive'
|
||||
ARG_ORGUNITSHAREDDRIVES = 'orgunitshareddrives'
|
||||
ARG_ORPHANS = 'orphans'
|
||||
@@ -934,6 +946,7 @@ class GamCLArgs():
|
||||
OB_LOOKERSTUDIO_PERMISSION_ENTITY = 'LookerStudioPermissionEntity'
|
||||
OB_MATTER_ITEM = 'MatterItem'
|
||||
OB_MATTER_ITEM_LIST = 'MatterItemList'
|
||||
OB_MEET_CONFERENCE_NAME = 'MeetConferenceName'
|
||||
OB_MESSAGE_ID = 'MessageID'
|
||||
OB_MIMETYPE = 'MimeType'
|
||||
OB_MIMETYPE_LIST = 'MimeTypeList'
|
||||
|
||||
@@ -84,6 +84,7 @@ class GamEntity():
|
||||
CHANNEL_PRODUCT = 'chpr'
|
||||
CHANNEL_SKU = 'chsk'
|
||||
CHAT_BOT = 'chbo'
|
||||
CHAT_ADMIN = 'chad'
|
||||
CHAT_EVENT = 'chev'
|
||||
CHAT_MANAGER_USER = 'chgu'
|
||||
CHAT_MEMBER = 'chme'
|
||||
@@ -93,6 +94,7 @@ class GamEntity():
|
||||
CHAT_MESSAGE_ID = 'chmi'
|
||||
CHAT_SPACE = 'chsp'
|
||||
CHAT_THREAD = 'chth'
|
||||
CHILD_ORGANIZATIONAL_UNIT = 'corg'
|
||||
CHROME_APP = 'capp'
|
||||
CHROME_APP_DEVICE = 'capd'
|
||||
CHROME_BROWSER = 'chbr'
|
||||
@@ -131,10 +133,12 @@ class GamEntity():
|
||||
COPYFROM_GROUP = 'cfgr'
|
||||
COURSE = 'cour'
|
||||
COURSE_ALIAS = 'coal'
|
||||
COURSE_ANNOUNCEMENT = 'cann'
|
||||
COURSE_ANNOUNCEMENT_ID = 'caid'
|
||||
COURSE_ANNOUNCEMENT_STATE = 'cast'
|
||||
COURSE_MATERIAL_DRIVEFILE = 'comd'
|
||||
COURSE_MATERIAL_FORM = 'comf'
|
||||
COURSE_MATERIAL = 'cmtl'
|
||||
COURSE_MATERIAL_ID = 'cmid'
|
||||
COURSE_MATERIAL_STATE = 'cmst'
|
||||
COURSE_NAME = 'cona'
|
||||
@@ -202,6 +206,7 @@ class GamEntity():
|
||||
DRIVE_PATH = 'drvp'
|
||||
DRIVE_SETTINGS = 'drvs'
|
||||
DRIVE_SHORTCUT = 'drsc'
|
||||
DRIVE_SHORTCUT_ID = 'dsci'
|
||||
DRIVE_3PSHORTCUT = 'dr3s'
|
||||
DRIVE_TRASH = 'drvt'
|
||||
EMAIL = 'emai'
|
||||
@@ -255,6 +260,11 @@ class GamEntity():
|
||||
LOOKERSTUDIO_ASSET_REPORT = 'lsar'
|
||||
LOOKERSTUDIO_PERMISSION = 'lspe'
|
||||
MD5HASH = 'md5h'
|
||||
MEET_SPACE = 'mesp'
|
||||
MEET_CONFERENCE = 'msco'
|
||||
MEET_PARTICIPANT = 'msps'
|
||||
MEET_RECORDING = 'msre'
|
||||
MEET_TRANSCRIPT = 'mstr'
|
||||
MEMBER = 'memb'
|
||||
MEMBER_NOT_ARCHIVED = 'mena'
|
||||
MEMBER_ARCHIVED = 'mear'
|
||||
@@ -424,6 +434,7 @@ class GamEntity():
|
||||
CHANNEL_PRODUCT: ['Channel Products', 'Channel Product'],
|
||||
CHANNEL_SKU: ['Channel SKUs', 'Channel SKU'],
|
||||
CHAT_BOT: ['Chat BOTs', 'Chat BOT'],
|
||||
CHAT_ADMIN: ['Chat Admins', 'Chat Admin'],
|
||||
CHAT_EVENT: ['Chat Events', 'Chat Event'],
|
||||
CHAT_MANAGER_USER: ['Chat User Managers', 'Chat User Manager'],
|
||||
CHAT_MESSAGE: ['Chat Messages', 'Chat Message'],
|
||||
@@ -433,6 +444,7 @@ class GamEntity():
|
||||
CHAT_MEMBER_USER: ['Chat User Members', 'Chat User Member'],
|
||||
CHAT_SPACE: ['Chat Spaces', 'Chat Space'],
|
||||
CHAT_THREAD: ['Chat Threads', 'Chat Thread'],
|
||||
CHILD_ORGANIZATIONAL_UNIT: ['Child Organizational Units', 'Child Organizational Unit'],
|
||||
CHROME_APP: ['Chrome Applications', 'Chrome Application'],
|
||||
CHROME_APP_DEVICE: ['Chrome Application Devices', 'Chrome Application Device'],
|
||||
CHROME_BROWSER: ['Chrome Browsers', 'Chrome Browser'],
|
||||
@@ -471,10 +483,12 @@ class GamEntity():
|
||||
COPYFROM_GROUP: ['Copy From Groups', 'CopyFrom Group'],
|
||||
COURSE: ['Courses', 'Course'],
|
||||
COURSE_ALIAS: ['Course Aliases', 'Course Alias'],
|
||||
COURSE_ANNOUNCEMENT: ['Course Announcements', 'Course Announcement'],
|
||||
COURSE_ANNOUNCEMENT_ID: ['Course Announcement IDs', 'Course Announcement ID'],
|
||||
COURSE_ANNOUNCEMENT_STATE: ['Course Announcement States', 'Course Announcement State'],
|
||||
COURSE_MATERIAL_DRIVEFILE: ['Course Material Drive Files', 'Course Material Drive File'],
|
||||
COURSE_MATERIAL_FORM: ['Course Material Forms', 'Course Material Form'],
|
||||
COURSE_MATERIAL: ['Course Materials', 'Course Material'],
|
||||
COURSE_MATERIAL_ID: ['Course Material IDs', 'Course Material ID'],
|
||||
COURSE_MATERIAL_STATE: ['Course Material States', 'Course Material State'],
|
||||
COURSE_NAME: ['Course Names', 'Course Name'],
|
||||
@@ -542,6 +556,7 @@ class GamEntity():
|
||||
DRIVE_PATH: ['Drive Paths', 'Drive Path'],
|
||||
DRIVE_SETTINGS: ['Drive Settings', 'Drive Settings'],
|
||||
DRIVE_SHORTCUT: ['Drive Shortcuts', 'Drive Shortcut'],
|
||||
DRIVE_SHORTCUT_ID: ['Drive Shortcut IDs', 'Drive Shortcut ID'],
|
||||
DRIVE_3PSHORTCUT: ['Drive 3rd Party Shortcuts', 'Drive 3rd Party Shortcut'],
|
||||
DRIVE_TRASH: ['Drive Trash', 'Drive Trash'],
|
||||
EMAIL: ['Email Addresses', 'Email Address'],
|
||||
@@ -595,6 +610,11 @@ class GamEntity():
|
||||
LOOKERSTUDIO_ASSET_REPORT: ['Looker Studio REPORT Assets', 'Looker Studio REPORT Asset'],
|
||||
LOOKERSTUDIO_PERMISSION: ['Looker Studio Permissions', 'Looker Studio Permission'],
|
||||
MD5HASH: ['MD5 hash', 'MD5 Hash'],
|
||||
MEET_SPACE: ['Meet Spaces', 'Meet Space'],
|
||||
MEET_CONFERENCE: ['Meet Conferences', 'Meet Conference'],
|
||||
MEET_PARTICIPANT: ['Meet Participants', 'Meet Participant'],
|
||||
MEET_RECORDING: ['Meet Recordings', 'Meet Recording'],
|
||||
MEET_TRANSCRIPT: ['Meet Transcripts', 'Meet Transcript'],
|
||||
MEMBER: ['Members', 'Member'],
|
||||
MEMBER_NOT_ARCHIVED: ['Members (Not Archived)', 'Member (Not Archived)'],
|
||||
MEMBER_ARCHIVED: ['Members (Archived)', 'Member (Archived)'],
|
||||
|
||||
@@ -78,7 +78,7 @@ Please go to:
|
||||
|
||||
https://admin.google.com/ac/owl/list?tab=configuredApps
|
||||
|
||||
1. Click on: Add app > OAuth App Name Or Client ID.
|
||||
1. Click on: Configure new app > OAuth App Name Or Client ID.
|
||||
2. Enter the following Client ID value:
|
||||
|
||||
{1}
|
||||
@@ -186,6 +186,7 @@ BATCH_NOT_PROCESSED_ERRORS = '{0}batch file: {1}, not processed, {2} {3}\n'
|
||||
CALLING_GCLOUD_FOR_REAUTH = 'Calling gcloud for reauth credentials..."\n'
|
||||
CAN_NOT_DELETE_USER_WITH_VAULT_HOLD = '{0}: The user may be (or have recently been) on Google Vault Hold and thus not eligible for deletion. You can check holds with "gam user {1} show vaultholds".'
|
||||
CAN_NOT_BE_SPECIFIED_MORE_THAN_ONCE = 'Argument {0} can not be specified more than once'
|
||||
CHAT_ADMIN_ACCESS_LIMITED_TO_ONE_USER = 'Chat adminaccess|asadmin limited to one user, {0} specified'
|
||||
CHROME_TARGET_VERSION_FORMAT = r'^([a-z]+)-(\d+)$ or ^(\d{1,4}\.){1,4}$'
|
||||
COLUMN_DOES_NOT_MATCH_ANY_INPUT_COLUMNS = '{0} column "{1}" does not match any input columns'
|
||||
COLUMN_DOES_NOT_MATCH_ANY_OUTPUT_COLUMNS = '{0} column "{1}" does not match any output columns'
|
||||
@@ -256,7 +257,9 @@ FORBIDDEN = 'Forbidden'
|
||||
FORMAT_NOT_AVAILABLE = 'Format ({0}) not available'
|
||||
FORMAT_NOT_DOWNLOADABLE = 'Format not downloadable'
|
||||
FROM = 'From'
|
||||
FROM_LC = 'from'
|
||||
FULL_PATH_MUST_START_WITH_DRIVE = 'fullpath must start with {0} or {1}'
|
||||
GAM_BATCH_FILE_WRITTEN = 'GAM batch file {0} written\n'
|
||||
GAM_LATEST_VERSION_NOT_AVAILABLE = 'GAM Latest Version information not available'
|
||||
GAM_OUT_OF_MEMORY = 'GAM has run out of memory. If this is a large Google Workspace instance, you should use a 64-bit version of GAM on Windows or a 64-bit version of Python on other systems.'
|
||||
GENERATING_NEW_PRIVATE_KEY = 'Generating new private key'
|
||||
@@ -317,6 +320,7 @@ IS_NOT_UNIQUE = 'Is not unique, {0}: {1}'
|
||||
IS_REQD_TO_CHG_PWD_NO_DELEGATION = 'Is required to change password at next login. You must change password or clear changepassword flag for delegation.'
|
||||
IS_SUSPENDED_NO_BACKUPCODES = 'User is suspended. You must unsuspend to process backupcodes'
|
||||
IS_SUSPENDED_NO_DELEGATION = 'Is suspended. You must unsuspend for delegation.'
|
||||
IS_YUBIKEY_INSERTED = 'Is YubiKey inserted?'
|
||||
JSON_ERROR = 'JSON error "{0}" in file {1}'
|
||||
JSON_KEY_NOT_FOUND = 'JSON key "{0}" not found in file {1}'
|
||||
KIOSK_MODE_REQUIRED = ' This command ({0}) requires that the ChromeOS device be in Kiosk mode.'
|
||||
@@ -392,6 +396,7 @@ NO_ENTITIES_MATCHED = 'No {0} matched'
|
||||
NO_FILTER_ACTIONS = 'No {0} actions specified'
|
||||
NO_FILTER_CRITERIA = 'No {0} criteria specified'
|
||||
NO_LABELS_MATCH = 'No Labels match'
|
||||
NO_LABELS_TO_PROCESS = 'No Labels to process'
|
||||
NO_MESSAGES_WITH_LABEL = 'No Messages with Label'
|
||||
NO_PARENTS_TO_CONVERT_TO_SHORTCUTS = 'No parents to convert to shortcuts'
|
||||
NO_REPORT_AVAILABLE = 'No {0} report available.'
|
||||
@@ -419,6 +424,8 @@ ONLY_ONE_DEVICE_SELECTION_ALLOWED = 'Only one device selection allowed, filter =
|
||||
ONLY_ONE_JSON_RANGE_ALLOWED = 'Only one range/json allowed'
|
||||
ONLY_ONE_OWNER_ALLOWED = 'Only one owner allowed'
|
||||
OR = 'or'
|
||||
OU_AND_MOVETOOU_CANNOT_BE_IDENTICAL = 'ou {0} can not be be identical to movetoou {1}'
|
||||
OU_SUBOUS_CANNOT_BE_MOVED_TO_MOVETOOU = 'ou {0} sub OUs can not be be moved to movetoou {1}'
|
||||
PERMISSION_DENIED = 'The caller does not have permission'
|
||||
PLEASE_CORRECT_YOUR_SYSTEM_TIME = 'Please correct your system time.'
|
||||
PLEASE_ENTER_A_OR_M = 'Please enter a or m ...\n'
|
||||
@@ -450,6 +457,7 @@ SCHEMA_WOULD_HAVE_NO_FIELDS = '{0} would have no {1}'
|
||||
SELECTED = 'Selected'
|
||||
SERVICE_NOT_APPLICABLE = 'Service not applicable/Does not exist'
|
||||
SERVICE_NOT_APPLICABLE_THIS_ADDRESS = 'Service not applicable for this address: {0}'
|
||||
SHORTCUT_TARGET_CAPABILITY_IS_FALSE = '{0} capability {1} is False'
|
||||
STARTING_THREAD = 'Starting thread'
|
||||
STATISTICS_COPY_FILE = 'Total: {0}, Copied: {1}, Shortcut created {2}, Shortcut exists {3}, Duplicate: {4}, Copy Failed: {5}, Not copyable: {6}, In skipids: {7}, Permissions Failed: {8}, Protected Ranges Failed: {9}'
|
||||
STATISTICS_COPY_FOLDER = 'Total: {0}, Copied: {1}, Shortcut created {2}, Shortcut exists {3}, Duplicate: {4}, Merged: {5}, Copy Failed: {6}, Not writable: {7}, Permissions Failed: {8}'
|
||||
@@ -464,6 +472,8 @@ TASKLIST_TITLE_NOT_FOUND = 'Task list title not found'
|
||||
THREAD = 'thread'
|
||||
THREADS = 'threads'
|
||||
TO = 'To'
|
||||
TO_LC = 'to'
|
||||
TO_MAXIMUM_OF = 'to maximum of'
|
||||
TO_SET_UP_GOOGLE_CHAT = """
|
||||
To set up Google Chat for your API project, please go to:
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ _PRODUCTS = {
|
||||
'101043': 'Google Workspace Additional Storage',
|
||||
'101047': 'Gemini',
|
||||
'101049': 'Education Endpoint Management',
|
||||
'101050': 'Colab',
|
||||
'Google-Apps': 'Google Workspace',
|
||||
'Google-Chrome-Device-Management': 'Google Chrome Device Management',
|
||||
'Google-Drive-storage': 'Google Drive Storage',
|
||||
@@ -92,8 +93,20 @@ _SKUS = {
|
||||
'product': '101047', 'aliases': ['gwlabs', 'workspacelabs'], 'displayName': 'Google Workspace Labs'},
|
||||
'1010470003': {
|
||||
'product': '101047', 'aliases': ['geminibiz'], 'displayName': 'Gemini Business'},
|
||||
'1010470004': {
|
||||
'product': '101047', 'aliases': ['geminiedu'], 'displayName': 'Gemini Education'},
|
||||
'1010470005': {
|
||||
'product': '101047', 'aliases': ['geminiedupremium'], 'displayName': 'Gemini Education Premium'},
|
||||
'1010470006': {
|
||||
'product': '101047', 'aliases': ['aisecurity'], 'displayName': 'AI Security'},
|
||||
'1010470007': {
|
||||
'product': '101047', 'aliases': ['aimeetingsandmessaging'], 'displayName': 'AI Meetings and Messaging'},
|
||||
'1010490001': {
|
||||
'product': '101049', 'aliases': ['eeu'], 'displayName': 'Endpoint Education Upgrade'},
|
||||
'1010500001': {
|
||||
'product': '101050', 'aliases': ['colabpro'], 'displayName': 'Colab Pro'},
|
||||
'1010500002': {
|
||||
'product': '101050', 'aliases': ['colabpro+', 'colabproplus'], 'displayName': 'Colab Pro+'},
|
||||
'Google-Apps': {
|
||||
'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'},
|
||||
'Google-Apps-For-Business': {
|
||||
|
||||
@@ -112,6 +112,8 @@ class YubiKey():
|
||||
return publicKeyData
|
||||
except ValueError as err:
|
||||
systemErrorExit(YUBIKEY_VALUE_ERROR_RC, f'YubiKey - {err}')
|
||||
except TypeError as err:
|
||||
systemErrorExit(YUBIKEY_NOT_FOUND_RC, f'YubiKey - {err} - {Msg.IS_YUBIKEY_INSERTED}')
|
||||
|
||||
def get_serial_number(self):
|
||||
try:
|
||||
@@ -168,6 +170,8 @@ class YubiKey():
|
||||
piv.put_object(OBJECT_ID.CHUID, generate_chuid())
|
||||
except ValueError as err:
|
||||
systemErrorExit(YUBIKEY_VALUE_ERROR_RC, f'YubiKey - {err}')
|
||||
except TypeError as err:
|
||||
systemErrorExit(YUBIKEY_NOT_FOUND_RC, f'YubiKey - {err} - {Msg.IS_YUBIKEY_INSERTED}')
|
||||
|
||||
def sign(self, message):
|
||||
if mplock is not None:
|
||||
@@ -191,6 +195,8 @@ class YubiKey():
|
||||
systemErrorExit(YUBIKEY_APDU_ERROR_RC, f'YubiKey - {err}')
|
||||
except ValueError as err:
|
||||
systemErrorExit(YUBIKEY_VALUE_ERROR_RC, f'YubiKey - {err}')
|
||||
except TypeError as err:
|
||||
systemErrorExit(YUBIKEY_NOT_FOUND_RC, f'YubiKey - {err} - {Msg.IS_YUBIKEY_INSERTED}')
|
||||
if mplock is not None:
|
||||
mplock.release()
|
||||
return signed
|
||||
|
||||
141
src/gam/serviceaccountlookup-v1.json
Normal file
141
src/gam/serviceaccountlookup-v1.json
Normal file
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"basePath": "",
|
||||
"baseUrl": "https://www.googleapis.com/service_accounts/v1",
|
||||
"canonicalName": "serviceaccountlookup",
|
||||
"description": "Pseudo-API to lookup public certificates for a service account anonymously",
|
||||
"discoveryVersion": "v1",
|
||||
"documentationLink": "https://example.com/",
|
||||
"fullyEncodeReservedExpansion": true,
|
||||
"icons": {
|
||||
"x16": "http://www.google.com/images/icons/product/search-16.gif",
|
||||
"x32": "http://www.google.com/images/icons/product/search-32.gif"
|
||||
},
|
||||
"id": "serviceaccountlookup:v1",
|
||||
"kind": "discovery#restDescription",
|
||||
"name": "serviceaccountlookup",
|
||||
"ownerDomain": "google.com",
|
||||
"ownerName": "Google",
|
||||
"packagePath": "admin",
|
||||
"parameters": {
|
||||
"$.xgafv": {
|
||||
"description": "V1 error format.",
|
||||
"enum": [
|
||||
"1",
|
||||
"2"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"v1 error format",
|
||||
"v2 error format"
|
||||
],
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"access_token": {
|
||||
"description": "OAuth access token.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"alt": {
|
||||
"default": "json",
|
||||
"description": "Data format for response.",
|
||||
"enum": [
|
||||
"json",
|
||||
"media",
|
||||
"proto"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Responses with Content-Type of application/json",
|
||||
"Media download with context-dependent Content-Type",
|
||||
"Responses with Content-Type of application/x-protobuf"
|
||||
],
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"callback": {
|
||||
"description": "JSONP",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"description": "Selector specifying which fields to include in a partial response.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"oauth_token": {
|
||||
"description": "OAuth 2.0 token for the current user.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"prettyPrint": {
|
||||
"default": "true",
|
||||
"description": "Returns response with indentations and line breaks.",
|
||||
"location": "query",
|
||||
"type": "boolean"
|
||||
},
|
||||
"quotaUser": {
|
||||
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"uploadType": {
|
||||
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"upload_protocol": {
|
||||
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"protocol": "rest",
|
||||
"resources": {
|
||||
"serviceaccounts": {
|
||||
"methods": {
|
||||
"lookup": {
|
||||
"description": "Lookup",
|
||||
"flatPath": "metadata/x509/{account}",
|
||||
"httpMethod": "GET",
|
||||
"id": "serviceaccountslookup.lookup",
|
||||
"parameterOrder": [
|
||||
"account"
|
||||
],
|
||||
"parameters": {
|
||||
"account": {
|
||||
"description": "Email or ID of the service account.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "metadata/x509/{account}",
|
||||
"response": {
|
||||
"$ref": "Certificates"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rootUrl": "https://www.googleapis.com/service_accounts/v1",
|
||||
"schemas": {
|
||||
"Certificates": {
|
||||
"description": "JSON template for certificates.",
|
||||
"id": "Certificates",
|
||||
"properties": {
|
||||
"email": { "description": "Email of the delegate.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"servicePath": "",
|
||||
"title": "Service Account Lookup Pseudo-API",
|
||||
"version": "v1",
|
||||
"version_module": true
|
||||
}
|
||||
141
src/serviceaccountlookup-v1.json
Normal file
141
src/serviceaccountlookup-v1.json
Normal file
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"basePath": "",
|
||||
"baseUrl": "https://www.googleapis.com/service_accounts/v1",
|
||||
"canonicalName": "serviceaccountlookup",
|
||||
"description": "Pseudo-API to lookup public certificates for a service account anonymously",
|
||||
"discoveryVersion": "v1",
|
||||
"documentationLink": "https://example.com/",
|
||||
"fullyEncodeReservedExpansion": true,
|
||||
"icons": {
|
||||
"x16": "http://www.google.com/images/icons/product/search-16.gif",
|
||||
"x32": "http://www.google.com/images/icons/product/search-32.gif"
|
||||
},
|
||||
"id": "serviceaccountlookup:v1",
|
||||
"kind": "discovery#restDescription",
|
||||
"name": "serviceaccountlookup",
|
||||
"ownerDomain": "google.com",
|
||||
"ownerName": "Google",
|
||||
"packagePath": "admin",
|
||||
"parameters": {
|
||||
"$.xgafv": {
|
||||
"description": "V1 error format.",
|
||||
"enum": [
|
||||
"1",
|
||||
"2"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"v1 error format",
|
||||
"v2 error format"
|
||||
],
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"access_token": {
|
||||
"description": "OAuth access token.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"alt": {
|
||||
"default": "json",
|
||||
"description": "Data format for response.",
|
||||
"enum": [
|
||||
"json",
|
||||
"media",
|
||||
"proto"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Responses with Content-Type of application/json",
|
||||
"Media download with context-dependent Content-Type",
|
||||
"Responses with Content-Type of application/x-protobuf"
|
||||
],
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"callback": {
|
||||
"description": "JSONP",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"description": "Selector specifying which fields to include in a partial response.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"oauth_token": {
|
||||
"description": "OAuth 2.0 token for the current user.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"prettyPrint": {
|
||||
"default": "true",
|
||||
"description": "Returns response with indentations and line breaks.",
|
||||
"location": "query",
|
||||
"type": "boolean"
|
||||
},
|
||||
"quotaUser": {
|
||||
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"uploadType": {
|
||||
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"upload_protocol": {
|
||||
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"protocol": "rest",
|
||||
"resources": {
|
||||
"serviceaccounts": {
|
||||
"methods": {
|
||||
"lookup": {
|
||||
"description": "Lookup",
|
||||
"flatPath": "metadata/x509/{account}",
|
||||
"httpMethod": "GET",
|
||||
"id": "serviceaccountslookup.lookup",
|
||||
"parameterOrder": [
|
||||
"account"
|
||||
],
|
||||
"parameters": {
|
||||
"account": {
|
||||
"description": "Email or ID of the service account.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "metadata/x509/{account}",
|
||||
"response": {
|
||||
"$ref": "Certificates"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rootUrl": "https://www.googleapis.com/service_accounts/v1",
|
||||
"schemas": {
|
||||
"Certificates": {
|
||||
"description": "JSON template for certificates.",
|
||||
"id": "Certificates",
|
||||
"properties": {
|
||||
"email": { "description": "Email of the delegate.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"servicePath": "",
|
||||
"title": "Service Account Lookup Pseudo-API",
|
||||
"version": "v1",
|
||||
"version_module": true
|
||||
}
|
||||
Reference in New Issue
Block a user