共用方式為


Microsoft.Web sites/functions

Bicep 資源定義

月臺/函式資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Web/sites/functions 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Web/sites/functions@2022-09-01' = {
  name: 'string'
  kind: 'string'
  parent: resourceSymbolicName
  properties: {
    config: any()
    config_href: 'string'
    files: {}
    function_app_id: 'string'
    href: 'string'
    invoke_url_template: 'string'
    isDisabled: bool
    language: 'string'
    script_href: 'string'
    script_root_path_href: 'string'
    secrets_file_href: 'string'
    test_data: 'string'
    test_data_href: 'string'
  }
}

屬性值

sites/functions

名稱 描述
NAME 資源名稱

瞭解如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)
kind 資源種類。 字串
父系 (parent) 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源之外宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: sites
properties FunctionEnvelope 資源特定屬性 FunctionEnvelopeProperties

FunctionEnvelopeProperties

名稱 描述
config 設定資訊。 針對 Bicep,您可以使用 any () 函式。
config_href 設定 URI。 字串
files 檔案清單。 物件 (object)
function_app_id 函式應用程式識別碼。 字串
href 函式 URI。 字串
invoke_url_template 調用 URL 字串
isDisabled 取得或設定值,指出是否停用函式 bool
語言 函式語言 字串
script_href 腳本 URI。 字串
script_root_path_href 編寫根路徑 URI 的腳本。 字串
secrets_file_href 秘密檔案 URI。 字串
test_data 透過 Azure 入口網站測試時所使用的測試數據。 字串
test_data_href 測試數據 URI。 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
具有 Azure Functions 來源的 Front Door Standard/Premium

部署至 Azure
此範本會建立 Front Door Standard/Premium、Azure Functions 應用程式,並設定函式應用程式來驗證流量是否已通過 Front Door 來源。
Azure 函式應用程式和 HTTP 觸發的函式

部署至 Azure
此範例會在範本中內嵌部署 Azure 函式應用程式和 HTTP 觸發的函式。 它也會部署 金鑰保存庫,並使用函式應用程式的主機金鑰填入秘密。
具有轉換功能的 Azure 函式

部署至 Azure
建立 Webhook 型 C# Azure 函式,其中包含在邏輯應用程式整合案例中使用的轉換功能

ARM 範本資源定義

月臺/函式資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Web/sites/functions 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Web/sites/functions",
  "apiVersion": "2022-09-01",
  "name": "string",
  "kind": "string",
  "properties": {
    "config": {},
    "config_href": "string",
    "files": {},
    "function_app_id": "string",
    "href": "string",
    "invoke_url_template": "string",
    "isDisabled": "bool",
    "language": "string",
    "script_href": "string",
    "script_root_path_href": "string",
    "secrets_file_href": "string",
    "test_data": "string",
    "test_data_href": "string"
  }
}

屬性值

sites/functions

名稱 描述
類型 資源類型 'Microsoft.Web/sites/functions'
apiVersion 資源 API 版本 '2022-09-01'
NAME 資源名稱

請參閱如何在 JSON ARM 樣本中設定子資源的名稱和類型。
字串 (必要)
kind 資源種類。 字串
properties FunctionEnvelope 資源特定屬性 FunctionEnvelopeProperties

FunctionEnvelopeProperties

名稱 描述
config 設定資訊。
config_href 設定 URI。 字串
files 檔案清單。 物件 (object)
function_app_id 函式應用程式識別碼。 字串
href 函式 URI。 字串
invoke_url_template 調用 URL 字串
isDisabled 取得或設定值,指出是否停用函式 bool
語言 函式語言 字串
script_href 腳本 URI。 字串
script_root_path_href 編寫根路徑 URI 的腳本。 字串
secrets_file_href 秘密檔案 URI。 字串
test_data 透過 Azure 入口網站測試時所使用的測試數據。 字串
test_data_href 測試數據 URI。 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
具有 Azure Functions 來源的 Front Door Standard/Premium

部署至 Azure
此範本會建立 Front Door Standard/Premium、Azure Functions 應用程式,並設定函式應用程式來驗證流量是否已通過 Front Door 來源。
Azure 函式應用程式和 HTTP 觸發的函式

部署至 Azure
此範例會在範本中內嵌部署 Azure 函式應用程式和 HTTP 觸發的函式。 它也會部署 金鑰保存庫,並使用函式應用程式的主機金鑰填入秘密。
具有轉換功能的 Azure 函式

部署至 Azure
建立 Webhook 型 C# Azure 函式,其中包含在邏輯應用程式整合案例中使用的轉換功能

Terraform (AzAPI 提供者) 資源定義

月臺/函式資源類型可以使用目標作業進行部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Web/sites/functions 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Web/sites/functions@2022-09-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      config_href = "string"
      files = {}
      function_app_id = "string"
      href = "string"
      invoke_url_template = "string"
      isDisabled = bool
      language = "string"
      script_href = "string"
      script_root_path_href = "string"
      secrets_file_href = "string"
      test_data = "string"
      test_data_href = "string"
    }
    kind = "string"
  })
}

屬性值

sites/functions

名稱 描述
類型 資源類型 “Microsoft.Web/sites/functions@2022-09-01”
NAME 資源名稱 字串 (必要)
parent_id 此資源之父系的資源標識碼。 類型資源的標識碼: 網站
kind 資源種類。 字串
properties FunctionEnvelope 資源特定屬性 FunctionEnvelopeProperties

FunctionEnvelopeProperties

名稱 描述
config 設定資訊。
config_href 設定 URI。 字串
files 檔案清單。 物件 (object)
function_app_id 函式應用程式識別碼。 字串
href 函式 URI。 字串
invoke_url_template 叫用 URL 字串
isDisabled 取得或設定值,指出是否停用函式 bool
語言 函式語言 字串
script_href 腳本 URI。 字串
script_root_path_href 編寫根路徑 URI 的腳本。 字串
secrets_file_href 秘密檔案 URI。 字串
test_data 透過 Azure 入口網站進行測試時所使用的測試數據。 字串
test_data_href 測試數據 URI。 字串