Microsoft.Web 託管環境

Bicep 資源定義

hostingEnvironments 資源類型可以使用目標作業來部署:

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

使用範例

Azure 已驗證的模組

下列 Azure 驗證模組 可用來部署此資源類型。

模組 描述
App Service 環境 App Service 環境的 AVM 資源模組

Azure 快速入門範例

下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。

Bicep 檔案 描述
App Service 環境 搭配 Hosting Plan 與 Azure WebApp 在現有的虛擬網路中建立具有 ILB 位址的 App Service 環境 v2,以便私下使用。 App Service 環境將包含主控方案和 Azure Web 應用程式
建立 App Service 環境 v2 在您的虛擬網路中建立App Service 環境 v2
在 ASEv3 中建立 AppServicePlan 與應用程式 在 ASEv3 中建立 AppServicePlan 和 App

資源格式

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

resource symbolicname 'Microsoft.Web/hostingEnvironments@2025-03-01' = {
  kind: 'string'
  location: 'string'
  name: 'string'
  properties: {
    clusterSettings: [
      {
        name: 'string'
        value: 'string'
      }
    ]
    customDnsSuffixConfiguration: {
      kind: 'string'
      properties: {
        certificateUrl: 'string'
        dnsSuffix: 'string'
        keyVaultReferenceIdentity: 'string'
      }
    }
    dedicatedHostCount: int
    dnsSuffix: 'string'
    frontEndScaleFactor: int
    internalLoadBalancingMode: 'string'
    ipsslAddressCount: int
    multiSize: 'string'
    networkingConfiguration: {
      kind: 'string'
      properties: {
        allowNewPrivateEndpointConnections: bool
        ftpEnabled: bool
        inboundIpAddressOverride: 'string'
        remoteDebugEnabled: bool
      }
    }
    upgradePreference: 'string'
    userWhitelistedIpRanges: [
      'string'
    ]
    virtualNetwork: {
      id: 'string'
      subnet: 'string'
    }
    zoneRedundant: bool
  }
  tags: {
    {customized property}: 'string'
  }
}

屬性值

Microsoft.Web/託管環境

名字 描述 價值
類 資源種類。 如果資源是應用程式,您可以參考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 以取得種類支援的詳細值。 字串
位置 資源位置。 字串 (必要)
名字 資源名稱 字串 (必要)
性能 核心資源屬性 AppServiceEnvironment
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤

AppServiceEnvironment

名字 描述 價值
clusterSettings 變更 App Service 環境的行為的自訂設定。 NameValuePair[]
customDnsSuffixConfiguration ASEv3 自定義網域後綴組態的完整檢視。 CustomDnsSuffixConfiguration
dedicatedHostCount 專用主機計數 整數 (int)
dns後綴 App Service 環境的 DNS 後綴。 字串
frontEndScaleFactor 前端的縮放比例。 整數 (int)
internalLoadBalancingMode (內部負載均衡模式) 指定要在 App Service 環境的虛擬網路內部提供服務的端點。 “無”
“發佈”
“網络”
'Web, Publishing'
ipsslAddressCount 保留給 App Service 環境的 IP SSL 位址數目。 整數 (int)
多尺寸 前端 VM 大小,例如「中」、「大型」。 字串
networkingConfiguration ASE 網路設定的完整檢視。 AseV3NetworkingConfiguration
upgradePreference 升級喜好設定 “早期”
“遲到”
“手動”
“無”
userWhitelistedIp範圍 使用者已將 IP 範圍新增至 ASE 資料庫的允許清單 字串[]
虛擬網路 虛擬網路的描述。 VirtualNetworkProfile (必填)
區域冗餘 此 App Service 環境是否為區域備援。 布爾 (bool)

AseV3NetworkingConfiguration

名字 描述 價值
類 資源種類。 字串
性能 AseV3NetworkingConfiguration 資源特定屬性 AseV3NetworkingConfigurationProperties

AseV3NetworkingConfigurationProperties

名字 描述 價值
allowNewPrivateEndpointConnections 在 ASE 上啟用和停用新私人端點連線建立的屬性 布爾 (bool)
ftp已啟用 在 ASEV3 上啟用和停用 FTP 的屬性 布爾 (bool)
inboundIpAddressOverride 客戶提供的輸入IP位址。 只能在 Ase create 上設定。 字串
remoteDebugEnabled 已啟用 在 ASEV3 上啟用和停用遠端偵錯的屬性 布爾 (bool)

