az functionapp

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Manage function apps. To install the Azure Functions Core tools see https://github.com/Azure/azure-functions-core-tools.

Commands

Name Description Type Status
az functionapp app

Commands to manage Azure Functions app.

Extension Preview
az functionapp app up

Deploy to Azure Functions via GitHub actions.

Extension Preview
az functionapp config

Configure a function app.

Extension GA
az functionapp config container

Manage an existing function app's container settings.

Extension GA
az functionapp config container set

Set an existing function app's container settings.

Extension GA
az functionapp connection

Commands to manage functionapp connections.

Core and Extension GA
az functionapp connection create

Create a connection between a functionapp and a target resource.

Core and Extension GA
az functionapp connection create app-insights

Create a functionapp connection to app-insights.

Core GA
az functionapp connection create appconfig

Create a functionapp connection to appconfig.

Core GA
az functionapp connection create cognitiveservices

Create a functionapp connection to cognitiveservices.

Core GA
az functionapp connection create confluent-cloud

Create a functionapp connection to confluent-cloud.

Core GA
az functionapp connection create cosmos-cassandra

Create a functionapp connection to cosmos-cassandra.

Core GA
az functionapp connection create cosmos-gremlin

Create a functionapp connection to cosmos-gremlin.

Core GA
az functionapp connection create cosmos-mongo

Create a functionapp connection to cosmos-mongo.

Core GA
az functionapp connection create cosmos-sql

Create a functionapp connection to cosmos-sql.

Core GA
az functionapp connection create cosmos-table

Create a functionapp connection to cosmos-table.

Core GA
az functionapp connection create eventhub

Create a functionapp connection to eventhub.

Core GA
az functionapp connection create fabric-sql

Create a functionapp connection to fabric-sql.

Core GA
az functionapp connection create fabric-sql (serviceconnector-passwordless extension)

Create a functionapp connection to fabric-sql.

Extension GA
az functionapp connection create keyvault

Create a functionapp connection to keyvault.

Core GA
az functionapp connection create mysql

Create a functionapp connection to mysql.

Core Deprecated
az functionapp connection create mysql-flexible

Create a functionapp connection to mysql-flexible.

Core GA
az functionapp connection create mysql-flexible (serviceconnector-passwordless extension)

Create a functionapp connection to mysql-flexible.

Extension GA
az functionapp connection create postgres

Create a functionapp connection to postgres.

Core Deprecated
az functionapp connection create postgres-flexible

Create a functionapp connection to postgres-flexible.

Core GA
az functionapp connection create postgres-flexible (serviceconnector-passwordless extension)

Create a functionapp connection to postgres-flexible.

Extension GA
az functionapp connection create redis

Create a functionapp connection to redis.

Core GA
az functionapp connection create redis-enterprise

Create a functionapp connection to redis-enterprise.

Core GA
az functionapp connection create servicebus

Create a functionapp connection to servicebus.

Core GA
az functionapp connection create signalr

Create a functionapp connection to signalr.

Core GA
az functionapp connection create sql

Create a functionapp connection to sql.

Core GA
az functionapp connection create sql (serviceconnector-passwordless extension)

Create a functionapp connection to sql.

Extension GA
az functionapp connection create storage-blob

Create a functionapp connection to storage-blob.

Core GA
az functionapp connection create storage-file

Create a functionapp connection to storage-file.

Core GA
az functionapp connection create storage-queue

Create a functionapp connection to storage-queue.

Core GA
az functionapp connection create storage-table

Create a functionapp connection to storage-table.

Core GA
az functionapp connection create webpubsub

Create a functionapp connection to webpubsub.

Core GA
az functionapp connection delete

Delete a functionapp connection.

Core GA
az functionapp connection list

List connections of a functionapp.

Core GA
az functionapp connection list-configuration

List source configurations of a functionapp connection.

Core GA
az functionapp connection list-support-types

List client types and auth types supported by functionapp connections.

Core GA
az functionapp connection show

Get the details of a functionapp connection.

