mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Compare commits
37 Commits
v7.13.02
...
20250719.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
882d7b5833 | ||
|
|
d4f5495909 | ||
|
|
b132e789f7 | ||
|
|
701824d984 | ||
|
|
4c63de65a5 | ||
|
|
d1d1040ec3 | ||
|
|
fe4268230e | ||
|
|
bda51867c8 | ||
|
|
a913c8f128 | ||
|
|
89ac556933 | ||
|
|
48c23c2f98 | ||
|
|
3f2a261a99 | ||
|
|
beb76c5879 | ||
|
|
bd22dc1b8b | ||
|
|
2258cd69a5 | ||
|
|
a523f9c0f7 | ||
|
|
ea41cf52de | ||
|
|
aec92f19ae | ||
|
|
df99e6ea8e | ||
|
|
d16166ffac | ||
|
|
1bd75c31ae | ||
|
|
8830da9908 | ||
|
|
fdc6c34c91 | ||
|
|
c6be86946e | ||
|
|
920c9a344a | ||
|
|
ec9f3b9e79 | ||
|
|
326e83a05d | ||
|
|
61c2b06021 | ||
|
|
60093404c1 | ||
|
|
228d3bba95 | ||
|
|
9f5dfc1a0a | ||
|
|
2b5c4561d1 | ||
|
|
4bdce171af | ||
|
|
1f68c8db00 | ||
|
|
963cbebba0 | ||
|
|
c0edbfe596 | ||
|
|
47617c2823 |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -292,10 +292,10 @@ jobs:
|
|||||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd "${OPENSSL_SOURCE_PATH}"
|
cd "${OPENSSL_SOURCE_PATH}"
|
||||||
if ([ "$RUNNER_OS" == "Windows" ] && [ "$RUNNER_ARCH" == "ARM64" ]); then
|
#if ([ "$RUNNER_OS" == "Windows" ] && [ "$RUNNER_ARCH" == "ARM64" ]); then
|
||||||
# https://github.com/openssl/openssl/issues/26239
|
# https://github.com/openssl/openssl/issues/26239
|
||||||
export CFLAGS=-DNO_INTERLOCKEDOR64
|
export CFLAGS=-DNO_INTERLOCKEDOR64
|
||||||
fi
|
#fi
|
||||||
# --libdir=lib is needed so Python can find OpenSSL libraries
|
# --libdir=lib is needed so Python can find OpenSSL libraries
|
||||||
"${PERL}" ./Configure --libdir=lib --prefix="${OPENSSL_INSTALL_PATH}" $OPENSSL_CONFIG_OPTS
|
"${PERL}" ./Configure --libdir=lib --prefix="${OPENSSL_INSTALL_PATH}" $OPENSSL_CONFIG_OPTS
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ jobs:
|
|||||||
curl -O -L "$latest_crypt_whl"
|
curl -O -L "$latest_crypt_whl"
|
||||||
"$PYTHON" -m pip install cryptography*.whl
|
"$PYTHON" -m pip install cryptography*.whl
|
||||||
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
#- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
|
||||||
# - name: Compile cryptography from source (no legacy)
|
# - name: Compile cryptography from source (no legacy)
|
||||||
# if: runner.os != 'Windows' || runner.arch != 'ARM64'
|
# if: runner.os != 'Windows' || runner.arch != 'ARM64'
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ authors = [
|
|||||||
{ name="Jay Lee", email="jay0lee@gmail.com" },
|
{ name="Jay Lee", email="jay0lee@gmail.com" },
|
||||||
{ name="Ross Scroggs", email="Ross.Scroggs@gmail.com" },
|
{ name="Ross Scroggs", email="Ross.Scroggs@gmail.com" },
|
||||||
]
|
]
|
||||||
# # The following files should be edited to match: setup.cfg, requirements.txt
|
# The following deps and optional deps should be edited to match: setup.cfg, requirements.txt
|
||||||
|
# notice that yubikey-manager remains optional further down since it is less command and adds
|
||||||
|
#significant compile dependencies.
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chardet>=5.2.0",
|
"chardet>=5.2.0",
|
||||||
"cryptography>=44.0.2",
|
"cryptography>=44.0.2",
|
||||||
@@ -22,7 +24,6 @@ dependencies = [
|
|||||||
"passlib>=1.7.4",
|
"passlib>=1.7.4",
|
||||||
"pathvalidate>=3.2.3",
|
"pathvalidate>=3.2.3",
|
||||||
"python-dateutil",
|
"python-dateutil",
|
||||||
"yubikey-manager>=5.6.1",
|
|
||||||
]
|
]
|
||||||
description = "CLI tool to manage Google Workspace"
|
description = "CLI tool to manage Google Workspace"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -622,6 +622,14 @@ If an item contains spaces, it should be surrounded by ".
|
|||||||
gs://<StorageBucketName>/<StorageObjectName>|
|
gs://<StorageBucketName>/<StorageObjectName>|
|
||||||
<StorageBucketName>/<StorageObjectName>
|
<StorageBucketName>/<StorageObjectName>
|
||||||
<Tag> ::= <String>
|
<Tag> ::= <String>
|
||||||
|
<TagManagerAccountID> ::= <String>
|
||||||
|
<TagManagerAccountPath> ::= accounts/<TagManagerAccountID>
|
||||||
|
<TagManagerContainerID> ::= <String>
|
||||||
|
<TagManagerContainerPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>
|
||||||
|
<TagManagerWorkspaceID> ::= <String>
|
||||||
|
<TagManagerWorkspacePath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>
|
||||||
|
<TagManagerTagID> ::= <String>
|
||||||
|
<TagManagerTagPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>/tags/<TagManagerTagID>
|
||||||
<TakeoutBucketName> ::= takeout-export-[a-f,0-9,-]*
|
<TakeoutBucketName> ::= takeout-export-[a-f,0-9,-]*
|
||||||
<TaskID> ::= <String>
|
<TaskID> ::= <String>
|
||||||
<TaskListID> ::= <String>
|
<TaskListID> ::= <String>
|
||||||
@@ -685,6 +693,7 @@ If an item contains spaces, it should be surrounded by ".
|
|||||||
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
|
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
|
||||||
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
||||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||||
|
<ChromeProfileCommandNameList> ::= "<ChromeProfileCommandName>(,<ChromeProfileCommandName>)*"
|
||||||
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
||||||
<CIGroupMemberTypeList> ::= "<CIGroupMemberType>(,<CIGroupMemberType>)*"
|
<CIGroupMemberTypeList> ::= "<CIGroupMemberType>(,<CIGroupMemberType>)*"
|
||||||
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
||||||
@@ -770,6 +779,9 @@ If an item contains spaces, it should be surrounded by ".
|
|||||||
<SharedDriveACLRoleList> ::= "<SharedDriveACLRole>(,<SharedDriveACLRole>)*"
|
<SharedDriveACLRoleList> ::= "<SharedDriveACLRole>(,<SharedDriveACLRole>)*"
|
||||||
<SharedDriveIDList> ::= "<SharedDriveID>(,<SharedDriveID>)*"
|
<SharedDriveIDList> ::= "<SharedDriveID>(,<SharedDriveID>)*"
|
||||||
<StringList> ::= "<String>(,<String>)*"
|
<StringList> ::= "<String>(,<String>)*"
|
||||||
|
<TagManagerAccountPathList> ::= "<TagManagerAccountPath>(,<TagManagerAccountPath>)*"
|
||||||
|
<TagManagerContainerPathList> ::= "<TagManagerContainerPath>(,<TagManagerContainerPath>)*"
|
||||||
|
<TagManagerWorkspacePathList> ::= "<TagManagerWorkspacePath>(,<TagManagerWorkspacePath>)*"
|
||||||
<TasklistIDList> ::= "<TasklistID>(,<TasklistID>)*"
|
<TasklistIDList> ::= "<TasklistID>(,<TasklistID>)*"
|
||||||
<TasklistTitleList> ::= "'<TasklistTitle>'(,'<TasklistTitle>')*"
|
<TasklistTitleList> ::= "'<TasklistTitle>'(,'<TasklistTitle>')*"
|
||||||
<TasklistIDTaskIDList> ::= "<TasklistIDTaskID>(,<TasklistIDTaskID>)*"
|
<TasklistIDTaskIDList> ::= "<TasklistIDTaskID>(,<TasklistIDTaskID>)*"
|
||||||
@@ -1025,7 +1037,10 @@ Specify a collection of items by directly specifying them; the item type is dete
|
|||||||
<CalendarEntity> ::=
|
<CalendarEntity> ::=
|
||||||
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||||
<ChromeProfileNameEntity> ::=
|
<ChromeProfileNameEntity> ::=
|
||||||
<ChromeProfileNameList> | <FileSelector> | <CSVFileSelector>
|
<ChromeProfileNameList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||||
|
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||||
<CIPolicyNameEntity> ::=
|
<CIPolicyNameEntity> ::=
|
||||||
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
||||||
<ClassificationLabelNameEntity> ::=
|
<ClassificationLabelNameEntity> ::=
|
||||||
@@ -1228,6 +1243,15 @@ Specify a collection of items by directly specifying them; the item type is dete
|
|||||||
<SiteACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
<SiteACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||||
<SiteEntity> ::=
|
<SiteEntity> ::=
|
||||||
<SiteList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
<SiteList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||||
|
<TagManagerAccountPathEntity> ::=
|
||||||
|
<TagManagerAccountPathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
<TagManagerContainerPathEntity> ::=
|
||||||
|
<TagManagerContainerPathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
<TagManagerWorkspacePathEntity> ::=
|
||||||
|
<TagManagerWorkspacePathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
<TasklistEntity> ::=
|
<TasklistEntity> ::=
|
||||||
<TasklistIDList> | <TaskListTitleList> | <FileSelector> | <CSVFileSelector>
|
<TasklistIDList> | <TaskListTitleList> | <FileSelector> | <CSVFileSelector>
|
||||||
<TasklistIDTaskIDEntity> ::=
|
<TasklistIDTaskIDEntity> ::=
|
||||||
@@ -2228,12 +2252,14 @@ gam show chromeneedsattn
|
|||||||
|
|
||||||
<ChromeProfilePermanentID> ::= <String>
|
<ChromeProfilePermanentID> ::= <String>
|
||||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
||||||
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
|
|
||||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||||
|
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
|
||||||
|
<ChromeProfileCommandNameList> ::= "<ChromeProfileCommandName>(,<ChromeProfileCommandName>)*"
|
||||||
<ChromeProfileNameEntity> ::=
|
<ChromeProfileNameEntity> ::=
|
||||||
<ChromeProfileNameList> |
|
<ChromeProfileNameList> |
|
||||||
(select <FileSelector>|<CSVFileSelector>) |
|
(select <ChromeProfileNameList>|<FileSelector>|<CSVFileSelector>) |
|
||||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
|
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||||
|
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||||
|
|
||||||
<ChromeProfileFieldName> ::=
|
<ChromeProfileFieldName> ::=
|
||||||
affiliationstate|
|
affiliationstate|
|
||||||
@@ -2297,7 +2323,7 @@ gam print chromeprofiles [todrive <ToDriveAttribute>*]
|
|||||||
|
|
||||||
gam create chromeprofilecommand <ChromeProfileNameEntity>
|
gam create chromeprofilecommand <ChromeProfileNameEntity>
|
||||||
[clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
[clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
||||||
[formatjson]
|
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]
|
||||||
|
|
||||||
gam info chromeprofilecommand <ChromeProfileCommandName>
|
gam info chromeprofilecommand <ChromeProfileCommandName>
|
||||||
[formatjson]
|
[formatjson]
|
||||||
@@ -8334,6 +8360,59 @@ gam <UserTypeEntity> profile share|shared|unshare|unshared
|
|||||||
|
|
||||||
gam <UserTypeEntity> show profile
|
gam <UserTypeEntity> show profile
|
||||||
|
|
||||||
|
# Users - Tag Manager
|
||||||
|
|
||||||
|
<TagManagerAccountID> ::= <String>
|
||||||
|
<TagManagerAccountPath> ::= accounts/<TagManagerAccountID>
|
||||||
|
<TagManagerAccountPathList> ::= "<TagManagerAccountPath>(,<TagManagerAccountPath>)*"
|
||||||
|
<TagManagerAccountPathEntity> ::=
|
||||||
|
<TagManagerAccountPathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
|
||||||
|
<TagManagerContainerID> ::= <String>
|
||||||
|
<TagManagerContainerPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>
|
||||||
|
<TagManagerContainerPathList> ::= "<TagManagerContainerPath>(,<TagManagerContainerPath>)*"
|
||||||
|
<TagManagerContainerPathEntity> ::=
|
||||||
|
<TagManagerContainerPathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
|
||||||
|
<TagManagerWorkspaceID> ::= <String>
|
||||||
|
<TagManagerWorkspacePath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>
|
||||||
|
<TagManagerWorkspacePathList> ::= "<TagManagerWorkspacePath>(,<TagManagerWorkspacePath>)*"
|
||||||
|
<TagManagerWorkspacePathEntity> ::=
|
||||||
|
<TagManagerWorkspacePathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
|
||||||
|
<TagManagerTagID> ::= <String>
|
||||||
|
<TagManagerTagPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>/tags/<TagManagerTagID>
|
||||||
|
|
||||||
|
gam <UserTypeEntity> show tagmanageraccounts
|
||||||
|
[includegoogletags [<Boolean>]]
|
||||||
|
[formatjson]
|
||||||
|
gam <UserTypeEntity> print tagmanagerccounts [todrive <ToDriveAttribute>*]
|
||||||
|
[includegoogletags [<Boolean>]]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
|
||||||
|
gam <UserTypeEntity> show tagmanagercontainers <TagManagerAccountPathEntity>
|
||||||
|
[formatjson]
|
||||||
|
gam <UserTypeEntity> print tagmanagercontainers <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
|
||||||
|
gam <UserTypeEntity> show tagmanagerworkspaces <TagManagerContainerPathEntity>
|
||||||
|
[formatjson]
|
||||||
|
gam <UserTypeEntity> print tagmanagerworkspaces <TagManagerContainerPathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
|
||||||
|
gam <UserTypeEntity> show tagmanagertags <TagManagerWorkspacePathEntity>
|
||||||
|
[formatjson]
|
||||||
|
gam <UserTypeEntity> print tagmanagertags <TagManagerWorkspacePathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
|
||||||
|
gam <UserTypeEntity> show tagmanagerpermissions <TagManagerAccountPathEntity>
|
||||||
|
[formatjson]
|
||||||
|
gam <UserTypeEntity> print tagmanagerpermissions <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
|
||||||
# Users - Tasks
|
# Users - Tasks
|
||||||
|
|
||||||
<TaskAttribute> ::=
|
<TaskAttribute> ::=
|
||||||
|
|||||||
@@ -1,3 +1,33 @@
|
|||||||
|
7.14.03
|
||||||
|
|
||||||
|
Fixed bug in `gam print cigroup-members includederivedmembership` that caused a trap.
|
||||||
|
|
||||||
|
7.14.02
|
||||||
|
|
||||||
|
Fixed bug in `gam print|show cigroups|cigroups-members cimember <UserItem>` that generated the following error:
|
||||||
|
```
|
||||||
|
Cloud Identity Group Print Failed: Request contains an invalid argument.
|
||||||
|
```
|
||||||
|
|
||||||
|
7.14.01
|
||||||
|
|
||||||
|
Don't install yubikey library via pip by default. To install with yubikey support use pip install gam7[yubikey]
|
||||||
|
|
||||||
|
7.14.00
|
||||||
|
|
||||||
|
Added commands to display Google Tag Manager accounts, containers, workspaces, tags and user permissions.
|
||||||
|
|
||||||
|
* See: https://github.com/GAM-team/GAM/wiki/Users-Tag-Manager
|
||||||
|
|
||||||
|
7.13.03
|
||||||
|
|
||||||
|
Added option `csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]`
|
||||||
|
to `gam create chromeprofilecommand` so that command details are displayed in CSV format.
|
||||||
|
|
||||||
|
Added option `commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>` to `<ChromeProfileNameEntity>`
|
||||||
|
so that `gam print|show chromeprofilecommands` can directly display the commands generated by
|
||||||
|
`gam create chromeprofilecommand` with the `csv` option.
|
||||||
|
|
||||||
7.13.02
|
7.13.02
|
||||||
|
|
||||||
Fixed bug in `gam create chromeprofilecommand` where `select|filter` were not recognized.
|
Fixed bug in `gam create chromeprofilecommand` where `select|filter` were not recognized.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||||
__version__ = '7.13.02'
|
__version__ = '7.14.03'
|
||||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
#pylint: disable=wrong-import-position
|
#pylint: disable=wrong-import-position
|
||||||
@@ -6011,7 +6011,11 @@ def getCIGroupMemberRoleFixType(member):
|
|||||||
def getCIGroupTransitiveMemberRoleFixType(groupName, tmember):
|
def getCIGroupTransitiveMemberRoleFixType(groupName, tmember):
|
||||||
''' map transitive member to normal member '''
|
''' map transitive member to normal member '''
|
||||||
tid = tmember['preferredMemberKey'][0].get('id', GC.Values[GC.CUSTOMER_ID]) if tmember['preferredMemberKey'] else ''
|
tid = tmember['preferredMemberKey'][0].get('id', GC.Values[GC.CUSTOMER_ID]) if tmember['preferredMemberKey'] else ''
|
||||||
|
if '/' in tmember['member']:
|
||||||
ttype, tname = tmember['member'].split('/')
|
ttype, tname = tmember['member'].split('/')
|
||||||
|
else:
|
||||||
|
ttype = ''
|
||||||
|
tname = tmember['member']
|
||||||
member = {'name': f'{groupName}/membershipd/{tname}', 'preferredMemberKey': {'id': tid}}
|
member = {'name': f'{groupName}/membershipd/{tname}', 'preferredMemberKey': {'id': tid}}
|
||||||
if 'type' not in tmember:
|
if 'type' not in tmember:
|
||||||
if tid == GC.Values[GC.CUSTOMER_ID]:
|
if tid == GC.Values[GC.CUSTOMER_ID]:
|
||||||
@@ -6106,7 +6110,7 @@ def getCIGroupMembershipGraph(ci, member):
|
|||||||
result = callGAPI(ci.groups().memberships(), 'getMembershipGraph',
|
result = callGAPI(ci.groups().memberships(), 'getMembershipGraph',
|
||||||
throwReasons=GAPI.CIGROUP_LIST_THROW_REASONS, retryReasons=GAPI.CIGROUP_RETRY_REASONS,
|
throwReasons=GAPI.CIGROUP_LIST_THROW_REASONS, retryReasons=GAPI.CIGROUP_RETRY_REASONS,
|
||||||
parent=parent,
|
parent=parent,
|
||||||
query=f"member_key_id == '{member}' && CIGROUP_DISCUSSION_FORUM_LABEL in labels")
|
query=f"member_key_id == '{member}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels")
|
||||||
return (ci, result.get('response', {}))
|
return (ci, result.get('response', {}))
|
||||||
except (GAPI.resourceNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis,
|
except (GAPI.resourceNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis,
|
||||||
GAPI.forbidden, GAPI.badRequest, GAPI.invalid, GAPI.invalidArgument,
|
GAPI.forbidden, GAPI.badRequest, GAPI.invalid, GAPI.invalidArgument,
|
||||||
@@ -24113,7 +24117,10 @@ def infoCrOSDevices(entityList):
|
|||||||
printKeyValueList([up, ''])
|
printKeyValueList([up, ''])
|
||||||
Ind.Increment()
|
Ind.Increment()
|
||||||
for key, value in sorted(iter(cros[up].items())):
|
for key, value in sorted(iter(cros[up].items())):
|
||||||
|
if key not in CROS_TIME_OBJECTS:
|
||||||
printKeyValueList([key, value])
|
printKeyValueList([key, value])
|
||||||
|
else:
|
||||||
|
printKeyValueList([key, formatLocalTime(value)])
|
||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
if not noLists:
|
if not noLists:
|
||||||
activeTimeRanges = _filterActiveTimeRanges(cros, True, listLimit, startDate, endDate, activeTimeRangesOrder)
|
activeTimeRanges = _filterActiveTimeRanges(cros, True, listLimit, startDate, endDate, activeTimeRangesOrder)
|
||||||
@@ -25677,24 +25684,28 @@ def doPrintShowChromeProfiles():
|
|||||||
csvPF.writeCSVfile('Chrome Profiles')
|
csvPF.writeCSVfile('Chrome Profiles')
|
||||||
|
|
||||||
def _getChromeProfileNameList():
|
def _getChromeProfileNameList():
|
||||||
if not Cmd.PeekArgumentPresent(['select', 'filter', 'filters']):
|
if not Cmd.PeekArgumentPresent(['select', 'commands', 'filter', 'filters']):
|
||||||
return getString(Cmd.OB_CHROMEPROFILE_NAME_LIST).replace(',', ' ').split()
|
return getString(Cmd.OB_CHROMEPROFILE_NAME_LIST).replace(',', ' ').split()
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def _initChromeProfileNameParameters():
|
def _initChromeProfileNameParameters():
|
||||||
cm = buildGAPIObject(API.CHROMEMANAGEMENT)
|
cm = buildGAPIObject(API.CHROMEMANAGEMENT)
|
||||||
return (cm, {'profileNameList': _getChromeProfileNameList(), 'customerId': _getCustomerId(),
|
return (cm, {'profileNameList': _getChromeProfileNameList(),
|
||||||
|
'commandNameList': [],
|
||||||
|
'customerId': _getCustomerId(),
|
||||||
'cbfilter': None, 'filterTimes': {},
|
'cbfilter': None, 'filterTimes': {},
|
||||||
'OBY': OrderBy(CHROMEPROFILE_ORDERBY_CHOICE_MAP)})
|
'OBY': OrderBy(CHROMEPROFILE_ORDERBY_CHOICE_MAP)})
|
||||||
|
|
||||||
def _getChromeProfileNameParameters(myarg, parameters):
|
def _getChromeProfileNameParameters(myarg, parameters):
|
||||||
if not parameters['cbfilter'] and myarg == 'select':
|
if not parameters['cbfilter'] and not parameters['commandNameList'] and myarg == 'select':
|
||||||
parameters['profileNameList'].extend(getEntityList(Cmd.OB_CHROMEPROFILE_NAME_LIST))
|
parameters['profileNameList'].extend(getEntityList(Cmd.OB_CHROMEPROFILE_NAME_LIST))
|
||||||
elif not parameters['profileNameList'] and myarg == 'orderby':
|
elif not parameters['cbfilter'] and not parameters['profileNameList'] and myarg == 'commands':
|
||||||
|
parameters['commandNameList'].extend(getEntityList(Cmd.OB_CHROMEPROFILE_COMMAND_NAME_LIST))
|
||||||
|
elif not parameters['profileNameList'] and not parameters['commandNameList'] and myarg == 'orderby':
|
||||||
parameters['OBY'].GetChoice()
|
parameters['OBY'].GetChoice()
|
||||||
elif not parameters['profileNameList'] and myarg.startswith('filtertime'):
|
elif not parameters['profileNameList'] and not parameters['commandNameList'] and myarg.startswith('filtertime'):
|
||||||
parameters['filterTimes'][myarg] = getTimeOrDeltaFromNow()
|
parameters['filterTimes'][myarg] = getTimeOrDeltaFromNow()
|
||||||
elif not parameters['profileNameList'] and myarg in {'filter', 'filters'}:
|
elif not parameters['profileNameList'] and not parameters['commandNameList'] and myarg in {'filter', 'filters'}:
|
||||||
parameters['cbfilter'] = getString(Cmd.OB_STRING)
|
parameters['cbfilter'] = getString(Cmd.OB_STRING)
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
@@ -25703,9 +25714,14 @@ def _getChromeProfileNameParameters(myarg, parameters):
|
|||||||
def _getChromeProfileNameEntityForCommand(cm, parameters):
|
def _getChromeProfileNameEntityForCommand(cm, parameters):
|
||||||
if parameters['cbfilter'] is None:
|
if parameters['cbfilter'] is None:
|
||||||
customerId = parameters['customerId']
|
customerId = parameters['customerId']
|
||||||
|
if parameters['profileNameList']:
|
||||||
for i, profileName in enumerate(parameters['profileNameList']):
|
for i, profileName in enumerate(parameters['profileNameList']):
|
||||||
if not profileName.startswith('customers'):
|
if not profileName.startswith('customers'):
|
||||||
parameters['profileNameList'][i] = f'customers/{customerId}/profiles/{profileName}'
|
parameters['profileNameList'][i] = f'customers/{customerId}/profiles/{profileName}'
|
||||||
|
elif parameters['commandNameList']:
|
||||||
|
for i, commandName in enumerate(parameters['commandNameList']):
|
||||||
|
if not commandName.startswith('customers'):
|
||||||
|
parameters['commandNameList'][i] = f'customers/{customerId}/profiles/{commandName}'
|
||||||
return
|
return
|
||||||
if parameters['filterTimes']:
|
if parameters['filterTimes']:
|
||||||
for filterTimeName, filterTimeValue in iter(parameters['filterTimes'].items()):
|
for filterTimeName, filterTimeValue in iter(parameters['filterTimes'].items()):
|
||||||
@@ -25740,13 +25756,23 @@ def _showChromeProfileCommand(profcmd, FJQC, i=0, count=0):
|
|||||||
showJSON(None, profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS)
|
showJSON(None, profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS)
|
||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
|
|
||||||
|
def _printChromeProfileCommand(profcmd, csvPF, FJQC):
|
||||||
|
row = flattenJSON(profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS)
|
||||||
|
if not FJQC.formatJSON:
|
||||||
|
csvPF.WriteRowTitles(row)
|
||||||
|
elif csvPF.CheckRowTitles(row):
|
||||||
|
csvPF.WriteRowNoFilter({'name': profcmd['name'],
|
||||||
|
'JSON': json.dumps(cleanJSON(profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS),
|
||||||
|
ensure_ascii=False, sort_keys=True)})
|
||||||
|
|
||||||
# gam create chromeprofilecommand <ChromeProfileNameEntity>
|
# gam create chromeprofilecommand <ChromeProfileNameEntity>
|
||||||
# [clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
# [clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
||||||
# [formatjson]
|
# [csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]
|
||||||
def doCreateChromeProfileCommand():
|
def doCreateChromeProfileCommand():
|
||||||
cm, parameters = _initChromeProfileNameParameters()
|
cm, parameters = _initChromeProfileNameParameters()
|
||||||
body = {'commandType': 'clearBrowsingData', 'payload': {}}
|
body = {'commandType': 'clearBrowsingData', 'payload': {}}
|
||||||
FJQC = FormatJSONQuoteChar()
|
csvPF = None
|
||||||
|
FJQC = FormatJSONQuoteChar(None)
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
myarg = getArgument()
|
myarg = getArgument()
|
||||||
if _getChromeProfileNameParameters(myarg, parameters):
|
if _getChromeProfileNameParameters(myarg, parameters):
|
||||||
@@ -25755,8 +25781,13 @@ def doCreateChromeProfileCommand():
|
|||||||
body['payload']['clearCache'] = getBoolean()
|
body['payload']['clearCache'] = getBoolean()
|
||||||
elif myarg == 'clearcookies':
|
elif myarg == 'clearcookies':
|
||||||
body['payload']['clearCookies'] = getBoolean()
|
body['payload']['clearCookies'] = getBoolean()
|
||||||
|
elif myarg == 'csv':
|
||||||
|
csvPF = CSVPrintFile(['name'], 'sortall')
|
||||||
|
FJQC.SetCsvPF(csvPF)
|
||||||
|
elif csvPF and myarg == 'todrive':
|
||||||
|
csvPF.GetTodriveParameters()
|
||||||
else:
|
else:
|
||||||
FJQC.GetFormatJSON(myarg)
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
||||||
_getChromeProfileNameEntityForCommand(cm, parameters)
|
_getChromeProfileNameEntityForCommand(cm, parameters)
|
||||||
count = len(parameters['profileNameList'])
|
count = len(parameters['profileNameList'])
|
||||||
i = 0
|
i = 0
|
||||||
@@ -25766,11 +25797,16 @@ def doCreateChromeProfileCommand():
|
|||||||
profcmd = callGAPI(cm.customers().profiles().commands(), 'create',
|
profcmd = callGAPI(cm.customers().profiles().commands(), 'create',
|
||||||
throwReasons=[GAPI.INVALID_ARGUMENT, GAPI.NOT_FOUND, GAPI.PERMISSION_DENIED],
|
throwReasons=[GAPI.INVALID_ARGUMENT, GAPI.NOT_FOUND, GAPI.PERMISSION_DENIED],
|
||||||
parent=profileName, body=body)
|
parent=profileName, body=body)
|
||||||
_showChromeProfileCommand(profcmd, FJQC)
|
if csvPF is None:
|
||||||
|
_showChromeProfileCommand(profcmd, FJQC, i, count)
|
||||||
|
else:
|
||||||
|
_printChromeProfileCommand(profcmd, csvPF, FJQC)
|
||||||
except (GAPI.notFound) as e:
|
except (GAPI.notFound) as e:
|
||||||
entityActionFailedWarning([Ent.CHROME_PROFILE_COMMAND, profileName], str(e), i, count)
|
entityActionFailedWarning([Ent.CHROME_PROFILE_COMMAND, profileName], str(e), i, count)
|
||||||
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||||
entityActionFailedExit([Ent.CHROME_PROFILE_COMMAND, profileName], str(e))
|
entityActionFailedExit([Ent.CHROME_PROFILE_COMMAND, profileName], str(e))
|
||||||
|
if csvPF:
|
||||||
|
csvPF.writeCSVfile('Chrome Profile Commands')
|
||||||
|
|
||||||
# gam info chromeprofilecommand <ChromeProfileCommandName>
|
# gam info chromeprofilecommand <ChromeProfileCommandName>
|
||||||
# [formatjson]
|
# [formatjson]
|
||||||
@@ -25794,15 +25830,6 @@ def doInfoChromeProfileCommand():
|
|||||||
# gam print chromeprofilecommands <ChromeProfilNameEntity> [todrive <ToDriveAttribute>*]
|
# gam print chromeprofilecommands <ChromeProfilNameEntity> [todrive <ToDriveAttribute>*]
|
||||||
# [formatjson [quotechar <Character>]]
|
# [formatjson [quotechar <Character>]]
|
||||||
def doPrintShowChromeProfileCommands():
|
def doPrintShowChromeProfileCommands():
|
||||||
def _printProfileCommand(profcmd):
|
|
||||||
row = flattenJSON(profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS)
|
|
||||||
if not FJQC.formatJSON:
|
|
||||||
csvPF.WriteRowTitles(row)
|
|
||||||
elif csvPF.CheckRowTitles(row):
|
|
||||||
csvPF.WriteRowNoFilter({'name': profcmd['name'],
|
|
||||||
'JSON': json.dumps(cleanJSON(profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS),
|
|
||||||
ensure_ascii=False, sort_keys=True)})
|
|
||||||
|
|
||||||
csvPF = CSVPrintFile(['name']) if Act.csvFormat() else None
|
csvPF = CSVPrintFile(['name']) if Act.csvFormat() else None
|
||||||
FJQC = FormatJSONQuoteChar(csvPF)
|
FJQC = FormatJSONQuoteChar(csvPF)
|
||||||
cm, parameters = _initChromeProfileNameParameters()
|
cm, parameters = _initChromeProfileNameParameters()
|
||||||
@@ -25815,6 +25842,7 @@ def doPrintShowChromeProfileCommands():
|
|||||||
else:
|
else:
|
||||||
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
||||||
_getChromeProfileNameEntityForCommand(cm, parameters)
|
_getChromeProfileNameEntityForCommand(cm, parameters)
|
||||||
|
if parameters['profileNameList']:
|
||||||
count = len(parameters['profileNameList'])
|
count = len(parameters['profileNameList'])
|
||||||
i = 0
|
i = 0
|
||||||
for profileName in parameters['profileNameList']:
|
for profileName in parameters['profileNameList']:
|
||||||
@@ -25836,11 +25864,28 @@ def doPrintShowChromeProfileCommands():
|
|||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
else:
|
else:
|
||||||
for profcmd in profcmds:
|
for profcmd in profcmds:
|
||||||
_printProfileCommand(profcmd)
|
_printChromeProfileCommand(profcmd, csvPF, FJQC)
|
||||||
except (GAPI.notFound) as e:
|
except GAPI.notFound as e:
|
||||||
entityActionFailedWarning([Ent.CHROME_PROFILE, profileName], str(e), i, count)
|
entityActionFailedWarning([Ent.CHROME_PROFILE, profileName], str(e), i, count)
|
||||||
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||||
entityActionFailedExit([Ent.CHROME_PROFILE, profileName], str(e))
|
entityActionFailedExit([Ent.CHROME_PROFILE, profileName], str(e))
|
||||||
|
elif parameters['commandNameList']:
|
||||||
|
count = len(parameters['commandNameList'])
|
||||||
|
i = 0
|
||||||
|
for profileCommandName in parameters['commandNameList']:
|
||||||
|
i +=1
|
||||||
|
try:
|
||||||
|
profcmd = callGAPI(cm.customers().profiles().commands(), 'get',
|
||||||
|
throwReasons=[GAPI.INVALID_ARGUMENT, GAPI.NOT_FOUND, GAPI.PERMISSION_DENIED],
|
||||||
|
name=profileCommandName)
|
||||||
|
if not csvPF:
|
||||||
|
_showChromeProfileCommand(profcmd, FJQC, i, count)
|
||||||
|
else:
|
||||||
|
_printChromeProfileCommand(profcmd, csvPF, FJQC)
|
||||||
|
except GAPI.notFound as e:
|
||||||
|
entityActionFailedWarning([Ent.CHROME_PROFILE_COMMAND, profileCommandName], str(e), i, count)
|
||||||
|
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||||
|
entityActionFailedExit([Ent.CHROME_PROFILE, profileCommandName], str(e))
|
||||||
if csvPF:
|
if csvPF:
|
||||||
csvPF.writeCSVfile('Chrome Profile Commands')
|
csvPF.writeCSVfile('Chrome Profile Commands')
|
||||||
|
|
||||||
@@ -36809,7 +36854,7 @@ def doPrintCIGroups():
|
|||||||
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
||||||
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
||||||
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
||||||
memberQuery = f"member_key_id == '{emailAddress}' && CIGROUP_DISCUSSION_FORUM_LABEL in labels"
|
memberQuery = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels"
|
||||||
entitySelection = None
|
entitySelection = None
|
||||||
if myarg == 'ciowner':
|
if myarg == 'ciowner':
|
||||||
showOwnedBy = emailAddress
|
showOwnedBy = emailAddress
|
||||||
@@ -37055,7 +37100,7 @@ def getCIGroupTransitiveMembers(ci, groupName, membersList, i, count):
|
|||||||
entityUnknownWarning(Ent.CLOUD_IDENTITY_GROUP, groupName, i, count)
|
entityUnknownWarning(Ent.CLOUD_IDENTITY_GROUP, groupName, i, count)
|
||||||
return False
|
return False
|
||||||
except GAPI.permissionDenied as e:
|
except GAPI.permissionDenied as e:
|
||||||
entityActionFailedExit([Ent.CLOUD_IDENTITY_GROUP, groupName], str(e))
|
entityActionFailedWarning([Ent.CLOUD_IDENTITY_GROUP, groupName], str(e))
|
||||||
return False
|
return False
|
||||||
for member in groupMembers:
|
for member in groupMembers:
|
||||||
membersList.append(getCIGroupTransitiveMemberRoleFixType(groupName, member))
|
membersList.append(getCIGroupTransitiveMemberRoleFixType(groupName, member))
|
||||||
@@ -37232,7 +37277,7 @@ def doPrintCIGroupMembers():
|
|||||||
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
||||||
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
||||||
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
||||||
query = f"member_key_id == '{emailAddress}' && CIGROUP_DISCUSSION_FORUM_LABEL in labels"
|
query = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels"
|
||||||
entityList = None
|
entityList = None
|
||||||
if myarg == 'ciowner':
|
if myarg == 'ciowner':
|
||||||
showOwnedBy = emailAddress
|
showOwnedBy = emailAddress
|
||||||
@@ -37451,7 +37496,7 @@ def doShowCIGroupMembers():
|
|||||||
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
||||||
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
||||||
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
||||||
query = f"member_key_id == '{emailAddress}' && CIGROUP_DISCUSSION_FORUM_LABEL in labels"
|
query = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels"
|
||||||
entityList = None
|
entityList = None
|
||||||
if myarg == 'ciowner':
|
if myarg == 'ciowner':
|
||||||
showOwnedBy = emailAddress
|
showOwnedBy = emailAddress
|
||||||
@@ -76450,6 +76495,147 @@ def importTasklist(users):
|
|||||||
tasklist=tasklistId, parent=parent, body=task)
|
tasklist=tasklistId, parent=parent, body=task)
|
||||||
parentIdMap[taskId] = result['id']
|
parentIdMap[taskId] = result['id']
|
||||||
|
|
||||||
|
TAGMANAGER_PARAMETERS = {
|
||||||
|
Ent.TAGMANAGER_ACCOUNT: {'api': API.TAGMANAGER, 'respType': 'account', 'parentEntityType': None,
|
||||||
|
'name': 'name', 'idList': ['accountId']},
|
||||||
|
Ent.TAGMANAGER_CONTAINER: {'api': API.TAGMANAGER, 'respType': 'container', 'parentEntityType': Ent.TAGMANAGER_ACCOUNT,
|
||||||
|
'name': 'name', 'idList': ['accountId', 'containerId']},
|
||||||
|
Ent.TAGMANAGER_WORKSPACE: {'api': API.TAGMANAGER, 'respType': 'workspace', 'parentEntityType': Ent.TAGMANAGER_CONTAINER,
|
||||||
|
'name': 'name', 'idList': ['accountId', 'containerId', 'workspaceId']},
|
||||||
|
Ent.TAGMANAGER_TAG: {'api': API.TAGMANAGER, 'respType': 'tag', 'parentEntityType': Ent.TAGMANAGER_WORKSPACE,
|
||||||
|
'name': 'name', 'idList': ['accountId', 'containerId', 'workspaceId', 'tagId']},
|
||||||
|
Ent.TAGMANAGER_PERMISSION: {'api': API.TAGMANAGER_USERS, 'respType': 'userPermission', 'parentEntityType': Ent.TAGMANAGER_ACCOUNT,
|
||||||
|
'name': 'emailAddress', 'idList': ['accountId']},
|
||||||
|
}
|
||||||
|
|
||||||
|
def printShowTagManagerObjects(users, entityType):
|
||||||
|
csvPF = CSVPrintFile(['User']) if Act.csvFormat() else None
|
||||||
|
FJQC = FormatJSONQuoteChar(csvPF)
|
||||||
|
if entityType == Ent.TAGMANAGER_ACCOUNT:
|
||||||
|
kwargs = {'includeGoogleTags': False}
|
||||||
|
parentList = [None]
|
||||||
|
else:
|
||||||
|
kwargs = {'parent': None}
|
||||||
|
if not checkArgumentPresent('select'):
|
||||||
|
parentList = getString(Cmd.OB_TAGMANAGER_PATH_LIST).replace(',', ' ').split()
|
||||||
|
else:
|
||||||
|
parentList = getEntityList(Cmd.OB_TAGMANAGER_PATH_LIST)
|
||||||
|
parameters = TAGMANAGER_PARAMETERS[entityType]
|
||||||
|
if csvPF:
|
||||||
|
csvPF.AddTitles([parameters['name'], 'path'])
|
||||||
|
while Cmd.ArgumentsRemaining():
|
||||||
|
myarg = getArgument()
|
||||||
|
if csvPF and myarg == 'todrive':
|
||||||
|
csvPF.GetTodriveParameters()
|
||||||
|
elif entityType == Ent.TAGMANAGER_ACCOUNT and myarg == 'includegoogletags':
|
||||||
|
kwargs['includeGoogleTags'] = getBoolean()
|
||||||
|
else:
|
||||||
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
||||||
|
i, count, users = getEntityArgument(users)
|
||||||
|
for user in users:
|
||||||
|
i += 1
|
||||||
|
user, svc = buildGAPIServiceObject(parameters['api'], user, i, count)
|
||||||
|
if not svc:
|
||||||
|
continue
|
||||||
|
if entityType == Ent.TAGMANAGER_ACCOUNT:
|
||||||
|
svc = svc.accounts()
|
||||||
|
elif entityType == Ent.TAGMANAGER_CONTAINER:
|
||||||
|
svc = svc.accounts().containers()
|
||||||
|
elif entityType == Ent.TAGMANAGER_WORKSPACE:
|
||||||
|
svc = svc.accounts().containers().workspaces()
|
||||||
|
elif entityType == Ent.TAGMANAGER_TAG:
|
||||||
|
svc = svc.accounts().containers().workspaces().tags()
|
||||||
|
else: #elif entityType == Ent.TAGMANAGER_PERMISSION:
|
||||||
|
svc = svc.accounts().user_permissions()
|
||||||
|
jcount = len(parentList)
|
||||||
|
j = 0
|
||||||
|
for parent in parentList:
|
||||||
|
j += 1
|
||||||
|
if entityType == Ent.TAGMANAGER_ACCOUNT:
|
||||||
|
printGettingAllEntityItemsForWhom(entityType, user, i, count)
|
||||||
|
else:
|
||||||
|
kwargs['parent'] = parent
|
||||||
|
qualifier = f' for {Ent.Singular(parameters["parentEntityType"])}: {parent}'
|
||||||
|
printGettingAllEntityItemsForWhom(entityType, user, i, count, qualifier=qualifier)
|
||||||
|
try:
|
||||||
|
results = callGAPIpages(svc, 'list', parameters['respType'],
|
||||||
|
pageMessage=getPageMessageForWhom(),
|
||||||
|
throwReasons=GAPI.TAGMANAGER_THROW_REASONS,
|
||||||
|
**kwargs)
|
||||||
|
except (GAPI.badRequest, GAPI.invalid, GAPI.notFound) as e:
|
||||||
|
entityActionFailedWarning([Ent.USER, user, entityType, kwargs['parent']], str(e), j, jcount)
|
||||||
|
continue
|
||||||
|
kcount = len(results)
|
||||||
|
if not csvPF:
|
||||||
|
if not FJQC.formatJSON:
|
||||||
|
entityPerformActionNumItems([Ent.USER, user], kcount, entityType, j, jcount)
|
||||||
|
Ind.Increment()
|
||||||
|
k = 0
|
||||||
|
for result in results:
|
||||||
|
k += 1
|
||||||
|
if not FJQC.formatJSON:
|
||||||
|
printEntity([entityType, result['path']], k, kcount)
|
||||||
|
Ind.Increment()
|
||||||
|
printKeyValueList([parameters['name'], result.pop(parameters['name'])])
|
||||||
|
for tmid in parameters['idList']:
|
||||||
|
printKeyValueList([tmid, result.pop(tmid)])
|
||||||
|
showJSON(None, result)
|
||||||
|
Ind.Decrement()
|
||||||
|
else:
|
||||||
|
printLine(json.dumps(cleanJSON(result), ensure_ascii=False, sort_keys=True))
|
||||||
|
Ind.Decrement()
|
||||||
|
else:
|
||||||
|
for result in results:
|
||||||
|
baseRow = {'User': user}
|
||||||
|
for tmid in parameters['idList']:
|
||||||
|
baseRow[tmid] = result.pop(tmid)
|
||||||
|
row = flattenJSON(result, flattened=baseRow)
|
||||||
|
if not FJQC.formatJSON:
|
||||||
|
csvPF.WriteRowTitles(row)
|
||||||
|
elif csvPF.CheckRowTitles(row):
|
||||||
|
row = {'User': user, parameters['name']: result[parameters['name']], 'path': result['path']}
|
||||||
|
row['JSON'] = json.dumps(cleanJSON(result), ensure_ascii=False, sort_keys=True)
|
||||||
|
csvPF.WriteRowNoFilter(row)
|
||||||
|
if csvPF:
|
||||||
|
csvPF.writeCSVfile(Ent.Plural(entityType))
|
||||||
|
|
||||||
|
# gam <UserTypeEntity> show tagmanageraccounts
|
||||||
|
# [includegoogletags [<Boolean>]]
|
||||||
|
# [formatjson]
|
||||||
|
# gam <UserTypeEntity> print tagmanagerccounts [todrive <ToDriveAttribute>*]
|
||||||
|
# [includegoogletags [<Boolean>]]
|
||||||
|
# [formatjson [quotechar <Character>]]
|
||||||
|
def printShowTagManagerAccounts(users):
|
||||||
|
printShowTagManagerObjects(users, Ent.TAGMANAGER_ACCOUNT)
|
||||||
|
|
||||||
|
# gam <UserTypeEntity> show tagmanagercontainers <TagManagerAccountPathEntity>
|
||||||
|
# [formatjson]
|
||||||
|
# gam <UserTypeEntity> print tagmanagercontainers <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
# [formatjson [quotechar <Character>]]
|
||||||
|
def printShowTagManagerContainers(users):
|
||||||
|
printShowTagManagerObjects(users, Ent.TAGMANAGER_CONTAINER)
|
||||||
|
|
||||||
|
# gam <UserTypeEntity> show tagmanagerworkspaces <TagManagerContainerPathEntity>
|
||||||
|
# [formatjson]
|
||||||
|
# gam <UserTypeEntity> print tagmanagerworkspaces <TagManagerContainerPathEntity>
|
||||||
|
# [formatjson [quotechar <Character>]]
|
||||||
|
def printShowTagManagerWorkspaces(users):
|
||||||
|
printShowTagManagerObjects(users, Ent.TAGMANAGER_WORKSPACE)
|
||||||
|
|
||||||
|
# gam <UserTypeEntity> show tagmanagertags <TagManagerWorkspacePathEntity>
|
||||||
|
# [formatjson]
|
||||||
|
# gam <UserTypeEntity> print tagmanagertags <TagManagerWorkspacePathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
# [formatjson [quotechar <Character>]]
|
||||||
|
def printShowTagManagerTags(users):
|
||||||
|
printShowTagManagerObjects(users, Ent.TAGMANAGER_TAG)
|
||||||
|
|
||||||
|
# gam <UserTypeEntity> show tagmanagerpermissions <TagManagerAccountPathEntity>
|
||||||
|
# [formatjson]
|
||||||
|
# gam <UserTypeEntity> print tagmanagerpermissions <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
# [formatjson [quotechar <Character>]]
|
||||||
|
def printShowTagManagerPermissions(users):
|
||||||
|
printShowTagManagerObjects(users, Ent.TAGMANAGER_PERMISSION)
|
||||||
|
|
||||||
def getCRMOrgId():
|
def getCRMOrgId():
|
||||||
setTrueCustomerId()
|
setTrueCustomerId()
|
||||||
_, crm = buildGAPIServiceObject(API.CLOUDRESOURCEMANAGER, None)
|
_, crm = buildGAPIServiceObject(API.CLOUDRESOURCEMANAGER, None)
|
||||||
@@ -78178,6 +78364,11 @@ USER_COMMANDS_WITH_OBJECTS = {
|
|||||||
Cmd.ARG_SITE: deprecatedUserSites,
|
Cmd.ARG_SITE: deprecatedUserSites,
|
||||||
Cmd.ARG_SITEACL: deprecatedUserSites,
|
Cmd.ARG_SITEACL: deprecatedUserSites,
|
||||||
Cmd.ARG_SITEACTIVITY: deprecatedUserSites,
|
Cmd.ARG_SITEACTIVITY: deprecatedUserSites,
|
||||||
|
Cmd.ARG_TAGMANAGERACCOUNT: printShowTagManagerAccounts,
|
||||||
|
Cmd.ARG_TAGMANAGERCONTAINER: printShowTagManagerContainers,
|
||||||
|
Cmd.ARG_TAGMANAGERPERMISSION: printShowTagManagerPermissions,
|
||||||
|
Cmd.ARG_TAGMANAGERTAG: printShowTagManagerTags,
|
||||||
|
Cmd.ARG_TAGMANAGERWORKSPACE: printShowTagManagerWorkspaces,
|
||||||
Cmd.ARG_TASK: printShowTasks,
|
Cmd.ARG_TASK: printShowTasks,
|
||||||
Cmd.ARG_TASKLIST: printShowTasklists,
|
Cmd.ARG_TASKLIST: printShowTasklists,
|
||||||
Cmd.ARG_THREAD: printShowThreads,
|
Cmd.ARG_THREAD: printShowThreads,
|
||||||
@@ -78285,6 +78476,11 @@ USER_COMMANDS_WITH_OBJECTS = {
|
|||||||
Cmd.ARG_SITE: deprecatedUserSites,
|
Cmd.ARG_SITE: deprecatedUserSites,
|
||||||
Cmd.ARG_SITEACL: deprecatedUserSites,
|
Cmd.ARG_SITEACL: deprecatedUserSites,
|
||||||
Cmd.ARG_SMIME: printShowSmimes,
|
Cmd.ARG_SMIME: printShowSmimes,
|
||||||
|
Cmd.ARG_TAGMANAGERACCOUNT: printShowTagManagerAccounts,
|
||||||
|
Cmd.ARG_TAGMANAGERCONTAINER: printShowTagManagerContainers,
|
||||||
|
Cmd.ARG_TAGMANAGERPERMISSION: printShowTagManagerPermissions,
|
||||||
|
Cmd.ARG_TAGMANAGERTAG: printShowTagManagerTags,
|
||||||
|
Cmd.ARG_TAGMANAGERWORKSPACE: printShowTagManagerWorkspaces,
|
||||||
Cmd.ARG_TASK: printShowTasks,
|
Cmd.ARG_TASK: printShowTasks,
|
||||||
Cmd.ARG_TASKLIST: printShowTasklists,
|
Cmd.ARG_TASKLIST: printShowTasklists,
|
||||||
Cmd.ARG_THREAD: printShowThreads,
|
Cmd.ARG_THREAD: printShowThreads,
|
||||||
@@ -78524,6 +78720,11 @@ USER_COMMANDS_OBJ_ALIASES = {
|
|||||||
Cmd.ARG_SITES: Cmd.ARG_SITE,
|
Cmd.ARG_SITES: Cmd.ARG_SITE,
|
||||||
Cmd.ARG_SITEACLS: Cmd.ARG_SITEACL,
|
Cmd.ARG_SITEACLS: Cmd.ARG_SITEACL,
|
||||||
Cmd.ARG_SMIMES: Cmd.ARG_SMIME,
|
Cmd.ARG_SMIMES: Cmd.ARG_SMIME,
|
||||||
|
Cmd.ARG_TAGMANAGERACCOUNTS: Cmd.ARG_TAGMANAGERACCOUNT,
|
||||||
|
Cmd.ARG_TAGMANAGERCONTAINERS: Cmd.ARG_TAGMANAGERCONTAINER,
|
||||||
|
Cmd.ARG_TAGMANAGERPERMISSIONS: Cmd.ARG_TAGMANAGERPERMISSION,
|
||||||
|
Cmd.ARG_TAGMANAGERTAGS: Cmd.ARG_TAGMANAGERTAG,
|
||||||
|
Cmd.ARG_TAGMANAGERWORKSPACES: Cmd.ARG_TAGMANAGERWORKSPACE,
|
||||||
Cmd.ARG_TASKS: Cmd.ARG_TASK,
|
Cmd.ARG_TASKS: Cmd.ARG_TASK,
|
||||||
Cmd.ARG_TASKLISTS: Cmd.ARG_TASKLIST,
|
Cmd.ARG_TASKLISTS: Cmd.ARG_TASKLIST,
|
||||||
Cmd.ARG_TEAMDRIVE: Cmd.ARG_SHAREDDRIVE,
|
Cmd.ARG_TEAMDRIVE: Cmd.ARG_SHAREDDRIVE,
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ SITEVERIFICATION = 'siteVerification'
|
|||||||
STORAGE = 'storage'
|
STORAGE = 'storage'
|
||||||
STORAGEREAD = 'storageread'
|
STORAGEREAD = 'storageread'
|
||||||
STORAGEWRITE = 'storagewrite'
|
STORAGEWRITE = 'storagewrite'
|
||||||
|
TAGMANAGER = 'tagmanager'
|
||||||
|
TAGMANAGER_USERS = 'tagmanagerusers'
|
||||||
TASKS = 'tasks'
|
TASKS = 'tasks'
|
||||||
VAULT = 'vault'
|
VAULT = 'vault'
|
||||||
YOUTUBE = 'youtube'
|
YOUTUBE = 'youtube'
|
||||||
@@ -199,6 +201,7 @@ PROJECT_APIS = [
|
|||||||
'sheets.googleapis.com',
|
'sheets.googleapis.com',
|
||||||
'siteverification.googleapis.com',
|
'siteverification.googleapis.com',
|
||||||
'storage-api.googleapis.com',
|
'storage-api.googleapis.com',
|
||||||
|
'tagmanager.googleapis.com',
|
||||||
'tasks.googleapis.com',
|
'tasks.googleapis.com',
|
||||||
'vault.googleapis.com',
|
'vault.googleapis.com',
|
||||||
'youtube.googleapis.com',
|
'youtube.googleapis.com',
|
||||||
@@ -277,6 +280,8 @@ _INFO = {
|
|||||||
STORAGE: {'name': 'Cloud Storage API', 'version': 'v1', 'v2discovery': True},
|
STORAGE: {'name': 'Cloud Storage API', 'version': 'v1', 'v2discovery': True},
|
||||||
STORAGEREAD: {'name': 'Cloud Storage API - Read', 'version': 'v1', 'v2discovery': True, 'mappedAPI': STORAGE},
|
STORAGEREAD: {'name': 'Cloud Storage API - Read', 'version': 'v1', 'v2discovery': True, 'mappedAPI': STORAGE},
|
||||||
STORAGEWRITE: {'name': 'Cloud Storage API - Write', 'version': 'v1', 'v2discovery': True, 'mappedAPI': STORAGE},
|
STORAGEWRITE: {'name': 'Cloud Storage API - Write', 'version': 'v1', 'v2discovery': True, 'mappedAPI': STORAGE},
|
||||||
|
TAGMANAGER: {'name': 'Tag Manager API - Accounts, Containers, Workspaces, Tags', 'version': 'v2', 'v2discovery': True},
|
||||||
|
TAGMANAGER_USERS: {'name': 'Tag Manager API - Users', 'version': 'v2', 'v2discovery': True, 'mappedAPI': TAGMANAGER},
|
||||||
TASKS: {'name': 'Tasks API', 'version': 'v1', 'v2discovery': True},
|
TASKS: {'name': 'Tasks API', 'version': 'v1', 'v2discovery': True},
|
||||||
VAULT: {'name': 'Vault API', 'version': 'v1', 'v2discovery': True},
|
VAULT: {'name': 'Vault API', 'version': 'v1', 'v2discovery': True},
|
||||||
YOUTUBE: {'name': 'Youtube API', 'version': 'v3', 'v2discovery': True},
|
YOUTUBE: {'name': 'Youtube API', 'version': 'v3', 'v2discovery': True},
|
||||||
@@ -696,6 +701,16 @@ _SVCACCT_SCOPES = [
|
|||||||
'api': SHEETS,
|
'api': SHEETS,
|
||||||
'subscopes': READONLY,
|
'subscopes': READONLY,
|
||||||
'scope': 'https://www.googleapis.com/auth/spreadsheets'},
|
'scope': 'https://www.googleapis.com/auth/spreadsheets'},
|
||||||
|
{'name': 'Tag Manager API - Accounts, Containers, Workspaces, Tags - read only',
|
||||||
|
'api': TAGMANAGER,
|
||||||
|
'subscopes': [],
|
||||||
|
'offByDefault': True,
|
||||||
|
'scope': 'https://www.googleapis.com/auth/tagmanager.readonly'},
|
||||||
|
{'name': 'Tag Manager API - Users',
|
||||||
|
'api': TAGMANAGER_USERS,
|
||||||
|
'subscopes': [],
|
||||||
|
'offByDefault': True,
|
||||||
|
'scope': 'https://www.googleapis.com/auth/tagmanager.manage.users'},
|
||||||
{'name': 'Tasks API',
|
{'name': 'Tasks API',
|
||||||
'api': TASKS,
|
'api': TASKS,
|
||||||
'subscopes': READONLY,
|
'subscopes': READONLY,
|
||||||
|
|||||||
@@ -782,6 +782,16 @@ class GamCLArgs():
|
|||||||
ARG_SUSPENDED = 'suspended'
|
ARG_SUSPENDED = 'suspended'
|
||||||
ARG_SVCACCT = 'svcacct'
|
ARG_SVCACCT = 'svcacct'
|
||||||
ARG_SVCACCTS = 'svcaccts'
|
ARG_SVCACCTS = 'svcaccts'
|
||||||
|
ARG_TAGMANAGERACCOUNT = 'tagmanageraccount'
|
||||||
|
ARG_TAGMANAGERACCOUNTS = 'tagmanageraccounts'
|
||||||
|
ARG_TAGMANAGERCONTAINER = 'tagmanagercontainer'
|
||||||
|
ARG_TAGMANAGERCONTAINERS = 'tagmanagercontainers'
|
||||||
|
ARG_TAGMANAGERPERMISSION = 'tagmanagerpermission'
|
||||||
|
ARG_TAGMANAGERPERMISSIONS = 'tagmanagerpermissions'
|
||||||
|
ARG_TAGMANAGERTAG = 'tagmanagertag'
|
||||||
|
ARG_TAGMANAGERTAGS = 'tagmanagertags'
|
||||||
|
ARG_TAGMANAGERWORKSPACE = 'tagmanagerworkspace'
|
||||||
|
ARG_TAGMANAGERWORKSPACES = 'tagmanagerworkspaces'
|
||||||
ARG_TASK = 'task'
|
ARG_TASK = 'task'
|
||||||
ARG_TASKS = 'tasks'
|
ARG_TASKS = 'tasks'
|
||||||
ARG_TASKLIST = 'tasklist'
|
ARG_TASKLIST = 'tasklist'
|
||||||
@@ -859,6 +869,8 @@ class GamCLArgs():
|
|||||||
OB_CHAT_THREAD = 'ChatThread'
|
OB_CHAT_THREAD = 'ChatThread'
|
||||||
OB_CHROMEPROFILE_NAME = 'ChromeProfileName'
|
OB_CHROMEPROFILE_NAME = 'ChromeProfileName'
|
||||||
OB_CHROMEPROFILE_NAME_LIST = 'ChromeProfileNameList'
|
OB_CHROMEPROFILE_NAME_LIST = 'ChromeProfileNameList'
|
||||||
|
OB_CHROMEPROFILE_COMMAND_NAME = 'ChromeProfileCommandName'
|
||||||
|
OB_CHROMEPROFILE_COMMAND_NAME_LIST = 'ChromeProfileNameCommandList'
|
||||||
OB_CHROME_VERSION = 'ChromeVersion'
|
OB_CHROME_VERSION = 'ChromeVersion'
|
||||||
OB_CIDR_NETMASK = 'CIDRnetmask'
|
OB_CIDR_NETMASK = 'CIDRnetmask'
|
||||||
OB_CIGROUP_ALIAS_LIST = "CIGroupAliasList"
|
OB_CIGROUP_ALIAS_LIST = "CIGroupAliasList"
|
||||||
@@ -1037,6 +1049,7 @@ class GamCLArgs():
|
|||||||
OB_STRING_LIST = 'StringList'
|
OB_STRING_LIST = 'StringList'
|
||||||
OB_STUDENT_ITEM = 'StudentItem'
|
OB_STUDENT_ITEM = 'StudentItem'
|
||||||
OB_TAG = 'Tag'
|
OB_TAG = 'Tag'
|
||||||
|
OB_TAGMANAGER_PATH_LIST = 'TagManagerPathList'
|
||||||
OB_TASK_ID = 'TaskID'
|
OB_TASK_ID = 'TaskID'
|
||||||
OB_TASKLIST_ID = 'TaskListID'
|
OB_TASKLIST_ID = 'TaskListID'
|
||||||
OB_TASKLIST_ID_ENTITY = 'TaskListIDEntity'
|
OB_TASKLIST_ID_ENTITY = 'TaskListIDEntity'
|
||||||
|
|||||||
@@ -358,7 +358,12 @@ class GamEntity():
|
|||||||
SUBSCRIPTION = 'subs'
|
SUBSCRIPTION = 'subs'
|
||||||
SVCACCT = 'svac'
|
SVCACCT = 'svac'
|
||||||
SVCACCT_KEY = 'svky'
|
SVCACCT_KEY = 'svky'
|
||||||
TARGET_USER = 'tgt'
|
TAGMANAGER_ACCOUNT = 'tmac'
|
||||||
|
TAGMANAGER_CONTAINER = 'tmco'
|
||||||
|
TAGMANAGER_PERMISSION = 'tmpm'
|
||||||
|
TAGMANAGER_TAG = 'tmtg'
|
||||||
|
TAGMANAGER_WORKSPACE = 'tmws'
|
||||||
|
TARGET_USER = 'tgt '
|
||||||
TASK = 'task'
|
TASK = 'task'
|
||||||
TASKLIST = 'tali'
|
TASKLIST = 'tali'
|
||||||
TEACHER = 'teac'
|
TEACHER = 'teac'
|
||||||
@@ -710,6 +715,11 @@ class GamEntity():
|
|||||||
SUBSCRIPTION: ['Subscriptions', 'Subscription'],
|
SUBSCRIPTION: ['Subscriptions', 'Subscription'],
|
||||||
SVCACCT: ['Service Accounts', 'Service Account'],
|
SVCACCT: ['Service Accounts', 'Service Account'],
|
||||||
SVCACCT_KEY: ['Service Account Keys', 'Service Account Key'],
|
SVCACCT_KEY: ['Service Account Keys', 'Service Account Key'],
|
||||||
|
TAGMANAGER_ACCOUNT: ['Tag Manager Accounts', 'Tag Manager Account'],
|
||||||
|
TAGMANAGER_CONTAINER: ['Tag Manager Containers', 'Tag Manager Container'],
|
||||||
|
TAGMANAGER_PERMISSION: ['Tag Manager Permissions', 'Tag Manager Permission'],
|
||||||
|
TAGMANAGER_TAG: ['Tag Manager Tags', 'Tag Manager Tag'],
|
||||||
|
TAGMANAGER_WORKSPACE: ['Tag Manager Workspaces', 'Tag Manager Workspace'],
|
||||||
TARGET_USER: ['Target Users', 'Target User'],
|
TARGET_USER: ['Target Users', 'Target User'],
|
||||||
TASK: ['Tasks', 'Task'],
|
TASK: ['Tasks', 'Task'],
|
||||||
TASKLIST: ['Tasklists', 'Tasklist'],
|
TASKLIST: ['Tasklists', 'Tasklist'],
|
||||||
|
|||||||
@@ -287,6 +287,7 @@ PEOPLE_ACCESS_THROW_REASONS = [SERVICE_NOT_AVAILABLE, FORBIDDEN, PERMISSION_DENI
|
|||||||
RESELLER_THROW_REASONS = [BAD_REQUEST, RESOURCE_NOT_FOUND, FORBIDDEN, INVALID]
|
RESELLER_THROW_REASONS = [BAD_REQUEST, RESOURCE_NOT_FOUND, FORBIDDEN, INVALID]
|
||||||
SHEETS_ACCESS_THROW_REASONS = DRIVE_USER_THROW_REASONS+[NOT_FOUND, PERMISSION_DENIED, FORBIDDEN, INTERNAL_ERROR, INSUFFICIENT_FILE_PERMISSIONS,
|
SHEETS_ACCESS_THROW_REASONS = DRIVE_USER_THROW_REASONS+[NOT_FOUND, PERMISSION_DENIED, FORBIDDEN, INTERNAL_ERROR, INSUFFICIENT_FILE_PERMISSIONS,
|
||||||
BAD_REQUEST, INVALID, INVALID_ARGUMENT, FAILED_PRECONDITION]
|
BAD_REQUEST, INVALID, INVALID_ARGUMENT, FAILED_PRECONDITION]
|
||||||
|
TAGMANAGER_THROW_REASONS = [BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
|
||||||
TASK_THROW_REASONS = [BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
|
TASK_THROW_REASONS = [BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
|
||||||
TASKLIST_THROW_REASONS = [BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
|
TASKLIST_THROW_REASONS = [BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
|
||||||
USER_GET_THROW_REASONS = [USER_NOT_FOUND, DOMAIN_NOT_FOUND, DOMAIN_CANNOT_USE_APIS, FORBIDDEN, BAD_REQUEST, SYSTEM_ERROR]
|
USER_GET_THROW_REASONS = [USER_NOT_FOUND, DOMAIN_NOT_FOUND, DOMAIN_CANNOT_USE_APIS, FORBIDDEN, BAD_REQUEST, SYSTEM_ERROR]
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = GAM for Google Workspace
|
name = GAM for Google Workspace
|
||||||
#version = attr: gam.var.GAM_VERSION
|
version = attr: gam__version__
|
||||||
version = 7.13.02
|
|
||||||
description = Command line management for Google Workspaces
|
description = Command line management for Google Workspaces
|
||||||
long_description = file: readme.md
|
long_description = file: readme.md
|
||||||
long_description_content_type = text/markdown
|
long_description_content_type = text/markdown
|
||||||
|
|||||||
@@ -519,6 +519,14 @@
|
|||||||
gs://<StorageBucketName>/<StorageObjectName>|
|
gs://<StorageBucketName>/<StorageObjectName>|
|
||||||
<StorageBucketName>/<StorageObjectName>
|
<StorageBucketName>/<StorageObjectName>
|
||||||
<Tag> ::= <String>
|
<Tag> ::= <String>
|
||||||
|
<TagManagerAccountID> ::= <String>
|
||||||
|
<TagManagerAccountPath> ::= accounts/<TagManagerAccountID>
|
||||||
|
<TagManagerContainerID> ::= <String>
|
||||||
|
<TagManagerContainerPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>
|
||||||
|
<TagManagerWorkspaceID> ::= <String>
|
||||||
|
<TagManagerWorkspacePath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>
|
||||||
|
<TagManagerTagID> ::= <String>
|
||||||
|
<TagManagerTagPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>/tags/<TagManagerTagID>
|
||||||
<TakeoutBucketName> ::= takeout-export-[a-f,0-9,-]*
|
<TakeoutBucketName> ::= takeout-export-[a-f,0-9,-]*
|
||||||
<TaskID> ::= <String>
|
<TaskID> ::= <String>
|
||||||
<TaskListID> ::= <String>
|
<TaskListID> ::= <String>
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ GAM is capable of acting as a Chat Bot and sending messages to Chat Rooms or dir
|
|||||||
Even if you're not going to use GAM as a Chat Bot, you have to configure a Chat Bot as it is required by the Chat API in [Users - Chat](Users-Chat).
|
Even if you're not going to use GAM as a Chat Bot, you have to configure a Chat Bot as it is required by the Chat API in [Users - Chat](Users-Chat).
|
||||||
|
|
||||||
* Run the command `gam setup chat`; it will point you to a URL to configure your Chat Bot.
|
* Run the command `gam setup chat`; it will point you to a URL to configure your Chat Bot.
|
||||||
|
* Uncheck "Build this Chat app as a Workspace add-on."
|
||||||
* Enter an App name and Description of your choosing.
|
* Enter an App name and Description of your choosing.
|
||||||
* For the Avatar URL you can use `https://dummyimage.com/384x256/4d4d4d/0011ff.png&text=+GAM` or a public URL to an image of your own choosing.
|
* For the Avatar URL you can use `https://dummyimage.com/384x256/4d4d4d/0011ff.png&text=+GAM` or a public URL to an image of your own choosing.
|
||||||
* In Functionality, uncheck both "Receive 1:1 messages" and "Join spaces and group conversations"
|
* In Functionality, uncheck both "Receive 1:1 messages" and "Join spaces and group conversations"
|
||||||
|
|||||||
@@ -34,12 +34,14 @@ Follow instructions at: Turn on managed profile reporting
|
|||||||
<CustomerID> ::= <String>
|
<CustomerID> ::= <String>
|
||||||
<ChromeProfilePermanentID> ::= <String>
|
<ChromeProfilePermanentID> ::= <String>
|
||||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
||||||
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
|
|
||||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||||
|
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
|
||||||
|
<ChromeProfileCommandNameList> ::= "<ChromeProfileCommandName>(,<ChromeProfileCommandName>)*"
|
||||||
<ChromeProfileNameEntity> ::=
|
<ChromeProfileNameEntity> ::=
|
||||||
<ChromeProfileNameList> |
|
<ChromeProfileNameList> |
|
||||||
(select <FileSelector>|<CSVFileSelector>) |
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
|
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||||
|
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||||
|
|
||||||
<ChromeProfileFieldName> ::=
|
<ChromeProfileFieldName> ::=
|
||||||
affiliationstate|
|
affiliationstate|
|
||||||
@@ -209,12 +211,16 @@ gam print chromeprofiles filter "osPlatformType=WINDOWS"
|
|||||||
```
|
```
|
||||||
<ChromeProfileNameEntity> ::=
|
<ChromeProfileNameEntity> ::=
|
||||||
<ChromeProfileNameList> |
|
<ChromeProfileNameList> |
|
||||||
(select <FileSelector>|<CSVFileSelector>) |
|
(select <ChromeProfileNameList>|<FileSelector>|<CSVFileSelector>) |
|
||||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
|
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||||
|
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||||
```
|
```
|
||||||
* `<ChromeProfileNameList>` - List of Chrome profile names
|
* `<ChromeProfileNameList>` - A list of Chrome profile names
|
||||||
|
* `select <ChromeProfileNameList>` - A list of Chrome profile names
|
||||||
* `select <FileSelector>|<CSVFileSelector>` - A flat or CSV file containing Chrome profile names
|
* `select <FileSelector>|<CSVFileSelector>` - A flat or CSV file containing Chrome profile names
|
||||||
* `filter <String> (filtertime<String> <Time>)*` - A filter to select Chrome profiles
|
* `filter <String> (filtertime<String> <Time>)*` - A filter to select Chrome profiles
|
||||||
|
* `commands <ChromeProfileCommandNameList>` - A list of Chrome profile command names
|
||||||
|
* `commands <FileSelector>|<CSVFileSelector>` - A flat or CSV file containing Chrome profile command names
|
||||||
|
|
||||||
Use the `filtertime<String> <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
|
Use the `filtertime<String> <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
|
||||||
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in the `filter <String>`.
|
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in the `filter <String>`.
|
||||||
@@ -225,8 +231,12 @@ Clear a Chrome Browser profile cache and/or cookies.
|
|||||||
```
|
```
|
||||||
gam create chromeprofilecommand <ChromeProfileNameEntity>
|
gam create chromeprofilecommand <ChromeProfileNameEntity>
|
||||||
[clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
[clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
||||||
[formatjson]
|
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]
|
||||||
```
|
```
|
||||||
|
By default, when a Chrome profile command is created, GAM outputs details of the command as indented keywords and values.
|
||||||
|
* `formatjson` - Display the details in JSON format.
|
||||||
|
* `csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]` - Output the details in CSV format.
|
||||||
|
|
||||||
## Display Chrome Profile commands
|
## Display Chrome Profile commands
|
||||||
Display the status of a specific Chrome Browser profile command.
|
Display the status of a specific Chrome Browser profile command.
|
||||||
```
|
```
|
||||||
@@ -257,3 +267,50 @@ 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.
|
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.
|
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
For Windows PowerShell, replace `\"` with ``` `" ```.
|
||||||
|
|
||||||
|
Clear cache and cookies for two specific Chrome profiles:
|
||||||
|
```
|
||||||
|
gam create chromeprofilecommand 4c6c0a9f-de78-4285-be86-713fca8cffff,aa03151c-7c1d-41fe-b793-5753e167ffff clearcache clearcookies
|
||||||
|
```
|
||||||
|
|
||||||
|
Display the command status for those Chrome profiles:
|
||||||
|
```
|
||||||
|
gam show chromeprofilecommand 4c6c0a9f-de78-4285-be86-713fca8cffff,aa03151c-7c1d-41fe-b793-5753e167ffff
|
||||||
|
gam print chromeprofilecommand 4c6c0a9f-de78-4285-be86-713fca8cffff,aa03151c-7c1d-41fe-b793-5753e167ffff
|
||||||
|
```
|
||||||
|
|
||||||
|
Clear cache and cookies for Chrome profiles in a CSV file named `ChromeProfiles.csv` with a column `name`:
|
||||||
|
```
|
||||||
|
gam create chromeprofilecommand select csvfile ChromeProfiles.csv:name clearcache clearcookies
|
||||||
|
```
|
||||||
|
|
||||||
|
Display the command status for those Chrome profiles:
|
||||||
|
```
|
||||||
|
gam show chromeprofilecommand select csvfile ChromeProfiles.csv:name
|
||||||
|
gam print chromeprofilecommand select csvfile ChromeProfiles.csv:name
|
||||||
|
```
|
||||||
|
|
||||||
|
Clear cache and cookies for Chrome profiles with last activity more that 60 days ago:
|
||||||
|
```
|
||||||
|
gam create chromeprofilecommand filter "lastActivityTime < \"#filtertime1#\"" filtertime1 -60d clearcache clearcookies
|
||||||
|
```
|
||||||
|
|
||||||
|
Display the command status for those Chrome profiles:
|
||||||
|
```
|
||||||
|
gam show chromeprofilecommand filter "lastActivityTime < \"#filtertime1#\"" filtertime1 -60d
|
||||||
|
gam print chromeprofilecommand filter "lastActivityTime < \"#filtertime1#\"" filtertime1 -60d
|
||||||
|
```
|
||||||
|
|
||||||
|
Clear cache and cookies for Chrome profiles with last activity more that 60 days ago:
|
||||||
|
```
|
||||||
|
gam redirect csv ./ChromeProfileCmds.csv create chromeprofilecommand filter "lastActivityTime < \"#filtertime1#\"" filtertime1 -60d clearcache clearcookies csv
|
||||||
|
```
|
||||||
|
|
||||||
|
Display the command status for those Chrome profile commands
|
||||||
|
```
|
||||||
|
gam show chromeprofilecommand commands ChromeProfileCmds.csv:name
|
||||||
|
gam print chromeprofilecommand commands ChromeProfileCmds.csv:name
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# Cloud Identity Groups - Membership
|
# Cloud Identity Groups - Membership
|
||||||
- [API documentation](#api-documentation)
|
- [API documentation](#api-documentation)
|
||||||
- [Query documentation](#query-documentation)
|
|
||||||
- [Python Regular Expressions](Python-Regular-Expressions) Match function
|
- [Python Regular Expressions](Python-Regular-Expressions) Match function
|
||||||
- [Definitions](#definitions)
|
- [Definitions](#definitions)
|
||||||
- [Notes](#Notes)
|
- [Notes](#Notes)
|
||||||
@@ -22,10 +21,6 @@
|
|||||||
* [Cloud Identity Groups](https://gsuiteupdates.googleblog.com/2020/08/new-api-cloud-identity-groups-google.html)
|
* [Cloud Identity Groups](https://gsuiteupdates.googleblog.com/2020/08/new-api-cloud-identity-groups-google.html)
|
||||||
* [Security Groups](https://gsuiteupdates.googleblog.com/2020/09/security-groups-beta.html)
|
* [Security Groups](https://gsuiteupdates.googleblog.com/2020/09/security-groups-beta.html)
|
||||||
|
|
||||||
## Query documentation
|
|
||||||
* [Cloud Identity Groups API - Search Dynamic Groups](https://cloud.google.com/identity/docs/reference/rest/v1/groups#dynamicgroupquery)
|
|
||||||
* [Member Restrictions](https://cloud.google.com/identity/docs/reference/rest/v1/SecuritySettings#MemberRestriction)
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
In the Admin Directory API a group has the following characteristics:
|
In the Admin Directory API a group has the following characteristics:
|
||||||
@@ -45,7 +40,7 @@ Dynamic Groups require Cloud Identity Premium accounts.
|
|||||||
* https://cloud.google.com/identity/docs/how-to/create-dynamic-groups
|
* https://cloud.google.com/identity/docs/how-to/create-dynamic-groups
|
||||||
|
|
||||||
The `cimember <UserItem>` option of `gam print|show cigroup-members` requires a Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education;
|
The `cimember <UserItem>` option of `gam print|show cigroup-members` requires a Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education;
|
||||||
and Cloud Identity Premium accounts. Unfortunately, even if you have the required account, the API call that supports the query doesn't work.
|
and Cloud Identity Premium accounts.
|
||||||
|
|
||||||
* https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/searchTransitiveGroups
|
* https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/searchTransitiveGroups
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
* [Security Groups](https://gsuiteupdates.googleblog.com/2020/09/security-groups-beta.html)
|
* [Security Groups](https://gsuiteupdates.googleblog.com/2020/09/security-groups-beta.html)
|
||||||
|
|
||||||
## Query documentation
|
## Query documentation
|
||||||
* [Cloud Identity Groups API - Search Dynamic Groups](https://cloud.google.com/identity/docs/reference/rest/v1/groups#dynamicgroupquery)
|
* [Cloud Identity Groups API - Search](https://cloud.google.com/identity/docs/reference/rest/v1/groups/search)
|
||||||
|
* [Cloud Identity Groups API - Dynamic Group Query](https://cloud.google.com/identity/docs/reference/rest/v1/groups#dynamicgroupquery)
|
||||||
* [Dynamic Groups Member Attributes](https://cloud.google.com/identity/docs/how-to/dynamic-groups-attributes)
|
* [Dynamic Groups Member Attributes](https://cloud.google.com/identity/docs/how-to/dynamic-groups-attributes)
|
||||||
* [Member Restrictions](https://cloud.google.com/identity/docs/reference/rest/v1/SecuritySettings#MemberRestriction)
|
* [Member Restrictions](https://cloud.google.com/identity/docs/reference/rest/v1/SecuritySettings#MemberRestriction)
|
||||||
|
|
||||||
@@ -51,7 +52,7 @@ Dynamic Groups require Cloud Identity Premium accounts.
|
|||||||
* https://cloud.google.com/identity/docs/how-to/create-dynamic-groups
|
* https://cloud.google.com/identity/docs/how-to/create-dynamic-groups
|
||||||
|
|
||||||
The `cimember <UserItem>` option of `gam print cigroups` requires a Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education;
|
The `cimember <UserItem>` option of `gam print cigroups` requires a Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education;
|
||||||
and Cloud Identity Premium accounts. Unfortunately, even if you have the required account, the API call that supports the query doesn't work.
|
and Cloud Identity Premium accounts.
|
||||||
|
|
||||||
* https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/searchTransitiveGroups
|
* https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/searchTransitiveGroups
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,8 @@ Data fields identified in a `csvkmd` argument.
|
|||||||
<ChromeProfileNameEntity> ::=
|
<ChromeProfileNameEntity> ::=
|
||||||
<ChromeProfileNameList> |
|
<ChromeProfileNameList> |
|
||||||
(select <FileSelector>|<CSVFileSelector>) |
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
|
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||||
|
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||||
<CIPolicyNameEntity> ::=
|
<CIPolicyNameEntity> ::=
|
||||||
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
||||||
<ClassificationLabelNameEntity> ::=
|
<ClassificationLabelNameEntity> ::=
|
||||||
@@ -350,6 +351,15 @@ Data fields identified in a `csvkmd` argument.
|
|||||||
<SiteACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
<SiteACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||||
<SiteEntity> ::=
|
<SiteEntity> ::=
|
||||||
<SiteList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
<SiteList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||||
|
<TagManagerAccountPathEntity> ::=
|
||||||
|
<TagManagerAccountPathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
<TagManagerContainerPathEntity> ::=
|
||||||
|
<TagManagerContainerPathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
<TagManagerWorkspacePathEntity> ::=
|
||||||
|
<TagManagerWorkspacePathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
<TasklistEntity> ::=
|
<TasklistEntity> ::=
|
||||||
<TasklistIDList> | <TaskListTitleList> | <FileSelector> | <CSVFileSelector>
|
<TasklistIDList> | <TaskListTitleList> | <FileSelector> | <CSVFileSelector>
|
||||||
<TasklistIDTaskIDEntity> ::=
|
<TasklistIDTaskIDEntity> ::=
|
||||||
|
|||||||
@@ -308,12 +308,3 @@ the quote character itself, the column delimiter (comma by default) and new-line
|
|||||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
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.
|
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.
|
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||||
|
|
||||||
## Display global address list
|
|
||||||
As of mid-October 2024, Google deprecated the API that retrieved the Global Address List.
|
|
||||||
|
|
||||||
These commands are a work-around.
|
|
||||||
```
|
|
||||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" redirect csv ./UserGAL.csv print users fields name,gal
|
|
||||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" batch_size 25 redirect csv ./GroupGAL.csv print groups fields name,gal
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -10,10 +10,46 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
|||||||
|
|
||||||
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
||||||
|
|
||||||
|
### 7.14.03
|
||||||
|
|
||||||
|
Fixed bug in `gam print cigroup-members includederivedmembership` that caused a trap.
|
||||||
|
|
||||||
|
### 7.14.02
|
||||||
|
|
||||||
|
Fixed bug in `gam print|show cigroups|cigroups-members cimember <UserItem>` that generated the following error:
|
||||||
|
```
|
||||||
|
Cloud Identity Group Print Failed: Request contains an invalid argument.
|
||||||
|
```
|
||||||
|
|
||||||
|
### 7.14.01
|
||||||
|
|
||||||
|
Don't install yubikey library via pip by default. To install with yubikey support use pip install gam7[yubikey]
|
||||||
|
|
||||||
|
### 7.14.00
|
||||||
|
|
||||||
|
Added commands to display Google Tag Manager accounts, containers, workspaces, tags and user permissions.
|
||||||
|
|
||||||
|
* See: https://github.com/GAM-team/GAM/wiki/Users-Tag-Manager
|
||||||
|
|
||||||
|
### 7.13.03
|
||||||
|
|
||||||
|
Added option `csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]`
|
||||||
|
to `gam create chromeprofilecommand` so that command details are displayed in CSV format.
|
||||||
|
|
||||||
|
Added option `commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>` to `<ChromeProfileNameEntity>`
|
||||||
|
so that `gam print|show chromeprofilecommands` can directly display the commands generated by
|
||||||
|
`gam create chromeprofilecommand` with the `csv` option.
|
||||||
|
|
||||||
### 7.13.02
|
### 7.13.02
|
||||||
|
|
||||||
Fixed bug in `gam create chromeprofilecommand` where `select|filter` were not recognized.
|
Fixed bug in `gam create chromeprofilecommand` where `select|filter` were not recognized.
|
||||||
|
|
||||||
|
Updated `gam create datatransfer <OldOwnerID> datastudio <NewOwnerID>` that generated the following
|
||||||
|
error due to an unhandled API change.
|
||||||
|
```
|
||||||
|
ERROR: Invalid choice (google data studio): Expected <calendar|looker studio|drive and docs>
|
||||||
|
```
|
||||||
|
|
||||||
### 7.13.01
|
### 7.13.01
|
||||||
|
|
||||||
Enhanced `gam create|print|show chromeprofilecommand` to allow specification
|
Enhanced `gam create|print|show chromeprofilecommand` to allow specification
|
||||||
|
|||||||
17
wiki/Global-Address-List.md
Normal file
17
wiki/Global-Address-List.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Global Address List
|
||||||
|
|
||||||
|
As of mid-October 2024, Google deprecated the API that retrieved the Global Address List.
|
||||||
|
|
||||||
|
These commands are a work-around.
|
||||||
|
|
||||||
|
Display users/groups in GAL.
|
||||||
|
```
|
||||||
|
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" redirect csv ./UserGAL.csv print users fields name,gal
|
||||||
|
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" batch_size 25 redirect csv ./GroupGAL.csv print groups fields name,gal
|
||||||
|
```
|
||||||
|
|
||||||
|
Display users/groups not in GAL.
|
||||||
|
```
|
||||||
|
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:false" redirect csv ./UserNotGAL.csv print users fields name,gal
|
||||||
|
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:false" batch_size 25 redirect csv ./GroupNotGAL.csv print groups fields name,gal
|
||||||
|
```
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
```
|
```
|
||||||
<DataTransferService> ::=
|
<DataTransferService> ::=
|
||||||
calendar|
|
calendar|
|
||||||
currents|
|
datastudio|lookerstudio|"looker studio"|
|
||||||
datastudio|lookerstudio|"google data studio"|
|
|
||||||
drive|gdrive|googledrive|"drive and docs"
|
drive|gdrive|googledrive|"drive and docs"
|
||||||
<DataTransferServiceList> ::= "<DataTransferService>(,<DataTransferService>)*"
|
<DataTransferServiceList> ::= "<DataTransferService>(,<DataTransferService>)*"
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ gam create|add datatransfer|transfer <OldOwnerID> <DataTransferServiceList> <New
|
|||||||
(<ParameterKey> <ParameterValue>)*
|
(<ParameterKey> <ParameterValue>)*
|
||||||
[wait <Integer> <Integer>]
|
[wait <Integer> <Integer>]
|
||||||
```
|
```
|
||||||
For`datastudio` and `drive`, there are options to control the privacy level of the files to be transferred.
|
For`lookerstudio` and `drive`, there are options to control the privacy level of the files to be transferred.
|
||||||
* `private` or `privacy_level private` - Transfer files that are not shared with anyone
|
* `private` or `privacy_level private` - Transfer files that are not shared with anyone
|
||||||
* `shared` or `privacy_level shared` - Transfer files shared with at least one other user; this is the **default**
|
* `shared` or `privacy_level shared` - Transfer files shared with at least one other user; this is the **default**
|
||||||
* `all` or `privacy_level private,shared` - Transfer all files
|
* `all` or `privacy_level private,shared` - Transfer all files
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
|
|||||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||||
admin@server:/Users/admin$ gam version
|
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
|
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||||
GAM 7.13.02 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.14.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.5 64-bit final
|
Python 3.13.5 64-bit final
|
||||||
MacOS Sequoia 15.5 x86_64
|
MacOS Sequoia 15.5 x86_64
|
||||||
@@ -989,7 +989,7 @@ writes the credentials into the file oauth2.txt.
|
|||||||
C:\>del C:\GAMConfig\oauth2.txt
|
C:\>del C:\GAMConfig\oauth2.txt
|
||||||
C:\>gam version
|
C:\>gam version
|
||||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||||
GAM 7.13.02 - https://github.com/GAM-team/GAM - pythonsource
|
GAM 7.14.03 - https://github.com/GAM-team/GAM - pythonsource
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.5 64-bit final
|
Python 3.13.5 64-bit final
|
||||||
Windows-10-10.0.17134 AMD64
|
Windows-10-10.0.17134 AMD64
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
|
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
|
||||||
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
||||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||||
|
<ChromeProfileCommandNameList> ::= "<ChromeProfileCommandName>(,<ChromeProfileCommandName>)*"
|
||||||
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
||||||
<CIGroupMemberTypeList> ::= "<CIGroupMemberType>(,<CIGroupMemberType>)*"
|
<CIGroupMemberTypeList> ::= "<CIGroupMemberType>(,<CIGroupMemberType>)*"
|
||||||
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
||||||
@@ -97,6 +98,9 @@
|
|||||||
<SharedDriveACLRoleList> ::= "<SharedDriveACLRole>(,<SharedDriveACLRole>)*"
|
<SharedDriveACLRoleList> ::= "<SharedDriveACLRole>(,<SharedDriveACLRole>)*"
|
||||||
<SharedDriveIDList> ::= "<SharedDriveID>(,<SharedDriveID>)*"
|
<SharedDriveIDList> ::= "<SharedDriveID>(,<SharedDriveID>)*"
|
||||||
<StringList> ::= "<String>(,<String>)*"
|
<StringList> ::= "<String>(,<String>)*"
|
||||||
|
<TagManagerAccountPathList> ::= "<TagManagerAccountPath>(,<TagManagerAccountPath>)*"
|
||||||
|
<TagManagerContainerPathList> ::= "<TagManagerContainerPath>(,<TagManagerContainerPath>)*"
|
||||||
|
<TagManagerWorkspacePathList> ::= "<TagManagerWorkspacePath>(,<TagManagerWorkspacePath>)*"
|
||||||
<TasklistIDList> ::= "<TasklistID>(,<TasklistID>)*"
|
<TasklistIDList> ::= "<TasklistID>(,<TasklistID>)*"
|
||||||
<TasklistTitleList> ::= "'<TasklistTitle>'(,'<TasklistTitle>')*"
|
<TasklistTitleList> ::= "'<TasklistTitle>'(,'<TasklistTitle>')*"
|
||||||
<TasklistIDTaskIDList> ::= "<TasklistIDTaskID>(,<TasklistIDTaskID>)*"
|
<TasklistIDTaskIDList> ::= "<TasklistIDTaskID>(,<TasklistIDTaskID>)*"
|
||||||
|
|||||||
213
wiki/Users-Tag-Manager.md
Normal file
213
wiki/Users-Tag-Manager.md
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
# Users - Tag Manager
|
||||||
|
- [API documentation](#api-documentation)
|
||||||
|
- [Notes](#notes)
|
||||||
|
- [Definitions](#definitions)
|
||||||
|
- [Display Tag Manager Accounts](#display-tag-manager-accounts)
|
||||||
|
- [Display Tag Manager Containers](#display-tag-manager-containers)
|
||||||
|
- [Display Tag Manager Workspaces](#display-tag-manager-workspaces)
|
||||||
|
- [Display Tag Manager Tags](#display-tag-manager-tags)
|
||||||
|
- [Display Tag Manager User Permissions](#display-tag-manager-user-permissions)
|
||||||
|
- [Examples](#examples)
|
||||||
|
|
||||||
|
## API documentation
|
||||||
|
* [Tag Manager API](https://developers.google.com/tag-manager/reference/rest)
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
To use these commands you must add the 'Tag Manager API' to your project and update your service account authorization.
|
||||||
|
```
|
||||||
|
gam update project
|
||||||
|
gam user user@domain.com update serviceaccount
|
||||||
|
|
||||||
|
[*] 41) Tag Manager API - Accounts, Containers, Workspaces, Tags - read only
|
||||||
|
[*] 42) Tag Manager API - Users
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Definitions
|
||||||
|
* [`<UserTypeEntity>`](Collections-of-Users)
|
||||||
|
* [`<FileSelector> | <CSVFileSelector>`](Collections-of-Items)
|
||||||
|
```
|
||||||
|
<TagManagerAccountID> ::= <String>
|
||||||
|
<TagManagerAccountPath> ::= accounts/<TagManagerAccountID>
|
||||||
|
<TagManagerAccountPathList> ::= "<TagManagerAccountPath>(,<TagManagerAccountPath>)*"
|
||||||
|
<TagManagerAccountPathEntity> ::=
|
||||||
|
<TagManagerAccountPathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
|
||||||
|
<TagManagerContainerID> ::= <String>
|
||||||
|
<TagManagerContainerPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>
|
||||||
|
<TagManagerContainerPathList> ::= "<TagManagerContainerPath>(,<TagManagerContainerPath>)*"
|
||||||
|
<TagManagerContainerPathEntity> ::=
|
||||||
|
<TagManagerContainerPathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
|
||||||
|
<TagManagerWorkspaceID> ::= <String>
|
||||||
|
<TagManagerWorkspacePath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>
|
||||||
|
<TagManagerWorkspacePathList> ::= "<TagManagerWorkspacePath>(,<TagManagerWorkspacePath>)*"
|
||||||
|
<TagManagerWorkspacePathEntity> ::=
|
||||||
|
<TagManagerWorkspacePathList> |
|
||||||
|
(select <FileSelector>|<CSVFileSelector>) |
|
||||||
|
|
||||||
|
<TagManagerTagID> ::= <String>
|
||||||
|
<TagManagerTagPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>/tags/<TagManagerTagID>
|
||||||
|
```
|
||||||
|
## Display Tag Manager Accounts
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> show tagmanageraccounts
|
||||||
|
[includegoogletags [<Boolean>]]
|
||||||
|
[formatjson]
|
||||||
|
```
|
||||||
|
By default, Gam displays the accounts as an indented list of keys and values.
|
||||||
|
* `formatjson` - Display the account in JSON format
|
||||||
|
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> print tagmanagerccounts [todrive <ToDriveAttribute>*]
|
||||||
|
[includegoogletags [<Boolean>]]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
```
|
||||||
|
By default, Gam displays the accounts 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 Tag Manager Containers
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> show tagmanagercontainers <TagManagerAccountPathEntity>
|
||||||
|
[formatjson]
|
||||||
|
```
|
||||||
|
By default, Gam displays the containers as an indented list of keys and values.
|
||||||
|
* `formatjson` - Display the container in JSON format
|
||||||
|
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> print tagmanagercontainers <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
```
|
||||||
|
By default, Gam displays the containers 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 Tag Manager Workspaces
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> show tagmanagerworkspaces <TagManagerContainerPathEntity>
|
||||||
|
[formatjson]
|
||||||
|
```
|
||||||
|
By default, Gam displays the workspaces as an indented list of keys and values.
|
||||||
|
* `formatjson` - Display the workspace in JSON format
|
||||||
|
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> print tagmanagerworkspaces <TagManagerContainerPathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
```
|
||||||
|
By default, Gam displays the workspaces 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 Tag Manager Tags
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> show tagmanagertags <TagManagerWorkspacePathEntity>
|
||||||
|
[formatjson]
|
||||||
|
```
|
||||||
|
By default, Gam displays the tags as an indented list of keys and values.
|
||||||
|
* `formatjson` - Display the tag in JSON format
|
||||||
|
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> print tagmanagertags <TagManagerWorkspacePathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
```
|
||||||
|
By default, Gam displays the tags 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 Tag Manager User Permissions
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> show tagmanagerpermissions <TagManagerAccountPathEntity>
|
||||||
|
[formatjson]
|
||||||
|
```
|
||||||
|
By default, Gam displays the permissions as an indented list of keys and values.
|
||||||
|
* `formatjson` - Display the permission in JSON format
|
||||||
|
|
||||||
|
```
|
||||||
|
gam <UserTypeEntity> print tagmanagerpermissions <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||||
|
[formatjson [quotechar <Character>]]
|
||||||
|
```
|
||||||
|
By default, Gam displays the permissions 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.
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
Single user - Get CSV data.
|
||||||
|
```
|
||||||
|
$ gam redirect csv ./tmaccounts.csv user taguser@domain.com print tagmanageraccounts
|
||||||
|
|
||||||
|
$ gam redirect csv ./tmcontainers.csv user taguser@domain.com print tagmanagercontainers select csvfile tmaccounts.csv:path
|
||||||
|
|
||||||
|
$ gam redirect csv ./tmworkspaces.csv user taguser@domain.com print tagmanagerworkspaces select csvfile tmcontainers.csv:path
|
||||||
|
|
||||||
|
$ gam redirect csv ./tmtags.csv user taguser@domain.com print tagmanagertags select csvfile tmworkspaces.csv:path
|
||||||
|
|
||||||
|
$ gam redirect csv ./tmpermissions.csv user taguser@domain.com print tagmanagerpermissions select csvfile tmaccounts.csv:path
|
||||||
|
```
|
||||||
|
|
||||||
|
Single user - Get indented keys and values data from CSV data.
|
||||||
|
```
|
||||||
|
$ gam redirect stdout ./tmaccounts.txt user taguser@domain.com show tagmanageraccounts
|
||||||
|
|
||||||
|
$ gam redirect stdout ./tmcontainers.txt user taguser@domain.com show tagmanagercontainers select csvfile tmaccounts.csv:path
|
||||||
|
|
||||||
|
$ gam redirect stdout ./tmworkspaces.txt user taguser@domain.com show tagmanagerworkspaces select csvfile tmcontainers.csv:path
|
||||||
|
|
||||||
|
$ gam redirect stdout ./tmtags.txt user taguser@domain.com show tagmanagertags select csvfile tmworkspaces.csv:path
|
||||||
|
|
||||||
|
$ gam redirect stdout ./tmpermissions.txt user taguser@domain.com show tagmanagerpermissions select csvfile tmaccounts.csv:path
|
||||||
|
```
|
||||||
|
|
||||||
|
Multiple users - Get CSV data.
|
||||||
|
```
|
||||||
|
$ gam redirect csv ./tmaccounts.csv multiprocess redirect stderr - multiprocess csv Users.csv gam user "~User" print tagmanageraccounts
|
||||||
|
|
||||||
|
$ gam redirect csv ./tmcontainers.csv multiprocess redirect stderr - multiprocess csv tmaccounts.csv gam user "~User" print tagmanagercontainers "~path"
|
||||||
|
|
||||||
|
$ gam redirect csv ./tmworkspaces.csv multiprocess redirect stderr - multiprocess csv tmcontainers.csv gam user "~User" print tagmanagerworkspaces "~path"
|
||||||
|
|
||||||
|
$ gam redirect csv ./tmtags.csv multiprocess redirect stderr - multiprocess csv tmworkspaces.csv gam user "~User" print tagmanagertags "~path"
|
||||||
|
|
||||||
|
$ gam redirect csv ./tmpermissions.csv multiprocess redirect stderr - multiprocess csv tmaccounts.csv gam user "~User" print tagmanagerpermissions "~path"
|
||||||
|
```
|
||||||
|
|
||||||
|
Multiple users - Get indented keys and values data from CSV data.
|
||||||
|
```
|
||||||
|
$ gam redirect stdout ./tmaccounts.txt multiprocess redirect stderr - multiprocess csv Users.csv gam user "~User" show tagmanageraccounts
|
||||||
|
|
||||||
|
$ gam redirect stdout ./tmcontainers.txt multiprocess redirect stderr - multiprocess csv tmaccounts.csv gam user "~User" show tagmanagercontainers "~path"
|
||||||
|
|
||||||
|
$ gam redirect stdout ./tmworkspaces.txt multiprocess redirect stderr - multiprocess csv tmcontainers.csv gam user "~User" show tagmanagerworkspaces "~path"
|
||||||
|
|
||||||
|
$ gam redirect stdout ./tmtags.txt multiprocess redirect stderr - multiprocess csv tmworkspaces.csv gam user "~User" show tagmanagertags "~path"
|
||||||
|
|
||||||
|
$ gam redirect stdout ./tmpermissions.txt multiprocess redirect stderr - multiprocess csv tmaccounts.csv gam user "~User" show tagmanagerpermissions "~path"
|
||||||
|
|
||||||
|
```
|
||||||
@@ -4,7 +4,7 @@ k
|
|||||||
Print the current version of Gam with details
|
Print the current version of Gam with details
|
||||||
```
|
```
|
||||||
gam version
|
gam version
|
||||||
GAM 7.13.01 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.14.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.5 64-bit final
|
Python 3.13.5 64-bit final
|
||||||
MacOS Sequoia 15.5 x86_64
|
MacOS Sequoia 15.5 x86_64
|
||||||
@@ -16,7 +16,7 @@ Time: 2023-06-02T21:10:00-07:00
|
|||||||
Print the current version of Gam with details and time offset information
|
Print the current version of Gam with details and time offset information
|
||||||
```
|
```
|
||||||
gam version timeoffset
|
gam version timeoffset
|
||||||
GAM 7.13.02 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.14.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.5 64-bit final
|
Python 3.13.5 64-bit final
|
||||||
MacOS Sequoia 15.5 x86_64
|
MacOS Sequoia 15.5 x86_64
|
||||||
@@ -28,7 +28,7 @@ Your system time differs from www.googleapis.com by less than 1 second
|
|||||||
Print the current version of Gam with extended details and SSL information
|
Print the current version of Gam with extended details and SSL information
|
||||||
```
|
```
|
||||||
gam version extended
|
gam version extended
|
||||||
GAM 7.13.02 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.14.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.5 64-bit final
|
Python 3.13.5 64-bit final
|
||||||
MacOS Sequoia 15.5 x86_64
|
MacOS Sequoia 15.5 x86_64
|
||||||
@@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64
|
|||||||
Path: /Users/Admin/bin/gam7
|
Path: /Users/Admin/bin/gam7
|
||||||
Version Check:
|
Version Check:
|
||||||
Current: 5.35.08
|
Current: 5.35.08
|
||||||
Latest: 7.13.02
|
Latest: 7.14.03
|
||||||
echo $?
|
echo $?
|
||||||
1
|
1
|
||||||
```
|
```
|
||||||
@@ -73,7 +73,7 @@ echo $?
|
|||||||
Print the current version number without details
|
Print the current version number without details
|
||||||
```
|
```
|
||||||
gam version simple
|
gam version simple
|
||||||
7.13.02
|
7.14.03
|
||||||
```
|
```
|
||||||
In Linux/MacOS you can do:
|
In Linux/MacOS you can do:
|
||||||
```
|
```
|
||||||
@@ -83,7 +83,7 @@ echo $VER
|
|||||||
Print the current version of Gam and address of this Wiki
|
Print the current version of Gam and address of this Wiki
|
||||||
```
|
```
|
||||||
gam help
|
gam help
|
||||||
GAM 7.13.02 - https://github.com/GAM-team/GAM
|
GAM 7.14.03 - https://github.com/GAM-team/GAM
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.5 64-bit final
|
Python 3.13.5 64-bit final
|
||||||
MacOS Sequoia 15.5 x86_64
|
MacOS Sequoia 15.5 x86_64
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ Client Access
|
|||||||
* [Domain Shared Contacts](Domain-SharedContacts)
|
* [Domain Shared Contacts](Domain-SharedContacts)
|
||||||
* [Email Audit Monitor](Email-Audit-Monitor)
|
* [Email Audit Monitor](Email-Audit-Monitor)
|
||||||
* [Find File Owner](Find-File-Owner)
|
* [Find File Owner](Find-File-Owner)
|
||||||
|
* [Global Address List](Global-Address-List)
|
||||||
* [Google Data Transfers](Google-Data-Transfers)
|
* [Google Data Transfers](Google-Data-Transfers)
|
||||||
* [Groups](Groups)
|
* [Groups](Groups)
|
||||||
* [Groups - Membership](Groups-Membership)
|
* [Groups - Membership](Groups-Membership)
|
||||||
@@ -170,6 +171,7 @@ Service Account Access
|
|||||||
* [Users - Profile Photo](Users-Profile-Photo)
|
* [Users - Profile Photo](Users-Profile-Photo)
|
||||||
* [Users - Shared Drives](Users-Shared-Drives)
|
* [Users - Shared Drives](Users-Shared-Drives)
|
||||||
* [Users - Spreadsheets](Users-Spreadsheets)
|
* [Users - Spreadsheets](Users-Spreadsheets)
|
||||||
|
* [Users - Tag Manager](Users-Tag-Manager)
|
||||||
* [Users - Tasks](Users-Tasks)
|
* [Users - Tasks](Users-Tasks)
|
||||||
* [Users - YouTube](Users-YouTube)
|
* [Users - YouTube](Users-YouTube)
|
||||||
|
|
||||||
|
|||||||
@@ -994,6 +994,7 @@ gam update project
|
|||||||
gam oauth create
|
gam oauth create
|
||||||
gam info domain
|
gam info domain
|
||||||
gam config customer_id <CustomerID> save
|
gam config customer_id <CustomerID> save
|
||||||
|
gam user user@xxx.com update serviceaccount
|
||||||
```
|
```
|
||||||
|
|
||||||
### New clients
|
### New clients
|
||||||
@@ -1015,7 +1016,7 @@ gam create project
|
|||||||
gam oauth create
|
gam oauth create
|
||||||
gam info domain
|
gam info domain
|
||||||
gam config customer_id <CustomerID> save
|
gam config customer_id <CustomerID> save
|
||||||
gam user user@foo.com check serviceaccount
|
gam user user@foo.com update serviceaccount
|
||||||
```
|
```
|
||||||
|
|
||||||
To get information about a client, select a section.
|
To get information about a client, select a section.
|
||||||
|
|||||||
Reference in New Issue
Block a user