az functionapp

Manage function apps.

Commands

az functionapp config Configure a function app.
az functionapp config appsettings Configure function app settings.
az functionapp config appsettings delete Delete a function app's settings.
az functionapp config appsettings list Show settings for a function app.
az functionapp config appsettings set Update a function app's settings.
az functionapp config container Manage function app container settings.
az functionapp config container delete Delete a function app container's settings.
az functionapp config container set Set a function app container's settings.
az functionapp config container show Get details of a function app container's settings.
az functionapp config hostname Configure hostnames for a function app.
az functionapp config hostname add Bind a hostname to a function app.
az functionapp config hostname delete Unbind a hostname from a function app.
az functionapp config hostname get-external-ip Get the external-facing IP address for a function app.
az functionapp config hostname list List all hostname bindings for a function app.
az functionapp config set Set the web app's configuration.
az functionapp config show Get the details of a web app's configuration.
az functionapp config ssl Configure SSL certificates.
az functionapp config ssl bind Bind an SSL certificate to a function app.
az functionapp config ssl delete Delete an SSL certificate from a function app.
az functionapp config ssl list List SSL certificates for a function app.
az functionapp config ssl unbind Unbind an SSL certificate from a function app.
az functionapp config ssl upload Upload an SSL certificate to a function app.
az functionapp cors Manage Cross-Origin Resource Sharing (CORS).
az functionapp cors add Add allowed origins.
az functionapp cors remove Remove allowed origins.
az functionapp cors show Show allowed origins.
az functionapp create Create a function app.
az functionapp delete Delete a function app.
az functionapp deployment Manage function app deployments.
az functionapp deployment container Manage container-based continuous deployment.
az functionapp deployment container config Configure continuous deployment via containers.
az functionapp deployment container show-cd-url Get the URL which can be used to configure webhooks for continuous deployment.
az functionapp deployment list-publishing-credentials Get the details for available function app publishing credentials.
az functionapp deployment list-publishing-profiles Get the details for available function app deployment profiles.
az functionapp deployment source Manage function app deployment via source control.
az functionapp deployment source config Manage deployment from git or Mercurial repositories.
az functionapp deployment source config-local-git Get a URL for a git repository endpoint to clone and push to for function app deployment.
az functionapp deployment source config-zip Perform deployment using the kudu zip push deployment for a function app.
az functionapp deployment source delete Delete a source control deployment configuration.
az functionapp deployment source show Get the details of a source control deployment configuration.
az functionapp deployment source sync Synchronize from the repository. Only needed under manual integration mode.
az functionapp deployment source update-token Update source control token cached in Azure app service.
az functionapp deployment user Manage user credentials for deployment.
az functionapp deployment user set Update deployment credentials.
az functionapp deployment user show Gets publishing user.
az functionapp devops-build Functionapp specific integration with azure devops builds.
az functionapp devops-build create Create an Azure Devops build pipeline for a function app.
az functionapp identity Manage web app's managed service identity.
az functionapp identity assign Assign or disable managed service identity to the web app.
az functionapp identity remove Disable web app's managed service identity.
az functionapp identity show Display web app's managed service identity.
az functionapp list List function apps.
az functionapp list-consumption-locations List available locations for running function apps.
az functionapp plan Manage App Service Plans for an Azure Function.
az functionapp plan create Create an App Service Plan for an Azure Function.
az functionapp restart Restart a function app.
az functionapp show Get the details of a function app.
az functionapp start Start a function app.
az functionapp stop Stop a function app.
az functionapp update Update a function app.

az functionapp create

Create a function app.

az functionapp create --name
--resource-group
--storage-account
[--app-insights]
[--app-insights-key]
[--consumption-plan-location]
[--deployment-container-image-name]
[--deployment-local-git]
[--deployment-source-branch]
[--deployment-source-url]
[--os-type {Linux, Windows}]
[--plan]
[--runtime {dotnet, java, node, python}]
[--subscription]
[--tags]

Examples

Create a basic function app.

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

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>.

--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.

Optional Parameters

--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.

--consumption-plan-location -c

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

--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.

default value: master
--deployment-source-url -u

Git repository URL to link with manual integration.

--os-type

Set the OS type for the app to be created.

accepted values: Linux, Windows
--plan -p

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

--runtime

The functions runtime stack.

accepted values: dotnet, java, node, python
--subscription

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

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

az functionapp delete

Delete a function app.

az functionapp delete [--ids]
[--name]
[--resource-group]
[--subscription]

Examples

Delete a function app. (autogenerated)

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--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>.

--subscription

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

az functionapp list

List function apps.

az functionapp list [--resource-group]
[--subscription]

Examples

List default host name and state for all function apps.

az functionapp list --query "[].{hostName: defaultHostName, state: state}"

List all running function apps.

az functionapp list --query "[?state=='Running']"

Optional Parameters

--resource-group -g

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

--subscription

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

az functionapp list-consumption-locations

List available locations for running function apps.

az functionapp list-consumption-locations [--subscription]

Optional Parameters

--subscription

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

az functionapp restart

Restart a function app.

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

Examples

Restart a function app. (autogenerated)

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--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>.

--subscription

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

az functionapp show

Get the details of a function app.

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

Examples

Get the details of a function app. (autogenerated)

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--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>.

--subscription

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

az functionapp start

Start a function app.

az functionapp start [--ids]
[--name]
[--resource-group]
[--subscription]

Examples

Start a function app. (autogenerated)

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--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>.

--subscription

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

az functionapp stop

Stop a function app.

az functionapp stop [--ids]
[--name]
[--resource-group]
[--subscription]

Examples

Stop a function app. (autogenerated)

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--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>.

--subscription

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

az functionapp update

Update a function app.

az functionapp update [--add]
[--force-string]
[--ids]
[--name]
[--remove]
[--resource-group]
[--set]
[--subscription]

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

Name of the function app.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

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

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription

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