CustomDnsSuffixConfiguration

名字 描述 價值
類 資源種類。 字串
性能 CustomDnsSuffixConfiguration 資源特定屬性 CustomDnsSuffixConfigurationProperties

CustomDnsSuffixConfigurationProperties

名字 描述 價值
certificateUrl 的 參考 Azure Key Vault 憑證密碼的 URL,應該作為具有自定義網域後綴之網站的預設 SSL/TLS 憑證。 字串
dns後綴 默認自定義網域後綴,用於部署在 ASE 上的所有月臺。 字串
keyVaultReferenceIdentity 用來解析金鑰保存庫憑證參考的使用者指派身分識別。 如果未指定,則會使用系統指派的 ASE 身分識別。 字串

NameValuePair

名字 描述 價值
名字 配對名稱。 字串
價值 配對值。 字串

資源標籤

名字 描述 價值

VirtualNetworkProfile

名字 描述 價值
識別碼 虛擬網路的資源識別碼。 字串 (必要)
子網路 虛擬網路內的子網。 字串

ARM 樣本資源定義

hostingEnvironments 資源類型可以使用目標作業來部署:

使用範例

Azure 快速入門範本

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

範本 描述
App Service 環境 with Azure SQL backend

部署至 Azure
此範本會建立具有 Azure SQL 後端的 App Service 環境,以及私人端點,以及通常用於私人/隔離環境中的相關聯資源。
App Service 環境 搭配 Hosting Plan 與 Azure WebApp

部署至 Azure
在現有的虛擬網路中建立具有 ILB 位址的 App Service 環境 v2,以便私下使用。 App Service 環境將包含主控方案和 Azure Web 應用程式
建立 App Service 環境

部署至 Azure
在您的虛擬網路中建立App Service環境
建立 App Service 環境 v2

部署至 Azure
在您的虛擬網路中建立App Service 環境 v2
在 ASEv3 中建立 AppServicePlan 與應用程式

部署至 Azure
在 ASEv3 中建立 AppServicePlan 和 App
使用 ILB 位址建立 App Service 環境 v2

部署至 Azure
使用私人內部負載平衡器位址在虛擬網路中建立App Service 環境 v2
使用 ILB 位址建立 App Service 環境

部署至 Azure
使用私人內部負載平衡器位址在虛擬網路中建立App Service環境
新增 Web 應用程式Azure App Service 環境

部署至 Azure
在虛擬網路子網內建立 Azure App Service 環境。 此範本也會在 App Service 環境內新增 Azure Web 應用程式。 範本最初由 PixelPin 的 Callum Brankin 撰寫
ILB App Service 環境 with Azure 防火牆

部署至 Azure
Resource Manager 範本和參數,示範如何使用 Azure 防火牆整合來部署 App Service 環境
ILB ASE 或 ILB ASE v2 的 SSL 憑證

部署至 Azure
設定 ILB ASE 或 ILB ASE v2 的預設 SSL 憑證

資源格式

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

{
  "type": "Microsoft.Web/hostingEnvironments",
  "apiVersion": "2025-03-01",
  "name": "string",
  "kind": "string",
  "location": "string",
  "properties": {
    "clusterSettings": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "customDnsSuffixConfiguration": {
      "kind": "string",
      "properties": {
        "certificateUrl": "string",
        "dnsSuffix": "string",
        "keyVaultReferenceIdentity": "string"
      }
    },
    "dedicatedHostCount": "int",
    "dnsSuffix": "string",
    "frontEndScaleFactor": "int",
    "internalLoadBalancingMode": "string",
    "ipsslAddressCount": "int",
    "multiSize": "string",
    "networkingConfiguration": {
      "kind": "string",
      "properties": {
        "allowNewPrivateEndpointConnections": "bool",
        "ftpEnabled": "bool",
        "inboundIpAddressOverride": "string",
        "remoteDebugEnabled": "bool"
      }
    },
    "upgradePreference": "string",
    "userWhitelistedIpRanges": [ "string" ],
    "virtualNetwork": {
      "id": "string",
      "subnet": "string"
    },
    "zoneRedundant": "bool"
  },
  "tags": {
    "{customized property}": "string"
  }
}

