Dijeli putem


az staticwebapp functions

Link or unlink a prexisting functionapp with a static webapp. Also known as "Bring your own Functions.".

Commands

Name Description Type Status
az staticwebapp functions link

Link an Azure Function to a static webapp. Also known as "Bring your own Functions." Only one Azure Functions app is available to a single static web app. Static webapp SKU must be "Standard" or "Dedicated".

Core GA
az staticwebapp functions show

Show details on the Azure Function linked to a static webapp.

Core GA
az staticwebapp functions unlink

Unlink an Azure Function from a static webapp.

Core GA

Link an Azure Function to a static webapp. Also known as "Bring your own Functions." Only one Azure Functions app is available to a single static web app. Static webapp SKU must be "Standard" or "Dedicated".

az staticwebapp functions link --function-resource-id
                               --name
                               --resource-group
                               [--environment-name]
                               [--force]

Link a function to a static webapp

az staticwebapp functions link -n MyStaticAppName -g MyResourceGroup --function-resource-id "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Web/sites/<function-name>"
--function-resource-id

Resource ID of the functionapp to link. Can be retrieved with 'az functionapp --query id'.

--name -n

Name of the static site.

--resource-group -g

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

--environment-name

Name of the environment of static site.

--force

Force the function link even if the function is already linked to a static webapp. May be needed if the function was previously linked to a static webapp.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az staticwebapp functions show

Show details on the Azure Function linked to a static webapp.

az staticwebapp functions show --name
                               --resource-group

Examples

Show static app functions.

az staticwebapp functions show -n MyStaticAppName -g MyResourceGroup

Required Parameters

--name -n

Name of the static site.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

Unlink an Azure Function from a static webapp.

az staticwebapp functions unlink --name
                                 --resource-group

Show static app functions.

az staticwebapp functions unlink -n MyStaticAppName -g MyResourceGroup
--name -n

Name of the static site.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.