Skip to content

Commit 2fb7243

Browse files
committed
Update testing locally reference
1 parent 5c8f4eb commit 2fb7243

File tree

4 files changed

+24
-18
lines changed

4 files changed

+24
-18
lines changed

articles/azure-functions/functions-bindings-azure-sql-input.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace AzureSQLSamples
121121

122122
The following example shows a [C# function](functions-dotnet-class-library.md) that executes a stored procedure with input from the HTTP request query parameter.
123123

124-
The stored procedure `dbo.DeleteToDo` must be created on the SQL database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
124+
The stored procedure `dbo.DeleteToDo` must be created on the SQL database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
125125

126126
:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25":::
127127

@@ -237,7 +237,7 @@ namespace AzureSQLSamples
237237

238238
The following example shows a [C# function](functions-dotnet-class-library.md) that executes a stored procedure with input from the HTTP request query parameter.
239239

240-
The stored procedure `dbo.DeleteToDo` must be created on the SQL database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
240+
The stored procedure `dbo.DeleteToDo` must be created on the SQL database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
241241

242242
:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25":::
243243

@@ -356,7 +356,7 @@ public class GetToDoItem {
356356

357357
The following example shows a SQL input binding in a Java function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and executes a stored procedure with input from the HTTP request query parameter.
358358

359-
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
359+
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
360360

361361
:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25":::
362362

@@ -555,7 +555,7 @@ module.exports = async function (context, req, todoItem) {
555555

556556
The following example shows a SQL input binding that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and executes a stored procedure with input from the HTTP request query parameter.
557557

558-
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
558+
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
559559

560560
:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25":::
561561

@@ -746,7 +746,7 @@ Push-OutputBinding -Name res -Value ([HttpResponseContext]@{
746746

747747
The following example shows a SQL input binding in a function.json file and a PowerShell function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and executes a stored procedure with input from the HTTP request query parameter.
748748

749-
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
749+
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
750750

751751
:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25":::
752752

@@ -983,7 +983,7 @@ def main(req: func.HttpRequest, todoItem: func.SqlRowList) -> func.HttpResponse:
983983

984984
The following example shows a SQL input binding in a function.json file and a Python function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and executes a stored procedure with input from the HTTP request query parameter.
985985

986-
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
986+
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
987987

988988
:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25":::
989989

@@ -1107,7 +1107,7 @@ The following table explains the properties that you can set on the `options` ob
11071107
| Property | Description |
11081108
|---------|----------------------|
11091109
| **commandText** | Required. The Transact-SQL query command or name of the stored procedure executed by the binding. |
1110-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
1110+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
11111111
| **commandType** | Required. A [CommandType](/dotnet/api/system.data.commandtype) value, which is [Text](/dotnet/api/system.data.commandtype#fields) for a query and [StoredProcedure](/dotnet/api/system.data.commandtype#fields) for a stored procedure. |
11121112
| **parameters** | Optional. Zero or more parameter values passed to the command during execution as a single string. Must follow the format `@param1=param1,@param2=param2`. Neither the parameter name nor the parameter value can contain a comma (`,`) or an equals sign (`=`). |
11131113

@@ -1121,7 +1121,7 @@ The following table explains the binding configuration properties that you set i
11211121
|**direction** | Required. Must be set to `in`. |
11221122
|**name** | Required. The name of the variable that represents the query results in function code. |
11231123
| **commandText** | Required. The Transact-SQL query command or name of the stored procedure executed by the binding. |
1124-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
1124+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
11251125
| **commandType** | Required. A [CommandType](/dotnet/api/system.data.commandtype) value, which is [Text](/dotnet/api/system.data.commandtype#fields) for a query and [StoredProcedure](/dotnet/api/system.data.commandtype#fields) for a stored procedure. |
11261126
| **parameters** | Optional. Zero or more parameter values passed to the command during execution as a single string. Must follow the format `@param1=param1,@param2=param2`. Neither the parameter name nor the parameter value can contain a comma (`,`) or an equals sign (`=`). |
11271127

@@ -1139,7 +1139,7 @@ The following table explains the binding configuration properties that you set i
11391139
|**direction** | Required. Must be set to `in`. |
11401140
|**name** | Required. The name of the variable that represents the query results in function code. |
11411141
| **commandText** | Required. The Transact-SQL query command or name of the stored procedure executed by the binding. |
1142-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
1142+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
11431143
| **commandType** | Required. A [CommandType](/dotnet/api/system.data.commandtype) value, which is [Text](/dotnet/api/system.data.commandtype#fields) for a query and [StoredProcedure](/dotnet/api/system.data.commandtype#fields) for a stored procedure. |
11441144
| **parameters** | Optional. Zero or more parameter values passed to the command during execution as a single string. Must follow the format `@param1=param1,@param2=param2`. Neither the parameter name nor the parameter value can contain a comma (`,`) or an equals sign (`=`). |
11451145
::: zone-end
@@ -1155,11 +1155,11 @@ The binding definition includes the SQL command text, the command type, paramete
11551155

11561156
Queries executed by the input binding are [parameterized](/dotnet/api/microsoft.data.sqlclient.sqlparameter) in Microsoft.Data.SqlClient to reduce the risk of [SQL injection](/sql/relational-databases/security/sql-injection) from the parameter values passed into the binding.
11571157

1158-
If an exception occurs when a SQL input binding is executed then the function code won't execute. This may result in an error code being returned, such as an HTTP trigger returning a 500 error code.
1158+
If an exception occurs when a SQL input binding is executed then the function code won't execute. This may result in an error code being returned, such as an HTTP trigger returning a 500 error code.
11591159

11601160
## Next steps
11611161

11621162
- [Save data to a database (Output binding)](./functions-bindings-azure-sql-output.md)
11631163
- [Run a function when data is changed in a SQL table (Trigger)](./functions-bindings-azure-sql-trigger.md)
1164-
- [Run a function from a HTTP request (trigger)](./functions-bindings-http-webhook-trigger.md)
1164+
- [Run a function from an HTTP request (trigger)](./functions-bindings-http-webhook-trigger.md)
11651165
- [Review ToDo API sample with Azure SQL bindings](/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)

articles/azure-functions/functions-bindings-azure-sql-output.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static class OutputType
5959

6060
### HTTP trigger, write one record
6161

62-
The following example shows a [C# function](functions-dotnet-class-library.md) that adds a record to a database, using data provided in an HTTP POST request as a JSON body. The return object is the `OutputType` class we created to handle both an HTTP response and the SQL output binding.
62+
The following example shows a [C# function](functions-dotnet-class-library.md) that adds a record to a database, using data provided in an HTTP POST request as a JSON body. The return object is the `OutputType` class we created to handle both an HTTP response and the SQL output binding.
6363

6464
```cs
6565
using System;
@@ -378,7 +378,7 @@ public class ToDoItem {
378378
<a id="http-trigger-write-record-to-table-java"></a>
379379
### HTTP trigger, write a record to a table
380380

381-
The following example shows a SQL output binding in a Java function that adds a record to a table, using data provided in an HTTP POST request as a JSON body. The function takes an additional dependency on the [com.google.code.gson](https://github.com/google/gson) library to parse the JSON body.
381+
The following example shows a SQL output binding in a Java function that adds a record to a table, using data provided in an HTTP POST request as a JSON body. The function takes an additional dependency on the [com.google.code.gson](https://github.com/google/gson) library to parse the JSON body.
382382

383383
```xml
384384
<dependency>
@@ -423,7 +423,7 @@ public class PostToDo {
423423
<a id="http-trigger-write-to-two-tables-java"></a>
424424
### HTTP trigger, write to two tables
425425

426-
The following example shows a SQL output binding in a JavaS function that adds records to a database in two different tables (`dbo.ToDo` and `dbo.RequestLog`), using data provided in an HTTP POST request as a JSON body and multiple output bindings. The function takes an additional dependency on the [com.google.code.gson](https://github.com/google/gson) library to parse the JSON body.
426+
The following example shows a SQL output binding in a JavaS function that adds records to a database in two different tables (`dbo.ToDo` and `dbo.RequestLog`), using data provided in an HTTP POST request as a JSON body and multiple output bindings. The function takes an additional dependency on the [com.google.code.gson](https://github.com/google/gson) library to parse the JSON body.
427427

428428
```xml
429429
<dependency>
@@ -1110,7 +1110,7 @@ In the [Java functions runtime library](/java/api/overview/azure/functions/runti
11101110

11111111
| Element |Description|
11121112
|---------|---------|
1113-
| **commandText** | Required. The name of the table being written to by the binding. |
1113+
| **commandText** | Required. The name of the table being written to by the binding. |
11141114
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This isn't the actual connection string and must instead resolve to an environment variable.|
11151115
|**name** | Required. The unique name of the function binding. |
11161116

@@ -1168,7 +1168,7 @@ The `CommandText` property is the name of the table where the data is to be stor
11681168

11691169
The output bindings use the T-SQL [MERGE](/sql/t-sql/statements/merge-transact-sql) statement which requires [SELECT](/sql/t-sql/statements/merge-transact-sql#permissions) permissions on the target database.
11701170

1171-
If an exception occurs when a SQL output binding is executed then the function code stop executing. This may result in an error code being returned, such as an HTTP trigger returning a 500 error code. If the `IAsyncCollector` is used in a .NET function then the function code can handle exceptions throw by the call to `FlushAsync()`.
1171+
If an exception occurs when a SQL output binding is executed then the function code stop executing. This may result in an error code being returned, such as an HTTP trigger returning a 500 error code. If the `IAsyncCollector` is used in a .NET function then the function code can handle exceptions throw by the call to `FlushAsync()`.
11721172

11731173
## Next steps
11741174

articles/azure-functions/functions-reference-python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,8 @@ Azure Functions supports the following Python versions:
10751075

10761076
| Functions version | Python\* versions |
10771077
| ----- | :-----: |
1078-
| 4.x | 3.11<br/>3.10<br/>3.9<br/>3.8<br/>3.7 |
1079-
| 3.x | 3.9<br/> 3.8<br/>3.7 |
1078+
| 4.x | 3.12<br/>3.11<br/>3.10<br/>3.9<br/> |
1079+
| 3.x | 3.9<br/> |
10801080

10811081
\* Official Python distributions
10821082

articles/azure-functions/functions-run-local.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,12 @@ The following considerations apply when using the administrator endpoint for loc
347347

348348
+ Calling an administrator endpoint and passing test data is similar to using the **Test** tab in the Azure portal.
349349

350+
> [!Note]
351+
> When supplying complex JSON objects, the following considerations should be taken into account:
352+
> + JSON data must be escaped properly.
353+
> + The escaped JSON string must include `"SystemProperties":{}`
354+
> For example, `'{"input": "{\"SystemProperties\":{},\"testData\":{\"testid\":\"123\"}"}'`
355+
350356
### [Event Grid trigger](#tab/event-grid-trigger)
351357

352358
Event Grid triggers have specific requirements to enable local testing. For more information, see [Local testing with viewer web app](event-grid-how-tos.md#local-testing-with-viewer-web-app).

0 commit comments

Comments
 (0)