From 3964cbf91118fa2c66b1485b81757c9411f7a5b4 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Mon, 17 May 2021 14:09:34 -0700 Subject: [PATCH] Add dynamic option to update cigroup (#1381) Update print|show teamdrive documentation --- src/GamCommands.txt | 5 +++-- src/gam/gapi/cloudidentity/groups.py | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 57a1347f..83817ea8 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -223,6 +223,7 @@ If an item contains spaces, it should be surrounded by ". ::= See: https://support.google.com/mail/answer/7190 ::= See: https://developers.google.com/admin-sdk/directory/v1/guides/search-groups ::= See: https://support.google.com/a/answer/7549103 + ::= See: https://developers.google.com/drive/api/v3/search-shareddrives ::= See: https://developers.google.com/admin-sdk/directory/v1/guides/search-users ::= See: https://developers.google.com/vault/reference/rest/v1/matters.holds#CorpusQuery ::= @@ -1691,8 +1692,8 @@ gam update teamdrive [asadmin] [name ] ( )* gam delete teamdrive gam show teamdriveinfo [asadmin] -gam show teamdrives [asadmin] -gam print teamdrives [todrive] [asadmin] +gam show teamdrives [query ] [asadmin] +gam print teamdrives [query ] [todrive] [asadmin] gam show teamdrivethemes gam vacation diff --git a/src/gam/gapi/cloudidentity/groups.py b/src/gam/gapi/cloudidentity/groups.py index 3f958704..93798383 100644 --- a/src/gam/gapi/cloudidentity/groups.py +++ b/src/gam/gapi/cloudidentity/groups.py @@ -44,7 +44,6 @@ def create(): body['additionalGroupKeys'].append({'id': alias}) i += 2 elif myarg in ['dynamic']: - # As of 2020/06/25 this doesn't work (yet?) body['dynamicGroupMetadata'] = { 'queries': [{ 'query': sys.argv[i + 1], @@ -823,6 +822,14 @@ def update(): 'cloudidentity.googleapis.com/groups.discussion_forum': '' } i += 1 + elif myarg in ['dynamic']: + body['dynamicGroupMetadata'] = { + 'queries': [{ + 'query': sys.argv[i + 1], + 'resourceType': 'USER' + }] + } + i += 2 else: controlflow.invalid_argument_exit(sys.argv[i], 'gam update cigroup')