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
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-core-tools-reference.md
+36-64Lines changed: 36 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Reference documentation that supports the Azure Functions Core Tool
4
4
ms.topic: reference
5
5
ms.custom:
6
6
- ignite-2023
7
-
ms.date: 08/22/2024
7
+
ms.date: 08/20/2023
8
8
---
9
9
10
10
# Azure Functions Core Tools reference
@@ -26,7 +26,7 @@ Core Tools commands are organized into the following contexts, each providing a
26
26
27
27
Before using the commands in this article, you must [install the Core Tools](functions-run-local.md#install-the-azure-functions-core-tools).
28
28
29
-
## func init
29
+
## `func init`
30
30
31
31
Creates a new Functions project in a specific language.
32
32
@@ -55,7 +55,7 @@ When you supply `<PROJECT_FOLDER>`, the project is created in a new folder with
55
55
> [!NOTE]
56
56
> When you use either `--docker` or `--docker-only` options, Core Tools automatically create the Dockerfile for C#, JavaScript, Python, and PowerShell functions. For Java functions, you must manually create the Dockerfile. For more information, see [Creating containerized function apps](functions-how-to-custom-container.md#creating-containerized-function-apps).
57
57
58
-
## func logs
58
+
## `func logs`
59
59
60
60
Gets logs for functions running in a Kubernetes cluster.
61
61
@@ -72,7 +72,7 @@ The `func logs` action supports the following options:
72
72
73
73
To learn more, see [Azure Functions on Kubernetes with KEDA](functions-kubernetes-keda.md).
74
74
75
-
## func new
75
+
## `func new`
76
76
77
77
Creates a new function in the current project based on a template.
78
78
@@ -94,7 +94,7 @@ The `func new` action supports the following options:
94
94
95
95
To learn more, see [Create a function](functions-run-local.md#create-func).
96
96
97
-
## func run
97
+
## `func run`
98
98
99
99
*Version 1.x only.*
100
100
@@ -120,13 +120,13 @@ For example, to call an HTTP-triggered function and pass content body, run the f
120
120
func run MyHttpTrigger --content '{\"name\": \"Azure\"}'
121
121
```
122
122
123
-
## func start
123
+
## `func start`
124
124
125
125
Starts the local runtime host and loads the function project in the current folder.
126
126
127
127
The specific command depends on the [runtime version](functions-versions.md).
128
128
129
-
# [v2.x+](#tab/v2)
129
+
###[v2.x+](#tab/v2)
130
130
131
131
```command
132
132
func start
@@ -152,7 +152,7 @@ func start
152
152
153
153
With the project running, you can [verify individual function endpoints](functions-run-local.md#run-a-local-function).
154
154
155
-
# [v1.x](#tab/v1)
155
+
###[v1.x](#tab/v1)
156
156
157
157
```command
158
158
func host start
@@ -173,48 +173,26 @@ In version 1.x, you can also use the [`func run`](#func-run) command to run a sp
|**`--access-token`**| Lets you use a specific access token when performing authenticated `azure` actions. |
189
-
|**`--access-token-stdin `**| Reads a specific access token from a standard input. Use this when reading the token directly from a previous command such as [`az account get-access-token`](/cli/azure/account#az-account-get-access-token). |
190
-
|**`--management-url`**| Sets the management URL for your cloud. Use this when running in a sovereign cloud. |
191
-
|**`--slot`**| Optional name of a specific slot to which to publish. |
192
-
|**`--subscription`**| Sets the default subscription to use. |
193
-
194
184
For more information, see [Download application settings](functions-run-local.md#download-application-settings).
195
185
196
186
Settings are downloaded into the local.settings.json file for the project. On-screen values are masked for security. You can protect settings in the local.settings.json file by [enabling local encryption](functions-run-local.md#encrypt-the-local-settings-file).
197
187
198
-
## func azure functionapp list-functions
188
+
## `func azure functionapp list-functions`
199
189
200
190
Returns a list of the functions in the specified function app.
201
191
202
192
```command
203
193
func azure functionapp list-functions <APP_NAME>
204
194
```
205
-
206
-
`func azure functionapp list-functions` supports these optional arguments:
|**`--access-token`**| Lets you use a specific access token when performing authenticated `azure` actions. |
211
-
|**`--access-token-stdin `**| Reads a specific access token from a standard input. Use this when reading the token directly from a previous command such as [`az account get-access-token`](/cli/azure/account#az-account-get-access-token). |
212
-
|**`--management-url`**| Sets the management URL for your cloud. Use this when running in a sovereign cloud. |
213
-
|**`--show-keys`**| Shows HTTP function endpoint URLs that include their default access keys. These URLs can be used to access function endpoints with `function` level [HTTP authentication](functions-bindings-http-webhook-trigger.md#http-auth). |
214
-
|**`--slot`**| Optional name of a specific slot to which to publish. |
215
-
|**`--subscription`**| Sets the default subscription to use. |
216
-
217
-
## func azure functionapp logstream
195
+
## `func azure functionapp logstream`
218
196
219
197
Connects the local command prompt to streaming logs for the function app in Azure.
The default timeout for the connection is 2 hours. You can change the timeout by adding an app setting named [SCM_LOGSTREAM_TIMEOUT](functions-app-settings.md#scm_logstream_timeout), with a timeout value in seconds. Not yet supported for Linux apps in the Consumption plan. For these apps, use the `--browser` option to view logs in the portal.
226
204
227
-
The `func azure functionapp logstream` command supports these optional arguments:
205
+
The `deploy` action supports the following options:
|**`--access-token`**| Lets you use a specific access token when performing authenticated `azure` actions. |
232
-
|**`--access-token-stdin `**| Reads a specific access token from a standard input. Use this when reading the token directly from a previous command such as [`az account get-access-token`](/cli/azure/account#az-account-get-access-token). |
233
209
|**`--browser`**| Open Azure Application Insights Live Stream for the function app in the default browser. |
234
-
|**`--management-url`**| Sets the management URL for your cloud. Use this when running in a sovereign cloud. |
235
-
|**`--slot`**| Optional name of a specific slot to which to publish. |
236
-
|**`--subscription`**| Sets the default subscription to use. |
237
210
238
211
For more information, see [Enable streaming execution logs in Azure Functions](streaming-logs.md).
239
212
240
-
## func azure functionapp publish
213
+
## `func azure functionapp publish`
241
214
242
215
Deploys a Functions project to an existing function app resource in Azure.
243
216
@@ -269,7 +242,6 @@ The following publish options apply, based on version:
269
242
|**`--overwrite-settings -y`**| Suppress the prompt to overwrite app settings when `--publish-local-settings -i` is used.|
270
243
|**`--publish-local-settings -i`**| Publish settings in local.settings.json to Azure, prompting to overwrite if the setting already exists. If you're using a [local storage emulator](functions-develop-local.md#local-storage-emulator), first change the app setting to an [actual storage connection](#func-azure-storage-fetch-connection-string). |
271
244
|**`--publish-settings-only`**, **`-o`**| Only publish settings and skip the content. Default is prompt. |
272
-
|**`--show-keys`**| Shows HTTP function endpoint URLs that include their default access keys. These URLs can be used to access function endpoints with `function` level [HTTP authentication](functions-bindings-http-webhook-trigger.md#http-auth). |
273
245
|**`--slot`**| Optional name of a specific slot to which to publish. |
274
246
|**`--subscription`**| Sets the default subscription to use. |
275
247
@@ -283,7 +255,7 @@ The following publish options apply, based on version:
283
255
284
256
---
285
257
286
-
## func azure storage fetch-connection-string
258
+
## `func azure storage fetch-connection-string`
287
259
288
260
Gets the connection string for the specified Azure Storage account.
For more information, see [Download a storage connection string](functions-run-local.md#download-a-storage-connection-string).
295
267
296
-
## func azurecontainerapps deploy
268
+
## `func azurecontainerapps deploy`
297
269
298
270
Deploys a containerized function app to an Azure Container Apps environment. Both the storage account used by the function app and the environment must already exist. For more information, see [Azure Container Apps hosting of Azure Functions](functions-container-apps-hosting.md).
299
271
@@ -326,11 +298,11 @@ The following deployment options apply:
326
298
> [!IMPORTANT]
327
299
> Storage connection strings and other service credentials are important secrets. Make sure to securely store any script files using `func azurecontainerapps deploy` and don't store them in any publicly accessible source control.
328
300
329
-
## func deploy
301
+
## `func deploy`
330
302
331
303
The `func deploy` command is deprecated. Instead use [`func kubernetes deploy`](#func-kubernetes-deploy).
332
304
333
-
## func durable delete-task-hub
305
+
## `func durable delete-task-hub`
334
306
335
307
Deletes all storage artifacts in the Durable Functions task hub.
336
308
@@ -347,7 +319,7 @@ The `delete-task-hub` action supports the following options:
347
319
348
320
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#delete-a-task-hub).
349
321
350
-
## func durable get-history
322
+
## `func durable get-history`
351
323
352
324
Returns the history of the specified orchestration instance.
353
325
@@ -365,7 +337,7 @@ The `get-history` action supports the following options:
365
337
366
338
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#azure-functions-core-tools-1).
367
339
368
-
## func durable get-instances
340
+
## `func durable get-instances`
369
341
370
342
Returns the status of all orchestration instances. Supports paging using the `top` parameter.
371
343
@@ -387,7 +359,7 @@ The `get-instances` action supports the following options:
387
359
388
360
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#azure-functions-core-tools-2).
389
361
390
-
## func durable get-runtime-status
362
+
## `func durable get-runtime-status`
391
363
392
364
Returns the status of the specified orchestration instance.
393
365
@@ -407,7 +379,7 @@ The `get-runtime-status` action supports the following options:
407
379
408
380
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#azure-functions-core-tools-1).
409
381
410
-
## func durable purge-history
382
+
## `func durable purge-history`
411
383
412
384
Purge orchestration instance state, history, and blob storage for orchestrations older than the specified threshold.
413
385
@@ -427,7 +399,7 @@ The `purge-history` action supports the following options:
427
399
428
400
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#azure-functions-core-tools-7).
429
401
430
-
## func durable raise-event
402
+
## `func durable raise-event`
431
403
432
404
Raises an event to the specified orchestration instance.
433
405
@@ -447,7 +419,7 @@ The `raise-event` action supports the following options:
447
419
448
420
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#azure-functions-core-tools-5).
449
421
450
-
## func durable rewind
422
+
## `func durable rewind`
451
423
452
424
Rewinds the specified orchestration instance.
453
425
@@ -466,7 +438,7 @@ The `rewind` action supports the following options:
466
438
467
439
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#azure-functions-core-tools-6).
468
440
469
-
## func durable start-new
441
+
## `func durable start-new`
470
442
471
443
Starts a new instance of the specified orchestrator function.
472
444
@@ -486,7 +458,7 @@ The `start-new` action supports the following options:
486
458
487
459
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#azure-functions-core-tools).
488
460
489
-
## func durable terminate
461
+
## `func durable terminate`
490
462
491
463
Stops the specified orchestration instance.
492
464
@@ -505,7 +477,7 @@ The `terminate` action supports the following options:
505
477
506
478
To learn more, see the [Durable Functions documentation](./durable/durable-functions-instance-management.md#azure-functions-core-tools-4).
507
479
508
-
## func extensions install
480
+
## `func extensions install`
509
481
510
482
Manually installs Functions extensions in a non-.NET project or in a C# script project.
511
483
@@ -547,7 +519,7 @@ The following considerations apply when using `func extensions install`:
547
519
548
520
+ The first time you explicitly install an extension, a .NET project file named extensions.csproj is added to the root of your app project. This file defines the set of NuGet packages required by your functions. While you can work with the [NuGet package references](/nuget/consume-packages/package-references-in-project-files) in this file, Core Tools lets you install extensions without having to manually edit this C# project file.
549
521
550
-
## func extensions sync
522
+
## `func extensions sync`
551
523
552
524
Installs all extensions added to the function app.
553
525
@@ -561,7 +533,7 @@ The `sync` action supports the following options:
561
533
562
534
Regenerates a missing extensions.csproj file. No action is taken when an extension bundle is defined in your host.json file.
563
535
564
-
## func kubernetes deploy
536
+
## `func kubernetes deploy`
565
537
566
538
Deploys a Functions project as a custom docker container to a Kubernetes cluster.
567
539
@@ -600,7 +572,7 @@ Core Tools uses the local Docker CLI to build and publish the image. Make sure y
600
572
601
573
To learn more, see [Deploying a function app to Kubernetes](functions-kubernetes-keda.md#deploying-a-function-app-to-kubernetes).
602
574
603
-
## func kubernetes install
575
+
## `func kubernetes install`
604
576
605
577
Installs KEDA in a Kubernetes cluster.
606
578
@@ -620,7 +592,7 @@ The `install` action supports the following options:
620
592
621
593
To learn more, see [Managing KEDA and functions in Kubernetes](functions-kubernetes-keda.md#managing-keda-and-functions-in-kubernetes).
622
594
623
-
## func kubernetes remove
595
+
## `func kubernetes remove`
624
596
625
597
Removes KEDA from the Kubernetes cluster defined in the kubectl config file.
626
598
@@ -638,7 +610,7 @@ The `remove` action supports the following options:
638
610
639
611
To learn more, see [Uninstalling KEDA from Kubernetes](functions-kubernetes-keda.md#uninstalling-keda-from-kubernetes).
640
612
641
-
## func settings add
613
+
## `func settings add`
642
614
643
615
Adds a new setting to the `Values` collection in the [local.settings.json file].
644
616
@@ -654,7 +626,7 @@ The `add` action supports the following option:
|**`--connectionString`**| Adds the name-value pair to the `ConnectionStrings` collection instead of the `Values` collection. Only use the `ConnectionStrings` collection when required by certain frameworks. To learn more, see [local.settings.json file]. |
656
628
657
-
## func settings decrypt
629
+
## `func settings decrypt`
658
630
659
631
Decrypts previously encrypted values in the `Values` collection in the [local.settings.json file].
660
632
@@ -664,7 +636,7 @@ func settings decrypt
664
636
665
637
Connection string values in the `ConnectionStrings` collection are also decrypted. In local.settings.json, `IsEncrypted` is also set to `false`. Encrypt local settings to reduce the risk of leaking valuable information from local.settings.json. In Azure, application settings are always stored encrypted.
666
638
667
-
## func settings delete
639
+
## `func settings delete`
668
640
669
641
Removes an existing setting from the `Values` collection in the [local.settings.json file].
670
642
@@ -680,7 +652,7 @@ The `delete` action supports the following option:
|**`--connectionString`**| Removes the name-value pair from the `ConnectionStrings` collection instead of from the `Values` collection. |
682
654
683
-
## func settings encrypt
655
+
## `func settings encrypt`
684
656
685
657
Encrypts the values of individual items in the `Values` collection in the [local.settings.json file].
686
658
@@ -690,7 +662,7 @@ func settings encrypt
690
662
691
663
Connection string values in the `ConnectionStrings` collection are also encrypted. In local.settings.json, `IsEncrypted` is also set to `true`, which specifies that the local runtime decrypts settings before using them. Encrypt local settings to reduce the risk of leaking valuable information from local.settings.json. In Azure, application settings are always stored encrypted.
692
664
693
-
## func settings list
665
+
## `func settings list`
694
666
695
667
Outputs a list of settings in the `Values` collection in the [local.settings.json file].
696
668
@@ -706,7 +678,7 @@ The `list` action supports the following option:
0 commit comments