Core GA
az functionapp connection update

Update a functionapp connection.

Core GA
az functionapp connection update app-insights

Update a functionapp to app-insights connection.

Core GA
az functionapp connection update appconfig

Update a functionapp to appconfig connection.

Core GA
az functionapp connection update cognitiveservices

Update a functionapp to cognitiveservices connection.

Core GA
az functionapp connection update confluent-cloud

Update a functionapp to confluent-cloud connection.

Core GA
az functionapp connection update cosmos-cassandra

Update a functionapp to cosmos-cassandra connection.

Core GA
az functionapp connection update cosmos-gremlin

Update a functionapp to cosmos-gremlin connection.

Core GA
az functionapp connection update cosmos-mongo

Update a functionapp to cosmos-mongo connection.

Core GA
az functionapp connection update cosmos-sql

Update a functionapp to cosmos-sql connection.

Core GA
az functionapp connection update cosmos-table

Update a functionapp to cosmos-table connection.

Core GA
az functionapp connection update eventhub

Update a functionapp to eventhub connection.

Core GA
az functionapp connection update fabric-sql

Update a functionapp to fabric-sql connection.

Core GA
az functionapp connection update keyvault

Update a functionapp to keyvault connection.

Core GA
az functionapp connection update mysql

Update a functionapp to mysql connection.

Core Deprecated
az functionapp connection update mysql-flexible

Update a functionapp to mysql-flexible connection.

Core GA
az functionapp connection update postgres

Update a functionapp to postgres connection.

Core Deprecated
az functionapp connection update postgres-flexible

Update a functionapp to postgres-flexible connection.

Core GA
az functionapp connection update redis

Update a functionapp to redis connection.

Core GA
az functionapp connection update redis-enterprise

Update a functionapp to redis-enterprise connection.

Core GA
az functionapp connection update servicebus

Update a functionapp to servicebus connection.

Core GA
az functionapp connection update signalr

Update a functionapp to signalr connection.

Core GA
az functionapp connection update sql

Update a functionapp to sql connection.

Core GA
az functionapp connection update storage-blob

Update a functionapp to storage-blob connection.

Core GA
az functionapp connection update storage-file

Update a functionapp to storage-file connection.

Core GA
az functionapp connection update storage-queue

Update a functionapp to storage-queue connection.

Core GA
az functionapp connection update storage-table

Update a functionapp to storage-table connection.

Core GA
az functionapp connection update webpubsub

Update a functionapp to webpubsub connection.

Core GA
az functionapp connection validate

Validate a functionapp connection.

Core GA
az functionapp connection wait

Place the CLI in a waiting state until a condition of the connection is met.

Core GA
az functionapp create

Create a function app.

Extension GA
az functionapp deployment

Manage function app deployments.

Extension GA
az functionapp deployment source

Manage function app deployment via source control.

Extension GA
az functionapp deployment source config-zip

Perform deployment using the kudu zip push deployment for a function app.

Extension GA
az functionapp devops-pipeline

Azure Function specific integration with Azure DevOps. Please visit https://aka.ms/functions-azure-devops for more information.

Extension GA
az functionapp devops-pipeline create

Create an Azure DevOps pipeline for a function app.

Extension GA
az functionapp restart

Restart a function app.

Extension GA
az functionapp show

Get the details of a function app.

Extension GA

az functionapp create

Create a function app.

The function app's name must be able to produce a unique FQDN as AppName.azurewebsites.net.

az functionapp create --name
                      --resource-group
                      [--app-insights]
                      [--app-insights-key]
                      [--assign-identity]
                      [--consumption-plan-location]
                      [--custom-location]
                      [--deployment-container-image-name]
                      [--deployment-local-git]
                      [--deployment-source-branch]
                      [--deployment-source-url]
                      [--disable-app-insights {false, true}]
                      [--docker-registry-server-password]
                      [--docker-registry-server-user]
                      [--functions-version {4}]
                      [--max-worker-count]
                      [--min-worker-count]
                      [--os-type {Linux, Windows}]
                      [--plan]
                      [--role]
                      [--runtime]
                      [--runtime-version]
                      [--scope]
                      [--storage-account]
                      [--tags]

