File tree Expand file tree Collapse file tree 6 files changed +97
-0
lines changed
articles/azure-web-pubsub/LocalFunctionProj/LocalFunctionProj Expand file tree Collapse file tree 6 files changed +97
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "recommendations" : [
3
+ " ms-azuretools.vscode-azurefunctions"
4
+ ]
5
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "bindings" : [
3
+ {
4
+ "authLevel" : " Anonymous" ,
5
+ "type" : " httpTrigger" ,
6
+ "direction" : " in" ,
7
+ "name" : " Request" ,
8
+ "methods" : [
9
+ " get" ,
10
+ " post"
11
+ ]
12
+ },
13
+ {
14
+ "type" : " http" ,
15
+ "direction" : " out" ,
16
+ "name" : " Response"
17
+ }
18
+ ]
19
+ }
Original file line number Diff line number Diff line change
1
+ using namespace System.Net
2
+
3
+ # Input bindings are passed in via param block.
4
+ param ($Request , $TriggerMetadata )
5
+
6
+ # Write to the Azure Functions log stream.
7
+ Write-Host " PowerShell HTTP trigger function processed a request."
8
+
9
+ # Interact with query parameters or the body of the request.
10
+ $name = $Request.Query.Name
11
+ if (-not $name ) {
12
+ $name = $Request.Body.Name
13
+ }
14
+
15
+ $body = " This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
16
+
17
+ if ($name ) {
18
+ $body = " Hello, $name . This HTTP triggered function executed successfully."
19
+ }
20
+
21
+ # Associate values to output bindings by calling 'Push-OutputBinding'.
22
+ Push-OutputBinding - Name Response - Value ([HttpResponseContext ]@ {
23
+ StatusCode = [HttpStatusCode ]::OK
24
+ Body = $body
25
+ })
Original file line number Diff line number Diff line change
1
+ {
2
+ "version" : " 2.0" ,
3
+ "logging" : {
4
+ "applicationInsights" : {
5
+ "samplingSettings" : {
6
+ "isEnabled" : true ,
7
+ "excludedTypes" : " Request"
8
+ }
9
+ }
10
+ },
11
+ "managedDependency" : {
12
+ "enabled" : true
13
+ },
14
+ "extensionBundle" : {
15
+ "id" : " Microsoft.Azure.Functions.ExtensionBundle" ,
16
+ "version" : " [3.*, 4.0.0)"
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ # Azure Functions profile.ps1
2
+ #
3
+ # This profile.ps1 will get executed every "cold start" of your Function App.
4
+ # "cold start" occurs when:
5
+ #
6
+ # * A Function App starts up for the very first time
7
+ # * A Function App starts up after being de-allocated due to inactivity
8
+ #
9
+ # You can define helper functions, run commands, or specify environment variables
10
+ # NOTE: any variables defined that are not environment variables will get reset after the first execution
11
+
12
+ # Authenticate with Azure PowerShell using MSI.
13
+ # Remove this if you are not planning on using MSI or Azure PowerShell.
14
+ if ($env: MSI_SECRET ) {
15
+ Disable-AzContextAutosave - Scope Process | Out-Null
16
+ Connect-AzAccount - Identity
17
+ }
18
+
19
+ # Uncomment the next line to enable legacy AzureRm alias in Azure PowerShell.
20
+ # Enable-AzureRmAlias
21
+
22
+ # You can also define functions or aliases that can be referenced in any of your PowerShell functions.
Original file line number Diff line number Diff line change
1
+ # This file enables modules to be automatically managed by the Functions service.
2
+ # See https://aka.ms/functionsmanageddependency for additional information.
3
+ #
4
+ @ {
5
+ # For latest supported version, go to 'https://www.powershellgallery.com/packages/Az'.
6
+ # To use the Az module in your function app, please uncomment the line below.
7
+ # 'Az' = '9.*'
8
+ }
You can’t perform that action at this time.
0 commit comments