Skip to content

Commit 2330c0c

Browse files
Merge pull request #270668 from NathanJBennett/main
Add RouterUpdatedEvent to subscribe to events page.
2 parents dad1deb + 2a39657 commit 2330c0c

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

articles/communication-services/how-tos/router-sdk/subscribe-events.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ dotnet run
134134
| [`RouterWorkerOfferRevoked`](#microsoftcommunicationrouterworkerofferrevoked) | `Worker` | An offer to a worker was revoked |
135135
| [`RouterWorkerOfferExpired`](#microsoftcommunicationrouterworkerofferexpired) | `Worker` | An offer to a worker has expired |
136136
| [`RouterWorkerRegistered`](#microsoftcommunicationrouterworkerregistered) | `Worker` | A worker has been registered (status changed from inactive/draining to active) |
137+
| [`RouterWorkerUpdated`](#microsoftcommunicationrouterworkerupdated) | `Worker` | One of the following worker properties has been updated: `AvailableForOffers`, `TotalCapacity`, `QueueAssignments`, `ChannelConfigurations`, `Labels`, `Tags` |
137138
| [`RouterWorkerDeregistered`](#microsoftcommunicationrouterworkerderegistered) | `Worker` | A worker has been deregistered (status changed from active to inactive/draining) |
138139

139140
### Microsoft.Communication.RouterJobReceived
@@ -1080,6 +1081,74 @@ dotnet run
10801081
| channelConfigurations| `List<ChannelConfiguration>` ||
10811082
| tags | `Dictionary<string, object>` | ✔️ | | Based on user input
10821083

1084+
### Microsoft.Communication.RouterWorkerUpdated
1085+
1086+
[Back to Event Catalog](#events-catalog)
1087+
1088+
```json
1089+
{
1090+
"id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
1091+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
1092+
"subject": "worker/{worker-id}",
1093+
"data": {
1094+
"workerId": "worker3",
1095+
"availableForOffers": true,
1096+
"totalCapacity": 100,
1097+
"queueAssignments": [
1098+
{
1099+
"id": "MyQueueId2",
1100+
"name": "Queue 3",
1101+
"labels": {
1102+
"Language": "en",
1103+
"Product": "Office",
1104+
"Geo": "NA"
1105+
}
1106+
}
1107+
],
1108+
"labels": {
1109+
"x": "111",
1110+
"y": "111"
1111+
},
1112+
"channelConfigurations": [
1113+
{
1114+
"channelId": "FooVoiceChannelId",
1115+
"capacityCostPerJob": 10,
1116+
"maxNumberOfJobs": 5
1117+
}
1118+
],
1119+
"tags": {
1120+
"Locale": "en-us",
1121+
"Segment": "Enterprise",
1122+
"Token": "FooToken"
1123+
},
1124+
"updatedWorkerProperties": [
1125+
"TotalCapacity",
1126+
"Labels",
1127+
"Tags",
1128+
"ChannelConfigurations",
1129+
"AvailableForOffers",
1130+
"QueueAssignments"
1131+
]
1132+
},
1133+
"eventType": "Microsoft.Communication.RouterWorkerUpdated",
1134+
"dataVersion": "1.0",
1135+
"metadataVersion": "1",
1136+
"eventTime": "2022-02-17T00:55:25.1736293Z"
1137+
}
1138+
```
1139+
1140+
#### Attribute list
1141+
1142+
| Attribute | Type | Nullable | Description | Notes |
1143+
|:--------- |:-----:|:-------:|-------------|-------|
1144+
| workerId | `string` ||
1145+
| totalCapacity | `int` ||
1146+
| queueAssignments | `List<QueueDetails>` ||
1147+
| labels | `Dictionary<string, object>` | ✔️ | | Based on user input
1148+
| channelConfigurations| `List<ChannelConfiguration>` ||
1149+
| tags | `Dictionary<string, object>` | ✔️ | | Based on user input
1150+
| updatedWorkerProperties | `List<UpdateWorkerProperty>` | ❌ | Worker Properties updated including AvailableForOffers, QueueAssignments, ChannelConfigurations, TotalCapacity, Labels, and Tags
1151+
10831152
### Microsoft.Communication.RouterWorkerDeregistered
10841153

10851154
[Back to Event Catalog](#events-catalog)
@@ -1142,6 +1211,20 @@ public class ChannelConfiguration
11421211
}
11431212
```
11441213

1214+
### UpdatedWorkerProperty
1215+
1216+
```csharp
1217+
public enum UpdatedWorkerProperty
1218+
{
1219+
AvailableForOffers,
1220+
Capacity,
1221+
QueueAssignments,
1222+
Labels,
1223+
Tags,
1224+
ChannelConfigurations
1225+
}
1226+
```
1227+
11451228
### WorkerSelector
11461229

11471230
```csharp

0 commit comments

Comments
 (0)