你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Web Apps - Create Or Update

有关在现有资源组中创建新的 Web、移动或 API 应用的说明,或更新现有应用。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}?api-version=2024-11-01

URI 参数

名称 必需 类型 说明
name
path True

string

要创建或更新的应用的唯一名称。 若要创建或更新部署槽位,请使用 {slot} 参数。

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._\(\)]+[^\.]$

资源所属的资源组的名称。

subscriptionId
path True

string

Azure 订阅 ID。 这是 GUID 格式的字符串(例如 000000000-0000-0000-0000-00000000000000)。

api-version
query True

string

API 版本

请求正文

名称 必需 类型 说明
location True

string

资源位置。

extendedLocation

ExtendedLocation

扩展位置。

identity

ManagedServiceIdentity

托管服务标识。

kind

string

资源类型。 如果资源是应用,可以参考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 了解类型支持的详细信息值。

properties.autoGeneratedDomainNameLabelScope

autoGeneratedDomainNameLabelScope

指定资源创建期间默认主机名的唯一性范围

properties.clientAffinityEnabled

boolean

true 启用客户端相关性;false 停止发送会话关联 Cookie,这会将同一会话中的客户端请求路由到同一实例。 默认值为 true

properties.clientAffinityPartitioningEnabled

boolean

true 要使用 CHIPS Cookie 启用客户端关联分区,这会将属性添加到 partitioned 关联 Cookie 中; false 停止发送分区的关联 Cookie。 默认值为 false

properties.clientAffinityProxyEnabled

boolean

true 使用 X-Forwarded-Host 请求标头覆盖客户端关联 Cookie 域。 false 以使用默认域。 默认值为 false

properties.clientCertEnabled

boolean

true 启用客户端证书身份验证(TLS 相互身份验证):否则,false。 默认值为 false

properties.clientCertExclusionPaths

string

客户端证书身份验证逗号分隔排除路径

properties.clientCertMode

ClientCertMode

此组合使用 ClientCertEnabled 设置。

  • ClientCertEnabled:false 表示忽略 ClientCert。
  • ClientCertEnabled:true 和 ClientCertMode:必需意味着需要 ClientCert。
  • ClientCertEnabled:true 和 ClientCertMode:可选意味着 ClientCert 是可选的或接受的。
properties.cloningInfo

CloningInfo

如果在创建应用期间指定,则会从源应用克隆应用。

properties.containerSize

integer (int32)

函数容器的大小。

properties.customDomainVerificationId

string

验证分配给应用的自定义域的唯一标识符。 客户会将此 ID 添加到 txt 记录进行验证。

properties.dailyMemoryTimeQuota

integer (int32)

每日允许的最大内存时间配额(仅适用于动态应用)。

properties.daprConfig

DaprConfig

应用的 Dapr 配置。

properties.dnsConfiguration

SiteDnsConfig

用于为站点配置各种 DNS 相关设置的属性。

properties.enabled

boolean

如果启用应用,true;否则,false。 将此值设置为 false 会禁用应用(使应用脱机)。

properties.endToEndEncryptionEnabled

boolean

是否在前端和辅助角色之间使用端到端加密

properties.functionAppConfig

FunctionAppConfig

特定于 Azure 函数应用的配置。

properties.hostNameSslStates

HostNameSslState[]

主机名 SSL 状态用于管理应用的主机名的 SSL 绑定。

properties.hostNamesDisabled

boolean

true 禁用应用的公共主机名;否则,false。 如果 true,则只能通过 API 管理过程访问应用。

properties.hostingEnvironmentProfile

HostingEnvironmentProfile

要用于应用的应用服务环境。

properties.httpsOnly

boolean

HttpsOnly:将网站配置为仅接受 https 请求。 http 请求重定向问题

properties.hyperV

boolean

Hyper-V 沙盒。

properties.ipMode

IPMode

指定应用的 IP 模式。

properties.isXenon

boolean

已过时:Hyper-V 沙盒。

properties.keyVaultReferenceIdentity

string

用于 Key Vault 参考身份验证的标识。

properties.managedEnvironmentId

string

要托管此应用的客户的所选托管环境的 Azure 资源管理器 ID。 这必须采用 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} 的形式

properties.outboundVnetRouting

OutboundVnetRouting

用于通过虚拟网络为站点配置各种出站流量路由选项的属性

properties.publicNetworkAccess

string

允许或阻止所有公共流量的属性。 允许的值:“Enabled”、“Disabled”或空字符串。

properties.redundancyMode

RedundancyMode

站点冗余模式

properties.reserved

boolean

如果保留,则为 true;否则,false

properties.resourceConfig

ResourceConfig

函数应用资源要求。

properties.scmSiteAlsoStopped

boolean

true 停止应用时停止 SCM (KUDU) 站点;否则,false。 默认值为 false

properties.serverFarmId

string

关联的应用服务计划的资源 ID,格式为:“/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}”。

properties.siteConfig

SiteConfig

应用服务应用的配置。 此属性不会在响应正常的创建和读取请求时返回,因为它可能包含敏感信息。

properties.sshEnabled

boolean

是否启用 ssh 访问。

properties.storageAccountRequired

boolean

检查客户提供的存储帐户是否是必需的

properties.virtualNetworkSubnetId

string

要通过区域 VNET 集成加入的虚拟网络和子网的 Azure 资源管理器 ID。 这必须采用 /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}

properties.workloadProfileName

string

要执行的函数应用的工作负荷配置文件名称。

tags

object

资源标记。

响应

名称 类型 说明
200 OK

Site

还行。

202 Accepted

Site

正在进行异步作。

Other Status Codes

DefaultErrorResponse

应用服务错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Clone web app
Create or Update Flex Consumption function app
Create or Update Flex Consumption function app with details
Create or Update web app

Clone web app

示例请求

PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141?api-version=2024-11-01

{
  "kind": "app",
  "location": "East US",
  "properties": {
    "cloningInfo": {
      "cloneCustomHostNames": true,
      "cloneSourceControl": true,
      "sourceWebAppId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478",
      "sourceWebAppLocation": "West Europe",
      "hostingEnvironment": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites",
      "appSettingsOverrides": {
        "Setting1": "NewValue1",
        "Setting3": "NewValue5"
      },
      "configureLoadBalancing": false,
      "overwrite": false
    }
  }
}

