You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Start/Stop VM during off-hours, version 1 is going to retire soon by CY23 and is unavailable in the marketplace now. We recommend that you start using [version 2](/articles/azure-functions/start-stop-vms/overview.md), which is now generally available. The new version offers all existing capabilities and provides new features, such as multi-subscription support from a single Start/Stop instance. If you have the version 1 solution already deployed, you can still use the feature, and we will provide support until retirement in CY23. The details on announcement will be shared soon.
14
+
> Start/Stop VM during off-hours, version 1 is going to retire soon by CY23 and is unavailable in the marketplace now. We recommend that you start using [version 2](https://learn.microsoft.com/azure/azure-functions/start-stop-vms/overview), which is now generally available. The new version offers all existing capabilities and provides new features, such as multi-subscription support from a single Start/Stop instance. If you have the version 1 solution already deployed, you can still use the feature, and we will provide support until retirement in CY23. The details on announcement will be shared soon.
15
15
16
16
The Start/Stop VMs during off-hours feature start or stops enabled Azure VMs. It starts or stops machines on user-defined schedules, provides insights through Azure Monitor logs, and sends optional emails by using [action groups](../azure-monitor/alerts/action-groups.md). The feature can be enabled on both Azure Resource Manager and classic VMs for most scenarios.
@@ -38,13 +40,9 @@ public static SignalRConnectionInfo Negotiate(
38
40
39
41
# [Isolated process](#tab/isolated-process)
40
42
41
-
The following example shows a SignalR trigger that reads a message string from one hub using a SignalR trigger and writes it to a second hub using an output binding. The data required to connect to the output binding is obtained as a `MyConnectionInfo` object from an input binding defined using a `SignalRConnectionInfo` attribute.
43
+
The following example shows a SignalR trigger that reads a message string from one hub using a SignalR trigger and writes it to a second hub using an output binding. The data required to connect to the output binding is obtained as a `MyConnectionInfo` object from an input binding defined using a `SignalRConnectionInfo` attribute.
@@ -77,8 +75,8 @@ public static SignalRConnectionInfo Run(HttpRequest req, SignalRConnectionInfo c
77
75
```
78
76
79
77
---
80
-
::: zone-end
81
-
::: zone pivot="programming-language-javascript,programming-language-python,programming-language-powershell"
78
+
::: zone-end
79
+
::: zone pivot="programming-language-javascript,programming-language-python,programming-language-powershell"
82
80
83
81
The following example shows a SignalR connection info input binding in a *function.json* file and a function that uses the binding to return the connection information.
The following example shows a SignalR connection info input binding in a *function.json* file and a [Python function](functions-reference-python.md) that uses the binding to return the connection information.
The following example shows a [Java function](functions-reference-java.md) that acquires SignalR connection information using the input binding and returns it over HTTP.
@@ -146,7 +144,7 @@ public SignalRConnectionInfo negotiate(
146
144
}
147
145
```
148
146
149
-
:::zone-end
147
+
:::zone-end
150
148
151
149
## Usage
152
150
@@ -165,7 +163,7 @@ You can set the `UserId` property of the binding to the value from either header
// The serialization of the connection info object is done by the framework. It should be camel case. The SignalR client respects the camel case response only.
184
+
returnconnectionInfo;
185
+
}
186
+
```
181
187
182
188
# [C# Script](#tab/csharp-script)
183
189
@@ -214,10 +220,21 @@ public static SignalRConnectionInfo Run(HttpRequest req, SignalRConnectionInfo c
214
220
::: zone-end
215
221
216
222
::: zone pivot="programming-language-java"
217
-
SignalR trigger isn't currently supported for Java.
218
-
::: zone-end
219
-
220
-
::: zone pivot="programming-language-javascript,programming-language-python,programming-language-powershell"
::: zone pivot="programming-language-javascript,programming-language-python,programming-language-powershell"
221
238
222
239
You can set the `userId` property of the binding to the value from either header using a [binding expression](./functions-bindings-expressions-patterns.md): `{headers.x-ms-client-principal-id}` or `{headers.x-ms-client-principal-name}`.
223
240
@@ -235,7 +252,7 @@ Here's binding data in the *function.json* file:
You can set the `userId` property of the binding to the value from either header using a [binding expression](./functions-bindings-expressions-patterns.md): `{headers.x-ms-client-principal-id}` or `{headers.x-ms-client-principal-name}`.
@@ -330,9 +347,9 @@ The following table explains the binding configuration properties that you set i
330
347
331
348
---
332
349
333
-
::: zone-end
334
-
::: zone pivot="programming-language-java"
335
-
350
+
::: zone-end
351
+
::: zone pivot="programming-language-java"
352
+
336
353
## Annotations
337
354
338
355
The following table explains the supported settings for the `SignalRConnectionInfoInput` annotation.
@@ -344,8 +361,8 @@ The following table explains the supported settings for the `SignalRConnectionIn
344
361
|**userId**| Optional: The value of the user identifier claim to be set in the access key token. |
345
362
|**connectionStringSetting**| The name of the app setting that contains the SignalR Service connection string, which defaults to `AzureSignalRConnectionString`. |
346
363
347
-
::: zone-end
348
-
::: zone pivot="programming-language-javascript,programming-language-powershell,programming-language-python"
364
+
::: zone-end
365
+
::: zone pivot="programming-language-javascript,programming-language-powershell,programming-language-python"
349
366
## Configuration
350
367
351
368
The following table explains the binding configuration properties that you set in the *function.json* file.
@@ -364,4 +381,4 @@ The following table explains the binding configuration properties that you set i
364
381
## Next steps
365
382
366
383
-[Handle messages from SignalR Service (Trigger binding)](./functions-bindings-signalr-service-trigger.md)
367
-
-[Send SignalR Service messages (Output binding)](./functions-bindings-signalr-service-output.md)
384
+
-[Send SignalR Service messages (Output binding)](./functions-bindings-signalr-service-output.md)
The following example shows a function that sends a message using the output binding to all connected clients. The *newMessage* is the name of the method to be invoked on each client.
The following example shows a SignalR trigger that reads a message string from one hub using a SignalR trigger and writes it to a second hub using an output binding. The data required to connect to the output binding is obtained as a `MyConnectionInfo` object from an input binding defined using a `SignalRConnectionInfo` attribute.
74
+
The following sample shows a C# function that receives a message event from clients and logs the message content.
context.log(`Receive ${context.bindingData.message} from ${invocation.ConnectionId}.`)
148
145
};
149
146
```
150
-
::: zone-end
151
-
::: zone pivot="programming-language-powershell"
152
-
147
+
::: zone-end
148
+
::: zone pivot="programming-language-powershell"
149
+
153
150
Complete PowerShell examples are pending.
154
-
::: zone-end
155
-
::: zone pivot="programming-language-python"
151
+
::: zone-end
152
+
::: zone pivot="programming-language-python"
156
153
157
154
Here's the Python code:
158
155
@@ -165,8 +162,8 @@ def main(invocation) -> None:
165
162
invocation_json = json.loads(invocation)
166
163
logging.info("Receive {0} from {1}".format(invocation_json['Arguments'][0], invocation_json['ConnectionId']))
167
164
```
168
-
::: zone-end
169
-
165
+
::: zone-end
166
+
170
167
::: zone pivot="programming-language-csharp"
171
168
172
169
## Attributes
@@ -201,7 +198,7 @@ The following table explains the properties of the `SignalRTrigger` attribute.
201
198
202
199
C# script uses a function.json file for configuration instead of attributes.
203
200
204
-
The following table explains the binding configuration properties for C# script that you set in the *function.json* file.
201
+
The following table explains the binding configuration properties for C# script that you set in the *function.json* file.
205
202
206
203
|function.json property |Description|
207
204
|---------|-----------------------|
@@ -216,15 +213,15 @@ The following table explains the binding configuration properties for C# script
216
213
217
214
---
218
215
219
-
::: zone-end
220
-
::: zone pivot="programming-language-java"
221
-
216
+
::: zone-end
217
+
::: zone pivot="programming-language-java"
218
+
222
219
## Annotations
223
220
224
-
There isn't currently a supported Java annotation for a SignalR trigger.
225
-
::: zone-end
226
-
::: zone pivot="programming-language-javascript,programming-language-powershell,programming-language-python"
227
-
221
+
There isn't currently a supported Java annotation for a SignalR trigger.
222
+
::: zone-end
223
+
::: zone pivot="programming-language-javascript,programming-language-powershell,programming-language-python"
224
+
228
225
## Configuration
229
226
230
227
The following table explains the binding configuration properties that you set in the *function.json* file.
@@ -240,11 +237,11 @@ The following table explains the binding configuration properties that you set i
240
237
|**parameterNames**| (Optional) A list of names that binds to the parameters. |
241
238
|**connectionStringSetting**| The name of the app setting that contains the SignalR Service connection string, which defaults to `AzureSignalRConnectionString`. |
242
239
243
-
::: zone-end
240
+
::: zone-end
244
241
245
242
See the [Example section](#example) for complete examples.
246
243
247
-
## Usage
244
+
## Usage
248
245
249
246
### Payloads
250
247
@@ -277,7 +274,7 @@ Say you have a JavaScript SignalR client trying to invoke method `broadcast` in
0 commit comments