I'm trying to cut a BASH script that uses GAM to change Link Sharing permissions on all items on a single user from "Anyone at <Domain> with link" to "Off". By playing with the API and GAM, I think the boolean value I need to change is "allowFileDiscovery" and that'll move to <False>. I can't address these files manually because they literally have thousands upon thousands of them, It would take me days even addressing them in groups of 50 (the limit from the site UI) so scripting the action is the only realistic approach I have.
Here's my command. I'm getting a 404 "Share Drive Not Found", so I think I'm mistakenly targeting a TeamDrive or something. This is the first time I've tried to use GAM, so forgive me if I'm making obvious mistakes.
gam add drivefileacl <testfileID> domain ka...@domain.com role writer discoverable false
Have I been looking at the wrong part of the commands doc or am I misunders?
Thanks in advance