示例响应

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141",
  "name": "sitef6141",
  "type": "Microsoft.Web/sites",
  "kind": "app",
  "location": "East US",
  "properties": {
    "state": "Running",
    "hostNames": [
      "sitef6141.azurewebsites.net"
    ],
    "repositorySiteName": "sitef6141",
    "usageState": "Normal",
    "enabled": true,
    "enabledHostNames": [
      "sitef6141.azurewebsites.net",
      "sitef6141.scm.azurewebsites.net"
    ],
    "availabilityState": "Normal",
    "hostNameSslStates": [
      {
        "name": "sitef6141.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Standard"
      },
      {
        "name": "sitef6141.scm.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Repository"
      }
    ],
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
    "reserved": false,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2020-03-04T17:33:11.641Z",
    "outboundVnetRouting": {
      "allTraffic": false,
      "applicationTraffic": false,
      "contentShareTraffic": false,
      "imagePullTraffic": false,
      "backupRestoreTraffic": false
    },
    "siteConfig": {
      "numberOfWorkers": 1,
      "defaultDocuments": [
        "Default.htm",
        "Default.html",
        "Default.asp",
        "index.htm",
        "index.html",
        "iisstart.htm",
        "default.aspx",
        "index.php",
        "hostingstart.html"
      ],
      "netFrameworkVersion": "v4.0",
      "phpVersion": "5.6",
      "pythonVersion": "",
      "nodeVersion": "",
      "powerShellVersion": "",
      "linuxFxVersion": "",
      "requestTracingEnabled": false,
      "remoteDebuggingEnabled": false,
      "httpLoggingEnabled": false,
      "acrUseManagedIdentityCreds": false,
      "logsDirectorySizeLimit": 35,
      "detailedErrorLoggingEnabled": false,
      "use32BitWorkerProcess": true,
      "webSocketsEnabled": false,
      "alwaysOn": false,
      "appCommandLine": "",
      "managedPipelineMode": "Integrated",
      "virtualApplications": [
        {
          "virtualPath": "/",
          "physicalPath": "site\\wwwroot",
          "preloadEnabled": false
        }
      ],
      "loadBalancing": "LeastRequests",
      "autoHealEnabled": false,
      "vnetName": "",
      "vnetRouteAllEnabled": false,
      "vnetPrivatePortsCount": 0,
      "http20Enabled": false,
      "minTlsVersion": "1.2",
      "scmMinTlsVersion": "1.2",
      "ftpsState": "AllAllowed",
      "functionAppScaleLimit": 0,
      "functionsRuntimeScaleMonitoringEnabled": false,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": {}
    },
    "scmSiteAlsoStopped": false,
    "clientAffinityEnabled": true,
    "clientCertEnabled": false,
    "clientCertMode": "Required",
    "hostNamesDisabled": false,
    "customDomainVerificationId": "7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153",
    "outboundIpAddresses": "70.37.102.201,20.225.43.144",
    "possibleOutboundIpAddresses": "70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188",
    "containerSize": 0,
    "dailyMemoryTimeQuota": 0,
    "resourceGroup": "testrg123",
    "defaultHostName": "sitef6141.azurewebsites.net",
    "httpsOnly": false,
    "redundancyMode": "None",
    "storageAccountRequired": false,
    "keyVaultReferenceIdentity": "SystemAssigned"
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/sites/sitef6141/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2024-11-01
{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141",
  "name": "sitef6141",
  "type": "Microsoft.Web/sites",
  "kind": "app",
  "location": "East US",
  "properties": {
    "state": "Running",
    "hostNames": [
      "sitef6141.azurewebsites.net"
    ],
    "repositorySiteName": "sitef6141",
    "usageState": "Normal",
    "enabled": true,
    "enabledHostNames": [
      "sitef6141.azurewebsites.net",
      "sitef6141.scm.azurewebsites.net"
    ],
    "availabilityState": "Normal",
    "hostNameSslStates": [
      {
        "name": "sitef6141.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Standard"
      },
      {
        "name": "sitef6141.scm.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Repository"
      }
    ],
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
    "reserved": false,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2020-03-04T17:33:11.641Z",
    "outboundVnetRouting": {
      "allTraffic": false,
      "applicationTraffic": false,
      "contentShareTraffic": false,
      "imagePullTraffic": false,
      "backupRestoreTraffic": false
    },
    "siteConfig": {
      "numberOfWorkers": 1,
      "defaultDocuments": [
        "Default.htm",
        "Default.html",
        "Default.asp",
        "index.htm",
        "index.html",
        "iisstart.htm",
        "default.aspx",
        "index.php",
        "hostingstart.html"
      ],
      "netFrameworkVersion": "v4.0",
      "phpVersion": "5.6",
      "pythonVersion": "",
      "nodeVersion": "",
      "powerShellVersion": "",
      "linuxFxVersion": "",
      "requestTracingEnabled": false,
      "remoteDebuggingEnabled": false,
      "httpLoggingEnabled": false,
      "acrUseManagedIdentityCreds": false,
      "logsDirectorySizeLimit": 35,
      "detailedErrorLoggingEnabled": false,
      "use32BitWorkerProcess": true,
      "webSocketsEnabled": false,
      "alwaysOn": false,
      "appCommandLine": "",
      "managedPipelineMode": "Integrated",
      "virtualApplications": [
        {
          "virtualPath": "/",
          "physicalPath": "site\\wwwroot",
          "preloadEnabled": false
        }
      ],
      "loadBalancing": "LeastRequests",
      "autoHealEnabled": false,
      "vnetName": "",
      "vnetRouteAllEnabled": false,
      "vnetPrivatePortsCount": 0,
      "http20Enabled": false,
      "minTlsVersion": "1.2",
      "scmMinTlsVersion": "1.2",
      "ftpsState": "AllAllowed",
      "functionAppScaleLimit": 0,
      "functionsRuntimeScaleMonitoringEnabled": false,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": {}
    },
    "scmSiteAlsoStopped": false,
    "clientAffinityEnabled": true,
    "clientCertEnabled": false,
    "clientCertMode": "Required",
    "hostNamesDisabled": false,
    "customDomainVerificationId": "7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153",
    "outboundIpAddresses": "70.37.102.201,20.225.43.144",
    "possibleOutboundIpAddresses": "70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188",
    "containerSize": 0,
    "dailyMemoryTimeQuota": 0,
    "resourceGroup": "testrg123",
    "defaultHostName": "sitef6141.azurewebsites.net",
    "httpsOnly": false,
    "redundancyMode": "None",
    "storageAccountRequired": false,
    "keyVaultReferenceIdentity": "SystemAssigned"
  }
}

Create or Update Flex Consumption function app

示例请求

PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141?api-version=2024-11-01

{
  "location": "East US",
  "kind": "functionapp,linux",
  "properties": {
    "siteConfig": {
      "appSettings": [
        {
          "name": "AzureWebJobsStorage",
          "value": "DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=Sanitized;EndpointSuffix=core.windows.net"
        },
        {
          "name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
          "value": "InstrumentationKey=Sanitized;IngestionEndpoint=Sanitized;LiveEndpoint=Sanitized"
        }
      ]
    },
    "functionAppConfig": {
      "deployment": {
        "storage": {
          "type": "blobContainer",
          "value": "https://storageAccountName.blob.core.windows.net/containername",
          "authentication": {
            "type": "StorageAccountConnectionString",
            "storageAccountConnectionStringName": "TheAppSettingName"
          }
        }
      },
      "runtime": {
        "name": "python",
        "version": "3.11"
      },
      "scaleAndConcurrency": {
        "maximumInstanceCount": 100,
        "instanceMemoryMB": 2048
      }
    }
  }
}

示例响应

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141",
  "name": "sitef6141",
  "type": "Microsoft.Web/sites",
  "location": "East US",
  "properties": {
    "state": "Running",
    "hostNames": [
      "sitef6141.azurewebsites.net"
    ],
    "repositorySiteName": "sitef6141",
    "usageState": "Normal",
    "enabled": true,
    "enabledHostNames": [
      "sitef6141.azurewebsites.net",
      "sitef6141.scm.azurewebsites.net"
    ],
    "availabilityState": "Normal",
    "hostNameSslStates": [
      {
        "name": "sitef6141.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Standard"
      },
      {
        "name": "sitef6141.scm.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Repository"
      }
    ],
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
    "reserved": null,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2024-01-09T00:24:54.8",
    "outboundVnetRouting": {
      "allTraffic": false,
      "applicationTraffic": false,
      "contentShareTraffic": false,
      "imagePullTraffic": false,
      "backupRestoreTraffic": false
    },
    "siteConfig": {
      "numberOfWorkers": 1,
      "netFrameworkVersion": "",
      "phpVersion": "",
      "pythonVersion": "",
      "nodeVersion": "",
      "powerShellVersion": "",
      "linuxFxVersion": "",
      "requestTracingEnabled": false,
      "remoteDebuggingEnabled": false,
      "httpLoggingEnabled": false,
      "acrUseManagedIdentityCreds": false,
      "logsDirectorySizeLimit": 35,
      "detailedErrorLoggingEnabled": false,
      "use32BitWorkerProcess": false,
      "webSocketsEnabled": false,
      "alwaysOn": false,
      "appCommandLine": "",
      "managedPipelineMode": "Integrated",
      "virtualApplications": [
        {
          "virtualPath": "/",
          "physicalPath": "site\\wwwroot",
          "preloadEnabled": false
        }
      ],
      "loadBalancing": "LeastRequests",
      "autoHealEnabled": false,
      "vnetName": "",
      "vnetRouteAllEnabled": false,
      "vnetPrivatePortsCount": 0,
      "keyVaultReferenceIdentity": "",
      "ipSecurityRestrictions": [
        {
          "ipAddress": "Any",
          "action": "Allow",
          "priority": 2147483647,
          "name": "Allow all",
          "description": "Allow all access"
        }
      ],
      "scmIpSecurityRestrictions": [
        {
          "ipAddress": "Any",
          "action": "Allow",
          "priority": 2147483647,
          "name": "Allow all",
          "description": "Allow all access"
        }
      ],
      "http20Enabled": false,
      "minTlsVersion": "1.2",
      "scmMinTlsVersion": "1.2",
      "ftpsState": "AllAllowed",
      "functionAppScaleLimit": 0,
      "functionsRuntimeScaleMonitoringEnabled": false,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": {}
    },
    "functionAppConfig": {
      "deployment": {
        "storage": {
          "type": "blobContainer",
          "value": "https://storageAccountName.blob.core.windows.net/containername",
          "authentication": {
            "type": "StorageAccountConnectionString",
            "storageAccountConnectionStringName": "TheAppSettingName"
          }
        }
      },
      "runtime": {
        "name": "python",
        "version": "3.11"
      },
      "scaleAndConcurrency": {
        "alwaysReady": null,
        "maximumInstanceCount": 100,
        "instanceMemoryMB": 2048,
        "triggers": null
      }
    },
    "scmSiteAlsoStopped": false,
    "clientAffinityEnabled": false,
    "clientCertEnabled": false,
    "resourceConfig": {
      "cpu": 1,
      "memory": "2.0Gi"
    },
    "outboundIpAddresses": "70.37.102.201,20.225.43.144",
    "possibleOutboundIpAddresses": "70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188",
    "containerSize": 2048,
    "dailyMemoryTimeQuota": 0,
    "resourceGroup": "testrg123",
    "defaultHostName": "sitef6141.azurewebsites.net",
    "httpsOnly": true,
    "redundancyMode": "None",
    "publicNetworkAccess": "Enabled",
    "storageAccountRequired": false
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/sites/sitef6141/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2024-11-01
{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141",
  "name": "sitef6141",
  "type": "Microsoft.Web/sites",
  "location": "East US",
  "properties": {
    "state": "Running",
    "hostNames": [
      "sitef6141.azurewebsites.net"
    ],
    "repositorySiteName": "sitef6141",
    "usageState": "Normal",
    "enabled": true,
    "enabledHostNames": [
      "sitef6141.azurewebsites.net",
      "sitef6141.scm.azurewebsites.net"
    ],
    "availabilityState": "Normal",
    "hostNameSslStates": [
      {
        "name": "sitef6141.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Standard"
      },
      {
        "name": "sitef6141.scm.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Repository"
      }
    ],
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
    "reserved": null,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2024-01-09T00:24:54.8",
    "outboundVnetRouting": {
      "allTraffic": false,
      "applicationTraffic": false,
      "contentShareTraffic": false,
      "imagePullTraffic": false,
      "backupRestoreTraffic": false
    },
    "siteConfig": {
      "numberOfWorkers": 1,
      "netFrameworkVersion": "",
      "phpVersion": "",
      "pythonVersion": "",
      "nodeVersion": "",
      "powerShellVersion": "",
      "linuxFxVersion": "",
      "requestTracingEnabled": false,
      "remoteDebuggingEnabled": false,
      "httpLoggingEnabled": false,
      "acrUseManagedIdentityCreds": false,
      "logsDirectorySizeLimit": 35,
      "detailedErrorLoggingEnabled": false,
      "use32BitWorkerProcess": false,
      "webSocketsEnabled": false,
      "alwaysOn": false,
      "appCommandLine": "",
      "managedPipelineMode": "Integrated",
      "virtualApplications": [
        {
          "virtualPath": "/",
          "physicalPath": "site\\wwwroot",
          "preloadEnabled": false
        }
      ],
      "loadBalancing": "LeastRequests",
      "autoHealEnabled": false,
      "vnetName": "",
      "vnetRouteAllEnabled": false,
      "vnetPrivatePortsCount": 0,
      "keyVaultReferenceIdentity": "",
      "ipSecurityRestrictions": [
        {
          "ipAddress": "Any",
          "action": "Allow",
          "priority": 2147483647,
          "name": "Allow all",
          "description": "Allow all access"
        }
      ],
      "scmIpSecurityRestrictions": [
        {
          "ipAddress": "Any",
          "action": "Allow",
          "priority": 2147483647,
          "name": "Allow all",
          "description": "Allow all access"
        }
      ],
      "http20Enabled": false,
      "minTlsVersion": "1.2",
      "scmMinTlsVersion": "1.2",
      "ftpsState": "AllAllowed",
      "functionAppScaleLimit": 0,
      "functionsRuntimeScaleMonitoringEnabled": false,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": {}
    },
    "functionAppConfig": {
      "deployment": {
        "storage": {
          "type": "blobContainer",
          "value": "https://storageAccountName.blob.core.windows.net/containername",
          "authentication": {
            "type": "StorageAccountConnectionString",
            "storageAccountConnectionStringName": "TheAppSettingName"
          }
        }
      },
      "runtime": {
        "name": "python",
        "version": "3.11"
      },
      "scaleAndConcurrency": {
        "alwaysReady": null,
        "maximumInstanceCount": 100,
        "instanceMemoryMB": 2048,
        "triggers": null
      }
    },
    "scmSiteAlsoStopped": false,
    "clientAffinityEnabled": false,
    "clientCertEnabled": false,
    "resourceConfig": {
      "cpu": 1,
      "memory": "2.0Gi"
    },
    "outboundIpAddresses": "70.37.102.201,20.225.43.144",
    "possibleOutboundIpAddresses": "70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188",
    "containerSize": 2048,
    "dailyMemoryTimeQuota": 0,
    "resourceGroup": "testrg123",
    "defaultHostName": "sitef6141.azurewebsites.net",
    "httpsOnly": true,
    "redundancyMode": "None",
    "publicNetworkAccess": "Enabled",
    "storageAccountRequired": false
  }
}

Create or Update Flex Consumption function app with details

示例请求

PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141?api-version=2024-11-01

{
  "location": "East US",
  "kind": "functionapp,linux",
  "properties": {
    "siteConfig": {
      "appSettings": [
        {
          "name": "AzureWebJobsStorage",
          "value": "DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=Sanitized;EndpointSuffix=core.windows.net"
        },
        {
          "name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
          "value": "InstrumentationKey=Sanitized;IngestionEndpoint=Sanitized;LiveEndpoint=Sanitized"
        }
      ]
    },
    "functionAppConfig": {
      "deployment": {
        "storage": {
          "type": "blobContainer",
          "value": "https://storageAccountName.blob.core.windows.net/containername",
          "authentication": {
            "type": "StorageAccountConnectionString",
            "storageAccountConnectionStringName": "TheAppSettingName"
          }
        }
      },
      "runtime": {
        "name": "python",
        "version": "3.11"
      },
      "scaleAndConcurrency": {
        "alwaysReady": [
          {
            "name": "http",
            "instanceCount": 2
          }
        ],
        "maximumInstanceCount": 100,
        "instanceMemoryMB": 2048,
        "triggers": {
          "http": {
            "perInstanceConcurrency": 16
          }
        }
      }
    }
  }
}

示例响应

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141",
  "name": "sitef6141",
  "type": "Microsoft.Web/sites",
  "location": "East US",
  "properties": {
    "state": "Running",
    "hostNames": [
      "sitef6141.azurewebsites.net"
    ],
    "repositorySiteName": "sitef6141",
    "usageState": "Normal",
    "enabled": true,
    "enabledHostNames": [
      "sitef6141.azurewebsites.net",
      "sitef6141.scm.azurewebsites.net"
    ],
    "availabilityState": "Normal",
    "hostNameSslStates": [
      {
        "name": "sitef6141.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Standard"
      },
      {
        "name": "sitef6141.scm.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Repository"
      }
    ],
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
    "reserved": null,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2024-01-09T00:24:54.8",
    "outboundVnetRouting": {
      "allTraffic": false,
      "applicationTraffic": false,
      "contentShareTraffic": false,
      "imagePullTraffic": false,
      "backupRestoreTraffic": false
    },
    "siteConfig": {
      "numberOfWorkers": 1,
      "netFrameworkVersion": "",
      "phpVersion": "",
      "pythonVersion": "",
      "nodeVersion": "",
      "powerShellVersion": "",
      "linuxFxVersion": "",
      "requestTracingEnabled": false,
      "remoteDebuggingEnabled": false,
      "httpLoggingEnabled": false,
      "acrUseManagedIdentityCreds": false,
      "logsDirectorySizeLimit": 35,
      "detailedErrorLoggingEnabled": false,
      "use32BitWorkerProcess": false,
      "webSocketsEnabled": false,
      "alwaysOn": false,
      "appCommandLine": "",
      "managedPipelineMode": "Integrated",
      "virtualApplications": [
        {
          "virtualPath": "/",
          "physicalPath": "site\\wwwroot",
          "preloadEnabled": false
        }
      ],
      "loadBalancing": "LeastRequests",
      "autoHealEnabled": false,
      "vnetName": "",
      "vnetRouteAllEnabled": false,
      "vnetPrivatePortsCount": 0,
      "keyVaultReferenceIdentity": "",
      "ipSecurityRestrictions": [
        {
          "ipAddress": "Any",
          "action": "Allow",
          "priority": 2147483647,
          "name": "Allow all",
          "description": "Allow all access"
        }
      ],
      "scmIpSecurityRestrictions": [
        {
          "ipAddress": "Any",
          "action": "Allow",
          "priority": 2147483647,
          "name": "Allow all",
          "description": "Allow all access"
        }
      ],
      "http20Enabled": false,
      "minTlsVersion": "1.2",
      "scmMinTlsVersion": "1.2",
      "ftpsState": "AllAllowed",
      "functionAppScaleLimit": 0,
      "functionsRuntimeScaleMonitoringEnabled": false,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": {}
    },
    "functionAppConfig": {
      "deployment": {
        "storage": {
          "type": "blobContainer",
          "value": "https://storageAccountName.blob.core.windows.net/containername",
          "authentication": {
            "type": "StorageAccountConnectionString",
            "storageAccountConnectionStringName": "TheAppSettingName"
          }
        }
      },
      "runtime": {
        "name": "python",
        "version": "3.11"
      },
      "scaleAndConcurrency": {
        "alwaysReady": [
          {
            "name": "http",
            "instanceCount": 2
          }
        ],
        "maximumInstanceCount": 100,
        "instanceMemoryMB": 2048,
        "triggers": {
          "http": {
            "perInstanceConcurrency": 16
          }
        }
      }
    },
    "scmSiteAlsoStopped": false,
    "clientAffinityEnabled": false,
    "clientCertEnabled": false,
    "resourceConfig": {
      "cpu": 1,
      "memory": "2.0Gi"
    },
    "outboundIpAddresses": "70.37.102.201,20.225.43.144",
    "possibleOutboundIpAddresses": "70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188",
    "containerSize": 2048,
    "dailyMemoryTimeQuota": 0,
    "resourceGroup": "testrg123",
    "defaultHostName": "sitef6141.azurewebsites.net",
    "httpsOnly": true,
    "redundancyMode": "None",
    "publicNetworkAccess": "Enabled",
    "storageAccountRequired": false
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/sites/sitef6141/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2024-11-01
{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141",
  "name": "sitef6141",
  "type": "Microsoft.Web/sites",
  "location": "East US",
  "properties": {
    "state": "Running",
    "hostNames": [
      "sitef6141.azurewebsites.net"
    ],
    "repositorySiteName": "sitef6141",
    "usageState": "Normal",
    "enabled": true,
    "enabledHostNames": [
      "sitef6141.azurewebsites.net",
      "sitef6141.scm.azurewebsites.net"
    ],
    "availabilityState": "Normal",
    "hostNameSslStates": [
      {
        "name": "sitef6141.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Standard"
      },
      {
        "name": "sitef6141.scm.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Repository"
      }
    ],
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
    "reserved": null,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2024-01-09T00:24:54.8",
    "outboundVnetRouting": {
      "allTraffic": false,
      "applicationTraffic": false,
      "contentShareTraffic": false,
      "imagePullTraffic": false,
      "backupRestoreTraffic": false
    },
    "siteConfig": {
      "numberOfWorkers": 1,
      "netFrameworkVersion": "",
      "phpVersion": "",
      "pythonVersion": "",
      "nodeVersion": "",
      "powerShellVersion": "",
      "linuxFxVersion": "",
      "requestTracingEnabled": false,
      "remoteDebuggingEnabled": false,
      "httpLoggingEnabled": false,
      "acrUseManagedIdentityCreds": false,
      "logsDirectorySizeLimit": 35,
      "detailedErrorLoggingEnabled": false,
      "use32BitWorkerProcess": false,
      "webSocketsEnabled": false,
      "alwaysOn": false,
      "appCommandLine": "",
      "managedPipelineMode": "Integrated",
      "virtualApplications": [
        {
          "virtualPath": "/",
          "physicalPath": "site\\wwwroot",
          "preloadEnabled": false
        }
      ],
      "loadBalancing": "LeastRequests",
      "autoHealEnabled": false,
      "vnetName": "",
      "vnetRouteAllEnabled": false,
      "vnetPrivatePortsCount": 0,
      "keyVaultReferenceIdentity": "",
      "ipSecurityRestrictions": [
        {
          "ipAddress": "Any",
          "action": "Allow",
          "priority": 2147483647,
          "name": "Allow all",
          "description": "Allow all access"
        }
      ],
      "scmIpSecurityRestrictions": [
        {
          "ipAddress": "Any",
          "action": "Allow",
          "priority": 2147483647,
          "name": "Allow all",
          "description": "Allow all access"
        }
      ],
      "http20Enabled": false,
      "minTlsVersion": "1.2",
      "scmMinTlsVersion": "1.2",
      "ftpsState": "AllAllowed",
      "functionAppScaleLimit": 0,
      "functionsRuntimeScaleMonitoringEnabled": false,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": {}
    },
    "functionAppConfig": {
      "deployment": {
        "storage": {
          "type": "blobContainer",
          "value": "https://storageAccountName.blob.core.windows.net/containername",
          "authentication": {
            "type": "StorageAccountConnectionString",
            "storageAccountConnectionStringName": "TheAppSettingName"
          }
        }
      },
      "runtime": {
        "name": "python",
        "version": "3.11"
      },
      "scaleAndConcurrency": {
        "alwaysReady": [
          {
            "name": "http",
            "instanceCount": 2
          }
        ],
        "maximumInstanceCount": 100,
        "instanceMemoryMB": 2048,
        "triggers": {
          "http": {
            "perInstanceConcurrency": 16
          }
        }
      }
    },
    "scmSiteAlsoStopped": false,
    "clientAffinityEnabled": false,
    "clientCertEnabled": false,
    "resourceConfig": {
      "cpu": 1,
      "memory": "2.0Gi"
    },
    "outboundIpAddresses": "70.37.102.201,20.225.43.144",
    "possibleOutboundIpAddresses": "70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188",
    "containerSize": 2048,
    "dailyMemoryTimeQuota": 0,
    "resourceGroup": "testrg123",
    "defaultHostName": "sitef6141.azurewebsites.net",
    "httpsOnly": true,
    "redundancyMode": "None",
    "publicNetworkAccess": "Enabled",
    "storageAccountRequired": false
  }
}

Create or Update web app

示例请求

PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141?api-version=2024-11-01

{
  "kind": "app",
  "location": "East US",
  "properties": {
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"
  }
}

示例响应

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141",
  "name": "sitef6141",
  "type": "Microsoft.Web/sites",
  "kind": "app",
  "location": "East US",
  "properties": {
    "state": "Running",
    "hostNames": [
      "sitef6141.azurewebsites.net"
    ],
    "repositorySiteName": "sitef6141",
    "usageState": "Normal",
    "enabled": true,
    "enabledHostNames": [
      "sitef6141.azurewebsites.net",
      "sitef6141.scm.azurewebsites.net"
    ],
    "availabilityState": "Normal",
    "hostNameSslStates": [
      {
        "name": "sitef6141.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Standard"
      },
      {
        "name": "sitef6141.scm.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Repository"
      }
    ],
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
    "reserved": false,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2020-03-04T17:33:11.641Z",
    "outboundVnetRouting": {
      "allTraffic": false,
      "applicationTraffic": false,
      "contentShareTraffic": false,
      "imagePullTraffic": false,
      "backupRestoreTraffic": false
    },
    "siteConfig": {
      "numberOfWorkers": 1,
      "defaultDocuments": [
        "Default.htm",
        "Default.html",
        "Default.asp",
        "index.htm",
        "index.html",
        "iisstart.htm",
        "default.aspx",
        "index.php",
        "hostingstart.html"
      ],
      "netFrameworkVersion": "v4.0",
      "phpVersion": "5.6",
      "pythonVersion": "",
      "nodeVersion": "",
      "powerShellVersion": "",
      "linuxFxVersion": "",
      "requestTracingEnabled": false,
      "remoteDebuggingEnabled": false,
      "httpLoggingEnabled": false,
      "acrUseManagedIdentityCreds": false,
      "logsDirectorySizeLimit": 35,
      "detailedErrorLoggingEnabled": false,
      "use32BitWorkerProcess": true,
      "webSocketsEnabled": false,
      "alwaysOn": false,
      "appCommandLine": "",
      "managedPipelineMode": "Integrated",
      "virtualApplications": [
        {
          "virtualPath": "/",
          "physicalPath": "site\\wwwroot",
          "preloadEnabled": false
        }
      ],
      "loadBalancing": "LeastRequests",
      "autoHealEnabled": false,
      "vnetName": "",
      "vnetRouteAllEnabled": false,
      "vnetPrivatePortsCount": 0,
      "http20Enabled": false,
      "minTlsVersion": "1.2",
      "scmMinTlsVersion": "1.2",
      "ftpsState": "AllAllowed",
      "functionAppScaleLimit": 0,
      "functionsRuntimeScaleMonitoringEnabled": false,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": {}
    },
    "scmSiteAlsoStopped": false,
    "clientAffinityEnabled": true,
    "clientAffinityProxyEnabled": true,
    "clientCertEnabled": false,
    "clientCertMode": "Required",
    "hostNamesDisabled": false,
    "customDomainVerificationId": "7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153",
    "outboundIpAddresses": "70.37.102.201,20.225.43.144",
    "possibleOutboundIpAddresses": "70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188",
    "containerSize": 0,
    "dailyMemoryTimeQuota": 0,
    "resourceGroup": "testrg123",
    "defaultHostName": "sitef6141.azurewebsites.net",
    "httpsOnly": false,
    "redundancyMode": "None",
    "storageAccountRequired": false,
    "keyVaultReferenceIdentity": "SystemAssigned",
    "workloadProfileName": "myd4wp",
    "resourceConfig": {
      "cpu": 1,
      "memory": "2.0Gi"
    }
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/sites/sitef6141/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2024-11-01
{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141",
  "name": "sitef6141",
  "type": "Microsoft.Web/sites",
  "kind": "app",
  "location": "East US",
  "properties": {
    "state": "Running",
    "hostNames": [
      "sitef6141.azurewebsites.net"
    ],
    "repositorySiteName": "sitef6141",
    "usageState": "Normal",
    "enabled": true,
    "enabledHostNames": [
      "sitef6141.azurewebsites.net",
      "sitef6141.scm.azurewebsites.net"
    ],
    "availabilityState": "Normal",
    "hostNameSslStates": [
      {
        "name": "sitef6141.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Standard"
      },
      {
        "name": "sitef6141.scm.azurewebsites.net",
        "sslState": "Disabled",
        "hostType": "Repository"
      }
    ],
    "serverFarmId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
    "reserved": false,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2020-03-04T17:33:11.641Z",
    "outboundVnetRouting": {
      "allTraffic": false,
      "applicationTraffic": false,
      "contentShareTraffic": false,
      "imagePullTraffic": false,
      "backupRestoreTraffic": false
    },
    "siteConfig": {
      "numberOfWorkers": 1,
      "defaultDocuments": [
        "Default.htm",
        "Default.html",
        "Default.asp",
        "index.htm",
        "index.html",
        "iisstart.htm",
        "default.aspx",
        "index.php",
        "hostingstart.html"
      ],
      "netFrameworkVersion": "v4.0",
      "phpVersion": "5.6",
      "pythonVersion": "",
      "nodeVersion": "",
      "powerShellVersion": "",
      "linuxFxVersion": "",
      "requestTracingEnabled": false,
      "remoteDebuggingEnabled": false,
      "httpLoggingEnabled": false,
      "acrUseManagedIdentityCreds": false,
      "logsDirectorySizeLimit": 35,
      "detailedErrorLoggingEnabled": false,
      "use32BitWorkerProcess": true,
      "webSocketsEnabled": false,
      "alwaysOn": false,
      "appCommandLine": "",
      "managedPipelineMode": "Integrated",
      "virtualApplications": [
        {
          "virtualPath": "/",
          "physicalPath": "site\\wwwroot",
          "preloadEnabled": false
        }
      ],
      "loadBalancing": "LeastRequests",
      "autoHealEnabled": false,
      "vnetName": "",
      "vnetRouteAllEnabled": false,
      "vnetPrivatePortsCount": 0,
      "http20Enabled": false,
      "minTlsVersion": "1.2",
      "scmMinTlsVersion": "1.2",
      "ftpsState": "AllAllowed",
      "functionAppScaleLimit": 0,
      "functionsRuntimeScaleMonitoringEnabled": false,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": {}
    },
    "scmSiteAlsoStopped": false,
    "clientAffinityEnabled": true,
    "clientCertEnabled": false,
    "clientCertMode": "Required",
    "hostNamesDisabled": false,
    "customDomainVerificationId": "7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153",
    "outboundIpAddresses": "70.37.102.201,20.225.43.144",
    "possibleOutboundIpAddresses": "70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188",
    "containerSize": 0,
    "dailyMemoryTimeQuota": 0,
    "resourceGroup": "testrg123",
    "defaultHostName": "sitef6141.azurewebsites.net",
    "httpsOnly": false,
    "redundancyMode": "None",
    "storageAccountRequired": false,
    "keyVaultReferenceIdentity": "SystemAssigned",
    "workloadProfileName": "myd4wp",
    "resourceConfig": {
      "cpu": 1,
      "memory": "2.0Gi"
    }
  }
}

定义

名称 说明
ApiDefinitionInfo

有关应用的正式 API 定义的信息。

ApiManagementConfig

链接到应用的 Azure API 管理 (APIM) 配置。

Authentication

用于访问用于部署的存储帐户的身份验证方法。

AuthenticationType

用于选择身份验证类型以访问所选存储帐户的属性。 可用选项:SystemAssignedIdentity、UserAssignedIdentity、StorageAccountConnectionString。

autoGeneratedDomainNameLabelScope

指定资源创建期间默认主机名的唯一性范围

AutoHealActions

触发规则时,自动修复模块要执行的作。

AutoHealActionType

要执行的预定义作。

AutoHealCustomAction

触发自动修复规则时要执行的自定义作。

AutoHealRules

可以为自动愈合定义的规则。

AutoHealTriggers

自动愈合的触发器。

AzureStorageInfoValue

Azure 文件存储或 Blob 存储访问字典存储的信息值。

AzureStorageProtocol

要用于存储帐户的装载协议。

AzureStorageState

存储帐户的状态。

AzureStorageType

存储的类型。

ClientCertMode

此组合使用 ClientCertEnabled 设置。

  • ClientCertEnabled:false 表示忽略 ClientCert。
  • ClientCertEnabled:true 和 ClientCertMode:必需意味着需要 ClientCert。
  • ClientCertEnabled:true 和 ClientCertMode:可选意味着 ClientCert 是可选的或接受的。
CloningInfo

克隆作所需的信息。

ConnectionStringType

数据库的类型。

ConnStringInfo

数据库连接字符串信息。

CorsSettings

应用的跨域资源共享(CORS)设置。

DaprConfig

应用 Dapr 配置。

daprLogLevel

设置 Dapr sidecar 的日志级别。 允许的值是调试、信息、警告、错误。 默认值为信息。

DefaultAction

如果未匹配任何规则,则主要访问限制的默认作。

DefaultErrorResponse

应用服务错误响应。

Details
Error

错误模型。

Experiments

生产试验中的路由规则。

ExtendedLocation

扩展位置。

FtpsState

FTP/FTPS 服务的状态

FunctionAppConfig

函数应用配置。

FunctionsAlwaysReadyConfig

设置函数组或特定函数的“Always Ready”实例数。

FunctionsDeployment

函数应用部署的配置部分。

FunctionsDeploymentStorageType

要选择 Azure 存储类型的属性。 可用选项:blobContainer。

FunctionsRuntime

函数应用运行时名称和版本。

FunctionsScaleAndConcurrency

函数应用的缩放和并发设置。

HandlerMapping

用于定义哪些处理程序使用特定扩展处理 HTTP 请求的 IIS 处理程序映射。 例如,它用于配置 php-cgi.exe 进程,以使用 *.php 扩展处理所有 HTTP 请求。

HostingEnvironmentProfile

要用于此资源的应用服务环境的规范。

HostNameSslState

已启用 SSL 的主机名。

HostType

指示主机名是标准主机名还是存储库主机名。

Http

HTTP 触发器的缩放和并发设置。

IpFilterTag

定义此 IP 筛选器将用于什么。 这是为了支持对代理进行 IP 筛选。

IPMode

指定应用的 IP 模式。

IpSecurityRestriction

应用上的 IP 安全限制。

ManagedPipelineMode

托管管道模式。

ManagedServiceIdentity

托管服务标识。

ManagedServiceIdentityType

托管服务标识的类型。

NameValuePair

名称值对。

OutboundVnetRouting

虚拟网络上的出站流量选项。

PushSettings

推送应用的设置。

RampUpRule

用于加速测试的路由规则。 此规则允许将静态流量 % 重定向到槽,或者根据性能逐步更改路由 %。

RedundancyMode

站点冗余模式

RequestsBasedTrigger

根据请求总数触发。

ResourceConfig

函数应用资源要求。

RuntimeName

函数应用运行时名称。 可用选项:dotnet 隔离、节点、java、powershell、python、自定义

ScmType

SCM 类型。

Site

Web 应用、移动应用后端或 API 应用。

SiteAvailabilityState

应用的管理信息可用性状态。

SiteConfig

应用服务应用的配置。

SiteDnsConfig
SiteLimits

对应用设置的指标限制。

SiteLoadBalancing

站点负载均衡。

SiteMachineKey

应用的 MachineKey。

SlotSwapStatus

上次成功的槽交换作的状态。

SlowRequestsBasedTrigger

根据请求执行时间触发。

SslState

SSL 类型

StatusCodesBasedTrigger

基于状态代码触发。

StatusCodesRangeBasedTrigger

根据状态代码的范围触发。

Storage

函数应用使用的已部署包的存储。

SupportedTlsVersions

MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本

TlsCipherSuites

应用程序允许的最低强度 TLS 密码套件

Triggers

函数应用触发器的缩放和并发设置。

UsageState

指示应用是否已超过其配额使用情况的状态。 只读。

userAssignedIdentity

用户分配的标识。

VirtualApplication

应用中的虚拟应用程序。

VirtualDirectory

虚拟应用程序的目录。

ApiDefinitionInfo

有关应用的正式 API 定义的信息。

名称 类型 说明
url

string

API 定义的 URL。

ApiManagementConfig

链接到应用的 Azure API 管理 (APIM) 配置。

名称 类型 说明
id

string

APIM-Api 标识符。

Authentication

用于访问用于部署的存储帐户的身份验证方法。

名称 类型 说明
storageAccountConnectionStringName

string

将此属性用于 StorageAccountConnectionString。 设置具有存储帐户连接字符串的应用设置的名称。 使用其他身份验证类型时,不要为此属性设置值。

type

AuthenticationType

用于选择身份验证类型以访问所选存储帐户的属性。 可用选项:SystemAssignedIdentity、UserAssignedIdentity、StorageAccountConnectionString。

userAssignedIdentityResourceId

string

将此属性用于 UserAssignedIdentity。 设置标识的资源 ID。 使用其他身份验证类型时,不要为此属性设置值。

AuthenticationType

用于选择身份验证类型以访问所选存储帐户的属性。 可用选项:SystemAssignedIdentity、UserAssignedIdentity、StorageAccountConnectionString。

说明
StorageAccountConnectionString
SystemAssignedIdentity
UserAssignedIdentity

autoGeneratedDomainNameLabelScope

指定资源创建期间默认主机名的唯一性范围

说明
NoReuse
ResourceGroupReuse
SubscriptionReuse
TenantReuse

AutoHealActions

触发规则时,自动修复模块要执行的作。

名称 类型 说明
actionType

AutoHealActionType

要执行的预定义作。

customAction

AutoHealCustomAction

要执行的自定义作。

minProcessExecutionTime

string

执行作之前必须执行进程的最短时间

AutoHealActionType

要执行的预定义作。

说明
CustomAction
LogEvent
Recycle

AutoHealCustomAction

触发自动修复规则时要执行的自定义作。

名称 类型 说明
exe

string

要运行的可执行文件。

parameters

string

可执行文件的参数。

AutoHealRules

可以为自动愈合定义的规则。

名称 类型 说明
actions

AutoHealActions

触发规则时要执行的作。

triggers

AutoHealTriggers

描述何时执行自动修复作的条件。

AutoHealTriggers

自动愈合的触发器。

名称 类型 说明
privateBytesInKB

integer (int32)

基于专用字节的规则。

requests

RequestsBasedTrigger

基于请求总数的规则。

slowRequests

SlowRequestsBasedTrigger

基于请求执行时间的规则。

slowRequestsWithPath

SlowRequestsBasedTrigger[]

基于具有路径的多个慢请求规则的规则

statusCodes

StatusCodesBasedTrigger[]

基于状态代码的规则。

statusCodesRange

StatusCodesRangeBasedTrigger[]

基于状态代码范围的规则。

AzureStorageInfoValue

Azure 文件存储或 Blob 存储访问字典存储的信息值。

名称 类型 说明
accessKey

string

存储帐户的访问密钥。

accountName

string

存储帐户的名称。

mountPath

string

在站点的运行时环境中装载存储的路径。

protocol

AzureStorageProtocol

要用于存储帐户的装载协议。

shareName

string

文件共享的名称(容器名称,Blob 存储)。

state

AzureStorageState

存储帐户的状态。

type

AzureStorageType

存储的类型。

AzureStorageProtocol

要用于存储帐户的装载协议。

说明
Http
Nfs
Smb

AzureStorageState

存储帐户的状态。

说明
InvalidCredentials
InvalidShare
NotValidated
Ok

AzureStorageType

存储的类型。

说明
AzureBlob
AzureFiles

ClientCertMode

此组合使用 ClientCertEnabled 设置。

  • ClientCertEnabled:false 表示忽略 ClientCert。
  • ClientCertEnabled:true 和 ClientCertMode:必需意味着需要 ClientCert。
  • ClientCertEnabled:true 和 ClientCertMode:可选意味着 ClientCert 是可选的或接受的。
说明
Optional
OptionalInteractiveUser
Required

CloningInfo

克隆作所需的信息。

名称 类型 说明
appSettingsOverrides

object

克隆应用的应用程序设置替代。 如果指定,这些设置将覆盖从源应用克隆的设置。 否则,源应用的应用程序设置将保留。

cloneCustomHostNames

boolean

true 从源应用克隆自定义主机名;否则,false

cloneSourceControl

boolean

true 从源应用克隆源代码管理;否则,false

configureLoadBalancing

boolean

true 为源应用和目标应用配置负载均衡。

correlationId

string (uuid)

克隆作的相关 ID。 此 ID 将多个克隆作关联在一起,以使用相同的快照。

hostingEnvironment

string

应用服务环境。

overwrite

boolean

true 覆盖目标应用;否则,false

sourceWebAppId

string

源应用的 ARM 资源 ID。 应用资源 ID 的格式为 /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} 用于生产槽位和 /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} 用于其他槽。

sourceWebAppLocation

string

源应用的位置,例如:美国西部或北欧

trafficManagerProfileId

string

要使用的流量管理器配置文件的 ARM 资源 ID(如果存在)。 流量管理器资源 ID 的格式为 /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}。

trafficManagerProfileName

string

要创建的流量管理器配置文件的名称。 仅当流量管理器配置文件尚不存在时,才需要这样做。

ConnectionStringType

数据库的类型。

说明
ApiHub
Custom
DocDb
EventHub
MySql
NotificationHub
PostgreSQL
RedisCache
SQLAzure
SQLServer
ServiceBus

ConnStringInfo

数据库连接字符串信息。

名称 类型 说明
connectionString

string

连接字符串值。

name

string

连接字符串的名称。

type

ConnectionStringType

数据库的类型。

CorsSettings

应用的跨域资源共享(CORS)设置。

名称 类型 说明
allowedOrigins

string[]

获取或设置应允许进行跨域调用的源列表(例如:http://example.com:12345)。 使用“*”允许所有。

supportCredentials

boolean

获取或设置是否允许使用凭据的 CORS 请求。 有关详细信息,请参阅 https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials

DaprConfig

应用 Dapr 配置。

名称 类型 默认值 说明
appId

string

Dapr 应用程序标识符

appPort

integer (int32)

告知 Dapr 应用程序正在侦听的端口

enableApiLogging

boolean

为 Dapr sidecar 启用 API 日志记录

enabled

boolean

False

指示 Dapr 侧车是否已启用的布尔值

httpMaxRequestSize

integer (int32)

增加请求正文 http 服务器参数的最大大小(以 MB 为单位)以处理大文件的上传。 默认值为 4 MB。

httpReadBufferSize

integer (int32)

发送多 KB 标头时要处理的 http 标头读取缓冲区的最大大小(以 KB 为单位)。 默认值为 65KB。

logLevel

daprLogLevel

设置 Dapr sidecar 的日志级别。 允许的值是调试、信息、警告、错误。 默认值为信息。

daprLogLevel

设置 Dapr sidecar 的日志级别。 允许的值是调试、信息、警告、错误。 默认值为信息。

说明
debug
error
info
warn

DefaultAction

如果未匹配任何规则,则主要访问限制的默认作。

说明
Allow
Deny

DefaultErrorResponse

应用服务错误响应。

名称 类型 说明
error

Error

错误模型。

Details

名称 类型 说明
code

string

标准化字符串,以编程方式标识错误。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

Error

错误模型。

名称 类型 说明
code

string

标准化字符串,以编程方式标识错误。

details

Details[]

详细错误。

innererror

string

调试错误的详细信息。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

Experiments

生产试验中的路由规则。

名称 类型 说明
rampUpRules

RampUpRule[]

提升规则的列表。

ExtendedLocation

扩展位置。

名称 类型 说明
name

string

扩展位置的名称。

type

string

扩展位置的类型。

FtpsState

FTP/FTPS 服务的状态

说明
AllAllowed
Disabled
FtpsOnly

FunctionAppConfig

函数应用配置。

名称 类型 说明
deployment

FunctionsDeployment

函数应用部署配置。

runtime

FunctionsRuntime

函数应用运行时设置。

scaleAndConcurrency

FunctionsScaleAndConcurrency

函数应用缩放和并发设置。

FunctionsAlwaysReadyConfig

设置函数组或特定函数的“Always Ready”实例数。

名称 类型 说明
instanceCount

integer (int32)

设置给定函数组或特定函数的“Always Ready”实例数。 有关详细信息,请参阅 https://aka.ms/flexconsumption/alwaysready

name

string

需要函数组或函数名称。 有关详细信息,请参阅 https://aka.ms/flexconsumption/alwaysready

FunctionsDeployment

函数应用部署的配置部分。

名称 类型 说明
storage

Storage

函数应用使用的已部署包的存储。

FunctionsDeploymentStorageType

要选择 Azure 存储类型的属性。 可用选项:blobContainer。

说明
blobContainer

FunctionsRuntime

函数应用运行时名称和版本。

名称 类型 说明
name

RuntimeName

函数应用运行时名称。 可用选项:dotnet 隔离、节点、java、powershell、python、自定义

version

string

函数应用运行时版本。 示例:8(对于 dotnet 隔离)

FunctionsScaleAndConcurrency

函数应用的缩放和并发设置。

名称 类型 说明
alwaysReady

FunctionsAlwaysReadyConfig[]

函数应用的“始终就绪”配置。

instanceMemoryMB

integer (int32)

以 MB 为单位设置分配给函数应用的每个实例的内存量。 CPU 和网络带宽按比例分配。

maximumInstanceCount

integer (int32)

函数应用的最大实例数。

triggers

Triggers

函数应用触发器的缩放和并发设置。

HandlerMapping

用于定义哪些处理程序使用特定扩展处理 HTTP 请求的 IIS 处理程序映射。 例如,它用于配置 php-cgi.exe 进程,以使用 *.php 扩展处理所有 HTTP 请求。

名称 类型 说明
arguments

string

要传递给脚本处理器的命令行参数。

extension

string

使用此扩展的请求将使用指定的 FastCGI 应用程序进行处理。

scriptProcessor

string

FastCGI 应用程序的绝对路径。

HostingEnvironmentProfile

要用于此资源的应用服务环境的规范。

名称 类型 说明
id

string

应用服务环境的资源 ID。

name

string

应用服务环境的名称。

type

string

应用服务环境的资源类型。

HostNameSslState

已启用 SSL 的主机名。

名称 类型 说明
hostType

HostType

指示主机名是标准主机名还是存储库主机名。

name

string

主机名。

sslState

SslState

SSL 类型。

thumbprint

string

SSL 证书指纹。

toUpdate

boolean

设置为 true 以更新现有主机名。

virtualIP

string

如果启用了基于 IP 的 SSL,则分配给主机名的虚拟 IP 地址。

HostType

指示主机名是标准主机名还是存储库主机名。

说明
Repository
Standard

Http

HTTP 触发器的缩放和并发设置。

名称 类型 说明
perInstanceConcurrency

integer (int32)

每个实例的最大并发 HTTP 触发器调用数。

IpFilterTag

定义此 IP 筛选器将用于什么。 这是为了支持对代理进行 IP 筛选。

说明
Default
ServiceTag
XffProxy

IPMode

指定应用的 IP 模式。

说明
IPv4
IPv4AndIPv6
IPv6

IpSecurityRestriction

应用上的 IP 安全限制。

名称 类型 说明
action

string

允许或拒绝对此 IP 范围的访问。

description

string

IP 限制规则说明。

headers

object

IP 限制规则标头。 X-Forwarded-Host(https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples)。 匹配的逻辑为 .。

  • 如果属性为 null 或空(默认值),则允许所有主机(或缺少主机)。
  • 使用序号-ignore-case(不包括端口号)比较值。
  • 允许子域通配符,但与根域不匹配。 例如,*.contoso.com 与子域 foo.contoso.com 匹配,但与根域 contoso.com 或多级 foo.bar.contoso.com
  • 允许 Unicode 主机名,但会转换为 Punycode 进行匹配。

X-Forwarded-For(https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples)。 匹配的逻辑为 .。

  • 如果属性为 null 或空(默认值),则允许任何转发链(或缺少) 。
  • 如果链(逗号分隔)中的任何地址(不包括端口号)与属性定义的 CIDR 匹配。

X-Azure-FDID 和 X-FD-HealthProbe。 匹配逻辑完全匹配。

ipAddress

string

安全限制有效的 IP 地址。 它可以采用纯 ipv4 地址(所需的 SubnetMask 属性)或 CIDR 表示法(如 ipv4/mask(前导位匹配)的形式。 对于 CIDR,不得指定 SubnetMask 属性。

name

string

IP 限制规则名称。

priority

integer (int32)

IP 限制规则的优先级。

subnetMask

string

限制有效的 IP 地址范围的子网掩码。

subnetTrafficTag

integer (int32)

(内部)子网流量标记

tag

IpFilterTag

定义此 IP 筛选器将用于什么。 这是为了支持对代理进行 IP 筛选。

vnetSubnetResourceId

string

虚拟网络资源 ID

vnetTrafficTag

integer (int32)

(内部)Vnet 流量标记

ManagedPipelineMode

托管管道模式。

说明
Classic
Integrated

ManagedServiceIdentity

托管服务标识。

名称 类型 说明
principalId

string

托管服务标识的主体 ID。

tenantId

string

托管服务标识的租户。

type

ManagedServiceIdentityType

托管服务标识的类型。

userAssignedIdentities

<string,  userAssignedIdentity>

与资源关联的用户分配标识的列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}

ManagedServiceIdentityType

托管服务标识的类型。

说明
None
SystemAssigned
SystemAssigned, UserAssigned
UserAssigned

NameValuePair

名称值对。

名称 类型 说明
name

string

配对名称。

value

string

对值。

OutboundVnetRouting

虚拟网络上的出站流量选项。

名称 类型 说明
allTraffic

boolean

如果此设置设置为 true,则启用 OutboundVnetRouting 中定义的所有其他路由选项。

applicationTraffic

boolean

这会导致所有出站流量都应用了虚拟网络安全组和用户定义的路由。 以前称为 VnetRouteAllEnabled。

backupRestoreTraffic

boolean

支持通过虚拟网络执行备份和还原作。 以前称为 VnetBackupRestoreEnabled

contentShareTraffic

boolean

允许通过虚拟网络访问内容。 以前称为 VnetContentShareEnabled

imagePullTraffic

boolean

允许通过虚拟网络拉取映像。 以前称为 VnetImagePullEnabled。

PushSettings

推送应用的设置。

名称 类型 说明
id

string

资源 ID。

kind

string

资源类型。

name

string

资源名称。

properties.dynamicTagsJson

string

获取或设置一个 JSON 字符串,其中包含将从推送注册终结点中的用户声明评估的动态标记列表。

properties.isPushEnabled

boolean

获取或设置一个标志,该值指示是否启用推送终结点。

properties.tagWhitelistJson

string

获取或设置一个 JSON 字符串,其中包含允许列表供推送注册终结点使用的标记列表。

properties.tagsRequiringAuth

string

获取或设置一个 JSON 字符串,其中包含要求在推送注册终结点中使用用户身份验证的标记列表。 标记可以包含字母数字字符,如下所示:“_”、“@”、“#”、“.”、“:”、“-”。 应在 PushRequestHandler 中执行验证。

type

string

资源类型。

RampUpRule

用于加速测试的路由规则。 此规则允许将静态流量 % 重定向到槽,或者根据性能逐步更改路由 %。

名称 类型 说明
actionHostName

string

如果决定将流量重定向到的槽的主机名。 例如 myapp-stage.azurewebsites.net。

changeDecisionCallbackUrl

string

可以在 TiPCallback 站点扩展中提供自定义决策算法,可以指定 URL。

changeIntervalInMinutes

integer (int32)

指定重新评估 ReroutePercentage 的间隔(以分钟为单位)。

changeStep

number (double)

在自动增加方案中,这是在到达 \nReroutePercentageMinReroutePercentage之前从 MaxReroutePercentage 中添加/删除的步骤。 站点指标每 N 分钟检查一次,ChangeIntervalInMinutes中指定的时间。\n自定义决策算法可以在 TiPCallback 站点扩展中提供,可在 ChangeDecisionCallbackUrl中指定 URL。

maxReroutePercentage

number (double)

指定 ReroutePercentage 将保留的上限。

minReroutePercentage

number (double)

指定重新路由Percentage 将保留的下边界。

name

string

路由规则的名称。 建议的名称是指向将接收试验中的流量的槽。

reroutePercentage

number (double)

将重定向到 ActionHostName的流量的百分比。

RedundancyMode

站点冗余模式

说明
ActiveActive
Failover
GeoRedundant
Manual
None

RequestsBasedTrigger

根据请求总数触发。

名称 类型 说明
count

integer (int32)

请求计数。

timeInterval

string

时间间隔。

ResourceConfig

函数应用资源要求。

名称 类型 说明
cpu

number (double)

核心中所需的 CPU,例如 0.5

memory

string

所需的内存,例如“1Gi”

RuntimeName

函数应用运行时名称。 可用选项:dotnet 隔离、节点、java、powershell、python、自定义

说明
custom
dotnet-isolated
java
node
powershell
python

ScmType

SCM 类型。

说明
BitbucketGit
BitbucketHg
CodePlexGit
CodePlexHg
Dropbox
ExternalGit
ExternalHg
GitHub
LocalGit
None
OneDrive
Tfs
VSO
VSTSRM

Site

Web 应用、移动应用后端或 API 应用。

名称 类型 默认值 说明
extendedLocation

ExtendedLocation

扩展位置。

id

string

资源 ID。

identity

ManagedServiceIdentity

托管服务标识。

kind

string

资源类型。 如果资源是应用,可以参考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 了解类型支持的详细信息值。

location

string

资源位置。

name

string

资源名称。

properties.autoGeneratedDomainNameLabelScope

autoGeneratedDomainNameLabelScope

指定资源创建期间默认主机名的唯一性范围

properties.availabilityState

SiteAvailabilityState

应用的管理信息可用性状态。

properties.clientAffinityEnabled

boolean

true 启用客户端相关性;false 停止发送会话关联 Cookie,这会将同一会话中的客户端请求路由到同一实例。 默认值为 true

properties.clientAffinityPartitioningEnabled

boolean

true 要使用 CHIPS Cookie 启用客户端关联分区,这会将属性添加到 partitioned 关联 Cookie 中; false 停止发送分区的关联 Cookie。 默认值为 false

properties.clientAffinityProxyEnabled

boolean

true 使用 X-Forwarded-Host 请求标头覆盖客户端关联 Cookie 域。 false 以使用默认域。 默认值为 false

properties.clientCertEnabled

boolean

true 启用客户端证书身份验证(TLS 相互身份验证):否则,false。 默认值为 false

properties.clientCertExclusionPaths

string

客户端证书身份验证逗号分隔排除路径

properties.clientCertMode

ClientCertMode

此组合使用 ClientCertEnabled 设置。

  • ClientCertEnabled:false 表示忽略 ClientCert。
  • ClientCertEnabled:true 和 ClientCertMode:必需意味着需要 ClientCert。
  • ClientCertEnabled:true 和 ClientCertMode:可选意味着 ClientCert 是可选的或接受的。
properties.cloningInfo

CloningInfo

如果在创建应用期间指定,则会从源应用克隆应用。

properties.containerSize

integer (int32)

函数容器的大小。

properties.customDomainVerificationId

string

验证分配给应用的自定义域的唯一标识符。 客户会将此 ID 添加到 txt 记录进行验证。

properties.dailyMemoryTimeQuota

integer (int32)

每日允许的最大内存时间配额(仅适用于动态应用)。

properties.daprConfig

DaprConfig

应用的 Dapr 配置。

properties.defaultHostName

string

应用的默认主机名。 只读。

properties.dnsConfiguration

SiteDnsConfig

用于为站点配置各种 DNS 相关设置的属性。

properties.enabled

boolean

如果启用应用,true;否则,false。 将此值设置为 false 会禁用应用(使应用脱机)。

properties.enabledHostNames

string[]

为应用启用了主机名。需要分配主机名(请参阅主机名)并启用。 否则,不会在这些主机名上提供应用。

properties.endToEndEncryptionEnabled

boolean

是否在前端和辅助角色之间使用端到端加密

properties.functionAppConfig

FunctionAppConfig

特定于 Azure 函数应用的配置。

properties.hostNameSslStates

HostNameSslState[]

主机名 SSL 状态用于管理应用的主机名的 SSL 绑定。

properties.hostNames

string[]

与应用关联的主机名。

properties.hostNamesDisabled

boolean

true 禁用应用的公共主机名;否则,false。 如果 true,则只能通过 API 管理过程访问应用。

properties.hostingEnvironmentProfile

HostingEnvironmentProfile

要用于应用的应用服务环境。

properties.httpsOnly

boolean

HttpsOnly:将网站配置为仅接受 https 请求。 http 请求重定向问题

properties.hyperV

boolean

False

Hyper-V 沙盒。

properties.inProgressOperationId

string (uuid)

如果此站点具有挂起的作,则指定作 ID。

properties.ipMode

IPMode

指定应用的 IP 模式。

properties.isDefaultContainer

boolean

如果应用是默认容器,则 true;否则,false

properties.isXenon

boolean

False

已过时:Hyper-V 沙盒。

properties.keyVaultReferenceIdentity

string

用于 Key Vault 参考身份验证的标识。

properties.lastModifiedTimeUtc

string (date-time)

上次修改应用的时间(UTC)。 只读。

properties.managedEnvironmentId

string

要托管此应用的客户的所选托管环境的 Azure 资源管理器 ID。 这必须采用 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} 的形式

properties.maxNumberOfWorkers

integer (int32)

最大辅助角色数。 这仅适用于 Functions 容器。

properties.outboundIpAddresses

string

应用用于出站连接的 IP 地址列表(例如数据库访问)。 包括可以使用当前设置托管站点的租户中的 VIP。 只读。

properties.outboundVnetRouting

OutboundVnetRouting

用于通过虚拟网络为站点配置各种出站流量路由选项的属性

properties.possibleOutboundIpAddresses

string

应用用于出站连接的 IP 地址列表(例如数据库访问)。 包括除 dataComponent 以外的所有租户的 VIP。 只读。

properties.publicNetworkAccess

string

允许或阻止所有公共流量的属性。 允许的值:“Enabled”、“Disabled”或空字符串。

properties.redundancyMode

RedundancyMode

站点冗余模式

properties.repositorySiteName

string

存储库站点的名称。

properties.reserved

boolean

False

如果保留,则为 true;否则,false

properties.resourceConfig

ResourceConfig

函数应用资源要求。

properties.resourceGroup

string

应用所属的资源组的名称。 只读。

properties.scmSiteAlsoStopped

boolean

False

true 停止应用时停止 SCM (KUDU) 站点;否则,false。 默认值为 false

properties.serverFarmId

string

关联的应用服务计划的资源 ID,格式为:“/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}”。

