你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Microsoft.Web sites/functions 2021-02-01
Bicep 资源定义
可以使用针对以下操作部署站点/函数资源类型:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中更改的属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.Web/sites/functions 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.Web/sites/functions@2021-02-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 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。 有关详细信息,请参阅 父资源之外的子资源。 |
类型为“站点”的资源的符号名称 |
properties | FunctionEnvelope 资源特定的属性 | FunctionEnvelopeProperties |
FunctionEnvelopeProperties
名称 | 说明 | 值 |
---|---|---|
config | 配置信息。 | 对于 Bicep,可以使用 any () 函数。 |
config_href | 配置 URI。 | 字符串 |
文件 | 文件列表。 | 对象 (object) |
function_app_id | 函数应用 ID。 | 字符串 |
href | 函数 URI。 | 字符串 |
invoke_url_template | 调用 URL | 字符串 |
isDisabled | 获取或设置一个值,该值指示是否禁用函数 | bool |
语言 | 函数语言 | 字符串 |
script_href | 脚本 URI。 | 字符串 |
script_root_path_href | 编写根路径 URI 脚本。 | 字符串 |
secrets_file_href | 机密文件 URI。 | string |
test_data | 通过 Azure 门户进行测试时使用的测试数据。 | 字符串 |
test_data_href | 测试数据 URI。 | 字符串 |
快速入门模板
以下快速入门模板部署此资源类型。
模板 | 说明 |
---|---|
具有Azure Functions源的 Front Door 标准版/高级版 |
此模板创建 Front Door 标准版/高级版(Azure Functions应用),并配置函数应用以验证流量是否已通过 Front Door 源。 |
Azure 函数应用和 HTTP 触发的函数 |
此示例在模板中部署 Azure 函数应用和 HTTP 触发的函数。 它还部署密钥保管库并使用函数应用的主机密钥填充机密。 |
具有转换功能的 Azure 函数 |
创建一个基于 Webhook 的 C# Azure 函数,该函数具有可在逻辑应用集成方案中使用的转换功能 |
ARM 模板资源定义
可以使用针对以下操作部署站点/函数资源类型:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中更改的属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.Web/sites/functions 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.Web/sites/functions",
"apiVersion": "2021-02-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
名称 | 说明 | Value |
---|---|---|
type | 资源类型 | 'Microsoft.Web/sites/functions' |
apiVersion | 资源 API 版本 | '2021-02-01' |
name | 资源名称 了解如何在 JSON ARM 模板中设置子资源的名称和类型。 |
字符串 (必需) |
kind | 资源类型。 | string |
properties | FunctionEnvelope 资源特定的属性 | FunctionEnvelopeProperties |
FunctionEnvelopeProperties
名称 | 说明 | 值 |
---|---|---|
config | 配置信息。 | |
config_href | 配置 URI。 | string |
文件 | 文件列表。 | 对象 (object) |
function_app_id | 函数应用 ID。 | 字符串 |
href | 函数 URI。 | 字符串 |
invoke_url_template | 调用 URL | 字符串 |
isDisabled | 获取或设置一个值,该值指示是否禁用函数 | bool |
语言 | 函数语言 | 字符串 |
script_href | 脚本 URI。 | 字符串 |
script_root_path_href | 脚本根路径 URI。 | string |
secrets_file_href | 机密文件 URI。 | 字符串 |
test_data | 测试通过 Azure 门户进行测试时使用的数据。 | string |
test_data_href | 测试数据 URI。 | 字符串 |
快速入门模板
以下快速入门模板部署此资源类型。
模板 | 说明 |
---|---|
具有Azure Functions源的 Front Door 标准版/高级版 |
此模板创建 Front Door 标准版/高级版(Azure Functions应用),并配置函数应用以验证流量是否已通过 Front Door 源。 |
Azure 函数应用和 HTTP 触发的函数 |
此示例在模板中内联部署 Azure 函数应用和 HTTP 触发的函数。 它还部署密钥保管库并使用函数应用的主机密钥填充机密。 |
具有转换功能的 Azure 函数 |
创建基于 Webhook 的 C# Azure 函数,其中包含可在逻辑应用集成方案中使用的转换功能 |
Terraform (AzAPI 提供程序) 资源定义
可以使用面向以下操作部署站点/函数资源类型:
- 资源组
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.Web/sites/functions 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Web/sites/functions@2021-02-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
名称 | 说明 | Value |
---|---|---|
type | 资源类型 | “Microsoft.Web/sites/functions@2021-02-01” |
name | 资源名称 | 字符串 (必需) |
parent_id | 此资源的父资源的 ID。 | 类型为的资源的 ID: 站点 |
kind | 资源类型。 | string |
properties | FunctionEnvelope 资源特定的属性 | FunctionEnvelopeProperties |
FunctionEnvelopeProperties
名称 | 说明 | 值 |
---|---|---|
config | 配置信息。 | |
config_href | 配置 URI。 | 字符串 |
文件 | 文件列表。 | 对象 (object) |
function_app_id | 函数应用 ID。 | 字符串 |
href | 函数 URI。 | string |
invoke_url_template | 调用 URL | 字符串 |
isDisabled | 获取或设置一个值,该值指示是否禁用函数 | bool |
语言 | 函数语言 | 字符串 |
script_href | 脚本 URI。 | 字符串 |
script_root_path_href | 编写根路径 URI 脚本。 | 字符串 |
secrets_file_href | 机密文件 URI。 | 字符串 |
test_data | 通过 Azure 门户进行测试时使用的测试数据。 | string |
test_data_href | 测试数据 URI。 | 字符串 |