屬性值

Microsoft.Web/託管環境

名字 描述 價值
apiVersion API 版本 '2025-03-01'
類 資源種類。 如果資源是應用程式,您可以參考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 以取得種類支援的詳細值。 字串
位置 資源位置。 字串 (必要)
名字 資源名稱 字串 (必要)
性能 核心資源屬性 AppServiceEnvironment
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
型別 資源類型 “Microsoft.Web/hostingEnvironments”

AppServiceEnvironment

名字 描述 價值
clusterSettings 變更 App Service 環境的行為的自訂設定。 NameValuePair[]
customDnsSuffixConfiguration ASEv3 自定義網域後綴組態的完整檢視。 CustomDnsSuffixConfiguration
dedicatedHostCount 專用主機計數 整數 (int)
dns後綴 App Service 環境的 DNS 後綴。 字串
frontEndScaleFactor 前端的縮放比例。 整數 (int)
internalLoadBalancingMode (內部負載均衡模式) 指定要在 App Service 環境的虛擬網路內部提供服務的端點。 “無”
“發佈”
“網络”
'Web, Publishing'
ipsslAddressCount 保留給 App Service 環境的 IP SSL 位址數目。 整數 (int)
多尺寸 前端 VM 大小,例如「中」、「大型」。 字串
networkingConfiguration ASE 網路設定的完整檢視。 AseV3NetworkingConfiguration
upgradePreference 升級喜好設定 “早期”
“遲到”
“手動”
“無”
userWhitelistedIp範圍 使用者已將 IP 範圍新增至 ASE 資料庫的允許清單 字串[]
虛擬網路 虛擬網路的描述。 VirtualNetworkProfile (必填)
區域冗餘 此 App Service 環境是否為區域備援。 布爾 (bool)

AseV3NetworkingConfiguration

名字 描述 價值
類 資源種類。 字串
性能 AseV3NetworkingConfiguration 資源特定屬性 AseV3NetworkingConfigurationProperties

AseV3NetworkingConfigurationProperties

名字 描述 價值
allowNewPrivateEndpointConnections 在 ASE 上啟用和停用新私人端點連線建立的屬性 布爾 (bool)
ftp已啟用 在 ASEV3 上啟用和停用 FTP 的屬性 布爾 (bool)
inboundIpAddressOverride 客戶提供的輸入IP位址。 只能在 Ase create 上設定。 字串
remoteDebugEnabled 已啟用 在 ASEV3 上啟用和停用遠端偵錯的屬性 布爾 (bool)

CustomDnsSuffixConfiguration

名字 描述 價值
類 資源種類。 字串
性能 CustomDnsSuffixConfiguration 資源特定屬性 CustomDnsSuffixConfigurationProperties

CustomDnsSuffixConfigurationProperties

名字 描述 價值
certificateUrl 的 參考 Azure Key Vault 憑證密碼的 URL,應該作為具有自定義網域後綴之網站的預設 SSL/TLS 憑證。 字串
dns後綴 默認自定義網域後綴,用於部署在 ASE 上的所有月臺。 字串
keyVaultReferenceIdentity 用來解析金鑰保存庫憑證參考的使用者指派身分識別。 如果未指定,則會使用系統指派的 ASE 身分識別。 字串

NameValuePair

名字 描述 價值
名字 配對名稱。 字串
價值 配對值。 字串

資源標籤

名字 描述 價值

VirtualNetworkProfile

名字 描述 價值
識別碼 虛擬網路的資源識別碼。 字串 (必要)
子網路 虛擬網路內的子網。 字串

Terraform (AzAPI 提供者) 資源定義

hostingEnvironments 資源類型可以使用目標作業來部署:

  • 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。

使用範例

Azure 已驗證的模組

下列 Azure 驗證模組 可用來部署此資源類型。