properties.siteConfig

SiteConfig

应用服务应用的配置。 此属性不会在响应正常的创建和读取请求时返回,因为它可能包含敏感信息。

properties.sku

string

基于关联的应用服务计划的应用程序的当前 SKU。 一些有效的 SKU 值包括 Free、Shared、Basic、Dynamic、FlexConsumption、Standard、Premium、PremiumV2、PremiumV3、Isolated、IsolatedV2

properties.slotSwapStatus

SlotSwapStatus

上次部署槽交换作的状态。

properties.sshEnabled

boolean

是否启用 ssh 访问。

properties.state

string

应用的当前状态。

properties.storageAccountRequired

boolean

检查客户提供的存储帐户是否是必需的

properties.suspendedTill

string (date-time)

应用暂停,直到超过内存时间配额。

properties.targetSwapSlot

string

指定此应用将交换到哪个部署槽位。 只读。

properties.trafficManagerHostNames

string[]

与应用关联的 Azure 流量管理器主机名。 只读。

properties.usageState

UsageState

指示应用是否已超过其配额使用情况的状态。 只读。

properties.virtualNetworkSubnetId

string

要通过区域 VNET 集成加入的虚拟网络和子网的 Azure 资源管理器 ID。 这必须采用 /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}

properties.workloadProfileName

