mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-08 21:53:36 +00:00
Some checks failed
Build and test GAM / build (Win64, build, 7, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 2, linux-aarch64, [self-hosted linux arm64]) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, [self-hosted linux arm64], yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 3, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 8, ubuntu-24.04, 3.13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 9, ubuntu-24.04, 3.9) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
50 lines
3.2 KiB
Markdown
50 lines
3.2 KiB
Markdown
!# List
|
|
|
|
The list command is used to verify collections of objects.
|
|
|
|
## Commands
|
|
```
|
|
gam list [todrive <ToDriveAttribute>*] <EntityList> [data <CrOSTypeEntity>|<UserTypeEntity> [delimiter <Character>]]
|
|
gam <CrOSTypeEntity>|<UserTypeEntity> list [todrive <ToDriveAttribute>*] [data <EntityList> [delimiter <Character>]]
|
|
```
|
|
|
|
Allow mapping of keyfield value in csvkmd selectors.
|
|
<CSVkmdSelector> ::= csvkmd <FileName> [charset <Charset>]
|
|
keyfield <FieldName> [keypattern <RegularExpression>] [keyvalue <String>] [delimiter <String>]
|
|
(matchfield <FieldName> <RegularExpression>)*
|
|
[datafield <FieldName>(:<FieldName)* [delimiter <String>]]
|
|
|
|
You want to update the membership of a collection of parent groups at your school, the data is coming from a database in a fixed format.
|
|
Example 1, CSV File GroupP1P2.csv, exactly the data you want, keypattern and keyvalue are not required
|
|
Group,P1Email,P2Email
|
|
2017-parents@domain.com,g1member11@domain.com,g1member12@domain.com
|
|
2017-parents@domain.com,g1member21@domain.com,g1member22@domain.com
|
|
2018-parents@domain.com,g2member11@domain.com,g2member11@domain.com
|
|
2018-parents@domain.com,g2member21@domain.com,g2member22@domain.com
|
|
...
|
|
For each row, the value from the Group column is used as the group name.
|
|
Verify data selection: gam list csvkmd GroupP1P2.csv keyfield Group datafield P1Email:P2Email data csvdata P1Email:P2Email
|
|
Execute: gam update groups csvkmd GroupP1P2.csv keyfield Group datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|
|
|
|
Example 2, CSV File GradYearP1P2.csv, you have to convert GradYear to group name GradYear-parents@domain.com, keyvalue is required
|
|
GradYear,P1Email,P2Email
|
|
2017,g1member11@domain.com,g1member12@domain.com
|
|
2017,g1member21@domain.com,g1member22@domain.com
|
|
2018,g2member11@domain.com,g2member11@domain.com
|
|
2018,g2member21@domain.com,g2member22@domain.com
|
|
...
|
|
For each row, the value from the GradYear column replaces the keyField name in the keyvalue argument and that value is used as the group name.
|
|
Verify data selection: gam list csvkmd GradYearP1P2.csv keyfield GradYear keyvalue GradYear-parents@domain.com datafield P1Email:P2Email data csvdata P1Email:P2Email
|
|
Execute: gam update groups csvkmd GradYearP1P2.csv keyfield GradYear keyvalue GradYear-parents@domain.com datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|
|
|
|
Example 3, CSV File GradYearP1P2.csv, you have to convert GradYear to group name 'LastTwoDigitsOfGradYear-parents@domain.com', keypattern and keyvalue are required.
|
|
GradYear,P1Email,P2Email
|
|
2017,g1member11@domain.com,g1member12@domain.com
|
|
2017,g1member21@domain.com,g1member22@domain.com
|
|
2018,g2member11@domain.com,g2member11@domain.com
|
|
2018,g2member21@domain.com,g2member22@domain.com
|
|
...
|
|
For each row, the value from the GradYear column is matched against the keypattern, the matched segments are substituted into the keyvalue argument and that value is used as the group name.
|
|
Verify data selection: gam list csvkmd GradYearP1P2.csv keyfield GradYear keypattern '20(..)' keyvalue '\1-parents@domain.com' datafield P1Email:P2Email data csvdata P1Email:P2Email
|
|
Execute: gam update groups csvkmd GradYearP1P2.csv keyfield GradYear keypattern '20(..)' keyvalue '\1-parents@domain.com' datafield P1Email:P2Email sync member csvdata P1Email:P2Email
|