模組 描述
App Service 環境 App Service 環境的 AVM 資源模組

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Web/hostingEnvironments@2025-03-01"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    kind = "string"
    properties = {
      clusterSettings = [
        {
          name = "string"
          value = "string"
        }
      ]
      customDnsSuffixConfiguration = {
        kind = "string"
        properties = {
          certificateUrl = "string"
          dnsSuffix = "string"
          keyVaultReferenceIdentity = "string"
        }
      }
      dedicatedHostCount = int
      dnsSuffix = "string"
      frontEndScaleFactor = int
      internalLoadBalancingMode = "string"
      ipsslAddressCount = int
      multiSize = "string"
      networkingConfiguration = {
        kind = "string"
        properties = {
          allowNewPrivateEndpointConnections = bool
          ftpEnabled = bool
          inboundIpAddressOverride = "string"
          remoteDebugEnabled = bool
        }
      }
      upgradePreference = "string"
      userWhitelistedIpRanges = [
        "string"
      ]
      virtualNetwork = {
        id = "string"
        subnet = "string"
      }
      zoneRedundant = bool
    }
  }
}

屬性值

Microsoft.Web/託管環境

名字 描述 價值
類 資源種類。 如果資源是應用程式,您可以參考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 以取得種類支援的詳細值。 字串
位置 資源位置。 字串 (必要)
名字 資源名稱 字串 (必要)
性能 核心資源屬性 AppServiceEnvironment
標籤 資源標籤 標記名稱和值的字典。
型別 資源類型 “Microsoft.Web/hostingEnvironments@2025-03-01”

AppServiceEnvironment

名字 描述 價值
clusterSettings 變更 App Service 環境的行為的自訂設定。 NameValuePair[]
customDnsSuffixConfiguration ASEv3 自定義網域後綴組態的完整檢視。 CustomDnsSuffixConfiguration
dedicatedHostCount 專用主機計數 整數 (int)
dns後綴 App Service 環境的 DNS 後綴。 字串
frontEndScaleFactor 前端的縮放比例。 整數 (int)
internalLoadBalancingMode (內部負載均衡模式) 指定要在 App Service 環境的虛擬網路內部提供服務的端點。 “無”
“發佈”
“網络”
'Web, Publishing'
ipsslAddressCount 保留給 App Service 環境的 IP SSL 位址數目。 整數 (int)
多尺寸 前端 VM 大小,例如「中」、「大型」。 字串
networkingConfiguration ASE 網路設定的完整檢視。 AseV3NetworkingConfiguration
upgradePreference 升級喜好設定 “早期”
“遲到”
“手動”
“無”
userWhitelistedIp範圍 使用者已將 IP 範圍新增至 ASE 資料庫的允許清單 字串[]
虛擬網路 虛擬網路的描述。 VirtualNetworkProfile (必填)
區域冗餘 此 App Service 環境是否為區域備援。 布爾 (bool)

AseV3NetworkingConfiguration

名字 描述 價值
類 資源種類。 字串
性能 AseV3NetworkingConfiguration 資源特定屬性 AseV3NetworkingConfigurationProperties

AseV3NetworkingConfigurationProperties

名字 描述 價值
allowNewPrivateEndpointConnections 在 ASE 上啟用和停用新私人端點連線建立的屬性 布爾 (bool)
ftp已啟用 在 ASEV3 上啟用和停用 FTP 的屬性 布爾 (bool)
inboundIpAddressOverride 客戶提供的輸入IP位址。 只能在 Ase create 上設定。 字串
remoteDebugEnabled 已啟用 在 ASEV3 上啟用和停用遠端偵錯的屬性 布爾 (bool)

CustomDnsSuffixConfiguration

名字 描述 價值
類 資源種類。 字串
性能 CustomDnsSuffixConfiguration 資源特定屬性 CustomDnsSuffixConfigurationProperties

CustomDnsSuffixConfigurationProperties

名字 描述 價值
certificateUrl 的 參考 Azure Key Vault 憑證密碼的 URL,應該作為具有自定義網域後綴之網站的預設 SSL/TLS 憑證。 字串
dns後綴 默認自定義網域後綴,用於部署在 ASE 上的所有月臺。 字串
keyVaultReferenceIdentity 用來解析金鑰保存庫憑證參考的使用者指派身分識別。 如果未指定,則會使用系統指派的 ASE 身分識別。 字串

NameValuePair

名字 描述 價值
名字 配對名稱。 字串
價值 配對值。 字串

資源標籤

名字 描述 價值

VirtualNetworkProfile

名字 描述 價值
識別碼 虛擬網路的資源識別碼。 字串 (必要)
子網路 虛擬網路內的子網。 字串