string

要执行的函数应用的工作负荷配置文件名称。

tags

object

资源标记。

type

string

资源类型。

SiteAvailabilityState

应用的管理信息可用性状态。

说明
DisasterRecoveryMode
Limited
Normal

SiteConfig

应用服务应用的配置。

名称 类型 默认值 说明
acrUseManagedIdentityCreds

boolean

将托管标识 Creds 用于 ACR 拉取的标志

acrUserManagedIdentityID

string

如果使用用户托管标识,则用户托管标识 ClientId

alwaysOn

boolean

如果启用了 Always On,true;否则,false

apiDefinition

ApiDefinitionInfo

有关应用的正式 API 定义的信息。

apiManagementConfig

ApiManagementConfig

链接到应用的 Azure API 管理设置。

appCommandLine

string

要启动的应用命令行。

appSettings

NameValuePair[]

应用程序设置。 此属性不会在响应正常的创建和读取请求时返回,因为它可能包含敏感信息。

autoHealEnabled

boolean

如果启用了自动愈合,true;否则,false

autoHealRules

AutoHealRules

自动治愈规则。

autoSwapSlotName

string

自动交换槽名称。

azureStorageAccounts

<string,  AzureStorageInfoValue>

Azure 存储帐户列表。

connectionStrings

ConnStringInfo[]

