Skip to content

Commit

Permalink
Added option security to gam create cigroup
Browse files Browse the repository at this point in the history
  • Loading branch information
taers232c committed Feb 4, 2025
1 parent 05333d9 commit a42eebd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
9 changes: 6 additions & 3 deletions src/GamCommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3927,8 +3927,11 @@ gam print group-members [todrive <ToDriveAttribute>*]
updatetime
<CIGroupFieldNameList> ::= "<CIGroupFieldName>(,<CIGroupFieldName>)*"

gam create cigroup <EmailAddress> [copyfrom <GroupItem>] <GroupAttribute>*
[makeowner] [alias|aliases <CIGroupAliasList>] [dynamic <QueryDynamicGroup>]
gam create cigroup <EmailAddress>
[copyfrom <GroupItem>] <GroupAttribute>*
[makeowner] [alias|aliases <CIGroupAliasList>]
[security|makesecuritygroup]
[dynamic <QueryDynamicGroup>]
gam update cigroup <GroupEntity> [copyfrom <GroupItem>] <GroupAttribute>
[security|makesecuritygroup|
dynamicsecurity|makedynamicsecuritygroup|
Expand Down Expand Up @@ -4515,7 +4518,7 @@ gam report users|user [todrive <ToDriveAttribute>*]
(country|countrycode <String>)

gam create|add resoldcustomer <CustomerDomain> (customer_auth_token <String>) <ResoldCustomerAttribute>+
gam update resoldcustomer <CustomerID> [customer_auth_token <String>] <ResoldCustomerAttribues>+
gam update resoldcustomer <CustomerID> <ResoldCustomerAttribues>+
gam info resoldcustomer <CustomerID> [formatjson]

gam create|add resoldsubscription <CustomerID> (sku <SKUID>)
Expand Down
7 changes: 7 additions & 0 deletions src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
7.03.04

Added option `security` to `gam create cigroup` that allows creation of a security group
in a single command.

Updated to Python 3.13.2 where possible.

7.03.03

Fixed bug in `gam update resoldcustomer` that caused the following error:
Expand Down
15 changes: 9 additions & 6 deletions src/gam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""

__author__ = 'GAM Team <[email protected]>'
__version__ = '7.03.03'
__version__ = '7.03.04'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'

#pylint: disable=wrong-import-position
Expand Down Expand Up @@ -15106,7 +15106,7 @@ def doCreateResoldCustomer():
except (GAPI.badRequest, GAPI.resourceNotFound, GAPI.forbidden, GAPI.invalid) as e:
entityActionFailedWarning([Ent.CUSTOMER_DOMAIN, body['customerDomain']], str(e))

# gam update resoldcustomer <CustomerID> [customer_auth_token <String>] <ResoldCustomerAttribute>+
# gam update resoldcustomer <CustomerID> <ResoldCustomerAttribute>+
def doUpdateResoldCustomer():
res = buildGAPIObject(API.RESELLER)
customerId = getString(Cmd.OB_CUSTOMER_ID)
Expand All @@ -15133,6 +15133,7 @@ def doInfoResoldCustomer():
customerId=customerId)
if not FJQC.formatJSON:
printKeyValueList(['Customer ID', customerInfo['customerId']])
printKeyValueList(['Customer Type', customerInfo['customerType']])
printKeyValueList(['Customer Domain', customerInfo['customerDomain']])
if 'customerDomainVerified' in customerInfo:
printKeyValueList(['Customer Domain Verified', customerInfo['customerDomainVerified']])
Expand Down Expand Up @@ -31731,7 +31732,7 @@ def doCreateGroup(ciGroupsAPI=False):
'query': getString(Cmd.OB_QUERY)})
elif ciGroupsAPI and myarg == 'makeowner':
initialGroupConfig = 'WITH_INITIAL_OWNER'
elif ciGroupsAPI and myarg == 'security':
elif ciGroupsAPI and myarg in {'security', 'makesecuritygroup'}:
body['labels'][CIGROUP_SECURITY_LABEL] = ''
elif myarg == 'verifynotinvitable':
verifyNotInvitable = True
Expand Down Expand Up @@ -34609,9 +34610,11 @@ def doPrintShowGroupTree():
if csvPF:
csvPF.writeCSVfile('Group Tree')

# gam create cigroup <EmailAddress> [copyfrom <GroupItem>] <GroupAttribute>
# [makeowner] [alias|aliases <CIGroupAliasList>] [dynamic <QueryDynamicGroup>]
# [security]
# gam create cigroup <EmailAddress>
# [copyfrom <GroupItem>] <GroupAttribute>
# [makeowner] [alias|aliases <CIGroupAliasList>]
# [security|makesecuritygroup]
# [dynamic <QueryDynamicGroup>]
def doCreateCIGroup():
doCreateGroup(ciGroupsAPI=True)

Expand Down

0 comments on commit a42eebd

Please sign in to comment.