Skip to content

Commit e9a6024

Browse files
Merge pull request #223466 from MayankBargali-MSFT/patch-90
(AzureCXP) fixed sample for V2
2 parents 12999ec + e2e34fe commit e9a6024

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

articles/azure-functions/create-first-function-vs-code-python.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,17 @@ In this section, you use Visual Studio Code to create a local Azure Functions pr
9191
7. Replace the `app.route()` method call with the following code:
9292

9393
```python
94-
@app.route(route="hello", http_auth_level=func.AuthLevel.ANONYMOUS)
94+
@app.route(route="hello", auth_level=func.AuthLevel.ANONYMOUS)
9595
```
9696

9797
This code enables your HTTP function endpoint to be called in Azure without having to provide an [Authorization keys](functions-bindings-http-webhook-trigger.md#authorization-keys). Local execution doesn't require authorization keys.
9898

9999
Your function code should now look like the following example:
100100

101101
```python
102+
app = func.FunctionApp()
102103
@app.function_name(name="HttpTrigger1")
103-
@app.route(route="hello", http_auth_level=func.AuthLevel.ANONYMOUS)
104+
@app.route(route="hello", auth_level=func.AuthLevel.ANONYMOUS)
104105
def test_function(req: func.HttpRequest) -> func.HttpResponse:
105106
logging.info('Python HTTP trigger function processed a request.')
106107

0 commit comments

Comments
 (0)