连接字符串。 此属性不会在响应正常的创建和读取请求时返回,因为它可能包含敏感信息。

cors

CorsSettings

跨域资源共享 (CORS) 设置。

defaultDocuments

string[]

默认文档。

detailedErrorLoggingEnabled

boolean

如果启用了详细的错误日志记录,true;否则,false

documentRoot

string

文档根目录。

elasticWebAppScaleLimit

integer (int32)

minimum: 0

站点可横向扩展到的最大辅助角色数。 此设置仅适用于 elasticScaleEnabled true 计划中的应用

experiments

Experiments

这适用于多态类型。

ftpsState

FtpsState

FTP/FTPS 服务的状态

functionAppScaleLimit

integer (int32)

minimum: 0

站点可横向扩展到的最大辅助角色数。 此设置仅适用于消耗计划和弹性高级计划

functionsRuntimeScaleMonitoringEnabled

boolean

获取或设置一个值,该值指示是否启用函数运行时缩放监视。 启用后,ScaleController 不会直接监视事件源,而是调用运行时以获取缩放状态。

handlerMappings

HandlerMapping[]

处理程序映射。

healthCheckPath

string

运行状况检查路径

http20Enabled

boolean

True

Http20Enabled:配置网站以允许客户端通过 http2.0 进行连接

