The command watches an entire Drive rather than the claimed file or folder and sends resource data to Pub/Sub
Source references: 2The description claims a subscription on a Drive file or folder, but the actual `targetResource` is `drives/DRIVE_ID`. In addition, `includeResource: true` places resource data in events sent to the specified Pub/Sub topic.
A user expecting one-file or one-folder monitoring may collect update information across a broader Drive scope. If the topic is mistyped, third-party-controlled, or broadly accessible, unintended recipients may receive that event data.
The description promises a file-or-folder watch, but the command targets `//drive.googleapis.com/drives/DRIVE_ID`, potentially covering updates at Drive scope rather than one item. With `includeResource` enabled, resource data is included in notifications sent to the supplied Pub/Sub topic; a wrong Drive ID or topic could broaden disclosure. Users can ask the author to document the supported resource granularity and restrict use to a verified Drive, Cloud project, and topic.
Subscribe to change notifications on a Google Drive file or folder.Show 1 other places
1. Create subscription: `gws events subscriptions create --json '{"targetResource": "//drive.googleapis.com/drives/DRIVE_ID", "eventTypes": ["google.workspace.drive.file.v1.updated"], "notificationEndpoint": {"pubsubTopic": "projects/PROJECT/topics/TOPIC"}, "payloadOptions": {"includeResource": true}}'`2. List active subscriptions: `gws events subscriptions list`