events (v1)
PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.
CODEBLOCK0
Helper Commands
| Command | Description |
|---|
+subscribe | Subscribe to Workspace events and stream them as NDJSON |
+renew |
Renew/reactivate Workspace Events subscriptions |
API Resources
message
- stream — SendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state.
operations
- get — Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
subscriptions
- create — Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
- delete — Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
- get — Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
- list — Lists Google Workspace subscriptions. To learn how to use this method, see List Google Workspace subscriptions.
- patch — Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.
- reactivate — Reactivates a suspended Google Workspace subscription. This method resets your subscription's State field to ACTIVE. Before you use this method, you must fix the error that suspended the subscription. This method will ignore or reject any subscription that isn't currently in a suspended state. To learn how to use this method, see Reactivate a Google Workspace subscription.
tasks
- cancel — Cancel a task from the agent. If supported one should expect no more task updates for the task.
- get — Get the current state of a task from the agent.
- subscribe — TaskSubscription is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is complete the stream will return the completed task (like GetTask) and close the stream.
- pushNotificationConfigs — Operations on the 'pushNotificationConfigs' resource
Discovering Commands
Before calling any API method, inspect it:
CODEBLOCK1
Use gws schema output to build your --params and --json flags.
events (v1)
前置条件: 请阅读 ../gws-shared/SKILL.md 了解认证、全局标志和安全规则。如果该文件缺失,请运行 gws generate-skills 创建。
bash
gws events <资源> <方法> [标志]
辅助命令
续订/重新激活工作区事件订阅 |
API资源
message
- stream — SendStreamingMessage是一个流式调用,将返回任务更新事件的流,直到任务处于中断或终止状态。
operations
- get — 获取长时间运行操作的最新状态。客户端可以使用此方法按照API服务建议的时间间隔轮询操作结果。
subscriptions
- create — 创建Google Workspace订阅。要了解如何使用此方法,请参阅创建Google Workspace订阅。
- delete — 删除Google Workspace订阅。要了解如何使用此方法,请参阅删除Google Workspace订阅。
- get — 获取Google Workspace订阅的详细信息。要了解如何使用此方法,请参阅获取Google Workspace订阅详情。
- list — 列出Google Workspace订阅。要了解如何使用此方法,请参阅列出Google Workspace订阅。
- patch — 更新或续订Google Workspace订阅。要了解如何使用此方法,请参阅更新或续订Google Workspace订阅。
- reactivate — 重新激活已暂停的Google Workspace订阅。此方法会将订阅的State字段重置为ACTIVE。在使用此方法之前,您必须修复导致订阅暂停的错误。此方法将忽略或拒绝任何当前不处于暂停状态的订阅。要了解如何使用此方法,请参阅重新激活Google Workspace订阅。
tasks
- cancel — 取消来自代理的任务。如果支持,应预期不再收到该任务的更新。
- get — 从代理获取任务的当前状态。
- subscribe — TaskSubscription是一个流式调用,将返回任务更新事件的流。这将流附加到现有的正在处理的任务。如果任务已完成,流将返回已完成的任务(如GetTask)并关闭流。
- pushNotificationConfigs — 对pushNotificationConfigs资源的操作
发现命令
在调用任何API方法之前,请先检查它:
bash
浏览资源和方法
gws events --help
检查方法的必需参数、类型和默认值
gws schema events.<资源>.<方法>
使用gws schema的输出来构建您的--params和--json标志。