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

Microsoft.Web sites/slots

Bicep 资源定义

可以使用针对以下操作部署站点/槽资源类型:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Web/sites/slots 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Web/sites/slots@2022-09-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  kind: 'string'
  parent: resourceSymbolicName
  extendedLocation: {
    name: 'string'
  }
  identity: {
    type: 'string'
    userAssignedIdentities: {}
  }
  properties: {
    clientAffinityEnabled: bool
    clientCertEnabled: bool
    clientCertExclusionPaths: 'string'
    clientCertMode: 'string'
    cloningInfo: {
      appSettingsOverrides: {}
      cloneCustomHostNames: bool
      cloneSourceControl: bool
      configureLoadBalancing: bool
      correlationId: 'string'
      hostingEnvironment: 'string'
      overwrite: bool
      sourceWebAppId: 'string'
      sourceWebAppLocation: 'string'
      trafficManagerProfileId: 'string'
      trafficManagerProfileName: 'string'
    }
    containerSize: int
    customDomainVerificationId: 'string'
    dailyMemoryTimeQuota: int
    enabled: bool
    hostingEnvironmentProfile: {
      id: 'string'
    }
    hostNamesDisabled: bool
    hostNameSslStates: [
      {
        hostType: 'string'
        name: 'string'
        sslState: 'string'
        thumbprint: 'string'
        toUpdate: bool
        virtualIP: 'string'
      }
    ]
    httpsOnly: bool
    hyperV: bool
    isXenon: bool
    keyVaultReferenceIdentity: 'string'
    managedEnvironmentId: 'string'
    publicNetworkAccess: 'string'
    redundancyMode: 'string'
    reserved: bool
    scmSiteAlsoStopped: bool
    serverFarmId: 'string'
    siteConfig: {
      acrUseManagedIdentityCreds: bool
      acrUserManagedIdentityID: 'string'
      alwaysOn: bool
      apiDefinition: {
        url: 'string'
      }
      apiManagementConfig: {
        id: 'string'
      }
      appCommandLine: 'string'
      appSettings: [
        {
          name: 'string'
          value: 'string'
        }
      ]
      autoHealEnabled: bool
      autoHealRules: {
        actions: {
          actionType: 'string'
          customAction: {
            exe: 'string'
            parameters: 'string'
          }
          minProcessExecutionTime: 'string'
        }
        triggers: {
          privateBytesInKB: int
          requests: {
            count: int
            timeInterval: 'string'
          }
          slowRequests: {
            count: int
            path: 'string'
            timeInterval: 'string'
            timeTaken: 'string'
          }
          slowRequestsWithPath: [
            {
              count: int
              path: 'string'
              timeInterval: 'string'
              timeTaken: 'string'
            }
          ]
          statusCodes: [
            {
              count: int
              path: 'string'
              status: int
              subStatus: int
              timeInterval: 'string'
              win32Status: int
            }
          ]
          statusCodesRange: [
            {
              count: int
              path: 'string'
              statusCodes: 'string'
              timeInterval: 'string'
            }
          ]
        }
      }
      autoSwapSlotName: 'string'
      azureStorageAccounts: {}
      connectionStrings: [
        {
          connectionString: 'string'
          name: 'string'
          type: 'string'
        }
      ]
      cors: {
        allowedOrigins: [
          'string'
        ]
        supportCredentials: bool
      }
      defaultDocuments: [
        'string'
      ]
      detailedErrorLoggingEnabled: bool
      documentRoot: 'string'
      elasticWebAppScaleLimit: int
      experiments: {
        rampUpRules: [
          {
            actionHostName: 'string'
            changeDecisionCallbackUrl: 'string'
            changeIntervalInMinutes: int
            changeStep: int
            maxReroutePercentage: int
            minReroutePercentage: int
            name: 'string'
            reroutePercentage: int
          }
        ]
      }
      ftpsState: 'string'
      functionAppScaleLimit: int
      functionsRuntimeScaleMonitoringEnabled: bool
      handlerMappings: [
        {
          arguments: 'string'
          extension: 'string'
          scriptProcessor: 'string'
        }
      ]
      healthCheckPath: 'string'
      http20Enabled: bool
      httpLoggingEnabled: bool
      ipSecurityRestrictions: [
        {
          action: 'string'
          description: 'string'
          headers: {}
          ipAddress: 'string'
          name: 'string'
          priority: int
          subnetMask: 'string'
          subnetTrafficTag: int
          tag: 'string'
          vnetSubnetResourceId: 'string'
          vnetTrafficTag: int
        }
      ]
      ipSecurityRestrictionsDefaultAction: 'string'
      javaContainer: 'string'
      javaContainerVersion: 'string'
      javaVersion: 'string'
      keyVaultReferenceIdentity: 'string'
      limits: {
        maxDiskSizeInMb: int
        maxMemoryInMb: int
        maxPercentageCpu: int
      }
      linuxFxVersion: 'string'
      loadBalancing: 'string'
      localMySqlEnabled: bool
      logsDirectorySizeLimit: int
      managedPipelineMode: 'string'
      managedServiceIdentityId: int
      metadata: [
        {
          name: 'string'
          value: 'string'
        }
      ]
      minimumElasticInstanceCount: int
      minTlsVersion: 'string'
      netFrameworkVersion: 'string'
      nodeVersion: 'string'
      numberOfWorkers: int
      phpVersion: 'string'
      powerShellVersion: 'string'
      preWarmedInstanceCount: int
      publicNetworkAccess: 'string'
      publishingUsername: 'string'
      push: {
        kind: 'string'
        properties: {
          dynamicTagsJson: 'string'
          isPushEnabled: bool
          tagsRequiringAuth: 'string'
          tagWhitelistJson: 'string'
        }
      }
      pythonVersion: 'string'
      remoteDebuggingEnabled: bool
      remoteDebuggingVersion: 'string'
      requestTracingEnabled: bool
      requestTracingExpirationTime: 'string'
      scmIpSecurityRestrictions: [
        {
          action: 'string'
          description: 'string'
          headers: {}
          ipAddress: 'string'
          name: 'string'
          priority: int
          subnetMask: 'string'
          subnetTrafficTag: int
          tag: 'string'
          vnetSubnetResourceId: 'string'
          vnetTrafficTag: int
        }
      ]
      scmIpSecurityRestrictionsDefaultAction: 'string'
      scmIpSecurityRestrictionsUseMain: bool
      scmMinTlsVersion: 'string'
      scmType: 'string'
      tracingOptions: 'string'
      use32BitWorkerProcess: bool
      virtualApplications: [
        {
          physicalPath: 'string'
          preloadEnabled: bool
          virtualDirectories: [
            {
              physicalPath: 'string'
              virtualPath: 'string'
            }
          ]
          virtualPath: 'string'
        }
      ]
      vnetName: 'string'
      vnetPrivatePortsCount: int
      vnetRouteAllEnabled: bool
      websiteTimeZone: 'string'
      webSocketsEnabled: bool
      windowsFxVersion: 'string'
      xManagedServiceIdentityId: int
    }
    storageAccountRequired: bool
    virtualNetworkSubnetId: 'string'
    vnetContentShareEnabled: bool
    vnetImagePullEnabled: bool
    vnetRouteAllEnabled: bool
  }
}

属性值

sites/slots

名称 说明
name 资源名称

了解如何在 Bicep 中为子资源设置名称和类型。
字符串 (必需)

字符限制:2-59

有效字符:
可映射到 Punycode 的字母数字、连字符和 Unicode 字符
location 资源位置。 字符串 (必需)
标记 资源标记。 标记名称和值的字典。 请参阅 模板中的标记
kind 资源类型。 字符串
父级 (parent) 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源之外的子资源
类型为“站点”的资源的符号名称
extendedLocation 扩展位置。 ExtendedLocation
标识 托管服务标识。 ManagedServiceIdentity
properties 特定于站点资源的属性 SiteProperties

ExtendedLocation

名称 说明
name 扩展位置的名称。 string

ManagedServiceIdentity

名称 说明 Value
type 托管服务标识的类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户分配标识的列表。 用户标识字典密钥引用将是采用以下格式的 ARM 资源 ID:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} 对象 (object)

SiteProperties

名称 说明
clientAffinityEnabled true 启用客户端相关性; false 停止发送会话相关性 Cookie,将同一会话中的客户端请求路由到同一实例。 默认值为 true bool
clientCertEnabled true 启用客户端证书身份验证 (TLS 相互身份验证) ;否则为 false。 默认值为 false bool
clientCertExclusionPaths 客户端证书身份验证逗号分隔的排除路径 字符串
clientCertMode 这由 ClientCertEnabled 设置组成。
- ClientCertEnabled:false 表示忽略 ClientCert。
- ClientCertEnabled: true 和 ClientCertMode: Required 表示 ClientCert 是必需的。
- ClientCertEnabled: true 和 ClientCertMode: Optional 表示 ClientCert 可选或已接受。
“可选”
“OptionalInteractiveUser”
“必需”
cloningInfo 如果在应用创建过程中指定,则会从源应用克隆应用。 克隆Info
containerSize 函数容器的大小。 int
customDomainVerificationId 验证分配给应用的自定义域的唯一标识符。 客户会将此 ID 添加到 txt 记录进行验证。 字符串
dailyMemoryTimeQuota 每日允许的最大内存时间配额 (仅适用于) 动态应用。 int
enabled true 如果应用已启用,则为 ;否则为 false。 将此值设置为 false 会禁用应用 (使应用脱机) 。 bool
hostingEnvironmentProfile 应用服务环境用于应用。 HostingEnvironmentProfile
hostNamesDisabled true 禁用应用的公共主机名;否则为 false
如果 true为 ,则只能通过 API 管理过程访问应用。
bool
hostNameSslStates 主机名 SSL 状态用于管理应用的主机名的 SSL 绑定。 HostNameSslState[]
httpsOnly HttpsOnly:将网站配置为仅接受 https 请求。 问题重定向
http 请求
bool
hyperV Hyper-V 沙盒。 bool
isXenon 已过时:Hyper-V 沙盒。 bool
keyVaultReferenceIdentity 用于密钥保管库参考身份验证的标识。 字符串
managedEnvironmentId Azure 资源管理器要托管此应用的客户的选定托管环境的 ID。 此格式必须为 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} 字符串
publicNetworkAccess 允许或阻止所有公共流量的属性。 允许的值:“Enabled”、“Disabled”或空字符串。 string
redundancyMode 站点冗余模式 'ActiveActive'
“故障转移”
“GeoRedundant”
“手动”
“None”
reserved true 如果已保留,则为 ;否则为 false bool
scmSiteAlsoStopped true 在停止应用时停止 SCM (KUDU) 站点;否则为 false。 默认为 false bool
serverFarmId 关联的App 服务计划的资源 ID,格式为:“/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}”。 字符串
siteConfig 应用的配置。 SiteConfig
storageAccountRequired 检查是否需要客户提供的存储帐户 bool
virtualNetworkSubnetId Azure 资源管理器要通过区域 VNET 集成加入的虚拟网络和子网的 ID。
此格式必须为 /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}
字符串
vnetContentShareEnabled 启用通过虚拟网络访问内容 bool
vnetImagePullEnabled 通过虚拟网络启用拉取映像 bool
vnetRouteAllEnabled 虚拟网络启用“全部路由”。 这会导致所有出站流量都应用了虚拟网络安全组和用户定义的路由。 bool