Examples

Create a basic function app.

az functionapp create -g MyResourceGroup  -p MyPlan -n MyUniqueAppName -s MyStorageAccount

Create a function app. (autogenerated)

az functionapp create --consumption-plan-location westus --name MyUniqueAppName --os-type Windows --resource-group MyResourceGroup --runtime dotnet --storage-account MyStorageAccount

Create a function app using a private ACR image.

az functionapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime node --storage-account MyStorageAccount --deployment-container-image-name myacr.azurecr.io/myimage:tag --docker-registry-server-password passw0rd --docker-registry-server-user MyUser

Create a function app in an app service kubernetes environment

az functionapp create -g MyResourceGroup  -p MyPlan -n MyUniqueAppName -s MyStorageAccount --custom-location /subscriptions/sub_id/resourcegroups/group_name/providers/microsoft.extendedlocation/customlocations/custom_location_name

Create a function app in an app service kubernetes environment and in the same resource group as the custom location

az functionapp create -g MyResourceGroup  -p MyPlan -n MyUniqueAppName -s MyStorageAccount --custom-location custom_location_name

Required Parameters

--name -n

Name of the function app.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--app-insights

Name of the existing App Insights project to be added to the Function app. Must be in the same resource group.

--app-insights-key

Instrumentation key of App Insights to be added.

--assign-identity

Accept system or user assigned identities separated by spaces. Use '[system]' to refer system assigned identity, or a resource id to refer user assigned identity. Check out help for more examples.

--consumption-plan-location -c

Geographic location where Function App will be hosted. Use az functionapp list-consumption-locations to view available locations.

--custom-location

Name or ID of the custom location. Use an ID for a custom location in a different resource group from the app.

--deployment-container-image-name -i

Linux only. Container image name from Docker Hub, e.g. publisher/image-name:tag.

--deployment-local-git -l

Enable local git.

--deployment-source-branch -b

The branch to deploy.

Property Value
Default value: master
--deployment-source-url -u

Git repository URL to link with manual integration.

--disable-app-insights

Disable creating application insights resource during functionapp create. No logs will be available.

Property Value
Accepted values: false, true
--docker-registry-server-password

The container registry server password. Required for private registries.

--docker-registry-server-user

The container registry server username.

--functions-version

The functions app version. Use "az functionapp list-runtimes" to check compatibility with runtimes and runtime versions.

Property Value
Accepted values: 4
--max-worker-count
Preview

Maximum number of workers to be allocated.

--min-worker-count
Preview

Minimum number of workers to be allocated.

--os-type

Set the OS type for the app to be created.

Property Value
Accepted values: Linux, Windows
--plan -p

Name or resource id of the function app service plan. Use 'appservice plan create' to get one.

--role

Role name or id the system assigned identity will have.

Property Value
Default value: Contributor
--runtime

The functions runtime stack. Use "az functionapp list-runtimes" to check supported runtimes and versions.

--runtime-version

The version of the functions runtime stack. Use "az functionapp list-runtimes" to check supported runtimes and versions.

--scope

Scope that the system assigned identity can access.

--storage-account -s

Provide a string value of a Storage Account in the provided Resource Group. Or Resource ID of a Storage Account in a different Resource Group. Required for non-kubernetes function apps.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az functionapp restart

Restart a function app.

az functionapp restart [--ids]
                       [--name]
                       [--resource-group]
                       [--slot]
                       [--subscription]

Examples

Restart a function app. (autogenerated)

az functionapp restart --name MyFunctionApp --resource-group MyResourceGroup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the function app.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az functionapp show

Get the details of a function app.

az functionapp show [--ids]
                    [--name]
                    [--resource-group]
                    [--slot]
                    [--subscription]

Examples

Get the details of a function app. (autogenerated)

az functionapp show --name MyFunctionApp --resource-group MyResourceGroup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the function app.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False