http20ProxyFlag

integer (int32)

0

Http20ProxyFlag:配置一个网站以允许 http2.0 一直传递到应用程序。 0 = 禁用,1 = 通过所有 http2 流量,2 = 仅通过 gRPC。

httpLoggingEnabled

boolean

如果启用了 HTTP 日志记录,true;否则,false

ipSecurityRestrictions

IpSecurityRestriction[]

主要 IP 安全限制。

ipSecurityRestrictionsDefaultAction

DefaultAction

如果未匹配任何规则,则主要访问限制的默认作。

javaContainer

string

Java 容器。

javaContainerVersion

string

Java 容器版本。

javaVersion

string

Java 版本。

keyVaultReferenceIdentity

string

用于 Key Vault 参考身份验证的标识。

limits

SiteLimits

网站限制。

linuxFxVersion

string

Linux 应用框架和版本

loadBalancing

SiteLoadBalancing

站点负载均衡。

localMySqlEnabled

boolean

False

true 启用本地 MySQL;否则,false

logsDirectorySizeLimit

integer (int32)

HTTP 日志目录大小限制。

machineKey

SiteMachineKey

Site MachineKey。

managedPipelineMode

ManagedPipelineMode

托管管道模式。

managedServiceIdentityId

integer (int32)

托管服务标识 ID