克隆Info

名称 说明
appSettingsOverrides 克隆应用的应用程序设置替代。 如果指定,这些设置将覆盖克隆的设置
来自源应用。 否则,将保留源应用中的应用程序设置。
对象 (object)
cloneCustomHostNames true 从源应用克隆自定义主机名;否则为 false bool
cloneSourceControl true 从源应用克隆源代码管理;否则为 false bool
configureLoadBalancing true 为源应用和目标应用配置负载均衡。 bool
correlationId 克隆操作的相关 ID。 此 ID 关联多个克隆操作
一起使用相同的快照。
字符串
hostingEnvironment 应用服务环境。 字符串
overwrite true 覆盖目标应用;否则为 false bool
sourceWebAppId 源应用的 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 要使用的流量管理器配置文件的 ARM 资源 ID(如果存在)。 流量管理器资源 ID 的格式为
/subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}。
字符串
trafficManagerProfileName 要创建的流量管理器配置文件的名称。 仅当流量管理器配置文件尚不存在时,才需要此项。 字符串

HostingEnvironmentProfile

名称 说明 Value
id 应用服务环境的资源 ID。 字符串

HostNameSslState

名称 说明
hostType 指示主机名是标准主机名还是存储库主机名。 'Repository'
'Standard'
name 主机名 字符串
sslState SSL 类型。 'Disabled'
“IpBasedEnabled”
'SniEnabled'
thumbprint SSL 证书指纹。 字符串
toUpdate true设置为 可更新现有主机名。 bool
virtualIP 如果启用了基于 IP 的 SSL,则分配给主机名的虚拟 IP 地址。 字符串

SiteConfig

名称 说明
acrUseManagedIdentityCreds 使用托管标识 Creds 进行 ACR 拉取的标志 bool
acrUserManagedIdentityID 如果使用用户托管标识,则为用户托管标识 ClientId string
alwaysOn true如果启用Always On,则为 ;否则为 false bool
apiDefinition 有关应用的正式 API 定义的信息。 ApiDefinitionInfo
apiManagementConfig 链接到应用的 Azure API 管理设置。 ApiManagementConfig
appCommandLine 要启动的应用命令行。 字符串
appSettings 应用程序设置。 NameValuePair[]
autoHealEnabled true 如果启用自动愈合,则为 ;否则为 false bool
autoHealRules 自动愈合规则。 AutoHealRules
autoSwapSlotName 自动交换槽名称。 字符串
azureStorageAccounts Azure 存储帐户列表。 对象 (object)
connectionStrings 连接字符串。 ConnStringInfo[]
cors 跨源资源共享 (CORS) 设置。 CorsSettings
defaultDocuments 默认文档。 string[]
detailedErrorLoggingEnabled true 如果启用了详细错误日志记录,则为 ;否则为 false bool
documentRoot 文档根目录。 string
elasticWebAppScaleLimit 网站可以横向扩展到的最大辅助角色数。
此设置仅适用于 ElasticScaleEnabled 为的计划中的应用 true
int
experiments 这是针对多态类型的解决方法。 试验
ftpsState FTP/FTPS 服务的状态 “AllAllowed”
“Disabled”
“FtpsOnly”
functionAppScaleLimit 网站可以横向扩展到的最大辅助角色数。
此设置仅适用于消耗和弹性高级计划
int
functionsRuntimeScaleMonitoringEnabled 获取或设置一个值,该值指示是否启用函数运行时规模监视。 启用后,
ScaleController 不会直接监视事件源,而是会调用
用于获取缩放状态的运行时。
bool
handlerMappings 处理程序映射。 HandlerMapping[]
healthCheckPath 运行状况检查路径 字符串
http20Enabled Http20Enabled:将网站配置为允许客户端通过 http2.0 进行连接 bool
httpLoggingEnabled true 如果启用了 HTTP 日志记录,则为 ;否则为 false bool
ipSecurityRestrictions main的 IP 安全限制。 IpSecurityRestriction[]
ipSecurityRestrictionsDefaultAction 如果未匹配任何规则,则main访问限制的默认操作。 “允许”
“拒绝”
javaContainer Java 容器。 string
javaContainerVersion Java 容器版本。 string
javaVersion Java 版本。 字符串
keyVaultReferenceIdentity 用于密钥保管库参考身份验证的标识。 字符串
限制 网站限制。 SiteLimits
linuxFxVersion Linux 应用框架和版本 string
负载均衡 站点负载均衡。 “LeastRequests”
“LeastResponseTime”
“PerSiteRoundRobin”
“RequestHash”
“WeightedRoundRobin”
“WeightedTotalTraffic”
localMySqlEnabled true 启用本地 MySQL;否则为 false bool
logsDirectorySizeLimit HTTP 日志目录大小限制。 int
managedPipelineMode 托管管道模式。 “经典”
“集成”
managedServiceIdentityId 托管服务标识 ID int
metadata 应用程序元数据。 无法检索此属性,因为它可能包含机密。 NameValuePair[]
minimumElasticInstanceCount 站点的最小实例计数
此设置仅适用于弹性计划
int
minTlsVersion MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本 '1.0'
'1.1'
'1.2'
netFrameworkVersion .NET Framework版本。 string
nodeVersion Node.js 的版本。 字符串
numberOfWorkers 工作线程数。 int
phpVersion PHP 的版本。 string
powerShellVersion PowerShell 的版本。 字符串
preWarmedInstanceCount 预热实例数。
此设置仅适用于消耗和弹性计划
int
publicNetworkAccess 允许或阻止所有公共流量的属性。 字符串
publishingUsername 发布用户名。 字符串
push 推送终结点设置。 PushSettings
pythonVersion Python 版本。 字符串
remoteDebuggingEnabled true 如果启用了远程调试,则为 ;否则为 false bool
remoteDebuggingVersion 远程调试版本。 字符串
requestTracingEnabled true 如果启用了请求跟踪,则为 ;否则为 false bool
requestTracingExpirationTime 请求跟踪过期时间。 字符串
scmIpSecurityRestrictions scm 的 IP 安全限制。 IpSecurityRestriction[]
scmIpSecurityRestrictionsDefaultAction 如果未匹配任何规则,则 scm 访问限制的默认操作。 “允许”
“拒绝”
scmIpSecurityRestrictionsUseMain scm 使用main的 IP 安全限制。 bool
scmMinTlsVersion ScmMinTlsVersion:配置 SCM 站点的 SSL 请求所需的最低 TLS 版本 '1.0'
'1.1'
'1.2'
scmType SCM 类型。 'BitbucketGit'
'BitbucketHg'
“CodePlexGit”
“CodePlexHg”
'Dropbox'
'ExternalGit'
'ExternalHg'
“GitHub”
'LocalGit'
“None”
“OneDrive”
'Tfs'
“VSO”
'VSTSRM'
tracingOptions 跟踪选项。 string
use32BitWorkerProcess true 使用 32 位工作进程;否则为 false bool
virtualApplications 虚拟应用程序。 VirtualApplication[]
vnetName 虚拟网络名称。 字符串
vnetPrivatePortsCount 分配给此应用的专用端口数。 这些将在运行时动态分配。 int
vnetRouteAllEnabled 虚拟网络“全部路由”已启用。 这会导致所有出站流量都应用虚拟网络安全组和用户定义的路由。 bool
websiteTimeZone 设置站点用于生成时间戳的时区。 与 Linux 和 Windows App 服务兼容。 设置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 下列出的时区之一 string
webSocketsEnabled true 如果启用了 WebSocket,则为 ;否则为 false bool
windowsFxVersion Xenon 应用框架和版本 字符串
xManagedServiceIdentityId 显式托管服务标识 ID int

ApiDefinitionInfo

名称 说明
url API 定义的 URL。 string

ApiManagementConfig

名称 说明 Value
id APIM-Api 标识符。 string

NameValuePair

名称 说明
name 对名称。 string
value 对值。 string

AutoHealRules

名称 说明
actions 触发规则时要执行的操作。 AutoHealActions
触发器 描述何时执行自动愈合操作的条件。 AutoHealTriggers

AutoHealActions

名称 说明
actionType 要执行的预定义操作。 “CustomAction”
“LogEvent”
“回收”
customAction 要执行的自定义操作。 AutoHealCustomAction
minProcessExecutionTime 进程必须执行的最短时间
执行操作之前
字符串

AutoHealCustomAction

名称 说明
exe 要运行的可执行文件。 string
parameters 可执行文件的参数。 字符串

AutoHealTriggers

