共用方式為


az staticwebapp functions

使用靜態 Webapp 連結或取消連結預先xisting functionapp。 也稱為「攜帶您自己的函式」。

命令

名稱 Description 類型 狀態
az staticwebapp functions link

將 Azure 函式連結至靜態 Webapp。 也稱為「攜帶您自己的函式」。單一靜態 Web 應用程式只能使用一個 Azure Functions 應用程式。 靜態 Webapp SKU 必須是「標準」或「專用」。

核心 GA
az staticwebapp functions show

顯示連結至靜態 Webapp 的 Azure 函式詳細數據。

核心 GA
az staticwebapp functions unlink

從靜態 Webapp 取消連結 Azure 函式。

核心 GA

將 Azure 函式連結至靜態 Webapp。 也稱為「攜帶您自己的函式」。單一靜態 Web 應用程式只能使用一個 Azure Functions 應用程式。 靜態 Webapp SKU 必須是「標準」或「專用」。

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

將函式連結至靜態 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

要連結之 functionapp 的資源標識碼。 可以使用 'az functionapp --query id' 來擷取。

--name -n

靜態網站的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--environment-name

靜態網站環境的名稱。

--force

強制函式連結,即使函式已經連結至靜態 Webapp 也一樣。 如果函式先前已連結至靜態 Webapp,可能需要此函式。

預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

az staticwebapp functions show

顯示連結至靜態 Webapp 的 Azure 函式詳細數據。

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

範例

顯示靜態應用程式函式。

az staticwebapp functions show -n MyStaticAppName -g MyResourceGroup

必要參數

--name -n

靜態網站的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

從靜態 Webapp 取消連結 Azure 函式。

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

顯示靜態應用程式函式。

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

靜態網站的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。