metadata

NameValuePair[]

应用程序元数据。 无法检索此属性,因为它可能包含机密。

minTlsCipherSuite

TlsCipherSuites

应用程序允许的最低强度 TLS 密码套件

minTlsVersion

SupportedTlsVersions

MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本

minimumElasticInstanceCount

integer (int32)

minimum: 0
maximum: 20

站点的最小实例计数数 此设置仅适用于弹性计划

netFrameworkVersion

string

v4.6

.NET Framework 版本。

nodeVersion

string

Node.js的版本。

numberOfWorkers

integer (int32)

工人数。

phpVersion

string

PHP 的版本。

powerShellVersion

string

PowerShell 的版本。

preWarmedInstanceCount

integer (int32)

minimum: 0
maximum: 10

预瓦数实例数。 此设置仅适用于消耗计划和弹性计划

publicNetworkAccess

string

允许或阻止所有公共流量的属性。

publishingUsername

string

发布用户名。

push

PushSettings

推送终结点设置。

pythonVersion

string

Python 版本。

remoteDebuggingEnabled

boolean

如果启用了远程调试,true;否则,false

remoteDebuggingVersion

string

远程调试版本。

requestTracingEnabled

boolean

如果启用了请求跟踪,则 true;否则,false

requestTracingExpirationTime

