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

Microsoft.Compute hostGroups/hosts 2020-12-01

Bicep 资源定义

可以使用面向以下操作部署 hostGroups/hosts 资源类型:

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

资源格式

若要创建 Microsoft.Compute/hostGroups/hosts 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Compute/hostGroups/hosts@2020-12-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    capacity: int
    name: 'string'
    tier: 'string'
  }
  parent: resourceSymbolicName
  properties: {
    autoReplaceOnFailure: bool
    licenseType: 'string'
    platformFaultDomain: int
  }
}

属性值

hostGroups/hosts

名称 说明
name 资源名称

了解如何在 Bicep 中设置子资源的名称和类型。
字符串 (必需)
location 资源位置 字符串 (必需)
标记 资源标记 标记名称和值的字典。 请参阅 模板中的标记
sku 硬件代系和 VM 系列的专用主机的 SKU。 只需设置名称。 列出 Microsoft.Compute SKU 以获取可能值的列表。 需要 sku ()
父级 (parent) 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源之外的子资源
类型的资源的符号名称: hostGroups
properties 专用主机的属性。 DedicatedHostProperties

DedicatedHostProperties

名称 说明
autoReplaceOnFailure 指定在发生故障时是否应自动替换专用主机。 如果未提供该值,该值默认为“true”。 bool
LicenseType 指定将应用于专用主机上部署的 VM 的软件许可证类型。

可能的值为:



Windows_Server_Hybrid

Windows_Server_Perpetual

默认值:
“None”
“Windows_Server_Hybrid”
“Windows_Server_Perpetual”
platformFaultDomain 专用主机组中专用主机的容错域。 int

约束:
最小值 = 0

SKU

名称 说明
容量 指定规模集中的虚拟机数。 int
name SKU 名称。 字符串
指定规模集中虚拟机的层。

可能的值:

标准

基本
字符串

快速入门模板

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

模板 说明
Azure 专用主机

部署到 Azure
这将使用 Azure 专用主机部署独立环境,以便预配 VM。

ARM 模板资源定义

可以使用面向以下操作部署 hostGroups/hosts 资源类型:

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

资源格式

若要创建 Microsoft.Compute/hostGroups/hosts 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Compute/hostGroups/hosts",
  "apiVersion": "2020-12-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "capacity": "int",
    "name": "string",
    "tier": "string"
  },
  "properties": {
    "autoReplaceOnFailure": "bool",
    "licenseType": "string",
    "platformFaultDomain": "int"
  }
}

属性值

hostGroups/hosts

名称 说明 Value
type 资源类型 “Microsoft.Compute/hostGroups/hosts”
apiVersion 资源 API 版本 '2020-12-01'
name 资源名称

了解如何在 JSON ARM 模板中为子资源设置名称和类型。
字符串 (必需)
location 资源位置 字符串 (必需)
标记 资源标记 标记名称和值的字典。 请参阅 模板中的标记
sku 硬件代系和 VM 系列的专用主机的 SKU。 只需设置名称。 列出 Microsoft.Compute SKU 以获取可能值的列表。 需要 sku ()
properties 专用主机的属性。 DedicatedHostProperties

DedicatedHostProperties

名称 说明
autoReplaceOnFailure 指定在发生故障时是否应自动替换专用主机。 如果未提供该值,则该值默认为“true”。 bool
LicenseType 指定将应用于部署在专用主机上的 VM 的软件许可证类型。

可能的值为:



Windows_Server_Hybrid

Windows_Server_Perpetual

默认值:
“None”
“Windows_Server_Hybrid”
“Windows_Server_Perpetual”
platformFaultDomain 专用主机组中专用主机的容错域。 int

约束:
最小值 = 0

SKU

名称 说明
容量 指定规模集中的虚拟机数。 int
name SKU 名称。 字符串
指定规模集中虚拟机的层。

可能的值:

标准

基本
字符串

快速入门模板

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

模板 说明
Azure 专用主机

部署到 Azure
这将使用 Azure 专用主机部署隔离环境,以便预配 VM。

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

hostGroups/hosts 资源类型可以通过针对以下操作进行部署:

  • 资源组

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

资源格式

若要创建 Microsoft.Compute/hostGroups/hosts 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Compute/hostGroups/hosts@2020-12-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      autoReplaceOnFailure = bool
      licenseType = "string"
      platformFaultDomain = int
    }
    sku = {
      capacity = int
      name = "string"
      tier = "string"
    }
  })
}

属性值

hostGroups/hosts

名称 说明 Value
type 资源类型 “Microsoft.Compute/hostGroups/hosts@2020-12-01”
name 资源名称 字符串 (必需)
location 资源位置 字符串 (必需)
parent_id 此资源的父资源的 ID。 类型为 的资源的 ID: hostGroups
标记 资源标记 标记名称和值的字典。
sku 硬件代系和 VM 系列的专用主机的 SKU。 只需设置名称。 列出 Microsoft.Compute SKU 以获取可能值的列表。 需要 sku ()
properties 专用主机的属性。 DedicatedHostProperties

DedicatedHostProperties

名称 说明
autoReplaceOnFailure 指定在发生故障时是否应自动替换专用主机。 如果未提供该值,该值默认为“true”。 bool
LicenseType 指定将应用于专用主机上部署的 VM 的软件许可证类型。

可能的值为:



Windows_Server_Hybrid

Windows_Server_Perpetual

默认值:
"None"
“Windows_Server_Hybrid”
“Windows_Server_Perpetual”
platformFaultDomain 专用主机组中专用主机的容错域。 int

约束:
最小值 = 0

SKU

名称 说明
容量 指定规模集中的虚拟机数。 int
name SKU 名称。 字符串
指定规模集中虚拟机的层。

可能的值:

标准

基本
字符串