名称 说明
privateBytesInKB 基于专用字节的规则。 int
请求 基于请求总数的规则。 RequestsBasedTrigger
slowRequests 基于请求执行时间的规则。 SlowRequestsBasedTrigger
slowRequestsWithPath 基于具有路径的多个慢速请求规则的规则 SlowRequestsBasedTrigger[]
statusCodes 基于状态代码的规则。 StatusCodesBasedTrigger[]
statusCodesRange 基于状态代码范围的规则。 StatusCodesRangeBasedTrigger[]

RequestsBasedTrigger

名称 说明 Value
count 请求计数。 int
timeInterval 时间间隔。 字符串

SlowRequestsBasedTrigger

名称 说明 Value
count 请求计数。 int
path 请求路径。 string
timeInterval 时间间隔。 字符串
timeTaken 花费的时间。 字符串

StatusCodesBasedTrigger

名称 说明 Value
count 请求计数。 int
path 请求路径 string
status HTTP 状态代码。 int
subStatus 请求子状态。 int
timeInterval 时间间隔。 字符串
win32Status Win32 错误代码。 int

StatusCodesRangeBasedTrigger

名称 说明 Value
count 请求计数。 int
path string
statusCodes HTTP 状态代码。 string
timeInterval 时间间隔。 字符串

ConnStringInfo

名称 说明
connectionString 连接字符串值。 字符串
name 连接字符串的名称。 字符串
type 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
'RedisCache'
'SQLAzure'
'SQLServer'
“ServiceBus”

CorsSettings

名称 说明
allowedOrigins 获取或设置应允许进行跨源的源列表
调用 (,例如: http://example.com:12345) 。 使用“*”,允许所有来源。
string[]
supportCredentials 获取或设置是否允许使用凭据的 CORS 请求。 请参阅
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
以获取更多详细信息。
bool

试验

名称 说明
rampUpRules 增加规则的列表。 RampUpRule[]

RampUpRule

名称 说明
actionHostName 流量将重定向到的槽的主机名(如果决定)。 例如,myapp-stage.azurewebsites.net。 字符串
changeDecisionCallbackUrl 可以在 TiPCallback 站点扩展中提供可指定 URL 的自定义决策算法。 有关基架和合同,请参阅 TiPCallback 站点扩展。
https://www.siteextensions.net/packages/TiPCallback/
字符串
changeIntervalInMinutes 指定重新计算 ReroutePercentage 的间隔(以分钟为单位)。 int
changeStep 在自动增加方案中,这是添加 ReroutePercentage /删除的步骤,直到达到 \nMinReroutePercentage
MaxReroutePercentage. .\n自定义决策算法中指定的 ChangeIntervalInMinutes每 N 分钟检查一次站点指标
可以在 TiPCallback 站点扩展中提供可在 中指定的 ChangeDecisionCallbackUrlURL。
int
maxReroutePercentage 指定 ReroutePercentage 将保留的上限。 int
minReroutePercentage 指定 ReroutePercentage 将保留的下限。 int
name 路由规则的名称。 建议的名称是指向将在试验中接收流量的槽。 字符串
reroutePercentage 将重定向到 ActionHostName的流量的百分比。 int

HandlerMapping

名称 说明
参数 要传递给脚本处理器的命令行参数。 字符串
扩展 使用此扩展的请求将使用指定的 FastCGI 应用程序进行处理。 字符串
scriptProcessor FastCGI 应用程序的绝对路径。 字符串

IpSecurityRestriction

名称 说明
action 允许或拒绝对此 IP 范围的访问。 字符串
description IP 限制规则说明。 string
headers 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 或空 (默认) ,则允许任何转发的 for 链 (或缺少) 。
- 如果任何地址 (链中不包括端口号) (逗号分隔) 与 属性定义的 CIDR 匹配。

X-Azure-FDID 和 X-FD-HealthProbe。
匹配逻辑完全匹配。
对象 (object)
ipAddress 安全限制的有效 IP 地址。
它可以采用纯 ipv4 地址的形式, (所需的 SubnetMask 属性) 或
CIDR 表示法,例如 ipv4/mask (前导位匹配) 。 对于 CIDR,
不得指定 SubnetMask 属性。
字符串
name IP 限制规则名称。 字符串
priority IP 限制规则的优先级。 int
subnetMask 限制的有效 IP 地址范围的子网掩码。 string
subnetTrafficTag (内部) 子网流量标记 int
标记 定义此 IP 筛选器的用途。 这是为了支持代理上的 IP 筛选。 'Default'
“ServiceTag”
“XffProxy”
vnetSubnetResourceId 虚拟网络资源 ID 字符串
vnetTrafficTag (内部) Vnet 流量标记 int

SiteLimits

名称 说明
maxDiskSizeInMb 允许的最大磁盘大小使用量(以 MB 为单位)。 int
maxMemoryInMb 允许的最大内存使用量(以 MB 为单位)。 int
maxPercentageCpu 允许的最大 CPU 使用率百分比。 int

PushSettings

名称 说明
kind 资源类型。 string
properties PushSettings 资源特定的属性 PushSettingsProperties

PushSettingsProperties

名称 说明
dynamicTagsJson 获取或设置一个 JSON 字符串,其中包含将从推送注册终结点中的用户声明评估的动态标记列表。 字符串
isPushEnabled 获取或设置一个标志,指示是否启用推送终结点。 bool (必需)
tagsRequiringAuth 获取或设置一个 JSON 字符串,其中包含需要在推送注册终结点中使用用户身份验证的标记列表。
标记可以包含字母数字字符和以下内容:
'_', '@', '#', '.', ':', '-'.
应在 PushRequestHandler 中执行验证。
字符串
tagWhitelistJson 获取或设置一个 JSON 字符串,其中包含允许推送注册终结点使用的标记列表。 字符串

VirtualApplication

名称 说明
physicalPath 物理路径。 string
preloadEnabled true 如果启用了预加载,则为 ;否则为 false bool
virtualDirectories 虚拟应用程序的虚拟目录。 VirtualDirectory[]
virtualPath 虚拟路径。 字符串

VirtualDirectory

名称 说明
physicalPath 物理路径。 字符串
virtualPath 虚拟应用程序的路径。 字符串

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
使用部署槽位预配消耗计划函数

部署到 Azure
此模板在消耗计划(动态托管计划)上预配函数应用。 应用按需运行,每次执行计费,没有长期资源承诺。 还有其他模板可用于在专用托管计划中进行预配。
具有部署槽位的 Azure 函数应用

部署到 Azure
此模板在具有生产槽位和额外部署槽位的高级计划上预配函数应用。
具有自定义部署槽位的 Web 应用

部署到 Azure
此模板提供了一种在 Azure Web 应用 上部署具有自定义部署槽位的 Web 应用的简单方法。
高可用性多区域 Web 应用

部署到 Azure
通过此模板,可以在 Azure Front Door 后面的不同区域中使用两个 Web 应用创建安全、高度可用的多区域端到端解决方案
保护 N 层 Web 应用

部署到 Azure
此模板允许你创建一个安全的端到端解决方案,其中包含两个具有过渡槽的 Web 应用(前端和后端),前端将通过 VNet 注入和专用终结点安全地使用后端

ARM 模板资源定义

可以使用针对以下操作部署站点/槽资源类型:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Web/sites/slots 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Web/sites/slots",
  "apiVersion": "2022-09-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "kind": "string",
  "extendedLocation": {
    "name": "string"
  },
  "identity": {
    "type": "string",
    "userAssignedIdentities": {}
  },
  "properties": {
    "clientAffinityEnabled": "bool",
    "clientCertEnabled": "bool",
    "clientCertExclusionPaths": "string",
    "clientCertMode": "string",
    "cloningInfo": {
      "appSettingsOverrides": {},
      "cloneCustomHostNames": "bool",
      "cloneSourceControl": "bool",
      "configureLoadBalancing": "bool",
      "correlationId": "string",
      "hostingEnvironment": "string",
      "overwrite": "bool",
      "sourceWebAppId": "string",
      "sourceWebAppLocation": "string",
      "trafficManagerProfileId": "string",
      "trafficManagerProfileName": "string"
    },
    "containerSize": "int",
    "customDomainVerificationId": "string",
    "dailyMemoryTimeQuota": "int",
    "enabled": "bool",
    "hostingEnvironmentProfile": {
      "id": "string"
    },
    "hostNamesDisabled": "bool",
    "hostNameSslStates": [
      {
        "hostType": "string",
        "name": "string",
        "sslState": "string",
        "thumbprint": "string",
        "toUpdate": "bool",
        "virtualIP": "string"
      }
    ],
    "httpsOnly": "bool",
    "hyperV": "bool",
    "isXenon": "bool",
    "keyVaultReferenceIdentity": "string",
    "managedEnvironmentId": "string",
    "publicNetworkAccess": "string",
    "redundancyMode": "string",
    "reserved": "bool",
    "scmSiteAlsoStopped": "bool",
    "serverFarmId": "string",
    "siteConfig": {
      "acrUseManagedIdentityCreds": "bool",
      "acrUserManagedIdentityID": "string",
      "alwaysOn": "bool",
      "apiDefinition": {
        "url": "string"
      },
      "apiManagementConfig": {
        "id": "string"
      },
      "appCommandLine": "string",
      "appSettings": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "autoHealEnabled": "bool",
      "autoHealRules": {
        "actions": {
          "actionType": "string",
          "customAction": {
            "exe": "string",
            "parameters": "string"
          },
          "minProcessExecutionTime": "string"
        },
        "triggers": {
          "privateBytesInKB": "int",
          "requests": {
            "count": "int",
            "timeInterval": "string"
          },
          "slowRequests": {
            "count": "int",
            "path": "string",
            "timeInterval": "string",
            "timeTaken": "string"
          },
          "slowRequestsWithPath": [
            {
              "count": "int",
              "path": "string",
              "timeInterval": "string",
              "timeTaken": "string"
            }
          ],
          "statusCodes": [
            {
              "count": "int",
              "path": "string",
              "status": "int",
              "subStatus": "int",
              "timeInterval": "string",
              "win32Status": "int"
            }
          ],
          "statusCodesRange": [
            {
              "count": "int",
              "path": "string",
              "statusCodes": "string",
              "timeInterval": "string"
            }
          ]
        }
      },
      "autoSwapSlotName": "string",
      "azureStorageAccounts": {},
      "connectionStrings": [
        {
          "connectionString": "string",
          "name": "string",
          "type": "string"
        }
      ],
      "cors": {
        "allowedOrigins": [ "string" ],
        "supportCredentials": "bool"
      },
      "defaultDocuments": [ "string" ],
      "detailedErrorLoggingEnabled": "bool",
      "documentRoot": "string",
      "elasticWebAppScaleLimit": "int",
      "experiments": {
        "rampUpRules": [
          {
            "actionHostName": "string",
            "changeDecisionCallbackUrl": "string",
            "changeIntervalInMinutes": "int",
            "changeStep": "int",
            "maxReroutePercentage": "int",
            "minReroutePercentage": "int",
            "name": "string",
            "reroutePercentage": "int"
          }
        ]
      },
      "ftpsState": "string",
      "functionAppScaleLimit": "int",
      "functionsRuntimeScaleMonitoringEnabled": "bool",
      "handlerMappings": [
        {
          "arguments": "string",
          "extension": "string",
          "scriptProcessor": "string"
        }
      ],
      "healthCheckPath": "string",
      "http20Enabled": "bool",
      "httpLoggingEnabled": "bool",
      "ipSecurityRestrictions": [
        {
          "action": "string",
          "description": "string",
          "headers": {},
          "ipAddress": "string",
          "name": "string",
          "priority": "int",
          "subnetMask": "string",
          "subnetTrafficTag": "int",
          "tag": "string",
          "vnetSubnetResourceId": "string",
          "vnetTrafficTag": "int"
        }
      ],
      "ipSecurityRestrictionsDefaultAction": "string",
      "javaContainer": "string",
      "javaContainerVersion": "string",
      "javaVersion": "string",
      "keyVaultReferenceIdentity": "string",
      "limits": {
        "maxDiskSizeInMb": "int",
        "maxMemoryInMb": "int",
        "maxPercentageCpu": "int"
      },
      "linuxFxVersion": "string",
      "loadBalancing": "string",
      "localMySqlEnabled": "bool",
      "logsDirectorySizeLimit": "int",
      "managedPipelineMode": "string",
      "managedServiceIdentityId": "int",
      "metadata": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "minimumElasticInstanceCount": "int",
      "minTlsVersion": "string",
      "netFrameworkVersion": "string",
      "nodeVersion": "string",
      "numberOfWorkers": "int",
      "phpVersion": "string",
      "powerShellVersion": "string",
      "preWarmedInstanceCount": "int",
      "publicNetworkAccess": "string",
      "publishingUsername": "string",
      "push": {
        "kind": "string",
        "properties": {
          "dynamicTagsJson": "string",
          "isPushEnabled": "bool",
          "tagsRequiringAuth": "string",
          "tagWhitelistJson": "string"
        }
      },
      "pythonVersion": "string",
      "remoteDebuggingEnabled": "bool",
      "remoteDebuggingVersion": "string",
      "requestTracingEnabled": "bool",
      "requestTracingExpirationTime": "string",
      "scmIpSecurityRestrictions": [
        {
          "action": "string",
          "description": "string",
          "headers": {},
          "ipAddress": "string",
          "name": "string",
          "priority": "int",
          "subnetMask": "string",
          "subnetTrafficTag": "int",
          "tag": "string",
          "vnetSubnetResourceId": "string",
          "vnetTrafficTag": "int"
        }
      ],
      "scmIpSecurityRestrictionsDefaultAction": "string",
      "scmIpSecurityRestrictionsUseMain": "bool",
      "scmMinTlsVersion": "string",
      "scmType": "string",
      "tracingOptions": "string",
      "use32BitWorkerProcess": "bool",
      "virtualApplications": [
        {
          "physicalPath": "string",
          "preloadEnabled": "bool",
          "virtualDirectories": [
            {
              "physicalPath": "string",
              "virtualPath": "string"
            }
          ],
          "virtualPath": "string"
        }
      ],
      "vnetName": "string",
      "vnetPrivatePortsCount": "int",
      "vnetRouteAllEnabled": "bool",
      "websiteTimeZone": "string",
      "webSocketsEnabled": "bool",
      "windowsFxVersion": "string",
      "xManagedServiceIdentityId": "int"
    },
    "storageAccountRequired": "bool",
    "virtualNetworkSubnetId": "string",
    "vnetContentShareEnabled": "bool",
    "vnetImagePullEnabled": "bool",
    "vnetRouteAllEnabled": "bool"
  }
}

属性值

sites/slots

名称 说明 Value
type 资源类型 “Microsoft.Web/sites/slots”
apiVersion 资源 API 版本 '2022-09-01'
name 资源名称

了解如何在 JSON ARM 模板中为子资源设置名称和类型。
字符串 (必需)

字符限制:2-59

有效字符:
可映射到 Punycode 的字母数字、连字符和 Unicode 字符
location 资源位置。 字符串 (必需)
标记 资源标记。 标记名称和值的字典。 请参阅 模板中的标记
kind 资源类型。 字符串
extendedLocation 扩展位置。 ExtendedLocation
标识 托管服务标识。 ManagedServiceIdentity
properties 特定于站点资源的属性 SiteProperties

ExtendedLocation

名称 说明
name 扩展位置的名称。 string

ManagedServiceIdentity

名称 说明 Value
type 托管服务标识的类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户分配标识的列表。 用户标识字典密钥引用将是采用以下格式的 ARM 资源 ID:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} 对象 (object)

SiteProperties

名称 说明
clientAffinityEnabled true 启用客户端相关性; false 停止发送会话相关性 Cookie,将同一会话中的客户端请求路由到同一实例。 默认值为 true bool
clientCertEnabled true 启用客户端证书身份验证 (TLS 相互身份验证) ;否则为 false。 默认值为 false bool
clientCertExclusionPaths 客户端证书身份验证逗号分隔的排除路径 字符串
clientCertMode 这由 ClientCertEnabled 设置组成。
- ClientCertEnabled:false 表示忽略 ClientCert。
- ClientCertEnabled: true 和 ClientCertMode: Required 表示 ClientCert 是必需的。
- ClientCertEnabled: true 和 ClientCertMode: Optional 表示 ClientCert 可选或已接受。
“可选”
“OptionalInteractiveUser”
“必需”
cloningInfo 如果在应用创建过程中指定,则会从源应用克隆应用。 克隆Info
containerSize 函数容器的大小。 int
customDomainVerificationId 验证分配给应用的自定义域的唯一标识符。 客户会将此 ID 添加到 txt 记录进行验证。 字符串
dailyMemoryTimeQuota 每日允许的最大内存时间配额 (仅适用于) 动态应用。 int
enabled true 如果应用已启用,则为 ;否则为 false。 将此值设置为 false 会禁用应用 (使应用脱机) 。 bool
hostingEnvironmentProfile 要用于应用的应用服务环境。 HostingEnvironmentProfile
hostNamesDisabled true 禁用应用的公共主机名;否则为 false
如果 true为 ,则只能通过 API 管理过程访问应用。
bool
hostNameSslStates 主机名 SSL 状态用于管理应用主机名的 SSL 绑定。 HostNameSslState[]
httpsOnly HttpsOnly:将网站配置为仅接受 https 请求。 重定向的问题
http 请求
bool
hyperV Hyper-V 沙盒。 bool
isXenon 已过时:Hyper-V 沙盒。 bool
keyVaultReferenceIdentity 用于密钥保管库参考身份验证的标识。 字符串
managedEnvironmentId Azure 资源管理器托管此应用的客户的所选托管环境的 ID。 此格式必须为 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} 字符串
publicNetworkAccess 允许或阻止所有公共流量的属性。 允许的值:“Enabled”、“Disabled”或空字符串。 字符串
redundancyMode 站点冗余模式 'ActiveActive'
“Failover”
“GeoRedundant”
“Manual”
“None”
reserved true 如果保留,则为 ;否则为 false bool
scmSiteAlsoStopped true 在停止应用时停止 SCM (KUDU) 站点;否则为 false。 默认为 false bool
serverFarmId 关联的App 服务计划的资源 ID,格式为:“/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}”。 字符串
siteConfig 应用的配置。 SiteConfig
storageAccountRequired 检查是否需要客户提供的存储帐户 bool
virtualNetworkSubnetId Azure 资源管理器区域 VNET 集成要加入的虚拟网络和子网的 ID。
此格式必须为 /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}
string
vnetContentShareEnabled 启用通过虚拟网络访问内容 bool
vnetImagePullEnabled 启用通过虚拟网络拉取映像 bool
vnetRouteAllEnabled 虚拟网络“全部路由”已启用。 这会导致所有出站流量都应用虚拟网络安全组和用户定义的路由。 bool

CloningInfo

名称 说明
appSettingsOverrides 克隆应用的应用程序设置替代。 如果指定,这些设置将替代克隆的设置
从源应用。 否则,将保留源应用中的应用程序设置。
对象 (object)
cloneCustomHostNames true 从源应用克隆自定义主机名;否则为 false bool
cloneSourceControl true 从源应用克隆源代码管理;否则为 false bool
configureLoadBalancing true 为源应用和目标应用配置负载均衡。 bool
correlationId 克隆操作的相关 ID。 此 ID 关联多个克隆操作
一起使用相同的快照。
字符串
hostingEnvironment 应用服务环境。 字符串
overwrite true 覆盖目标应用;否则为 false bool
sourceWebAppId 源应用的 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 要使用的流量管理器配置文件的 ARM 资源 ID(如果存在)。 流量管理器资源 ID 的格式为
/subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}。
string
trafficManagerProfileName 要创建的流量管理器配置文件的名称。 仅当流量管理器配置文件尚不存在时,才需要此项。 字符串

HostingEnvironmentProfile

名称 说明 Value
id 应用服务环境的资源 ID。 string

HostNameSslState

名称 说明
hostType 指示主机名是标准主机名还是存储库主机名。 'Repository'
'Standard'
name 主机名 字符串
sslState SSL 类型。 'Disabled'
“IpBasedEnabled”
'SniEnabled'
thumbprint SSL 证书指纹。 字符串
toUpdate true设置为 可更新现有主机名。 bool
virtualIP 如果启用了基于 IP 的 SSL,则分配给主机名的虚拟 IP 地址。 字符串

SiteConfig

名称 说明
acrUseManagedIdentityCreds 使用托管标识 Creds 进行 ACR 拉取的标志 bool
acrUserManagedIdentityID 如果使用用户托管标识,则为用户托管标识 ClientId 字符串
alwaysOn true如果启用Always On,则为 ;否则为 false bool
apiDefinition 有关应用的正式 API 定义的信息。 ApiDefinitionInfo
apiManagementConfig 链接到应用的 Azure API 管理设置。 ApiManagementConfig
appCommandLine 要启动的应用命令行。 string
appSettings 应用程序设置。 NameValuePair[]
autoHealEnabled true 如果启用自动愈合,则为 ;否则为 false bool
autoHealRules 自动愈合规则。 AutoHealRules
autoSwapSlotName 自动交换槽名称。 字符串
azureStorageAccounts Azure 存储帐户列表。 对象 (object)
connectionStrings 连接字符串。 ConnStringInfo[]
cors 跨域资源共享 (CORS) 设置。 CorsSettings
defaultDocuments 默认文档。 string[]
detailedErrorLoggingEnabled true 如果启用了详细错误日志记录,则为 ;否则为 false bool
documentRoot 文档根目录。 字符串
elasticWebAppScaleLimit 站点可以横向扩展到的最大辅助角色数。
此设置仅适用于 ElasticScaleEnabled 为 的计划中的应用 true
int
experiments 这是多态类型的解决方法。 试验
ftpsState FTP/FTPS 服务的状态 “AllAllowed”
'Disabled'
'FtpsOnly'
functionAppScaleLimit 站点可以横向扩展到的最大辅助角色数。
此设置仅适用于消耗和弹性高级计划
int
functionsRuntimeScaleMonitoringEnabled 获取或设置一个值,该值指示是否启用函数运行时规模监视。 启用后,
ScaleController 不会直接监视事件源,而是调用
运行时以获取缩放状态。
bool
handlerMappings 处理程序映射。 HandlerMapping[]
healthCheckPath 运行状况检查路径 string
http20Enabled Http20Enabled:配置网站以允许客户端通过 http2.0 进行连接 bool
httpLoggingEnabled true 如果启用了 HTTP 日志记录,则为 ;否则为 false bool
ipSecurityRestrictions main的 IP 安全限制。 IpSecurityRestriction[]
ipSecurityRestrictionsDefaultAction 如果未匹配任何规则,则main访问限制的默认操作。 “允许”
“拒绝”
javaContainer Java 容器。 字符串
javaContainerVersion Java 容器版本。 string
javaVersion Java 版本。 string
keyVaultReferenceIdentity 用于密钥保管库参考身份验证的标识。 字符串
限制 网站限制。 SiteLimits
linuxFxVersion Linux 应用框架和版本 字符串
loadBalancing 站点负载均衡。 “LeastRequests”
“LeastResponseTime”
“PerSiteRoundRobin”
'RequestHash'
“WeightedRoundRobin”
'WeightedTotalTraffic'
localMySqlEnabled true 启用本地 MySQL;否则为 false bool
logsDirectorySizeLimit HTTP 日志目录大小限制。 int
managedPipelineMode 托管管道模式。 “经典”
“Integrated”
managedServiceIdentityId 托管服务标识 ID int
metadata 应用程序元数据。 无法检索此属性,因为它可能包含机密。 NameValuePair[]
minimumElasticInstanceCount 站点的最小实例计数
此设置仅适用于弹性计划
int
minTlsVersion MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本 '1.0'
'1.1'
'1.2'
netFrameworkVersion .NET Framework版本。 string
nodeVersion Node.js 的版本。 string
numberOfWorkers 工作线程数。 int
phpVersion PHP 的版本。 string
powerShellVersion PowerShell 的版本。 string
preWarmedInstanceCount 预热实例数。
此设置仅适用于消耗和弹性计划
int
publicNetworkAccess 允许或阻止所有公共流量的属性。 字符串
publishingUsername 发布用户名。 字符串
push 推送终结点设置。 PushSettings
pythonVersion Python 版本。 字符串
remoteDebuggingEnabled true 如果启用了远程调试,则为 ;否则为 false bool
remoteDebuggingVersion 远程调试版本。 字符串
requestTracingEnabled true 如果启用了请求跟踪,则为 ;否则为 false bool
requestTracingExpirationTime 请求跟踪过期时间。 string
scmIpSecurityRestrictions scm 的 IP 安全限制。 IpSecurityRestriction[]
scmIpSecurityRestrictionsDefaultAction 如果未匹配任何规则,则 scm 访问限制的默认操作。 “允许”
“拒绝”
scmIpSecurityRestrictionsUseMain scm 使用main的 IP 安全限制。 bool
scmMinTlsVersion ScmMinTlsVersion:配置 SCM 站点的 SSL 请求所需的最低 TLS 版本 '1.0'
'1.1'
'1.2'
scmType SCM 类型。 'BitbucketGit'
'BitbucketHg'
“CodePlexGit”
“CodePlexHg”
'Dropbox'
'ExternalGit'
'ExternalHg'
“GitHub”
'LocalGit'
“None”
“OneDrive”
'Tfs'
“VSO”
'VSTSRM'
tracingOptions 跟踪选项。 string
use32BitWorkerProcess true 使用 32 位工作进程;否则为 false bool
virtualApplications 虚拟应用程序。 VirtualApplication[]
vnetName 虚拟网络名称。 字符串
vnetPrivatePortsCount 分配给此应用的专用端口数。 这些将在运行时动态分配。 int
vnetRouteAllEnabled 虚拟网络“全部路由”已启用。 这会导致所有出站流量都应用虚拟网络安全组和用户定义的路由。 bool
websiteTimeZone 设置站点用于生成时间戳的时区。 与 Linux 和 Windows App 服务兼容。 设置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 下列出的时区之一 字符串
webSocketsEnabled true 如果启用了 WebSocket,则为 ;否则为 false bool
windowsFxVersion Xenon 应用框架和版本 字符串
xManagedServiceIdentityId 显式托管服务标识 ID int

ApiDefinitionInfo

名称 说明
url API 定义的 URL。 字符串

ApiManagementConfig

名称 说明 Value
id APIM-Api 标识符。 字符串

NameValuePair

名称 说明
name 对名称。 string
value 对值。 字符串

AutoHealRules

名称 说明
actions 触发规则时要执行的操作。 AutoHealActions
触发器 描述何时执行自动愈合操作的条件。 AutoHealTriggers

AutoHealActions

名称 说明
actionType 要执行的预定义操作。 “CustomAction”
“LogEvent”
“回收”
customAction 要执行的自定义操作。 AutoHealCustomAction
minProcessExecutionTime 进程必须执行的最短时间
执行操作之前
string

AutoHealCustomAction

名称 说明
exe 要运行的可执行文件。 字符串
parameters 可执行文件的参数。 字符串

AutoHealTriggers

名称 说明
privateBytesInKB 基于专用字节的规则。 int
请求 基于请求总数的规则。 RequestsBasedTrigger
slowRequests 基于请求执行时间的规则。 SlowRequestsBasedTrigger
slowRequestsWithPath 基于具有路径的多个慢速请求规则的规则 SlowRequestsBasedTrigger[]
statusCodes 基于状态代码的规则。 StatusCodesBasedTrigger[]
statusCodesRange 基于状态代码范围的规则。 StatusCodesRangeBasedTrigger[]

RequestsBasedTrigger

名称 说明 Value
count 请求计数。 int
timeInterval 时间间隔。 字符串

SlowRequestsBasedTrigger

名称 说明 Value
count 请求计数。 int
path 请求路径。 string
timeInterval 时间间隔。 string
timeTaken 花费的时间。 字符串

StatusCodesBasedTrigger

名称 说明 Value
count 请求计数。 int
path 请求路径 string
status HTTP 状态代码。 int
subStatus 请求子状态。 int
timeInterval 时间间隔。 字符串
win32Status Win32 错误代码。 int

StatusCodesRangeBasedTrigger

名称 说明 Value
count 请求计数。 int
path string
statusCodes HTTP 状态代码。 string
timeInterval 时间间隔。 字符串

ConnStringInfo

名称 说明
connectionString 连接字符串值。 string
name 连接字符串的名称。 字符串
type 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
“RedisCache”
“SQLAzure”
“SQLServer”
“ServiceBus”

CorsSettings

名称 说明
allowedOrigins 获取或设置应允许进行跨源的源列表
调用 (例如: http://example.com:12345) 。 使用“*”,允许所有来源。
string[]
supportCredentials 获取或设置是否允许具有凭据的 CORS 请求。 请参阅
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
以获取更多详细信息。
bool

试验

名称 说明
rampUpRules 加速规则列表。 RampUpRule[]

RampUpRule

名称 说明
actionHostName 流量将重定向到的槽的主机名(如果决定)。 例如,myapp-stage.azurewebsites.net。 字符串
changeDecisionCallbackUrl 可以在 TiPCallback 站点扩展中提供可指定 URL 的自定义决策算法。 有关基架和合同,请参阅 TiPCallback 站点扩展。
https://www.siteextensions.net/packages/TiPCallback/
字符串
changeIntervalInMinutes 指定重新计算 ReroutePercentage 的间隔(以分钟为单位)。 int
changeStep 在自动增加方案中,这是添加 ReroutePercentage /删除的步骤,直到达到 \nMinReroutePercentage
MaxReroutePercentage. .\n自定义决策算法中指定的 ChangeIntervalInMinutes每 N 分钟检查一次站点指标
可以在 TiPCallback 站点扩展中提供可在 中指定的 ChangeDecisionCallbackUrlURL。
int
maxReroutePercentage 指定 ReroutePercentage 将保留的上限。 int
minReroutePercentage 指定 ReroutePercentage 将保留的下限。 int
name 路由规则的名称。 建议的名称是指向将在试验中接收流量的槽。 string
reroutePercentage 将重定向到 ActionHostName的流量的百分比。 int

HandlerMapping

名称 说明
参数 要传递给脚本处理器的命令行参数。 字符串
扩展 使用此扩展的请求将使用指定的 FastCGI 应用程序进行处理。 字符串
scriptProcessor FastCGI 应用程序的绝对路径。 字符串

IpSecurityRestriction

名称 说明
action 允许或拒绝对此 IP 范围的访问。 字符串
description IP 限制规则说明。 字符串
headers 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 或空 (默认) ,则允许任何转发的 for 链 (或缺少) 。
- 如果任何地址 (链中不包括端口号) (逗号分隔) 与 属性定义的 CIDR 匹配。

X-Azure-FDID 和 X-FD-HealthProbe。
匹配逻辑完全匹配。
对象 (object)
ipAddress 安全限制的有效 IP 地址。
它可以采用纯 ipv4 地址的形式, (所需的 SubnetMask 属性) 或
CIDR 表示法,例如 ipv4/mask (前导位匹配) 。 对于 CIDR,
不得指定 SubnetMask 属性。
字符串
name IP 限制规则名称。 字符串
priority IP 限制规则的优先级。 int
subnetMask 限制的有效 IP 地址范围的子网掩码。 字符串
subnetTrafficTag (内部) 子网流量标记 int
标记 定义此 IP 筛选器的用途。 这是为了支持代理上的 IP 筛选。 'Default'
“ServiceTag”
'XffProxy'
vnetSubnetResourceId 虚拟网络资源 ID string
vnetTrafficTag (内部) Vnet 流量标记 int

SiteLimits

名称 说明
maxDiskSizeInMb 允许的最大磁盘大小使用量(以 MB 为单位)。 int
maxMemoryInMb 允许的最大内存使用量(以 MB 为单位)。 int
maxPercentageCpu 允许的最大 CPU 使用率百分比。 int

PushSettings

名称 说明
kind 资源类型。 string
properties PushSettings 资源特定的属性 PushSettingsProperties

PushSettingsProperties

名称 说明
dynamicTagsJson 获取或设置一个 JSON 字符串,其中包含将从推送注册终结点中的用户声明评估的动态标记列表。 string
isPushEnabled 获取或设置一个标志,指示是否启用推送终结点。 bool (必需)
tagsRequiringAuth 获取或设置一个 JSON 字符串,其中包含需要在推送注册终结点中使用用户身份验证的标记列表。
标记可以包含字母数字字符和以下内容:
'_', '@', '#', '.', ':', '-'.
应在 PushRequestHandler 中执行验证。
string
tagWhitelistJson 获取或设置一个 JSON 字符串,其中包含允许推送注册终结点使用的标记列表。 字符串

VirtualApplication

名称 说明
physicalPath 物理路径。 string
preloadEnabled true 如果启用了预加载,则为 ;否则为 false bool
virtualDirectories 虚拟应用程序的虚拟目录。 VirtualDirectory[]
virtualPath 虚拟路径。 string

VirtualDirectory

名称 说明
physicalPath 物理路径。 string
virtualPath 虚拟应用程序的路径。 string

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
使用部署槽位预配消耗计划函数

部署到 Azure
此模板在消耗计划(动态托管计划)上预配函数应用。 应用按需运行,每次执行计费,没有长期资源承诺。 还有其他模板可用于在专用托管计划中进行预配。
具有部署槽位的 Azure 函数应用

部署到 Azure
此模板在具有生产槽位和额外部署槽位的高级计划上预配函数应用。
具有自定义部署槽位的 Web 应用

部署到 Azure
此模板提供了一种在 Azure Web 应用 上部署具有自定义部署槽位的 Web 应用的简单方法。
高可用性多区域 Web 应用

部署到 Azure
通过此模板,可以在 Azure Front Door 后面的不同区域中使用两个 Web 应用创建安全、高度可用的多区域端到端解决方案
保护 N 层 Web 应用

部署到 Azure
此模板允许你创建一个安全的端到端解决方案,其中包含两个具有过渡槽的 Web 应用(前端和后端),前端将通过 VNet 注入和专用终结点安全地使用后端

Terraform (AzAPI 提供程序) 资源定义

可以使用针对以下操作部署站点/槽资源类型:

  • 资源组

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Web/sites/slots 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Web/sites/slots@2022-09-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type = "string"
    identity_ids = []
  }
  body = jsonencode({
    properties = {
      clientAffinityEnabled = bool
      clientCertEnabled = bool
      clientCertExclusionPaths = "string"
      clientCertMode = "string"
      cloningInfo = {
        appSettingsOverrides = {}
        cloneCustomHostNames = bool
        cloneSourceControl = bool
        configureLoadBalancing = bool
        correlationId = "string"
        hostingEnvironment = "string"
        overwrite = bool
        sourceWebAppId = "string"
        sourceWebAppLocation = "string"
        trafficManagerProfileId = "string"
        trafficManagerProfileName = "string"
      }
      containerSize = int
      customDomainVerificationId = "string"
      dailyMemoryTimeQuota = int
      enabled = bool
      hostingEnvironmentProfile = {
        id = "string"
      }
      hostNamesDisabled = bool
      hostNameSslStates = [
        {
          hostType = "string"
          name = "string"
          sslState = "string"
          thumbprint = "string"
          toUpdate = bool
          virtualIP = "string"
        }
      ]
      httpsOnly = bool
      hyperV = bool
      isXenon = bool
      keyVaultReferenceIdentity = "string"
      managedEnvironmentId = "string"
      publicNetworkAccess = "string"
      redundancyMode = "string"
      reserved = bool
      scmSiteAlsoStopped = bool
      serverFarmId = "string"
      siteConfig = {
        acrUseManagedIdentityCreds = bool
        acrUserManagedIdentityID = "string"
        alwaysOn = bool
        apiDefinition = {
          url = "string"
        }
        apiManagementConfig = {
          id = "string"
        }
        appCommandLine = "string"
        appSettings = [
          {
            name = "string"
            value = "string"
          }
        ]
        autoHealEnabled = bool
        autoHealRules = {
          actions = {
            actionType = "string"
            customAction = {
              exe = "string"
              parameters = "string"
            }
            minProcessExecutionTime = "string"
          }
          triggers = {
            privateBytesInKB = int
            requests = {
              count = int
              timeInterval = "string"
            }
            slowRequests = {
              count = int
              path = "string"
              timeInterval = "string"
              timeTaken = "string"
            }
            slowRequestsWithPath = [
              {
                count = int
                path = "string"
                timeInterval = "string"
                timeTaken = "string"
              }
            ]
            statusCodes = [
              {
                count = int
                path = "string"
                status = int
                subStatus = int
                timeInterval = "string"
                win32Status = int
              }
            ]
            statusCodesRange = [
              {
                count = int
                path = "string"
                statusCodes = "string"
                timeInterval = "string"
              }
            ]
          }
        }
        autoSwapSlotName = "string"
        azureStorageAccounts = {}
        connectionStrings = [
          {
            connectionString = "string"
            name = "string"
            type = "string"
          }
        ]
        cors = {
          allowedOrigins = [
            "string"
          ]
          supportCredentials = bool
        }
        defaultDocuments = [
          "string"
        ]
        detailedErrorLoggingEnabled = bool
        documentRoot = "string"
        elasticWebAppScaleLimit = int
        experiments = {
          rampUpRules = [
            {
              actionHostName = "string"
              changeDecisionCallbackUrl = "string"
              changeIntervalInMinutes = int
              changeStep = int
              maxReroutePercentage = int
              minReroutePercentage = int
              name = "string"
              reroutePercentage = int
            }
          ]
        }
        ftpsState = "string"
        functionAppScaleLimit = int
        functionsRuntimeScaleMonitoringEnabled = bool
        handlerMappings = [
          {
            arguments = "string"
            extension = "string"
            scriptProcessor = "string"
          }
        ]
        healthCheckPath = "string"
        http20Enabled = bool
        httpLoggingEnabled = bool
        ipSecurityRestrictions = [
          {
            action = "string"
            description = "string"
            headers = {}
            ipAddress = "string"
            name = "string"
            priority = int
            subnetMask = "string"
            subnetTrafficTag = int
            tag = "string"
            vnetSubnetResourceId = "string"
            vnetTrafficTag = int
          }
        ]
        ipSecurityRestrictionsDefaultAction = "string"
        javaContainer = "string"
        javaContainerVersion = "string"
        javaVersion = "string"
        keyVaultReferenceIdentity = "string"
        limits = {
          maxDiskSizeInMb = int
          maxMemoryInMb = int
          maxPercentageCpu = int
        }
        linuxFxVersion = "string"
        loadBalancing = "string"
        localMySqlEnabled = bool
        logsDirectorySizeLimit = int
        managedPipelineMode = "string"
        managedServiceIdentityId = int
        metadata = [
          {
            name = "string"
            value = "string"
          }
        ]
        minimumElasticInstanceCount = int
        minTlsVersion = "string"
        netFrameworkVersion = "string"
        nodeVersion = "string"
        numberOfWorkers = int
        phpVersion = "string"
        powerShellVersion = "string"
        preWarmedInstanceCount = int
        publicNetworkAccess = "string"
        publishingUsername = "string"
        push = {
          kind = "string"
          properties = {
            dynamicTagsJson = "string"
            isPushEnabled = bool
            tagsRequiringAuth = "string"
            tagWhitelistJson = "string"
          }
        }
        pythonVersion = "string"
        remoteDebuggingEnabled = bool
        remoteDebuggingVersion = "string"
        requestTracingEnabled = bool
        requestTracingExpirationTime = "string"
        scmIpSecurityRestrictions = [
          {
            action = "string"
            description = "string"
            headers = {}
            ipAddress = "string"
            name = "string"
            priority = int
            subnetMask = "string"
            subnetTrafficTag = int
            tag = "string"
            vnetSubnetResourceId = "string"
            vnetTrafficTag = int
          }
        ]
        scmIpSecurityRestrictionsDefaultAction = "string"
        scmIpSecurityRestrictionsUseMain = bool
        scmMinTlsVersion = "string"
        scmType = "string"
        tracingOptions = "string"
        use32BitWorkerProcess = bool
        virtualApplications = [
          {
            physicalPath = "string"
            preloadEnabled = bool
            virtualDirectories = [
              {
                physicalPath = "string"
                virtualPath = "string"
              }
            ]
            virtualPath = "string"
          }
        ]
        vnetName = "string"
        vnetPrivatePortsCount = int
        vnetRouteAllEnabled = bool
        websiteTimeZone = "string"
        webSocketsEnabled = bool
        windowsFxVersion = "string"
        xManagedServiceIdentityId = int
      }
      storageAccountRequired = bool
      virtualNetworkSubnetId = "string"
      vnetContentShareEnabled = bool
      vnetImagePullEnabled = bool
      vnetRouteAllEnabled = bool
    }
    kind = "string"
    extendedLocation = {
      name = "string"
    }
  })
}

属性值

sites/slots

名称 说明 Value
type 资源类型 “Microsoft.Web/sites/slots@2022-09-01”
name 资源名称 字符串 (必需)

字符限制:2-59

有效字符:
可映射到 Punycode 的字母数字、连字符和 Unicode 字符
location 资源位置。 字符串 (必需)
parent_id 此资源的父资源 ID。 类型为“站点”的资源的 ID
标记 资源标记。 标记名称和值的字典。
kind 资源类型。 字符串
extendedLocation 扩展位置。 ExtendedLocation
标识 托管服务标识。 ManagedServiceIdentity
properties 特定于站点资源的属性 SiteProperties

ExtendedLocation

名称 说明
name 扩展位置的名称。 字符串

ManagedServiceIdentity

名称 说明 Value
type 托管服务标识的类型。 “SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
identity_ids 与资源关联的用户分配标识的列表。 用户标识字典密钥引用将是采用以下格式的 ARM 资源 ID:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} 用户标识 ID 数组。

SiteProperties

名称 说明
clientAffinityEnabled true 启用客户端相关性; false 停止发送会话相关性 Cookie,将同一会话中的客户端请求路由到同一实例。 默认值为 true bool
clientCertEnabled true 启用客户端证书身份验证 (TLS 相互身份验证) ;否则为 false。 默认值为 false bool
clientCertExclusionPaths 客户端证书身份验证逗号分隔的排除路径 string
clientCertMode 这由 ClientCertEnabled 设置组成。
- ClientCertEnabled:false 表示忽略 ClientCert。
- ClientCertEnabled: true 和 ClientCertMode: Required 表示 ClientCert 是必需的。
- ClientCertEnabled: true 和 ClientCertMode: Optional 表示 ClientCert 可选或已接受。
“可选”
“OptionalInteractiveUser”
“必需”
cloningInfo 如果在应用创建过程中指定,则会从源应用克隆应用。 克隆Info
containerSize 函数容器的大小。 int
customDomainVerificationId 验证分配给应用的自定义域的唯一标识符。 客户会将此 ID 添加到 txt 记录进行验证。 字符串
dailyMemoryTimeQuota 每日允许的最大内存时间配额 (仅适用于) 动态应用。 int
enabled true 如果应用已启用,则为 ;否则为 false。 将此值设置为 false 会禁用应用 (使应用脱机) 。 bool
hostingEnvironmentProfile 应用服务环境用于应用。 HostingEnvironmentProfile
hostNamesDisabled true 禁用应用的公共主机名;否则为 false
如果 true为 ,则只能通过 API 管理过程访问应用。
bool
hostNameSslStates 主机名 SSL 状态用于管理应用的主机名的 SSL 绑定。 HostNameSslState[]
httpsOnly HttpsOnly:将网站配置为仅接受 https 请求。 重定向的问题
http 请求
bool
hyperV Hyper-V 沙盒。 bool
isXenon 已过时:Hyper-V 沙盒。 bool
keyVaultReferenceIdentity 用于密钥保管库参考身份验证的标识。 string
managedEnvironmentId Azure 资源管理器托管此应用的客户的所选托管环境的 ID。 此格式必须为 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} 字符串
publicNetworkAccess 允许或阻止所有公共流量的属性。 允许的值:“Enabled”、“Disabled”或空字符串。 string
redundancyMode 站点冗余模式 “ActiveActive”
“故障转移”
“GeoRedundant”
“手动”
"None"
reserved true 如果保留,则为 ;否则为 false bool
scmSiteAlsoStopped true 在停止应用时停止 SCM (KUDU) 站点;否则为 false。 默认为 false bool
serverFarmId 关联的App 服务计划的资源 ID,格式为:“/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}”。 string
siteConfig 应用的配置。 SiteConfig
storageAccountRequired 检查是否需要客户提供的存储帐户 bool
virtualNetworkSubnetId Azure 资源管理器区域 VNET 集成要加入的虚拟网络和子网的 ID。
此格式必须为 /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}
string
vnetContentShareEnabled 启用通过虚拟网络访问内容 bool
vnetImagePullEnabled 启用通过虚拟网络拉取映像 bool
vnetRouteAllEnabled 虚拟网络“全部路由”已启用。 这会导致所有出站流量都应用虚拟网络安全组和用户定义的路由。 bool

CloningInfo

名称 说明
appSettingsOverrides 克隆应用的应用程序设置替代。 如果指定,这些设置将替代克隆的设置
从源应用。 否则,将保留源应用中的应用程序设置。
对象 (object)
cloneCustomHostNames true 从源应用克隆自定义主机名;否则为 false bool
cloneSourceControl true 从源应用克隆源代码管理;否则为 false bool
configureLoadBalancing true 为源应用和目标应用配置负载均衡。 bool
correlationId 克隆操作的相关 ID。 此 ID 关联多个克隆操作
一起使用相同的快照。
string
hostingEnvironment 应用服务环境。 字符串
overwrite true 覆盖目标应用;否则为 false bool
sourceWebAppId 源应用的 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 要使用的流量管理器配置文件的 ARM 资源 ID(如果存在)。 流量管理器资源 ID 的格式为
/subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}。
字符串
trafficManagerProfileName 要创建的流量管理器配置文件的名称。 仅当流量管理器配置文件尚不存在时,才需要这样做。 字符串

HostingEnvironmentProfile

名称 说明 Value
id 应用服务环境的资源 ID。 string

HostNameSslState

名称 说明
hostType 指示主机名是标准主机名还是存储库主机名。 “存储库”
“Standard”
name 主机名 字符串
sslState SSL 类型。 “Disabled”
“IpBasedEnabled”
“SniEnabled”
thumbprint SSL 证书指纹。 string
toUpdate 设置为 以 true 更新现有主机名。 bool
virtualIP 如果启用了基于 IP 的 SSL,则分配给主机名的虚拟 IP 地址。 字符串

SiteConfig

名称 说明
acrUseManagedIdentityCreds 将托管标识 Creds 用于 ACR 拉取的标志 bool
acrUserManagedIdentityID 如果使用用户托管标识,则用户托管标识 ClientId 字符串
alwaysOn true如果启用Always On,则为 ;否则为 false bool
apiDefinition 有关应用的正式 API 定义的信息。 ApiDefinitionInfo
apiManagementConfig 链接到应用的 Azure API 管理设置。 ApiManagementConfig
appCommandLine 要启动的应用命令行。 string
appSettings 应用程序设置。 NameValuePair[]
autoHealEnabled true 如果启用了“自动愈合”,则为 ;否则为 false bool
autoHealRules 自动愈合规则。 AutoHealRules
autoSwapSlotName 自动交换槽名称。 string
azureStorageAccounts Azure 存储帐户列表。 对象 (object)
connectionStrings 连接字符串。 ConnStringInfo[]
cors 跨源资源共享 (CORS) 设置。 CorsSettings
defaultDocuments 默认文档。 string[]
detailedErrorLoggingEnabled true 如果启用了详细错误日志记录,则为 ;否则为 false bool
documentRoot 文档根目录。 字符串
elasticWebAppScaleLimit 网站可以横向扩展到的最大辅助角色数。
此设置仅适用于 ElasticScaleEnabled 为的计划中的应用 true
int
experiments 这是针对多态类型的解决方法。 试验
ftpsState FTP/FTPS 服务的状态 “AllAllowed”
“Disabled”
“FtpsOnly”
functionAppScaleLimit 站点可以横向扩展到的最大辅助角色数。
此设置仅适用于消耗和弹性高级计划
int
functionsRuntimeScaleMonitoringEnabled 获取或设置一个值,该值指示是否启用函数运行时规模监视。 启用后,
ScaleController 不会直接监视事件源,而是调用
运行时以获取缩放状态。
bool
handlerMappings 处理程序映射。 HandlerMapping[]
healthCheckPath 运行状况检查路径 字符串
http20Enabled Http20Enabled:配置网站以允许客户端通过 http2.0 进行连接 bool
httpLoggingEnabled true 如果启用了 HTTP 日志记录,则为 ;否则为 false bool
ipSecurityRestrictions main的 IP 安全限制。 IpSecurityRestriction[]
ipSecurityRestrictionsDefaultAction 如果未匹配任何规则,则main访问限制的默认操作。 “允许”
“拒绝”
javaContainer Java 容器。 string
javaContainerVersion Java 容器版本。 字符串
javaVersion Java 版本。 字符串
keyVaultReferenceIdentity 用于密钥保管库参考身份验证的标识。 string
限制 网站限制。 SiteLimits
linuxFxVersion Linux 应用框架和版本 字符串
loadBalancing 站点负载均衡。 “LeastRequests”
“LeastResponseTime”
“PerSiteRoundRobin”
“RequestHash”
“WeightedRoundRobin”
“WeightedTotalTraffic”
localMySqlEnabled true 启用本地 MySQL;否则为 false bool
logsDirectorySizeLimit HTTP 日志目录大小限制。 int
managedPipelineMode 托管管道模式。 “经典”
“集成”
managedServiceIdentityId 托管服务标识 ID int
metadata 应用程序元数据。 无法检索此属性,因为它可能包含机密。 NameValuePair[]
minimumElasticInstanceCount 站点的最小实例计数
此设置仅适用于弹性计划
int
minTlsVersion MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本 "1.0"
"1.1"
"1.2"
netFrameworkVersion .NET Framework版本。 string
nodeVersion Node.js 的版本。 字符串
numberOfWorkers 工作线程数。 int
phpVersion PHP 的版本。 string
powerShellVersion PowerShell 的版本。 字符串
preWarmedInstanceCount 预热实例数。
此设置仅适用于消耗和弹性计划
int
publicNetworkAccess 允许或阻止所有公共流量的属性。 字符串
publishingUsername 发布用户名。 字符串
push 推送终结点设置。 PushSettings
pythonVersion Python 的版本。 字符串
remoteDebuggingEnabled true 如果启用了远程调试,则为 ;否则为 false bool
remoteDebuggingVersion 远程调试版本。 字符串
requestTracingEnabled true 如果启用了请求跟踪,则为 ;否则为 false bool
requestTracingExpirationTime 请求跟踪过期时间。 字符串
scmIpSecurityRestrictions scm 的 IP 安全限制。 IpSecurityRestriction[]
scmIpSecurityRestrictionsDefaultAction 如果未匹配任何规则,则 scm 访问限制的默认操作。 “允许”
“拒绝”
scmIpSecurityRestrictionsUseMain scm 使用main的 IP 安全限制。 bool
scmMinTlsVersion ScmMinTlsVersion:配置 SCM 站点的 SSL 请求所需的最低 TLS 版本 "1.0"
"1.1"
"1.2"
scmType SCM 类型。 “BitbucketGit”
“BitbucketHg”
“CodePlexGit”
“CodePlexHg”
“Dropbox”
“ExternalGit”
“ExternalHg”
“GitHub”
“LocalGit”
"None"
“OneDrive”
“Tfs”
“VSO”
“VSTSRM”
tracingOptions 跟踪选项。 string
use32BitWorkerProcess true 使用 32 位工作进程;否则为 false bool
virtualApplications 虚拟应用程序。 VirtualApplication[]
vnetName 虚拟网络名称。 字符串
vnetPrivatePortsCount 分配给此应用的专用端口数。 这些将在运行时动态分配。 int
vnetRouteAllEnabled 虚拟网络启用“全部路由”。 这会导致所有出站流量都应用了虚拟网络安全组和用户定义的路由。 bool
websiteTimeZone 设置站点用于生成时间戳的时区。 与 Linux 和 Windows App 服务兼容。 设置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 下列出的时区之一 string
webSocketsEnabled true 如果已启用 WebSocket,则为 ;否则为 false bool
windowsFxVersion Xenon 应用框架和版本 字符串
xManagedServiceIdentityId 显式托管服务标识 ID int

ApiDefinitionInfo

名称 说明
url API 定义的 URL。 字符串

ApiManagementConfig

名称 说明 Value
id APIM-Api 标识符。 string

NameValuePair

名称 说明
name 对名称。 string
value 对值。 字符串

AutoHealRules

名称 说明
actions 触发规则时要执行的操作。 AutoHealActions
触发器 描述何时执行自动愈合操作的条件。 AutoHealTriggers

AutoHealActions

名称 说明
actionType 要执行的预定义操作。 “CustomAction”
“LogEvent”
“回收”
customAction 要执行的自定义操作。 AutoHealCustomAction
minProcessExecutionTime 进程必须执行的最短时间
执行操作之前
字符串

AutoHealCustomAction

名称 说明
exe 要运行的可执行文件。 字符串
parameters 可执行文件的参数。 string

AutoHealTriggers

名称 说明
privateBytesInKB 基于专用字节的规则。 int
请求 基于请求总数的规则。 RequestsBasedTrigger
slowRequests 基于请求执行时间的规则。 SlowRequestsBasedTrigger
slowRequestsWithPath 基于具有路径的多个慢速请求规则的规则 SlowRequestsBasedTrigger[]
statusCodes 基于状态代码的规则。 StatusCodesBasedTrigger[]
statusCodesRange 基于状态代码范围的规则。 StatusCodesRangeBasedTrigger[]

RequestsBasedTrigger

名称 说明 Value
count 请求计数。 int
timeInterval 时间间隔。 字符串

SlowRequestsBasedTrigger

名称 说明 Value
count 请求计数。 int
path 请求路径。 string
timeInterval 时间间隔。 字符串
timeTaken 花费的时间。 string

StatusCodesBasedTrigger

名称 说明 Value
count 请求计数。 int
path 请求路径 string
status HTTP 状态代码。 int
subStatus 请求子状态。 int
timeInterval 时间间隔。 string
win32Status Win32 错误代码。 int

StatusCodesRangeBasedTrigger

名称 说明 Value
count 请求计数。 int
path string
statusCodes HTTP 状态代码。 string
timeInterval 时间间隔。 string

ConnStringInfo

名称 说明
connectionString 连接字符串值。 string
name 连接字符串的名称。 string
type 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
“RedisCache”
“SQLAzure”
“SQLServer”
“ServiceBus”

CorsSettings

名称 说明
allowedOrigins 获取或设置应允许进行跨源的源列表
调用 (例如: http://example.com:12345) 。 使用“*”,允许所有来源。
string[]
supportCredentials 获取或设置是否允许具有凭据的 CORS 请求。 请参阅
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
以获取更多详细信息。
bool

试验

名称 说明
rampUpRules 加速规则列表。 RampUpRule[]

RampUpRule

名称 说明
actionHostName 流量将重定向到的槽的主机名(如果确定)。 例如,myapp-stage.azurewebsites.net。 string
changeDecisionCallbackUrl 可以在 TiPCallback 站点扩展中提供可指定 URL 的自定义决策算法。 有关基架和合同,请参阅 TiPCallback 站点扩展。
https://www.siteextensions.net/packages/TiPCallback/
字符串
changeIntervalInMinutes 指定重新计算 ReroutePercentage 的间隔(以分钟为单位)。 int
changeStep 在自动加速方案中,这是从 ReroutePercentage 中添加/删除的步骤,直到达到 \nMinReroutePercentage
MaxReroutePercentage. .\n自定义决策算法中指定的 ChangeIntervalInMinutes每 N 分钟检查一次站点指标
可以在 TiPCallback 站点扩展中提供可在 中指定的 ChangeDecisionCallbackUrlURL。
int
maxReroutePercentage 指定 ReroutePercentage 将保留的上限。 int
minReroutePercentage 指定 ReroutePercentage 将保留的下限。 int
name 路由规则的名称。 建议的名称是指向将在试验中接收流量的槽。 字符串
reroutePercentage 将重定向到 ActionHostName的流量的百分比。 int

HandlerMapping

名称 说明
参数 要传递给脚本处理器的命令行参数。 字符串
扩展 使用此扩展的请求将使用指定的 FastCGI 应用程序进行处理。 string
scriptProcessor FastCGI 应用程序的绝对路径。 字符串

IpSecurityRestriction

名称 说明
action 允许或拒绝对此 IP 范围的访问。 string
description IP 限制规则说明。 string
headers 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 或空 (默认) ,则允许任何转发的 for 链 (或缺少) 。
- 如果任何地址 (链中不包括端口号) (逗号分隔) 与 属性定义的 CIDR 匹配。

X-Azure-FDID 和 X-FD-HealthProbe。
匹配逻辑完全匹配。
对象 (object)
ipAddress 安全限制的有效 IP 地址。
它可以采用纯 ipv4 地址的形式, (所需的 SubnetMask 属性) 或
CIDR 表示法,例如 ipv4/mask (前导位匹配) 。 对于 CIDR,
不得指定 SubnetMask 属性。
string
name IP 限制规则名称。 字符串
priority IP 限制规则的优先级。 int
subnetMask 限制的有效 IP 地址范围的子网掩码。 string
subnetTrafficTag (内部) 子网流量标记 int
标记 定义此 IP 筛选器的用途。 这是为了支持代理上的 IP 筛选。 “Default”
“ServiceTag”
“XffProxy”
vnetSubnetResourceId 虚拟网络资源 ID 字符串
vnetTrafficTag (内部) Vnet 流量标记 int

SiteLimits

名称 说明
maxDiskSizeInMb 允许的最大磁盘大小使用量(以 MB 为单位)。 int
maxMemoryInMb 允许的最大内存使用量(以 MB 为单位)。 int
maxPercentageCpu 允许的最大 CPU 使用率百分比。 int

PushSettings

名称 说明
kind 资源类型。 string
properties PushSettings 资源特定的属性 PushSettingsProperties

PushSettingsProperties

名称 说明
dynamicTagsJson 获取或设置一个 JSON 字符串,其中包含将从推送注册终结点中的用户声明评估的动态标记列表。 string
isPushEnabled 获取或设置一个标志,指示是否启用推送终结点。 bool (必需)
tagsRequiringAuth 获取或设置一个 JSON 字符串,其中包含需要在推送注册终结点中使用用户身份验证的标记列表。
标记可以包含字母数字字符和以下内容:
'_', '@', '#', '.', ':', '-'.
应在 PushRequestHandler 中执行验证。
string
tagWhitelistJson 获取或设置一个 JSON 字符串,其中包含允许推送注册终结点使用的标记列表。 字符串

VirtualApplication

名称 说明
physicalPath 物理路径。 字符串
preloadEnabled true 如果启用了预加载,则为 ;否则为 false bool
virtualDirectories 虚拟应用程序的虚拟目录。 VirtualDirectory[]
virtualPath 虚拟路径。 string

VirtualDirectory

名称 说明
physicalPath 物理路径。 字符串
virtualPath 虚拟应用程序的路径。 字符串