string (date-time)

请求跟踪过期时间。

scmIpSecurityRestrictions

IpSecurityRestriction[]

scm 的 IP 安全限制。

scmIpSecurityRestrictionsDefaultAction

DefaultAction

如果未匹配任何规则,则 scm 访问限制的默认作。

scmIpSecurityRestrictionsUseMain

boolean

scm 使用 main 的 IP 安全限制。

scmMinTlsVersion

SupportedTlsVersions

ScmMinTlsVersion:配置 SCM 站点 SSL 请求所需的最低 TLS 版本

scmType

ScmType

SCM 类型。

tracingOptions

string

跟踪选项。

use32BitWorkerProcess

boolean

true 使用 32 位工作进程;否则,false

virtualApplications

VirtualApplication[]

虚拟应用程序。

vnetName

string

虚拟网络名称。

vnetPrivatePortsCount

integer (int32)

分配给此应用的专用端口数。 这些将在运行时动态分配。

vnetRouteAllEnabled

boolean

已启用“全部虚拟网络路由”。 这会导致所有出站流量都应用了虚拟网络安全组和用户定义的路由。

webSocketsEnabled

boolean

如果启用了 WebSocket,true;否则,false

websiteTimeZone

string

设置站点用于生成时间戳的时区。 与 Linux 和 Windows 应用服务兼容。 设置WEBSITE_TIME_ZONE应用设置优先于此配置。对于 Linux,需要 tz 数据库值 https://www.iana.org/time-zones(有关快速参考,请参阅 https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)。 对于 Windows,需要 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones 下列出的时区之一

windowsFxVersion

string

Xenon App Framework 和版本

xManagedServiceIdentityId

integer (int32)

显式托管服务标识 ID

SiteDnsConfig

名称 类型 说明
dnsAltServer

string

要由应用使用的备用 DNS 服务器。 此属性复制WEBSITE_DNS_ALT_SERVER应用设置。

dnsLegacySortOrder

boolean

指示使用虚拟网络自定义 DNS 服务器的站点仍在对 DNS 服务器列表进行排序。 只读。

dnsMaxCacheTimeout

integer (int32)

要缓存 DNS 的自定义时间(以秒为单位)。 允许的范围:0-60。 默认值为 30 秒。 0 表示缓存已禁用。

dnsRetryAttemptCount

integer (int32)

DNS 查找的重试总数。 允许的范围:1-5。 默认值为 3。

dnsRetryAttemptTimeout

integer (int32)

单个 DNS 查找超时(以秒为单位)。 允许的范围:1-30。 默认值为 3。

dnsServers

string[]

应用用于查找的自定义 DNS 服务器列表。 最多可以设置 5 个 dns 服务器。

SiteLimits

对应用设置的指标限制。

名称 类型 说明
maxDiskSizeInMb

integer (int64)

允许的最大磁盘大小使用量(以 MB 为单位)。

maxMemoryInMb

integer (int64)

允许的最大内存使用量(以 MB 为单位)。

maxPercentageCpu

number (double)

允许的最大 CPU 使用率百分比。

SiteLoadBalancing

站点负载均衡。

说明
LeastRequests
LeastRequestsWithTieBreaker
LeastResponseTime
PerSiteRoundRobin
RequestHash
WeightedRoundRobin
WeightedTotalTraffic

SiteMachineKey

应用的 MachineKey。

名称 类型 说明
decryption

string

用于解密的算法。

decryptionKey

string

解密密钥。

validation

string

MachineKey 验证。

validationKey

string

验证密钥。

SlotSwapStatus

上次成功的槽交换作的状态。

名称 类型 说明
destinationSlotName

string

上次交换作的目标槽。

sourceSlotName

string

上次交换作的源槽。

timestampUtc

string (date-time)

上次成功交换槽的时间。

SlowRequestsBasedTrigger

根据请求执行时间触发。

名称 类型 说明
count

integer (int32)

请求计数。

path

string

请求路径。

timeInterval

string

时间间隔。

timeTaken

string

花费的时间。

SslState

SSL 类型

说明
Disabled
IpBasedEnabled
SniEnabled

StatusCodesBasedTrigger

基于状态代码触发。

名称 类型 说明
count

integer (int32)

请求计数。

path

string

请求路径

status

integer (int32)

HTTP 状态代码。

subStatus

integer (int32)

请求子状态。

timeInterval

string

时间间隔。

win32Status

integer (int32)

Win32 错误代码。

StatusCodesRangeBasedTrigger

根据状态代码的范围触发。

名称 类型 说明
count

integer (int32)

请求计数。

path

string

statusCodes

string

HTTP 状态代码。

timeInterval

string

时间间隔。

Storage

函数应用使用的已部署包的存储。

名称 类型 说明
authentication

Authentication

用于访问用于部署的存储帐户的身份验证方法。

type

FunctionsDeploymentStorageType

要选择 Azure 存储类型的属性。 可用选项:blobContainer。

value

string (uri)

要设置所选 Azure 存储类型的 URL 的属性。 示例:对于 blobContainer,该值可以是 https://.blob.core.windows.net/.

SupportedTlsVersions

MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本

说明
1.0
1.1
1.2
1.3

TlsCipherSuites

应用程序允许的最低强度 TLS 密码套件

说明
TLS_AES_128_GCM_SHA256
TLS_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_256_GCM_SHA384

Triggers

函数应用触发器的缩放和并发设置。

名称 类型 说明
http

Http

HTTP 触发器的缩放和并发设置。

UsageState

指示应用是否已超过其配额使用情况的状态。 只读。

说明
Exceeded
Normal

userAssignedIdentity

用户分配的标识。

名称 类型 说明
clientId

string

用户分配标识的客户端 ID

principalId

string

用户分配标识的主体 ID

VirtualApplication

应用中的虚拟应用程序。

名称 类型 说明
physicalPath

string

物理路径。

preloadEnabled

boolean

如果启用了预加载,true;否则,false

virtualDirectories

VirtualDirectory[]

虚拟应用程序的虚拟目录。

virtualPath

string

虚拟路径。

VirtualDirectory

虚拟应用程序的目录。

名称 类型 说明
physicalPath

string

物理路径。

virtualPath

string

虚拟应用程序的路径。