Subscribe to EDS events by using EventBridge
WUYING Workspace supports delivering cloud desktop lifecycle events and file transfer approval events to EventBridge. By creating event subscription rules in EventBridge, you can push events to downstream targets such as Function Compute, message queues, and HTTP/HTTPS services in real time to implement automated O&M and business system integration. Compared with API polling, EventBridge proactive subscription offers millisecond-level delivery with zero polling overhead.
Architecture
The event source for WUYING Workspace is acs.gws. Events are delivered through the EventBridge default bus. Compared with API polling to check whether new events are generated, EventBridge proactive subscription offers the following advantages:
Higher timeliness: Downstream targets are triggered within milliseconds after an event is generated, without waiting for the polling interval.
Lower cost: No need to periodically call APIs to check whether events are generated, avoiding unnecessary request overhead.
Supported event types:
Event type | type identifier | Description |
File transfer approval event |
| Triggered when a user initiates a file upload or download |
Cloud desktop lifecycle event |
| Triggered when the lifecycle state of a cloud desktop changes, such as creation, start, stop, restart, or deletion |
Scenarios
EventBridge is the event hub of Alibaba Cloud. It connects cloud services and applications by using the standardized CloudEvents 1.0 protocol and provides unified event subscription and delivery capabilities. After WUYING Workspace is integrated with EventBridge, the following scenarios are supported:
Subscribe to cloud desktop lifecycle events to trigger DingTalk, SMS, or email notifications when a cloud desktop is created, started, stopped, or deleted.
Subscribe to file transfer approval events to push file upload or download actions to an approval system or security audit service in real time.
Push events to Function Compute to trigger automated O&M actions, such as auto scaling or exception alerting.
Deliver events to a message queue for asynchronous consumption by downstream business systems.
Step 1: Use the cloud service event bus
The cloud service event bus is the default bus that EventBridge automatically creates. Alibaba Cloud services deliver events to the default bus in real time. You can subscribe to events from various cloud services on this bus.
Before you begin, make sure that EventBridge is activated. If not, log on to the EventBridge console and follow the on-screen instructions to activate the service.
Log on to the EventBridge console. In the left-side navigation pane, click Event Buses.
In the top navigation bar, select the China (Shanghai) region.
NoteRegardless of which region your WUYING Workspace cloud desktops are deployed in, all WUYING Workspace events in EventBridge are uniformly routed through the China (Shanghai) region. This region is fixed and cannot be changed.
On the EventBridge page, click default.
Step 2: Create an event subscription rule
On the default page, click Event Rules in the left-side navigation pane, and then click Create Rule.
On the Create Rule panel, complete the following steps.
On the Configure Basic Info tab, enter the rule name in the Name field, enter the rule description in the Description field, and then click Next.
On the Configure Event Pattern tab, complete the following configurations, and then click Next.
From the Event Source drop-down list, select acs.gws.
From the Event Type drop-down list, select the event types to subscribe. You can select multiple event types:
gws:FileTransferEvent:TransferFileApprovalEvent(File transfer approval event)gws:DesktopControlEvent:DesktopLifeCycleEvent(Cloud desktop lifecycle event)
In the Event Pattern Debugging section, you can preview sample event messages. For field descriptions and examples, see Event message reference.
c. On the Configure Targets tab, select Service Type and configure the delivery target:
HTTP/HTTPS: Push events to a specified HTTP/HTTPS URL endpoint.
Function Compute: Push events to a specified Function Compute service and function to trigger automated actions. You must create the service and function in advance. For more information, see Manage services and Manage functions.
Message Service (MNS): Deliver events to an MNS queue, suitable for high-volume event scenarios. You must create the queue in advance. For more information, see Simple Message Queue (formerly MNS): Activation and permissions and Create a queue.
DingTalk: Push event notifications to a DingTalk chatbot.
d. After completing the target configuration, click Create.
Step 3: Trigger events
After creating the subscription rule, you can trigger events in the following ways to verify the rule configuration:
File transfer approval event: Automatically triggered when a user initiates a file upload or download operation.
Cloud desktop lifecycle event: Automatically triggered when you perform start, stop, restart, or other operations on a cloud desktop. For example, log on to the WUYING Workspace console and perform a stop or restart operation on the target cloud desktop.
Step 4: View delivery results
Go back to the default bus details page in the EventBridge console and click Event Tracing in the left-side navigation pane.
Query events by time range, event type, or event ID.
Click Event Tracing on the right side of the target event to view the event delivery trace, including the delivery target, status, number of attempts, and latency.
Event message reference
Events delivered by WUYING Workspace follow the CloudEvents 1.0 specification. An event message consists of common fields and business data fields (data).
Common fields
Field | Type | Description |
id | string | Unique event ID |
source | string | Event source. Fixed value: |
specversion | string | CloudEvents specification version. Fixed value: |
subject | string | Event subject. Format: |
time | string | Time when the event occurred (UTC) |
type | string | Event type identifier |
aliyunaccountid | string | Alibaba Cloud account ID |
aliyunpublishtime | string | Event publish time (UTC) |
aliyuneventbusname | string | Event bus name. Fixed value: |
aliyunregionid | string | Region of the event |
File transfer approval event
Event type: gws:FileTransferEvent:TransferFileApprovalEvent
Business data (data) field description:
Field | Type | Description |
regionId | string | Region where the cloud resource resides |
taskType | string | Task type. Valid values:
|
taskId | string | Task ID |
endUserId | string | Username of the user who initiated the transfer |
nickName | string | Nickname of the user who initiated the transfer |
productType | string | Cloud resource product type. Valid values:
|
resourceId | string | Cloud resource ID |
fileType | string | File type, typically the file extension |
fileName | string | File name |
sourcePath | string | Source path of the file |
targetPath | string | Target path for the transfer |
createTime | string | Time when the task was initiated. Example: 2026-07-14T14:04:34+08:00 |
extend | string | Extension field |
Sample event:
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.gws",
"specversion": "1.0",
"subject": "acs.gws:cn-hangzhou:123456789098****:215672",
"time": "2020-11-19T21:04:41+08:00",
"type": "gws:FileTransferEvent:TransferFileApprovalEvent",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"regionId": "cn-shanghai",
"taskType": "UPLOAD",
"taskId": "trt-a7nfbkifnak****",
"endUserId": "test-user-01",
"nickName": "User001",
"productType": "CloudDesktop",
"resourceId": "ecd-7vbpnowzwoakq****",
"fileType": "exe",
"fileName": "TestFolder",
"sourcePath": "C:\\Users\\test.exe",
"targetPath": "C:\\Users\\target\\test.exe",
"createTime": "2026-07-14T14:04:34+08:00",
"extend": "test"
}
}Cloud desktop lifecycle event
Event type: gws:DesktopControlEvent:DesktopLifeCycleEvent
Business data (data) field description:
Field | Type | Required | Description |
eventType | string | Yes | Event type. Valid values:
|
desktopId | string | Yes | Cloud desktop ID |
regionId | string | Yes | Region where the cloud desktop resides |
officeSiteId | string | Yes | Office network ID |
bizType | integer | Yes | Business type. Valid values:
|
createTime | long | Yes | Cloud desktop creation time, in milliseconds |
imageId | string | Yes | Image ID |
desktopType | string | Yes | Specification ID |
bundleId | string | No | Template ID |
agentProviderList | array\<string> | No | Pre-installed agent list. Valid values:
|
desktopScenario | string | No | Desktop scenario. Valid values:
|
jvsAgentId | string | No | JVS Agent ID. Valid only when the value of desktopScenario is JvsClaw, representing the Agent ID of Agentic Computer or Hermes Agent |
Sample event:
{
"datacontenttype": "application/json;charset=utf-8",
"aliyunaccountid": "190934003905****",
"data": {
"agentProviderList": [],
"bizType": 1,
"imageId": "desktopimage-windows-11-64-asp",
"createTime": 1784015260000,
"regionId": "cn-hangzhou",
"desktopScenario": "Classic",
"officeSiteId": "cn-hangzhou+dir-1912479448",
"desktopId": "ecd-6z8og19wjx42i****",
"eventType": "pending",
"desktopType": "eds.enterprise_office.6c12g"
},
"subject": "acs.gws:cn-hangzhou:1909340039053968:desktop:ecd-6z8og19wjx42i****",
"aliyunoriginalaccountid": "190934003905****",
"source": "acs.gws",
"type": "gws:DesktopControlEvent:DesktopLifeCycleEvent",
"aliyunpublishtime": "2026-07-14T07:47:42.833Z",
"specversion": "1.0",
"aliyuneventbusname": "default",
"id": "d586a06d-b04b-4cd3-9413-65c7227fe108",
"time": "2026-07-14T07:47:42.787Z",
"aliyunregionid": "cn-hangzhou"
}