AM - Google Workspace > Calendar - Delete all calendar resources in a building

125 views
Skip to first unread message

Declan Moon

unread,
Oct 30, 2023, 8:47:44 PM10/30/23
to GAM for Google Workspace
Hey all,

Looking to remove some old buildings and their associated calendars. I'm aware of the command to delete a building, but is there a way I can delete all calendar resources located under that building? I presume deleting the building would just move it's associated calendars to an empty/unassigned space.

Thankyou!

Jorge de los santos cabrera.

unread,
Nov 7, 2023, 9:51:38 AM11/7/23
to google-ap...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/04cdb31d-f456-4a73-aac1bb8187d797cbn%40googlegroups.com

Ross Scroggs

unread,
Nov 7, 2023, 9:23:25 PM11/7/23
to google-ap...@googlegroups.com
Calendar resources reference buildings; you can't delete a building if a resource calendar references it.
You'll have to list all of the resource calendars that reference the building, delete them and then delete the building.

$ gam redirect csv ./BuildingResources.csv print resources query "buildingId=test" allfields
Getting all Resource Calendars, may take some time on a large Google Workspace Account...
Got 1 Resource Calendar: Test Resource XXX - Test Resource XXX

$ more BuildingResources.csv
resourceId,resourceName,resourceEmail,resourceDescription,resourceType,buildingId,buildingName,capacity,featureInstances,floorName,floorSection,generatedResourceName,resourceCategory,userVisibleDescription
test,Test Resource XXX,c_18821kqq0bgqi...@resource.calendar.google.com,,,id:test,Test,,,,,Test-Test Resource XXX,CATEGORY_UNKNOWN,

$ gam redirect stdout ./DeleteBuildingResources.txt multiprocess redirect stderr stdout csv BuildingResources.csv gam delete resource "~resourceId"
2023-11-07T18:19:15.385-08:00,0/1,Using 1 process...
2023-11-07T18:19:15.385-08:00,0,Processing item 1/1
2023-11-07T18:19:16.474-08:00,0/1,Processing complete

$ more DeleteBuildingResources.txt
Resource Calendar: test, Deleted

$ gam delete building test
Building ID: test, Deleted

Ross
----
Ross Scroggs



To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CABWQkm991V%2B7OFe6A8bno05MNK_yMPT4UVo2ANuH%3DC2rKyHEnw%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages