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

Microsoft.Web 站点/插槽/配置 2016-08-01

Bicep 资源定义

可以使用目标作部署站点/槽/配置资源类型:

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

用法示例

Bicep 示例

部署应用服务的插槽虚拟网络关联的基本示例。

param resourceName string = 'acctest0001'
param location string = 'westeurope'

resource serverfarm 'Microsoft.Web/serverfarms@2022-09-01' = {
  name: resourceName
  location: location
  sku: {
    name: 'S1'
  }
  properties: {
    hyperV: false
    perSiteScaling: false
    reserved: false
    zoneRedundant: false
  }
}

resource site 'Microsoft.Web/sites@2022-09-01' = {
  name: resourceName
  location: location
  properties: {
    clientAffinityEnabled: false
    clientCertEnabled: false
    clientCertMode: 'Required'
    enabled: true
    httpsOnly: false
    publicNetworkAccess: 'Enabled'
    serverFarmId: serverfarm.id
    siteConfig: {
      acrUseManagedIdentityCreds: false
      alwaysOn: true
      autoHealEnabled: false
      ftpsState: 'Disabled'
      http20Enabled: false
      loadBalancing: 'LeastRequests'
      localMySqlEnabled: false
      managedPipelineMode: 'Integrated'
      minTlsVersion: '1.2'
      publicNetworkAccess: 'Enabled'
      remoteDebuggingEnabled: false
      scmIpSecurityRestrictionsUseMain: false
      scmMinTlsVersion: '1.2'
      use32BitWorkerProcess: true
      vnetRouteAllEnabled: false
      webSocketsEnabled: false
      windowsFxVersion: ''
    }
    vnetRouteAllEnabled: false
  }
}

resource slot 'Microsoft.Web/sites/slots@2022-09-01' = {
  name: resourceName
  location: location
  parent: site
  properties: {
    clientAffinityEnabled: false
    clientCertEnabled: false
    clientCertExclusionPaths: ''
    clientCertMode: 'Required'
    enabled: true
    httpsOnly: false
    publicNetworkAccess: 'Enabled'
    serverFarmId: serverfarm.id
    siteConfig: {
      acrUseManagedIdentityCreds: false
      alwaysOn: true
      autoHealEnabled: false
      ftpsState: 'Disabled'
      http20Enabled: false
      loadBalancing: 'LeastRequests'
      localMySqlEnabled: false
      managedPipelineMode: 'Integrated'
      minTlsVersion: '1.2'
      publicNetworkAccess: 'Enabled'
      remoteDebuggingEnabled: false
      scmIpSecurityRestrictionsUseMain: false
      scmMinTlsVersion: '1.2'
      use32BitWorkerProcess: false
      vnetRouteAllEnabled: false
      webSocketsEnabled: false
      windowsFxVersion: ''
    }
    vnetRouteAllEnabled: false
  }
}

resource config 'Microsoft.Web/sites/slots/config@2022-09-01' = {
  name: 'azurestorageaccounts'
  parent: slot
  properties: {}
}

Azure 验证模块

以下 Azure 验证模块 可用于部署此资源类型。

模块 描述
网页/功能应用 - 插槽 - 配置 AVM 网页/功能应用子模块 - 槽位 - 配置

资源格式

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

resource symbolicname 'Microsoft.Web/sites/slots/config@2016-08-01' = {
  name: 'string'
  // For remaining properties, see microsoft.web/sites/slots/config objects
}

microsoft.web/sites/slots/config 对象

设置 名称 属性以指定对象的类型。

对于 appsettings,请使用:

{
  kind: 'string'
  name: 'appsettings'
  properties: {
    {customized property}: 'string'
  }
}

对于 身份验证,请使用:

{
  kind: 'string'
  name: 'authsettings'
  properties: {
    additionalLoginParams: [
      'string'
    ]
    allowedAudiences: [
      'string'
    ]
    allowedExternalRedirectUrls: [
      'string'
    ]
    clientId: 'string'
    clientSecret: 'string'
    defaultProvider: 'string'
    enabled: bool
    facebookAppId: 'string'
    facebookAppSecret: 'string'
    facebookOAuthScopes: [
      'string'
    ]
    googleClientId: 'string'
    googleClientSecret: 'string'
    googleOAuthScopes: [
      'string'
    ]
    issuer: 'string'
    microsoftAccountClientId: 'string'
    microsoftAccountClientSecret: 'string'
    microsoftAccountOAuthScopes: [
      'string'
    ]
    runtimeVersion: 'string'
    tokenRefreshExtensionHours: int
    tokenStoreEnabled: bool
    twitterConsumerKey: 'string'
    twitterConsumerSecret: 'string'
    unauthenticatedClientAction: 'string'
  }
}

对于 备份,请使用:

{
  kind: 'string'
  name: 'backup'
  properties: {
    backupSchedule: {
      frequencyInterval: int
      frequencyUnit: 'string'
      keepAtLeastOneBackup: bool
      retentionPeriodInDays: int
      startTime: 'string'
    }
    databases: [
      {
        connectionString: 'string'
        connectionStringName: 'string'
        databaseType: 'string'
        name: 'string'
      }
    ]
    enabled: bool
    name: 'string'
    storageAccountUrl: 'string'
    type: 'string'
  }
}

对于 连接字符串,请使用:

{
  kind: 'string'
  name: 'connectionstrings'
  properties: {
    {customized property}: {
      type: 'string'
      value: 'string'
    }
  }
}

对于 日志,请使用:

{
  kind: 'string'
  name: 'logs'
  properties: {
    applicationLogs: {
      azureBlobStorage: {
        level: 'string'
        retentionInDays: int
        sasUrl: 'string'
      }
      azureTableStorage: {
        level: 'string'
        sasUrl: 'string'
      }
      fileSystem: {
        level: 'string'
      }
    }
    detailedErrorMessages: {
      enabled: bool
    }
    failedRequestsTracing: {
      enabled: bool
    }
    httpLogs: {
      azureBlobStorage: {
        enabled: bool
        retentionInDays: int
        sasUrl: 'string'
      }
      fileSystem: {
        enabled: bool
        retentionInDays: int
        retentionInMb: int
      }
    }
  }
}

对于 元数据,请使用:

{
  kind: 'string'
  name: 'metadata'
  properties: {
    {customized property}: 'string'
  }
}

对于 推送设置,请使用:

{
  kind: 'string'
  name: 'pushsettings'
  properties: {
    dynamicTagsJson: 'string'
    isPushEnabled: bool
    tagsRequiringAuth: 'string'
    tagWhitelistJson: 'string'
  }
}

对于 Web,请使用:

{
  kind: 'string'
  name: 'web'
  properties: {
    alwaysOn: bool
    apiDefinition: {
      url: '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
          timeInterval: 'string'
          timeTaken: 'string'
        }
        statusCodes: [
          {
            count: int
            status: int
            subStatus: int
            timeInterval: 'string'
            win32Status: int
          }
        ]
      }
    }
    autoSwapSlotName: 'string'
    connectionStrings: [
      {
        connectionString: 'string'
        name: 'string'
        type: 'string'
      }
    ]
    cors: {
      allowedOrigins: [
        'string'
      ]
    }
    defaultDocuments: [
      'string'
    ]
    detailedErrorLoggingEnabled: bool
    documentRoot: 'string'
    experiments: {
      rampUpRules: [
        {
          actionHostName: 'string'
          changeDecisionCallbackUrl: 'string'
          changeIntervalInMinutes: int
          changeStep: int
          maxReroutePercentage: int
          minReroutePercentage: int
          name: 'string'
          reroutePercentage: int
        }
      ]
    }
    handlerMappings: [
      {
        arguments: 'string'
        extension: 'string'
        scriptProcessor: 'string'
      }
    ]
    http20Enabled: bool
    httpLoggingEnabled: bool
    ipSecurityRestrictions: [
      {
        ipAddress: 'string'
        subnetMask: 'string'
      }
    ]
    javaContainer: 'string'
    javaContainerVersion: 'string'
    javaVersion: 'string'
    limits: {
      maxDiskSizeInMb: int
      maxMemoryInMb: int
      maxPercentageCpu: int
    }
    linuxFxVersion: 'string'
    loadBalancing: 'string'
    localMySqlEnabled: bool
    logsDirectorySizeLimit: int
    managedPipelineMode: 'string'
    minTlsVersion: 'string'
    netFrameworkVersion: 'string'
    nodeVersion: 'string'
    numberOfWorkers: int
    phpVersion: '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'
    scmType: 'string'
    tracingOptions: 'string'
    use32BitWorkerProcess: bool
    virtualApplications: [
      {
        physicalPath: 'string'
        preloadEnabled: bool
        virtualDirectories: [
          {
            physicalPath: 'string'
            virtualPath: 'string'
          }
        ]
        virtualPath: 'string'
      }
    ]
    vnetName: 'string'
    webSocketsEnabled: bool
  }
}

属性值

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “appsettings”(必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:站点/槽
性能 设置。 StringDictionaryProperties

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “authsettings”(必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:站点/槽
性能 SiteAuthSettings 资源特定属性 SiteAuthSettingsProperties

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “backup”(必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:站点/槽
性能 BackupRequest 资源特定属性 BackupRequestProperties

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “connectionstrings”(必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:站点/槽
性能 连接字符串。 ConnectionStringDictionary属性

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “logs”(必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:站点/槽
性能 SiteLogsConfig 资源特定属性 SiteLogsConfigProperties

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “metadata”(必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:站点/槽
性能 设置。 StringDictionaryProperties

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “pushsettings”(必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:站点/槽
性能 PushSettings 资源特定属性 PushSettingsProperties

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “web”(必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:站点/槽
性能 核心资源属性 站点配置

ApiDefinitionInfo

名字 描述 价值
网址 API 定义的 URL。 字符串

应用程序日志配置

名字 描述 价值
azureBlobStorage 将应用程序日志记录到 Blob 存储配置。 AzureBlobStorageApplicationLogsConfig
azureTableStorage 将应用程序日志记录到 Azure 表存储配置。 AzureTableStorageApplicationLogsConfig
文件系统 应用程序日志到文件系统配置。 FileSystemApplicationLogsConfig

AutoHealActions 自动修复作

名字 描述 价值
动作类型 要执行的预定义作。 “CustomAction”
“LogEvent”
“回收”
自定义作 要执行的自定义作。 AutohealCustomAction 自动修复
minProcessExecutionTime (最小进程执行时间) 必须执行进程的最短时间
执行作之前
字符串

AutohealCustomAction 自动修复

名字 描述 价值
exe 要运行的可执行文件。 字符串
参数 可执行文件的参数。 字符串

AutoHealRules 自动修复规则

名字 描述 价值
行动 触发规则时要执行的作。 AutoHealActions 自动修复作
触发器 描述何时执行自动修复作的条件。 AutoHealTriggers 自动修复触发器

AutoHealTriggers 自动修复触发器

名字 描述 价值
privateBytesInKB 基于专用字节的规则。 整数 (int)
请求 基于请求总数的规则。 RequestsBasedTrigger 触发器
slowRequests 请求 基于请求执行时间的规则。 SlowRequestsBasedTrigger 触发器
statusCodes 基于状态代码的规则。 StatusCodesBasedTrigger[]

AzureBlobStorageApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”
保留天数 保留天数。
删除早于 X 天的 Blob。
0 或更低意味着没有保留。
整数 (int)
sasUrl 的 具有读取/写入/列出/删除权限的 Azure Blob 容器的 SAS URL。 字符串

AzureBlobStorageHttpLogsConfig

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔
保留天数 保留天数。
删除早于 X 天的 Blob。
0 或更低意味着没有保留。
整数 (int)
sasUrl 的 具有读取/写入/列出/删除权限的 Azure Blob 容器的 SAS URL。 字符串

AzureTableStorageApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”
sasUrl 的 包含添加/查询/删除权限的 Azure 表的 SAS URL。 string (必需)

BackupRequestProperties

名字 描述 价值
backupSchedule 定期执行备份时计划备份。 备份计划
数据库 备份中包含的数据库。 DatabaseBackupSetting[]
启用 如果启用备份计划(在这种情况下必须包含),则为 true;如果应禁用备份计划,则为 false。 布尔
名字 备份的名称。 string (必需)
storageAccountUrl 的 容器的 SAS URL。 string (必需)
类型 备份的类型。 “Clone”
“Default”
“重定位”
“Snapshot”

备份计划

名字 描述 价值
频率间隔 应执行备份的频率(例如,对于每周备份,应将其设置为 7,FrequencyUnit 应设置为 Day) int (必需)
频率单位 执行备份的频率的时间单位(例如,对于每周备份,应将其设置为 Day,FrequencyInterval 应设置为 7) “Day”
“Hour”(必需)
keepAtLeastOneBackup 如此 如果保留策略应始终在存储帐户中保留至少一个备份,而不考虑备份的年龄:否则为 false。 bool (必需)
retentionPeriodInDays (保留期以天为单位) 删除多少天备份后。 int (必需)
开始时间 计划何时应开始工作。 字符串

ConnectionStringDictionary属性

名字 描述 价值

ConnStringInfo

名字 描述 价值
connectionString 连接字符串 连接字符串值。 字符串
名字 连接字符串的名称。 字符串
类型 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
“RedisCache”
“ServiceBus”
“SQLAzure”
“SQLServer”

ConnStringValueTypePair

名字 描述 价值
类型 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
“RedisCache”
“ServiceBus”
“SQLAzure”
“SQLServer”(必需)
价值 对的值。 string (必需)

CorsSettings

名字 描述 价值
allowedOrigins 的 获取或设置应允许进行跨源的源列表
调用(例如:http://example.com:12345)。 使用“*”允许所有。
字符串[]

DatabaseBackupSetting 数据库备份设置

名字 描述 价值
connectionString 连接字符串 包含要备份或还原的数据库的连接字符串。 如果还原应发生在新数据库,则内部的数据库名称为新数据库。 字符串
connectionStringName 包含链接到 SiteConfig.ConnectionStrings 的连接字符串名称。
这在还原期间与覆盖连接字符串选项一起使用。
字符串
数据库类型 数据库类型(例如 SqlAzure/MySql)。 “LocalMySql”
“MySql”
“PostgreSql”
“SqlAzure”(必需)
名字 字符串

启用配置

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔

实验

名字 描述 价值
rampUp规则 提升规则的列表。 RampUpRule[]

FileSystemApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”

FileSystemHttpLogsConfig 文件

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔
保留天数 保留天数。
删除早于 X 天的文件。
0 或更低意味着没有保留。
整数 (int)
保留(以 Mb 为单位) http 日志文件可以使用的最大大小(以兆字节为单位)。
到达旧日志文件后,将被删除以为新日志文件提供空间。
值可以介于 25 和 100 之间。
int

约束:
最小值 = 25
最大值 = 100

HandlerMapping

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

HttpLogsConfig

名字 描述 价值
azureBlobStorage 将 Http 日志记录到 Azure Blob 存储配置。 AzureBlobStorageHttpLogsConfig
文件系统 将 Http 日志记录到文件系统配置。 FileSystemHttpLogsConfig 文件

IpSecurityRestriction

名字 描述 价值
IP地址 安全限制有效的 IP 地址。 string (必需)
子网掩码 限制有效的 IP 地址范围的子网掩码。 字符串

microsoft.web/sites/slots/config

名字 描述 价值
名字 对于类型 Microsoft.Web/sites/slots/config,设置为“appsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“authsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“backup”。对于类型 Microsoft.Web/sites/slots/config,设置为“connectionstrings”。对于类型 Microsoft.Web/sites/slots/config,设置为“logs”。对于类型 Microsoft.Web/sites/slots/config,设置为“metadata”。对于类型 Microsoft.web/sites/slots/config,设置为“pushsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“web”。 “appsettings”
“authsettings”
“backup”
“connectionstrings”
“logs”
“metadata”
“pushsettings”
“web”(必需)

NameValuePair

名字 描述 价值
名字 配对名称。 字符串
价值 对值。 字符串

PushSettings 设置

名字 描述 价值
类 资源类型。 字符串
性能 PushSettings 资源特定属性 PushSettingsProperties

PushSettingsProperties

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

RampUpRule

名字 描述 价值
actionHostName (作主机名称) 如果决定将流量重定向到的槽的主机名。 例如 myapp-stage.azurewebsites.net。 字符串
更改决定回调网址 可以在 TiPCallback 站点扩展中提供自定义决策算法,可以指定 URL。 字符串
更改间隔以分钟为单位 指定重新评估 ReroutePercentage 的间隔(以分钟为单位)。 整数 (int)
changeStep 在自动增加方案中,这是从 <代码>ReroutePercentage</code> 中添加/删除的步骤,直到到达
<代码>MinReroutePercentage</code> 或 <代码>MaxReroutePercentage</code>。 站点指标每 N 分钟检查一次,<代码>ChangeIntervalInMinutes</code>。
可以在 TiPCallback 站点扩展中提供自定义决策算法,可以在 <代码>ChangeDecisionCallbackUrl</code>中指定 URL。
整数 (int)
maxReroutePercentage 指定 ReroutePercentage 将保留的上限。 整数 (int)
minReroutePercentage 指定重新路由Percentage 将保留的下边界。 整数 (int)
名字 路由规则的名称。 建议的名称是指向将接收试验中的流量的槽。 字符串
reroutePercentage 将重定向到 <代码>ActionHostName</code>的流量的百分比。 整数 (int)

RequestsBasedTrigger 触发器

名字 描述 价值
计数 请求计数。 整数 (int)
timeInterval 时间 时间间隔。 字符串

SiteAuthSettingsProperties

名字 描述 价值
additionalLoginParams 在以下情况下发送到 OpenID Connect 授权终结点的登录参数
用户登录。 每个参数必须采用“key=value”格式。
字符串[]
allowedAudiences 允许的受众值在验证颁发给的 JWT 时考虑
Azure Active Directory。 请注意,<代码>ClientID</code> 值始终被视为
允许访问群体,而不考虑此设置。
字符串[]
allowedExternalRedirectUrls 作为登录或注销应用的一部分,可重定向到的外部 URL。 请注意,将忽略 URL 的查询字符串部分。
这是 Windows 应用商店应用程序后端通常需要的高级设置。
请注意,始终允许当前域中的 URL。
字符串[]
客户端 ID 此信赖方应用程序的客户端 ID,称为client_id。
若要使用 Azure Active Directory 启用 OpenID 连接身份验证或
其他第三方 OpenID Connect 提供程序。
有关 OpenID Connect 的详细信息:http://openid.net/specs/openid-connect-core-1_0.html
字符串
客户密钥 此信赖方应用程序的客户端密码(在 Azure Active Directory 中,也称为密钥)。
此设置是可选的。 如果未配置客户端密码,则 OpenID Connect 隐式身份验证流用于对最终用户进行身份验证。
否则,OpenID Connect 授权代码流用于对最终用户进行身份验证。
有关 OpenID Connect 的详细信息:http://openid.net/specs/openid-connect-core-1_0.html
字符串
defaultProvider 配置多个提供程序时要使用的默认身份验证提供程序。
仅当配置了多个提供程序和未经身份验证的客户端时,才需要此设置
作设置为“RedirectToLoginPage”。
“AzureActiveDirectory”
“Facebook”
“Google”
“MicrosoftAccount”
“Twitter”
启用 如果为当前应用启用了身份验证/授权功能,<代码>true</code>;否则,<代码>false</code>。 布尔
facebookAppId 用于登录的 Facebook 应用的应用 ID。
启用 Facebook 登录需要此设置。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串
facebookAppSecret 用于 Facebook 登录的 Facebook 应用的应用机密。
启用 Facebook 登录需要此设置。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串
facebookOAuth范围 将作为 Facebook 登录身份验证的一部分请求的 OAuth 2.0 范围。
此设置是可选的。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串[]
googleClientId Google Web 应用程序的 OpenID Connect 客户端 ID。
启用 Google 登录需要此设置。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串
googleClientSecret 与 Google Web 应用程序关联的客户端密码。
启用 Google 登录需要此设置。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串
googleOAuth范围 将在 Google Sign-In 身份验证过程中请求的 OAuth 2.0 范围。
此设置是可选的。 如果未指定,则使用“openid”、“profile”和“email”作为默认范围。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串[]
发行 OpenID Connect 颁发者 URI,表示颁发此应用程序的访问令牌的实体。
使用 Azure Active Directory 时,此值是目录租户的 URI,例如 https://sts.windows.net/{tenant-guid}/。
此 URI 是令牌颁发者的区分大小写的标识符。
有关 OpenID Connect 发现的详细信息:http://openid.net/specs/openid-connect-discovery-1_0.html
字符串
microsoftAccountClientId 为用于身份验证的应用创建的 OAuth 2.0 客户端 ID。
启用Microsoft帐户身份验证需要此设置。
Microsoft帐户 OAuth 文档:https://dev.onedrive.com/auth/msa_oauth.htm
字符串
microsoftAccountClientSecret 为用于身份验证的应用创建的 OAuth 2.0 客户端密码。
启用Microsoft帐户身份验证需要此设置。
Microsoft帐户 OAuth 文档:https://dev.onedrive.com/auth/msa_oauth.htm
字符串
microsoftAccountOAuth范围 将在Microsoft帐户身份验证过程中请求的 OAuth 2.0 范围。
此设置是可选的。 如果未指定,则使用“wl.basic”作为默认范围。
Microsoft帐户范围和权限文档:https://msdn.microsoft.com/en-us/library/dn631845.aspx
字符串[]
runtimeVersion (运行时版本) 用于当前应用的身份验证/授权功能的 RuntimeVersion。
此值中的设置可以控制身份验证/授权模块中某些功能的行为。
字符串
tokenRefreshExtension小时 会话令牌过期后的小时数,会话令牌可用于
调用令牌刷新 API。 默认值为 72 小时。
整数 (int)
tokenStore已启用 <代码>true</code> 持久存储登录流期间获取的平台特定的安全令牌;否则,<代码>false</code>。
默认值为 <代码>false</code>。
布尔
twitterConsumerKey 用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者密钥。
启用 Twitter 登录需要此设置。
Twitter Sign-In 文档:https://dev.twitter.com/web/sign-in
字符串
推特消费者秘密 用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者机密。
启用 Twitter 登录需要此设置。
Twitter Sign-In 文档:https://dev.twitter.com/web/sign-in
字符串
unauthenticatedClientAction 未经身份验证的客户端尝试访问应用时要执行的作。 “AllowAnonymous”
“RedirectToLoginPage”

站点配置

名字 描述 价值
永远在线 如果启用了 Always On,<代码>true</code>;否则,<代码>false</code>。 布尔
api定义 有关应用的正式 API 定义的信息。 ApiDefinitionInfo
app命令行 要启动的应用命令行。 字符串
应用设置 应用程序设置。 NameValuePair[]
autoHealEnabled 已启用 如果启用了自动愈合,则 <代码>true</code>;否则,<代码>false</code>。 布尔
autoHealRules 自动修复规则 自动治愈规则。 AutoHealRules 自动修复规则
autoSwapSlotName (自动交换槽名称) 自动交换槽名称。 字符串
connectionStrings 连接字符串 连接字符串。 ConnStringInfo[]
CORS(跨域资源共享) 跨域资源共享 (CORS) 设置。 CorsSettings
defaultDocuments 文档 默认文档。 字符串[]
detailedErrorLogging已启用 如果启用了详细的错误日志记录,<代码>true</code>;否则,<代码>false</code>。 布尔
documentRoot 文档根目录。 字符串
实验 这适用于多态类型。 试验
handlerMappings 处理程序映射。 HandlerMapping[]
http20已启用 Http20Enabled:配置网站以允许客户端通过 http2.0 进行连接 布尔
httpLogging已启用 如果启用 HTTP 日志记录,则 <代码>true</code>;否则,<代码>false</code>。 布尔
ipSecurity限制 IP 安全限制。 IpSecurityRestriction[]
java容器 Java 容器。 字符串
javaContainerVersion Java 容器版本。 字符串
java版本 Java 版本。 字符串
限制 网站限制。 站点限制
linuxFx版本 Linux 应用框架和版本 字符串
负载均衡 站点负载均衡。 “LeastRequests”
“LeastResponseTime”
“RequestHash”
“WeightedRoundRobin”
“WeightedTotalTraffic”
localMySql已启用 <代码>true</code> 启用本地 MySQL;否则,<代码>false</code>。 布尔
logsDirectorySizeLimit HTTP 日志目录大小限制。 整数 (int)
managedPipelineMode 托管管道模式。 “经典”
“Integrated”
minTlsVersion (最小版本 MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本 '1.0'
'1.1'
'1.2'
netFrameworkVersion .NET Framework 版本。 字符串
nodeVersion Node.js的版本。 字符串
工人数 辅助角色数。 整数 (int)
php版本 PHP 的版本。 字符串
publishing用户名 发布用户名。 字符串
推送 推送终结点设置。 PushSettings 设置
python版本 Python 版本。 字符串
remoteDebugging已启用 如果启用了远程调试,<代码>true</code>;否则,<代码>false</code>。 布尔
remoteDebuggingVersion (远程调试版本) 远程调试版本。 字符串
requestTracing已启用 如果启用了请求跟踪,<代码>true</code>;否则,<代码>false</code>。 布尔
请求TracingExpirationTime 请求跟踪过期时间。 字符串
scm类型 SCM 类型。 “BitbucketGit”
“BitbucketHg”
“CodePlexGit”
“CodePlexHg”
“Dropbox”
“ExternalGit”
“ExternalHg”
“GitHub”
“LocalGit”
“None”
“OneDrive”
“Tfs”
“VSO”
tracing选项 跟踪选项。 字符串
use32BitWorker进程 <代码>true</code> 使用 32 位工作进程;否则,<代码>false</code>。 布尔
虚拟应用程序 虚拟应用程序。 VirtualApplication[]
vnet名称 虚拟网络名称。 字符串
webSockets已启用 如果启用了 WebSocket,则 <代码>true</code>;否则,<代码>false</code>。 布尔

站点限制

名字 描述 价值
最大磁盘大小(以 Mb 为单位) 允许的最大磁盘大小使用量(以 MB 为单位)。 整数 (int)
最大内存 允许的最大内存使用量(以 MB 为单位)。 整数 (int)
maxPercentageCpu 允许的最大 CPU 使用率百分比。 整数 (int)

SiteLogsConfigProperties

名字 描述 价值
应用程序日志 应用程序日志配置。 应用程序日志配置
detailedErrorMessages 详细的错误消息配置。 启用配置
failedRequestsTracing 请求 失败的请求跟踪配置。 启用配置
http日志 HTTP 日志配置。 HttpLogsConfig

SlowRequestsBasedTrigger 触发器

名字 描述 价值
计数 请求计数。 整数 (int)
timeInterval 时间 时间间隔。 字符串
时间 花费的时间。 字符串

StatusCodesBased触发器

名字 描述 价值
计数 请求计数。 整数 (int)
状态 HTTP 状态代码。 整数 (int)
子状态 请求子状态。 整数 (int)
timeInterval 时间 时间间隔。 字符串
win32状态 Win32 错误代码。 整数 (int)

StringDictionaryProperties

名字 描述 价值

StringDictionaryProperties

名字 描述 价值

虚拟应用程序

名字 描述 价值
物理路径 物理路径。 字符串
preload已启用 如果启用了预加载,<代码>true</code>;否则,<代码>false</code>。 布尔
虚拟目录 虚拟应用程序的虚拟目录。 VirtualDirectory []
虚拟路径 虚拟路径。 字符串

虚拟目录

名字 描述 价值
物理路径 物理路径。 字符串
虚拟路径 虚拟应用程序的路径。 字符串

ARM 模板资源定义

可以使用目标作部署站点/槽/配置资源类型:

用法示例

资源格式

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

{
  "name": "string"
  // For remaining properties, see microsoft.web/sites/slots/config objects
}

microsoft.web/sites/slots/config 对象

设置 名称 属性以指定对象的类型。

对于 appsettings,请使用:

{
  "kind": "string",
  "name": "appsettings",
  "properties": {
    "{customized property}": "string"
  }
}

对于 身份验证,请使用:

{
  "kind": "string",
  "name": "authsettings",
  "properties": {
    "additionalLoginParams": [ "string" ],
    "allowedAudiences": [ "string" ],
    "allowedExternalRedirectUrls": [ "string" ],
    "clientId": "string",
    "clientSecret": "string",
    "defaultProvider": "string",
    "enabled": "bool",
    "facebookAppId": "string",
    "facebookAppSecret": "string",
    "facebookOAuthScopes": [ "string" ],
    "googleClientId": "string",
    "googleClientSecret": "string",
    "googleOAuthScopes": [ "string" ],
    "issuer": "string",
    "microsoftAccountClientId": "string",
    "microsoftAccountClientSecret": "string",
    "microsoftAccountOAuthScopes": [ "string" ],
    "runtimeVersion": "string",
    "tokenRefreshExtensionHours": "int",
    "tokenStoreEnabled": "bool",
    "twitterConsumerKey": "string",
    "twitterConsumerSecret": "string",
    "unauthenticatedClientAction": "string"
  }
}

对于 备份,请使用:

{
  "kind": "string",
  "name": "backup",
  "properties": {
    "backupSchedule": {
      "frequencyInterval": "int",
      "frequencyUnit": "string",
      "keepAtLeastOneBackup": "bool",
      "retentionPeriodInDays": "int",
      "startTime": "string"
    },
    "databases": [
      {
        "connectionString": "string",
        "connectionStringName": "string",
        "databaseType": "string",
        "name": "string"
      }
    ],
    "enabled": "bool",
    "name": "string",
    "storageAccountUrl": "string",
    "type": "string"
  }
}

对于 连接字符串,请使用:

{
  "kind": "string",
  "name": "connectionstrings",
  "properties": {
    "{customized property}": {
      "type": "string",
      "value": "string"
    }
  }
}

对于 日志,请使用:

{
  "kind": "string",
  "name": "logs",
  "properties": {
    "applicationLogs": {
      "azureBlobStorage": {
        "level": "string",
        "retentionInDays": "int",
        "sasUrl": "string"
      },
      "azureTableStorage": {
        "level": "string",
        "sasUrl": "string"
      },
      "fileSystem": {
        "level": "string"
      }
    },
    "detailedErrorMessages": {
      "enabled": "bool"
    },
    "failedRequestsTracing": {
      "enabled": "bool"
    },
    "httpLogs": {
      "azureBlobStorage": {
        "enabled": "bool",
        "retentionInDays": "int",
        "sasUrl": "string"
      },
      "fileSystem": {
        "enabled": "bool",
        "retentionInDays": "int",
        "retentionInMb": "int"
      }
    }
  }
}

对于 元数据,请使用:

{
  "kind": "string",
  "name": "metadata",
  "properties": {
    "{customized property}": "string"
  }
}

对于 推送设置,请使用:

{
  "kind": "string",
  "name": "pushsettings",
  "properties": {
    "dynamicTagsJson": "string",
    "isPushEnabled": "bool",
    "tagsRequiringAuth": "string",
    "tagWhitelistJson": "string"
  }
}

对于 Web,请使用:

{
  "kind": "string",
  "name": "web",
  "properties": {
    "alwaysOn": "bool",
    "apiDefinition": {
      "url": "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",
          "timeInterval": "string",
          "timeTaken": "string"
        },
        "statusCodes": [
          {
            "count": "int",
            "status": "int",
            "subStatus": "int",
            "timeInterval": "string",
            "win32Status": "int"
          }
        ]
      }
    },
    "autoSwapSlotName": "string",
    "connectionStrings": [
      {
        "connectionString": "string",
        "name": "string",
        "type": "string"
      }
    ],
    "cors": {
      "allowedOrigins": [ "string" ]
    },
    "defaultDocuments": [ "string" ],
    "detailedErrorLoggingEnabled": "bool",
    "documentRoot": "string",
    "experiments": {
      "rampUpRules": [
        {
          "actionHostName": "string",
          "changeDecisionCallbackUrl": "string",
          "changeIntervalInMinutes": "int",
          "changeStep": "int",
          "maxReroutePercentage": "int",
          "minReroutePercentage": "int",
          "name": "string",
          "reroutePercentage": "int"
        }
      ]
    },
    "handlerMappings": [
      {
        "arguments": "string",
        "extension": "string",
        "scriptProcessor": "string"
      }
    ],
    "http20Enabled": "bool",
    "httpLoggingEnabled": "bool",
    "ipSecurityRestrictions": [
      {
        "ipAddress": "string",
        "subnetMask": "string"
      }
    ],
    "javaContainer": "string",
    "javaContainerVersion": "string",
    "javaVersion": "string",
    "limits": {
      "maxDiskSizeInMb": "int",
      "maxMemoryInMb": "int",
      "maxPercentageCpu": "int"
    },
    "linuxFxVersion": "string",
    "loadBalancing": "string",
    "localMySqlEnabled": "bool",
    "logsDirectorySizeLimit": "int",
    "managedPipelineMode": "string",
    "minTlsVersion": "string",
    "netFrameworkVersion": "string",
    "nodeVersion": "string",
    "numberOfWorkers": "int",
    "phpVersion": "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",
    "scmType": "string",
    "tracingOptions": "string",
    "use32BitWorkerProcess": "bool",
    "virtualApplications": [
      {
        "physicalPath": "string",
        "preloadEnabled": "bool",
        "virtualDirectories": [
          {
            "physicalPath": "string",
            "virtualPath": "string"
          }
        ],
        "virtualPath": "string"
      }
    ],
    "vnetName": "string",
    "webSocketsEnabled": "bool"
  }
}

属性值

Microsoft.Web/sites/slots/config

名字 描述 价值
apiVersion API 版本 '2016-08-01'
类 资源类型。 字符串
名字 资源名称 “appsettings”(必需)
性能 设置。 StringDictionaryProperties
类型 资源类型 “Microsoft.Web/sites/slots/config”

Microsoft.Web/sites/slots/config

名字 描述 价值
apiVersion API 版本 '2016-08-01'
类 资源类型。 字符串
名字 资源名称 “authsettings”(必需)
性能 SiteAuthSettings 资源特定属性 SiteAuthSettingsProperties
类型 资源类型 “Microsoft.Web/sites/slots/config”

Microsoft.Web/sites/slots/config

名字 描述 价值
apiVersion API 版本 '2016-08-01'
类 资源类型。 字符串
名字 资源名称 “backup”(必需)
性能 BackupRequest 资源特定属性 BackupRequestProperties
类型 资源类型 “Microsoft.Web/sites/slots/config”

Microsoft.Web/sites/slots/config

名字 描述 价值
apiVersion API 版本 '2016-08-01'
类 资源类型。 字符串
名字 资源名称 “connectionstrings”(必需)
性能 连接字符串。 ConnectionStringDictionary属性
类型 资源类型 “Microsoft.Web/sites/slots/config”

Microsoft.Web/sites/slots/config

名字 描述 价值
apiVersion API 版本 '2016-08-01'
类 资源类型。 字符串
名字 资源名称 “logs”(必需)
性能 SiteLogsConfig 资源特定属性 SiteLogsConfigProperties
类型 资源类型 “Microsoft.Web/sites/slots/config”

Microsoft.Web/sites/slots/config

名字 描述 价值
apiVersion API 版本 '2016-08-01'
类 资源类型。 字符串
名字 资源名称 “metadata”(必需)
性能 设置。 StringDictionaryProperties
类型 资源类型 “Microsoft.Web/sites/slots/config”

Microsoft.Web/sites/slots/config

名字 描述 价值
apiVersion API 版本 '2016-08-01'
类 资源类型。 字符串
名字 资源名称 “pushsettings”(必需)
性能 PushSettings 资源特定属性 PushSettingsProperties
类型 资源类型 “Microsoft.Web/sites/slots/config”

Microsoft.Web/sites/slots/config

名字 描述 价值
apiVersion API 版本 '2016-08-01'
类 资源类型。 字符串
名字 资源名称 “web”(必需)
性能 核心资源属性 站点配置
类型 资源类型 “Microsoft.Web/sites/slots/config”

ApiDefinitionInfo

名字 描述 价值
网址 API 定义的 URL。 字符串

应用程序日志配置

名字 描述 价值
azureBlobStorage 将应用程序日志记录到 Blob 存储配置。 AzureBlobStorageApplicationLogsConfig
azureTableStorage 将应用程序日志记录到 Azure 表存储配置。 AzureTableStorageApplicationLogsConfig
文件系统 应用程序日志到文件系统配置。 FileSystemApplicationLogsConfig

AutoHealActions 自动修复作

名字 描述 价值
动作类型 要执行的预定义作。 “CustomAction”
“LogEvent”
“回收”
自定义作 要执行的自定义作。 AutohealCustomAction 自动修复
minProcessExecutionTime (最小进程执行时间) 必须执行进程的最短时间
执行作之前
字符串

AutohealCustomAction 自动修复

名字 描述 价值
exe 要运行的可执行文件。 字符串
参数 可执行文件的参数。 字符串

AutoHealRules 自动修复规则

名字 描述 价值
行动 触发规则时要执行的作。 AutoHealActions 自动修复作
触发器 描述何时执行自动修复作的条件。 AutoHealTriggers 自动修复触发器

AutoHealTriggers 自动修复触发器

名字 描述 价值
privateBytesInKB 基于专用字节的规则。 整数 (int)
请求 基于请求总数的规则。 RequestsBasedTrigger 触发器
slowRequests 请求 基于请求执行时间的规则。 SlowRequestsBasedTrigger 触发器
statusCodes 基于状态代码的规则。 StatusCodesBasedTrigger[]

AzureBlobStorageApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”
保留天数 保留天数。
删除早于 X 天的 Blob。
0 或更低意味着没有保留。
整数 (int)
sasUrl 的 具有读取/写入/列出/删除权限的 Azure Blob 容器的 SAS URL。 字符串

AzureBlobStorageHttpLogsConfig

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔
保留天数 保留天数。
删除早于 X 天的 Blob。
0 或更低意味着没有保留。
整数 (int)
sasUrl 的 具有读取/写入/列出/删除权限的 Azure Blob 容器的 SAS URL。 字符串

AzureTableStorageApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”
sasUrl 的 包含添加/查询/删除权限的 Azure 表的 SAS URL。 string (必需)

BackupRequestProperties

名字 描述 价值
backupSchedule 定期执行备份时计划备份。 备份计划
数据库 备份中包含的数据库。 DatabaseBackupSetting[]
启用 如果启用备份计划(在这种情况下必须包含),则为 true;如果应禁用备份计划,则为 false。 布尔
名字 备份的名称。 string (必需)
storageAccountUrl 的 容器的 SAS URL。 string (必需)
类型 备份的类型。 “Clone”
“Default”
“重定位”
“Snapshot”

备份计划

名字 描述 价值
频率间隔 应执行备份的频率(例如,对于每周备份,应将其设置为 7,FrequencyUnit 应设置为 Day) int (必需)
频率单位 执行备份的频率的时间单位(例如,对于每周备份,应将其设置为 Day,FrequencyInterval 应设置为 7) “Day”
“Hour”(必需)
keepAtLeastOneBackup 如此 如果保留策略应始终在存储帐户中保留至少一个备份,而不考虑备份的年龄:否则为 false。 bool (必需)
retentionPeriodInDays (保留期以天为单位) 删除多少天备份后。 int (必需)
开始时间 计划何时应开始工作。 字符串

ConnectionStringDictionary属性

名字 描述 价值

ConnStringInfo

名字 描述 价值
connectionString 连接字符串 连接字符串值。 字符串
名字 连接字符串的名称。 字符串
类型 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
“RedisCache”
“ServiceBus”
“SQLAzure”
“SQLServer”

ConnStringValueTypePair

名字 描述 价值
类型 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
“RedisCache”
“ServiceBus”
“SQLAzure”
“SQLServer”(必需)
价值 对的值。 string (必需)

CorsSettings

名字 描述 价值
allowedOrigins 的 获取或设置应允许进行跨源的源列表
调用(例如:http://example.com:12345)。 使用“*”允许所有。
字符串[]

DatabaseBackupSetting 数据库备份设置

名字 描述 价值
connectionString 连接字符串 包含要备份或还原的数据库的连接字符串。 如果还原应发生在新数据库,则内部的数据库名称为新数据库。 字符串
connectionStringName 包含链接到 SiteConfig.ConnectionStrings 的连接字符串名称。
这在还原期间与覆盖连接字符串选项一起使用。
字符串
数据库类型 数据库类型(例如 SqlAzure/MySql)。 “LocalMySql”
“MySql”
“PostgreSql”
“SqlAzure”(必需)
名字 字符串

启用配置

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔

实验

名字 描述 价值
rampUp规则 提升规则的列表。 RampUpRule[]

FileSystemApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”

FileSystemHttpLogsConfig 文件

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔
保留天数 保留天数。
删除早于 X 天的文件。
0 或更低意味着没有保留。
整数 (int)
保留(以 Mb 为单位) http 日志文件可以使用的最大大小(以兆字节为单位)。
到达旧日志文件后,将被删除以为新日志文件提供空间。
值可以介于 25 和 100 之间。
int

约束:
最小值 = 25
最大值 = 100

HandlerMapping

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

HttpLogsConfig

名字 描述 价值
azureBlobStorage 将 Http 日志记录到 Azure Blob 存储配置。 AzureBlobStorageHttpLogsConfig
文件系统 将 Http 日志记录到文件系统配置。 FileSystemHttpLogsConfig 文件

IpSecurityRestriction

名字 描述 价值
IP地址 安全限制有效的 IP 地址。 string (必需)
子网掩码 限制有效的 IP 地址范围的子网掩码。 字符串

microsoft.web/sites/slots/config

名字 描述 价值
名字 对于类型 Microsoft.Web/sites/slots/config,设置为“appsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“authsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“backup”。对于类型 Microsoft.Web/sites/slots/config,设置为“connectionstrings”。对于类型 Microsoft.Web/sites/slots/config,设置为“logs”。对于类型 Microsoft.Web/sites/slots/config,设置为“metadata”。对于类型 Microsoft.web/sites/slots/config,设置为“pushsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“web”。 “appsettings”
“authsettings”
“backup”
“connectionstrings”
“logs”
“metadata”
“pushsettings”
“web”(必需)

NameValuePair

名字 描述 价值
名字 配对名称。 字符串
价值 对值。 字符串

PushSettings 设置

名字 描述 价值
类 资源类型。 字符串
性能 PushSettings 资源特定属性 PushSettingsProperties

PushSettingsProperties

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

RampUpRule

名字 描述 价值
actionHostName (作主机名称) 如果决定将流量重定向到的槽的主机名。 例如 myapp-stage.azurewebsites.net。 字符串
更改决定回调网址 可以在 TiPCallback 站点扩展中提供自定义决策算法,可以指定 URL。 字符串
更改间隔以分钟为单位 指定重新评估 ReroutePercentage 的间隔(以分钟为单位)。 整数 (int)
changeStep 在自动增加方案中,这是从 <代码>ReroutePercentage</code> 中添加/删除的步骤,直到到达
<代码>MinReroutePercentage</code> 或 <代码>MaxReroutePercentage</code>。 站点指标每 N 分钟检查一次,<代码>ChangeIntervalInMinutes</code>。
可以在 TiPCallback 站点扩展中提供自定义决策算法,可以在 <代码>ChangeDecisionCallbackUrl</code>中指定 URL。
整数 (int)
maxReroutePercentage 指定 ReroutePercentage 将保留的上限。 整数 (int)
minReroutePercentage 指定重新路由Percentage 将保留的下边界。 整数 (int)
名字 路由规则的名称。 建议的名称是指向将接收试验中的流量的槽。 字符串
reroutePercentage 将重定向到 <代码>ActionHostName</code>的流量的百分比。 整数 (int)

RequestsBasedTrigger 触发器

名字 描述 价值
计数 请求计数。 整数 (int)
timeInterval 时间 时间间隔。 字符串

SiteAuthSettingsProperties

名字 描述 价值
additionalLoginParams 在以下情况下发送到 OpenID Connect 授权终结点的登录参数
用户登录。 每个参数必须采用“key=value”格式。
字符串[]
allowedAudiences 允许的受众值在验证颁发给的 JWT 时考虑
Azure Active Directory。 请注意,<代码>ClientID</code> 值始终被视为
允许访问群体,而不考虑此设置。
字符串[]
allowedExternalRedirectUrls 作为登录或注销应用的一部分,可重定向到的外部 URL。 请注意,将忽略 URL 的查询字符串部分。
这是 Windows 应用商店应用程序后端通常需要的高级设置。
请注意,始终允许当前域中的 URL。
字符串[]
客户端 ID 此信赖方应用程序的客户端 ID,称为client_id。
若要使用 Azure Active Directory 启用 OpenID 连接身份验证或
其他第三方 OpenID Connect 提供程序。
有关 OpenID Connect 的详细信息:http://openid.net/specs/openid-connect-core-1_0.html
字符串
客户密钥 此信赖方应用程序的客户端密码(在 Azure Active Directory 中,也称为密钥)。
此设置是可选的。 如果未配置客户端密码,则 OpenID Connect 隐式身份验证流用于对最终用户进行身份验证。
否则,OpenID Connect 授权代码流用于对最终用户进行身份验证。
有关 OpenID Connect 的详细信息:http://openid.net/specs/openid-connect-core-1_0.html
字符串
defaultProvider 配置多个提供程序时要使用的默认身份验证提供程序。
仅当配置了多个提供程序和未经身份验证的客户端时,才需要此设置
作设置为“RedirectToLoginPage”。
“AzureActiveDirectory”
“Facebook”
“Google”
“MicrosoftAccount”
“Twitter”
启用 如果为当前应用启用了身份验证/授权功能,<代码>true</code>;否则,<代码>false</code>。 布尔
facebookAppId 用于登录的 Facebook 应用的应用 ID。
启用 Facebook 登录需要此设置。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串
facebookAppSecret 用于 Facebook 登录的 Facebook 应用的应用机密。
启用 Facebook 登录需要此设置。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串
facebookOAuth范围 将作为 Facebook 登录身份验证的一部分请求的 OAuth 2.0 范围。
此设置是可选的。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串[]
googleClientId Google Web 应用程序的 OpenID Connect 客户端 ID。
启用 Google 登录需要此设置。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串
googleClientSecret 与 Google Web 应用程序关联的客户端密码。
启用 Google 登录需要此设置。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串
googleOAuth范围 将在 Google Sign-In 身份验证过程中请求的 OAuth 2.0 范围。
此设置是可选的。 如果未指定,则使用“openid”、“profile”和“email”作为默认范围。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串[]
发行 OpenID Connect 颁发者 URI,表示颁发此应用程序的访问令牌的实体。
使用 Azure Active Directory 时,此值是目录租户的 URI,例如 https://sts.windows.net/{tenant-guid}/。
此 URI 是令牌颁发者的区分大小写的标识符。
有关 OpenID Connect 发现的详细信息:http://openid.net/specs/openid-connect-discovery-1_0.html
字符串
microsoftAccountClientId 为用于身份验证的应用创建的 OAuth 2.0 客户端 ID。
启用Microsoft帐户身份验证需要此设置。
Microsoft帐户 OAuth 文档:https://dev.onedrive.com/auth/msa_oauth.htm
字符串
microsoftAccountClientSecret 为用于身份验证的应用创建的 OAuth 2.0 客户端密码。
启用Microsoft帐户身份验证需要此设置。
Microsoft帐户 OAuth 文档:https://dev.onedrive.com/auth/msa_oauth.htm
字符串
microsoftAccountOAuth范围 将在Microsoft帐户身份验证过程中请求的 OAuth 2.0 范围。
此设置是可选的。 如果未指定,则使用“wl.basic”作为默认范围。
Microsoft帐户范围和权限文档:https://msdn.microsoft.com/en-us/library/dn631845.aspx
字符串[]
runtimeVersion (运行时版本) 用于当前应用的身份验证/授权功能的 RuntimeVersion。
此值中的设置可以控制身份验证/授权模块中某些功能的行为。
字符串
tokenRefreshExtension小时 会话令牌过期后的小时数,会话令牌可用于
调用令牌刷新 API。 默认值为 72 小时。
整数 (int)
tokenStore已启用 <代码>true</code> 持久存储登录流期间获取的平台特定的安全令牌;否则,<代码>false</code>。
默认值为 <代码>false</code>。
布尔
twitterConsumerKey 用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者密钥。
启用 Twitter 登录需要此设置。
Twitter Sign-In 文档:https://dev.twitter.com/web/sign-in
字符串
推特消费者秘密 用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者机密。
启用 Twitter 登录需要此设置。
Twitter Sign-In 文档:https://dev.twitter.com/web/sign-in
字符串
unauthenticatedClientAction 未经身份验证的客户端尝试访问应用时要执行的作。 “AllowAnonymous”
“RedirectToLoginPage”

站点配置

名字 描述 价值
永远在线 如果启用了 Always On,<代码>true</code>;否则,<代码>false</code>。 布尔
api定义 有关应用的正式 API 定义的信息。 ApiDefinitionInfo
app命令行 要启动的应用命令行。 字符串
应用设置 应用程序设置。 NameValuePair[]
autoHealEnabled 已启用 如果启用了自动愈合,则 <代码>true</code>;否则,<代码>false</code>。 布尔
autoHealRules 自动修复规则 自动治愈规则。 AutoHealRules 自动修复规则
autoSwapSlotName (自动交换槽名称) 自动交换槽名称。 字符串
connectionStrings 连接字符串 连接字符串。 ConnStringInfo[]
CORS(跨域资源共享) 跨域资源共享 (CORS) 设置。 CorsSettings
defaultDocuments 文档 默认文档。 字符串[]
detailedErrorLogging已启用 如果启用了详细的错误日志记录,<代码>true</code>;否则,<代码>false</code>。 布尔
documentRoot 文档根目录。 字符串
实验 这适用于多态类型。 试验
handlerMappings 处理程序映射。 HandlerMapping[]
http20已启用 Http20Enabled:配置网站以允许客户端通过 http2.0 进行连接 布尔
httpLogging已启用 如果启用 HTTP 日志记录,则 <代码>true</code>;否则,<代码>false</code>。 布尔
ipSecurity限制 IP 安全限制。 IpSecurityRestriction[]
java容器 Java 容器。 字符串
javaContainerVersion Java 容器版本。 字符串
java版本 Java 版本。 字符串
限制 网站限制。 站点限制
linuxFx版本 Linux 应用框架和版本 字符串
负载均衡 站点负载均衡。 “LeastRequests”
“LeastResponseTime”
“RequestHash”
“WeightedRoundRobin”
“WeightedTotalTraffic”
localMySql已启用 <代码>true</code> 启用本地 MySQL;否则,<代码>false</code>。 布尔
logsDirectorySizeLimit HTTP 日志目录大小限制。 整数 (int)
managedPipelineMode 托管管道模式。 “经典”
“Integrated”
minTlsVersion (最小版本 MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本 '1.0'
'1.1'
'1.2'
netFrameworkVersion .NET Framework 版本。 字符串
nodeVersion Node.js的版本。 字符串
工人数 辅助角色数。 整数 (int)
php版本 PHP 的版本。 字符串
publishing用户名 发布用户名。 字符串
推送 推送终结点设置。 PushSettings 设置
python版本 Python 版本。 字符串
remoteDebugging已启用 如果启用了远程调试,<代码>true</code>;否则,<代码>false</code>。 布尔
remoteDebuggingVersion (远程调试版本) 远程调试版本。 字符串
requestTracing已启用 如果启用了请求跟踪,<代码>true</code>;否则,<代码>false</code>。 布尔
请求TracingExpirationTime 请求跟踪过期时间。 字符串
scm类型 SCM 类型。 “BitbucketGit”
“BitbucketHg”
“CodePlexGit”
“CodePlexHg”
“Dropbox”
“ExternalGit”
“ExternalHg”
“GitHub”
“LocalGit”
“None”
“OneDrive”
“Tfs”
“VSO”
tracing选项 跟踪选项。 字符串
use32BitWorker进程 <代码>true</code> 使用 32 位工作进程;否则,<代码>false</code>。 布尔
虚拟应用程序 虚拟应用程序。 VirtualApplication[]
vnet名称 虚拟网络名称。 字符串
webSockets已启用 如果启用了 WebSocket,则 <代码>true</code>;否则,<代码>false</code>。 布尔

站点限制

名字 描述 价值
最大磁盘大小(以 Mb 为单位) 允许的最大磁盘大小使用量(以 MB 为单位)。 整数 (int)
最大内存 允许的最大内存使用量(以 MB 为单位)。 整数 (int)
maxPercentageCpu 允许的最大 CPU 使用率百分比。 整数 (int)

SiteLogsConfigProperties

名字 描述 价值
应用程序日志 应用程序日志配置。 应用程序日志配置
detailedErrorMessages 详细的错误消息配置。 启用配置
failedRequestsTracing 请求 失败的请求跟踪配置。 启用配置
http日志 HTTP 日志配置。 HttpLogsConfig

SlowRequestsBasedTrigger 触发器

名字 描述 价值
计数 请求计数。 整数 (int)
timeInterval 时间 时间间隔。 字符串
时间 花费的时间。 字符串

StatusCodesBased触发器

名字 描述 价值
计数 请求计数。 整数 (int)
状态 HTTP 状态代码。 整数 (int)
子状态 请求子状态。 整数 (int)
timeInterval 时间 时间间隔。 字符串
win32状态 Win32 错误代码。 整数 (int)

StringDictionaryProperties

名字 描述 价值

StringDictionaryProperties

名字 描述 价值

虚拟应用程序

名字 描述 价值
物理路径 物理路径。 字符串
preload已启用 如果启用了预加载,<代码>true</code>;否则,<代码>false</code>。 布尔
虚拟目录 虚拟应用程序的虚拟目录。 VirtualDirectory []
虚拟路径 虚拟路径。 字符串

虚拟目录

名字 描述 价值
物理路径 物理路径。 字符串
虚拟路径 虚拟应用程序的路径。 字符串

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

可以使用目标作部署站点/槽/配置资源类型:

  • 资源组 关于每个API版本中变更属性的列表,请参见 更改日志。

用法示例

Terraform 示例

部署应用服务的插槽虚拟网络关联的基本示例。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "serverfarm" {
  type      = "Microsoft.Web/serverfarms@2022-09-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      hyperV         = false
      perSiteScaling = false
      reserved       = false
      zoneRedundant  = false
    }
    sku = {
      name = "S1"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "site" {
  type      = "Microsoft.Web/sites@2022-09-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      clientAffinityEnabled = false
      clientCertEnabled     = false
      clientCertMode        = "Required"
      enabled               = true
      httpsOnly             = false
      publicNetworkAccess   = "Enabled"
      serverFarmId          = azapi_resource.serverfarm.id
      siteConfig = {
        acrUseManagedIdentityCreds       = false
        alwaysOn                         = true
        autoHealEnabled                  = false
        ftpsState                        = "Disabled"
        http20Enabled                    = false
        loadBalancing                    = "LeastRequests"
        localMySqlEnabled                = false
        managedPipelineMode              = "Integrated"
        minTlsVersion                    = "1.2"
        publicNetworkAccess              = "Enabled"
        remoteDebuggingEnabled           = false
        scmIpSecurityRestrictionsUseMain = false
        scmMinTlsVersion                 = "1.2"
        use32BitWorkerProcess            = true
        vnetRouteAllEnabled              = false
        webSocketsEnabled                = false
        windowsFxVersion                 = ""
      }
      vnetRouteAllEnabled = false
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "slot" {
  type      = "Microsoft.Web/sites/slots@2022-09-01"
  parent_id = azapi_resource.site.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      clientAffinityEnabled    = false
      clientCertEnabled        = false
      clientCertExclusionPaths = ""
      clientCertMode           = "Required"
      enabled                  = true
      httpsOnly                = false
      publicNetworkAccess      = "Enabled"
      serverFarmId             = azapi_resource.serverfarm.id
      siteConfig = {
        acrUseManagedIdentityCreds       = false
        alwaysOn                         = true
        autoHealEnabled                  = false
        ftpsState                        = "Disabled"
        http20Enabled                    = false
        loadBalancing                    = "LeastRequests"
        localMySqlEnabled                = false
        managedPipelineMode              = "Integrated"
        minTlsVersion                    = "1.2"
        publicNetworkAccess              = "Enabled"
        remoteDebuggingEnabled           = false
        scmIpSecurityRestrictionsUseMain = false
        scmMinTlsVersion                 = "1.2"
        use32BitWorkerProcess            = false
        vnetRouteAllEnabled              = false
        webSocketsEnabled                = false
        windowsFxVersion                 = ""
      }
      vnetRouteAllEnabled = false
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

data "azapi_resource_id" "config" {
  type      = "Microsoft.Web/sites/slots/config@2022-09-01"
  parent_id = azapi_resource.slot.id
  name      = "azurestorageaccounts"
}

resource "azapi_resource_action" "config" {
  type        = "Microsoft.Web/sites/slots/config@2022-09-01"
  resource_id = data.azapi_resource_id.config.id
  method      = "PUT"
  body = {
    name = "azurestorageaccounts"
    properties = {
    }
  }
  response_export_values = ["*"]
}

资源格式

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

resource "azapi_resource" "symbolicname" {
  name = "string"
  // For remaining properties, see microsoft.web/sites/slots/config objects
}

microsoft.web/sites/slots/config 对象

设置 名称 属性以指定对象的类型。

对于 appsettings,请使用:

{
  kind = "string"
  name = "appsettings"
  properties = {
    {customized property} = "string"
  }
}

对于 身份验证,请使用:

{
  kind = "string"
  name = "authsettings"
  properties = {
    additionalLoginParams = [
      "string"
    ]
    allowedAudiences = [
      "string"
    ]
    allowedExternalRedirectUrls = [
      "string"
    ]
    clientId = "string"
    clientSecret = "string"
    defaultProvider = "string"
    enabled = bool
    facebookAppId = "string"
    facebookAppSecret = "string"
    facebookOAuthScopes = [
      "string"
    ]
    googleClientId = "string"
    googleClientSecret = "string"
    googleOAuthScopes = [
      "string"
    ]
    issuer = "string"
    microsoftAccountClientId = "string"
    microsoftAccountClientSecret = "string"
    microsoftAccountOAuthScopes = [
      "string"
    ]
    runtimeVersion = "string"
    tokenRefreshExtensionHours = int
    tokenStoreEnabled = bool
    twitterConsumerKey = "string"
    twitterConsumerSecret = "string"
    unauthenticatedClientAction = "string"
  }
}

对于 备份,请使用:

{
  kind = "string"
  name = "backup"
  properties = {
    backupSchedule = {
      frequencyInterval = int
      frequencyUnit = "string"
      keepAtLeastOneBackup = bool
      retentionPeriodInDays = int
      startTime = "string"
    }
    databases = [
      {
        connectionString = "string"
        connectionStringName = "string"
        databaseType = "string"
        name = "string"
      }
    ]
    enabled = bool
    name = "string"
    storageAccountUrl = "string"
    type = "string"
  }
}

对于 连接字符串,请使用:

{
  kind = "string"
  name = "connectionstrings"
  properties = {
    {customized property} = {
      type = "string"
      value = "string"
    }
  }
}

对于 日志,请使用:

{
  kind = "string"
  name = "logs"
  properties = {
    applicationLogs = {
      azureBlobStorage = {
        level = "string"
        retentionInDays = int
        sasUrl = "string"
      }
      azureTableStorage = {
        level = "string"
        sasUrl = "string"
      }
      fileSystem = {
        level = "string"
      }
    }
    detailedErrorMessages = {
      enabled = bool
    }
    failedRequestsTracing = {
      enabled = bool
    }
    httpLogs = {
      azureBlobStorage = {
        enabled = bool
        retentionInDays = int
        sasUrl = "string"
      }
      fileSystem = {
        enabled = bool
        retentionInDays = int
        retentionInMb = int
      }
    }
  }
}

对于 元数据,请使用:

{
  kind = "string"
  name = "metadata"
  properties = {
    {customized property} = "string"
  }
}

对于 推送设置,请使用:

{
  kind = "string"
  name = "pushsettings"
  properties = {
    dynamicTagsJson = "string"
    isPushEnabled = bool
    tagsRequiringAuth = "string"
    tagWhitelistJson = "string"
  }
}

对于 Web,请使用:

{
  kind = "string"
  name = "web"
  properties = {
    alwaysOn = bool
    apiDefinition = {
      url = "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
          timeInterval = "string"
          timeTaken = "string"
        }
        statusCodes = [
          {
            count = int
            status = int
            subStatus = int
            timeInterval = "string"
            win32Status = int
          }
        ]
      }
    }
    autoSwapSlotName = "string"
    connectionStrings = [
      {
        connectionString = "string"
        name = "string"
        type = "string"
      }
    ]
    cors = {
      allowedOrigins = [
        "string"
      ]
    }
    defaultDocuments = [
      "string"
    ]
    detailedErrorLoggingEnabled = bool
    documentRoot = "string"
    experiments = {
      rampUpRules = [
        {
          actionHostName = "string"
          changeDecisionCallbackUrl = "string"
          changeIntervalInMinutes = int
          changeStep = int
          maxReroutePercentage = int
          minReroutePercentage = int
          name = "string"
          reroutePercentage = int
        }
      ]
    }
    handlerMappings = [
      {
        arguments = "string"
        extension = "string"
        scriptProcessor = "string"
      }
    ]
    http20Enabled = bool
    httpLoggingEnabled = bool
    ipSecurityRestrictions = [
      {
        ipAddress = "string"
        subnetMask = "string"
      }
    ]
    javaContainer = "string"
    javaContainerVersion = "string"
    javaVersion = "string"
    limits = {
      maxDiskSizeInMb = int
      maxMemoryInMb = int
      maxPercentageCpu = int
    }
    linuxFxVersion = "string"
    loadBalancing = "string"
    localMySqlEnabled = bool
    logsDirectorySizeLimit = int
    managedPipelineMode = "string"
    minTlsVersion = "string"
    netFrameworkVersion = "string"
    nodeVersion = "string"
    numberOfWorkers = int
    phpVersion = "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"
    scmType = "string"
    tracingOptions = "string"
    use32BitWorkerProcess = bool
    virtualApplications = [
      {
        physicalPath = "string"
        preloadEnabled = bool
        virtualDirectories = [
          {
            physicalPath = "string"
            virtualPath = "string"
          }
        ]
        virtualPath = "string"
      }
    ]
    vnetName = "string"
    webSocketsEnabled = bool
  }
}

属性值

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “appsettings”(必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:站点/槽
性能 设置。 StringDictionaryProperties
类型 资源类型 “Microsoft.Web/sites/slots/config@2016-08-01”

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “authsettings”(必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:站点/槽
性能 SiteAuthSettings 资源特定属性 SiteAuthSettingsProperties
类型 资源类型 “Microsoft.Web/sites/slots/config@2016-08-01”

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “backup”(必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:站点/槽
性能 BackupRequest 资源特定属性 BackupRequestProperties
类型 资源类型 “Microsoft.Web/sites/slots/config@2016-08-01”

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “connectionstrings”(必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:站点/槽
性能 连接字符串。 ConnectionStringDictionary属性
类型 资源类型 “Microsoft.Web/sites/slots/config@2016-08-01”

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “logs”(必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:站点/槽
性能 SiteLogsConfig 资源特定属性 SiteLogsConfigProperties
类型 资源类型 “Microsoft.Web/sites/slots/config@2016-08-01”

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “metadata”(必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:站点/槽
性能 设置。 StringDictionaryProperties
类型 资源类型 “Microsoft.Web/sites/slots/config@2016-08-01”

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “pushsettings”(必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:站点/槽
性能 PushSettings 资源特定属性 PushSettingsProperties
类型 资源类型 “Microsoft.Web/sites/slots/config@2016-08-01”

Microsoft.Web/sites/slots/config

名字 描述 价值
类 资源类型。 字符串
名字 资源名称 “web”(必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:站点/槽
性能 核心资源属性 站点配置
类型 资源类型 “Microsoft.Web/sites/slots/config@2016-08-01”

ApiDefinitionInfo

名字 描述 价值
网址 API 定义的 URL。 字符串

应用程序日志配置

名字 描述 价值
azureBlobStorage 将应用程序日志记录到 Blob 存储配置。 AzureBlobStorageApplicationLogsConfig
azureTableStorage 将应用程序日志记录到 Azure 表存储配置。 AzureTableStorageApplicationLogsConfig
文件系统 应用程序日志到文件系统配置。 FileSystemApplicationLogsConfig

AutoHealActions 自动修复作

名字 描述 价值
动作类型 要执行的预定义作。 “CustomAction”
“LogEvent”
“回收”
自定义作 要执行的自定义作。 AutohealCustomAction 自动修复
minProcessExecutionTime (最小进程执行时间) 必须执行进程的最短时间
执行作之前
字符串

AutohealCustomAction 自动修复

名字 描述 价值
exe 要运行的可执行文件。 字符串
参数 可执行文件的参数。 字符串

AutoHealRules 自动修复规则

名字 描述 价值
行动 触发规则时要执行的作。 AutoHealActions 自动修复作
触发器 描述何时执行自动修复作的条件。 AutoHealTriggers 自动修复触发器

AutoHealTriggers 自动修复触发器

名字 描述 价值
privateBytesInKB 基于专用字节的规则。 整数 (int)
请求 基于请求总数的规则。 RequestsBasedTrigger 触发器
slowRequests 请求 基于请求执行时间的规则。 SlowRequestsBasedTrigger 触发器
statusCodes 基于状态代码的规则。 StatusCodesBasedTrigger[]

AzureBlobStorageApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”
保留天数 保留天数。
删除早于 X 天的 Blob。
0 或更低意味着没有保留。
整数 (int)
sasUrl 的 具有读取/写入/列出/删除权限的 Azure Blob 容器的 SAS URL。 字符串

AzureBlobStorageHttpLogsConfig

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔
保留天数 保留天数。
删除早于 X 天的 Blob。
0 或更低意味着没有保留。
整数 (int)
sasUrl 的 具有读取/写入/列出/删除权限的 Azure Blob 容器的 SAS URL。 字符串

AzureTableStorageApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”
sasUrl 的 包含添加/查询/删除权限的 Azure 表的 SAS URL。 string (必需)

BackupRequestProperties

名字 描述 价值
backupSchedule 定期执行备份时计划备份。 备份计划
数据库 备份中包含的数据库。 DatabaseBackupSetting[]
启用 如果启用备份计划(在这种情况下必须包含),则为 true;如果应禁用备份计划,则为 false。 布尔
名字 备份的名称。 string (必需)
storageAccountUrl 的 容器的 SAS URL。 string (必需)
类型 备份的类型。 “Clone”
“Default”
“重定位”
“Snapshot”

备份计划

名字 描述 价值
频率间隔 应执行备份的频率(例如,对于每周备份,应将其设置为 7,FrequencyUnit 应设置为 Day) int (必需)
频率单位 执行备份的频率的时间单位(例如,对于每周备份,应将其设置为 Day,FrequencyInterval 应设置为 7) “Day”
“Hour”(必需)
keepAtLeastOneBackup 如此 如果保留策略应始终在存储帐户中保留至少一个备份,而不考虑备份的年龄:否则为 false。 bool (必需)
retentionPeriodInDays (保留期以天为单位) 删除多少天备份后。 int (必需)
开始时间 计划何时应开始工作。 字符串

ConnectionStringDictionary属性

名字 描述 价值

ConnStringInfo

名字 描述 价值
connectionString 连接字符串 连接字符串值。 字符串
名字 连接字符串的名称。 字符串
类型 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
“RedisCache”
“ServiceBus”
“SQLAzure”
“SQLServer”

ConnStringValueTypePair

名字 描述 价值
类型 数据库的类型。 “ApiHub”
“Custom”
“DocDb”
“EventHub”
“MySql”
“NotificationHub”
“PostgreSQL”
“RedisCache”
“ServiceBus”
“SQLAzure”
“SQLServer”(必需)
价值 对的值。 string (必需)

CorsSettings

名字 描述 价值
allowedOrigins 的 获取或设置应允许进行跨源的源列表
调用(例如:http://example.com:12345)。 使用“*”允许所有。
字符串[]

DatabaseBackupSetting 数据库备份设置

名字 描述 价值
connectionString 连接字符串 包含要备份或还原的数据库的连接字符串。 如果还原应发生在新数据库,则内部的数据库名称为新数据库。 字符串
connectionStringName 包含链接到 SiteConfig.ConnectionStrings 的连接字符串名称。
这在还原期间与覆盖连接字符串选项一起使用。
字符串
数据库类型 数据库类型(例如 SqlAzure/MySql)。 “LocalMySql”
“MySql”
“PostgreSql”
“SqlAzure”(必需)
名字 字符串

启用配置

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔

实验

名字 描述 价值
rampUp规则 提升规则的列表。 RampUpRule[]

FileSystemApplicationLogsConfig

名字 描述 价值
水平仪 日志级别。 “Error”
“信息”
“关闭”
“Verbose”
“Warning”

FileSystemHttpLogsConfig 文件

名字 描述 价值
启用 如果启用了配置,则为 true;如果禁用,则为 false;如果未设置配置,则为 null。 布尔
保留天数 保留天数。
删除早于 X 天的文件。
0 或更低意味着没有保留。
整数 (int)
保留(以 Mb 为单位) http 日志文件可以使用的最大大小(以兆字节为单位)。
到达旧日志文件后,将被删除以为新日志文件提供空间。
值可以介于 25 和 100 之间。
int

约束:
最小值 = 25
最大值 = 100

HandlerMapping

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

HttpLogsConfig

名字 描述 价值
azureBlobStorage 将 Http 日志记录到 Azure Blob 存储配置。 AzureBlobStorageHttpLogsConfig
文件系统 将 Http 日志记录到文件系统配置。 FileSystemHttpLogsConfig 文件

IpSecurityRestriction

名字 描述 价值
IP地址 安全限制有效的 IP 地址。 string (必需)
子网掩码 限制有效的 IP 地址范围的子网掩码。 字符串

microsoft.web/sites/slots/config

名字 描述 价值
名字 对于类型 Microsoft.Web/sites/slots/config,设置为“appsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“authsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“backup”。对于类型 Microsoft.Web/sites/slots/config,设置为“connectionstrings”。对于类型 Microsoft.Web/sites/slots/config,设置为“logs”。对于类型 Microsoft.Web/sites/slots/config,设置为“metadata”。对于类型 Microsoft.web/sites/slots/config,设置为“pushsettings”。对于类型 Microsoft.Web/sites/slots/config,设置为“web”。 “appsettings”
“authsettings”
“backup”
“connectionstrings”
“logs”
“metadata”
“pushsettings”
“web”(必需)

NameValuePair

名字 描述 价值
名字 配对名称。 字符串
价值 对值。 字符串

PushSettings 设置

名字 描述 价值
类 资源类型。 字符串
性能 PushSettings 资源特定属性 PushSettingsProperties

PushSettingsProperties

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

RampUpRule

名字 描述 价值
actionHostName (作主机名称) 如果决定将流量重定向到的槽的主机名。 例如 myapp-stage.azurewebsites.net。 字符串
更改决定回调网址 可以在 TiPCallback 站点扩展中提供自定义决策算法,可以指定 URL。 字符串
更改间隔以分钟为单位 指定重新评估 ReroutePercentage 的间隔(以分钟为单位)。 整数 (int)
changeStep 在自动增加方案中,这是从 <代码>ReroutePercentage</code> 中添加/删除的步骤,直到到达
<代码>MinReroutePercentage</code> 或 <代码>MaxReroutePercentage</code>。 站点指标每 N 分钟检查一次,<代码>ChangeIntervalInMinutes</code>。
可以在 TiPCallback 站点扩展中提供自定义决策算法,可以在 <代码>ChangeDecisionCallbackUrl</code>中指定 URL。
整数 (int)
maxReroutePercentage 指定 ReroutePercentage 将保留的上限。 整数 (int)
minReroutePercentage 指定重新路由Percentage 将保留的下边界。 整数 (int)
名字 路由规则的名称。 建议的名称是指向将接收试验中的流量的槽。 字符串
reroutePercentage 将重定向到 <代码>ActionHostName</code>的流量的百分比。 整数 (int)

RequestsBasedTrigger 触发器

名字 描述 价值
计数 请求计数。 整数 (int)
timeInterval 时间 时间间隔。 字符串

SiteAuthSettingsProperties

名字 描述 价值
additionalLoginParams 在以下情况下发送到 OpenID Connect 授权终结点的登录参数
用户登录。 每个参数必须采用“key=value”格式。
字符串[]
allowedAudiences 允许的受众值在验证颁发给的 JWT 时考虑
Azure Active Directory。 请注意,<代码>ClientID</code> 值始终被视为
允许访问群体,而不考虑此设置。
字符串[]
allowedExternalRedirectUrls 作为登录或注销应用的一部分,可重定向到的外部 URL。 请注意,将忽略 URL 的查询字符串部分。
这是 Windows 应用商店应用程序后端通常需要的高级设置。
请注意,始终允许当前域中的 URL。
字符串[]
客户端 ID 此信赖方应用程序的客户端 ID,称为client_id。
若要使用 Azure Active Directory 启用 OpenID 连接身份验证或
其他第三方 OpenID Connect 提供程序。
有关 OpenID Connect 的详细信息:http://openid.net/specs/openid-connect-core-1_0.html
字符串
客户密钥 此信赖方应用程序的客户端密码(在 Azure Active Directory 中,也称为密钥)。
此设置是可选的。 如果未配置客户端密码,则 OpenID Connect 隐式身份验证流用于对最终用户进行身份验证。
否则,OpenID Connect 授权代码流用于对最终用户进行身份验证。
有关 OpenID Connect 的详细信息:http://openid.net/specs/openid-connect-core-1_0.html
字符串
defaultProvider 配置多个提供程序时要使用的默认身份验证提供程序。
仅当配置了多个提供程序和未经身份验证的客户端时,才需要此设置
作设置为“RedirectToLoginPage”。
“AzureActiveDirectory”
“Facebook”
“Google”
“MicrosoftAccount”
“Twitter”
启用 如果为当前应用启用了身份验证/授权功能,<代码>true</code>;否则,<代码>false</code>。 布尔
facebookAppId 用于登录的 Facebook 应用的应用 ID。
启用 Facebook 登录需要此设置。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串
facebookAppSecret 用于 Facebook 登录的 Facebook 应用的应用机密。
启用 Facebook 登录需要此设置。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串
facebookOAuth范围 将作为 Facebook 登录身份验证的一部分请求的 OAuth 2.0 范围。
此设置是可选的。
Facebook 登录文档:https://developers.facebook.com/docs/facebook-login
字符串[]
googleClientId Google Web 应用程序的 OpenID Connect 客户端 ID。
启用 Google 登录需要此设置。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串
googleClientSecret 与 Google Web 应用程序关联的客户端密码。
启用 Google 登录需要此设置。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串
googleOAuth范围 将在 Google Sign-In 身份验证过程中请求的 OAuth 2.0 范围。
此设置是可选的。 如果未指定,则使用“openid”、“profile”和“email”作为默认范围。
Google Sign-In 文档:https://developers.google.com/identity/sign-in/web/
字符串[]
发行 OpenID Connect 颁发者 URI,表示颁发此应用程序的访问令牌的实体。
使用 Azure Active Directory 时,此值是目录租户的 URI,例如 https://sts.windows.net/{tenant-guid}/。
此 URI 是令牌颁发者的区分大小写的标识符。
有关 OpenID Connect 发现的详细信息:http://openid.net/specs/openid-connect-discovery-1_0.html
字符串
microsoftAccountClientId 为用于身份验证的应用创建的 OAuth 2.0 客户端 ID。
启用Microsoft帐户身份验证需要此设置。
Microsoft帐户 OAuth 文档:https://dev.onedrive.com/auth/msa_oauth.htm
字符串
microsoftAccountClientSecret 为用于身份验证的应用创建的 OAuth 2.0 客户端密码。
启用Microsoft帐户身份验证需要此设置。
Microsoft帐户 OAuth 文档:https://dev.onedrive.com/auth/msa_oauth.htm
字符串
microsoftAccountOAuth范围 将在Microsoft帐户身份验证过程中请求的 OAuth 2.0 范围。
此设置是可选的。 如果未指定,则使用“wl.basic”作为默认范围。
Microsoft帐户范围和权限文档:https://msdn.microsoft.com/en-us/library/dn631845.aspx
字符串[]
runtimeVersion (运行时版本) 用于当前应用的身份验证/授权功能的 RuntimeVersion。
此值中的设置可以控制身份验证/授权模块中某些功能的行为。
字符串
tokenRefreshExtension小时 会话令牌过期后的小时数,会话令牌可用于
调用令牌刷新 API。 默认值为 72 小时。
整数 (int)
tokenStore已启用 <代码>true</code> 持久存储登录流期间获取的平台特定的安全令牌;否则,<代码>false</code>。
默认值为 <代码>false</code>。
布尔
twitterConsumerKey 用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者密钥。
启用 Twitter 登录需要此设置。
Twitter Sign-In 文档:https://dev.twitter.com/web/sign-in
字符串
推特消费者秘密 用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者机密。
启用 Twitter 登录需要此设置。
Twitter Sign-In 文档:https://dev.twitter.com/web/sign-in
字符串
unauthenticatedClientAction 未经身份验证的客户端尝试访问应用时要执行的作。 “AllowAnonymous”
“RedirectToLoginPage”

站点配置

名字 描述 价值
永远在线 如果启用了 Always On,<代码>true</code>;否则,<代码>false</code>。 布尔
api定义 有关应用的正式 API 定义的信息。 ApiDefinitionInfo
app命令行 要启动的应用命令行。 字符串
应用设置 应用程序设置。 NameValuePair[]
autoHealEnabled 已启用 如果启用了自动愈合,则 <代码>true</code>;否则,<代码>false</code>。 布尔
autoHealRules 自动修复规则 自动治愈规则。 AutoHealRules 自动修复规则
autoSwapSlotName (自动交换槽名称) 自动交换槽名称。 字符串
connectionStrings 连接字符串 连接字符串。 ConnStringInfo[]
CORS(跨域资源共享) 跨域资源共享 (CORS) 设置。 CorsSettings
defaultDocuments 文档 默认文档。 字符串[]
detailedErrorLogging已启用 如果启用了详细的错误日志记录,<代码>true</code>;否则,<代码>false</code>。 布尔
documentRoot 文档根目录。 字符串
实验 这适用于多态类型。 试验
handlerMappings 处理程序映射。 HandlerMapping[]
http20已启用 Http20Enabled:配置网站以允许客户端通过 http2.0 进行连接 布尔
httpLogging已启用 如果启用 HTTP 日志记录,则 <代码>true</code>;否则,<代码>false</code>。 布尔
ipSecurity限制 IP 安全限制。 IpSecurityRestriction[]
java容器 Java 容器。 字符串
javaContainerVersion Java 容器版本。 字符串
java版本 Java 版本。 字符串
限制 网站限制。 站点限制
linuxFx版本 Linux 应用框架和版本 字符串
负载均衡 站点负载均衡。 “LeastRequests”
“LeastResponseTime”
“RequestHash”
“WeightedRoundRobin”
“WeightedTotalTraffic”
localMySql已启用 <代码>true</code> 启用本地 MySQL;否则,<代码>false</code>。 布尔
logsDirectorySizeLimit HTTP 日志目录大小限制。 整数 (int)
managedPipelineMode 托管管道模式。 “经典”
“Integrated”
minTlsVersion (最小版本 MinTlsVersion:配置 SSL 请求所需的最低 TLS 版本 '1.0'
'1.1'
'1.2'
netFrameworkVersion .NET Framework 版本。 字符串
nodeVersion Node.js的版本。 字符串
工人数 辅助角色数。 整数 (int)
php版本 PHP 的版本。 字符串
publishing用户名 发布用户名。 字符串
推送 推送终结点设置。 PushSettings 设置
python版本 Python 版本。 字符串
remoteDebugging已启用 如果启用了远程调试,<代码>true</code>;否则,<代码>false</code>。 布尔
remoteDebuggingVersion (远程调试版本) 远程调试版本。 字符串
requestTracing已启用 如果启用了请求跟踪,<代码>true</code>;否则,<代码>false</code>。 布尔
请求TracingExpirationTime 请求跟踪过期时间。 字符串
scm类型 SCM 类型。 “BitbucketGit”
“BitbucketHg”
“CodePlexGit”
“CodePlexHg”
“Dropbox”
“ExternalGit”
“ExternalHg”
“GitHub”
“LocalGit”
“None”
“OneDrive”
“Tfs”
“VSO”
tracing选项 跟踪选项。 字符串
use32BitWorker进程 <代码>true</code> 使用 32 位工作进程;否则,<代码>false</code>。 布尔
虚拟应用程序 虚拟应用程序。 VirtualApplication[]
vnet名称 虚拟网络名称。 字符串
webSockets已启用 如果启用了 WebSocket,则 <代码>true</code>;否则,<代码>false</code>。 布尔

站点限制

名字 描述 价值
最大磁盘大小(以 Mb 为单位) 允许的最大磁盘大小使用量(以 MB 为单位)。 整数 (int)
最大内存 允许的最大内存使用量(以 MB 为单位)。 整数 (int)
maxPercentageCpu 允许的最大 CPU 使用率百分比。 整数 (int)

SiteLogsConfigProperties

名字 描述 价值
应用程序日志 应用程序日志配置。 应用程序日志配置
detailedErrorMessages 详细的错误消息配置。 启用配置
failedRequestsTracing 请求 失败的请求跟踪配置。 启用配置
http日志 HTTP 日志配置。 HttpLogsConfig

SlowRequestsBasedTrigger 触发器

名字 描述 价值
计数 请求计数。 整数 (int)
timeInterval 时间 时间间隔。 字符串
时间 花费的时间。 字符串

StatusCodesBased触发器

名字 描述 价值
计数 请求计数。 整数 (int)
状态 HTTP 状态代码。 整数 (int)
子状态 请求子状态。 整数 (int)
timeInterval 时间 时间间隔。 字符串
win32状态 Win32 错误代码。 整数 (int)

StringDictionaryProperties

名字 描述 价值

StringDictionaryProperties

名字 描述 价值

虚拟应用程序

名字 描述 价值
物理路径 物理路径。 字符串
preload已启用 如果启用了预加载,<代码>true</code>;否则,<代码>false</code>。 布尔
虚拟目录 虚拟应用程序的虚拟目录。 VirtualDirectory []
虚拟路径 虚拟路径。 字符串

虚拟目录

名字 描述 价值
物理路径 物理路径。 字符串
虚拟路径 虚拟应用程序的路径。 字符串