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

Microsoft.DevTestLab labs/virtualmachines 2015-05-21-preview

Bicep 资源定义

可以使用目标操作部署 labs/virtualmachines 资源类型:

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

资源格式

若要创建 Microsoft.DevTestLab/labs/virtualmachines 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.DevTestLab/labs/virtualmachines@2015-05-21-preview' = {
  parent: resourceSymbolicName
  location: 'string'
  name: 'string'
  properties: {
    artifactDeploymentStatus: {
      artifactsApplied: int
      deploymentStatus: 'string'
      totalArtifacts: int
    }
    artifacts: [
      {
        artifactId: 'string'
        parameters: [
          {
            name: 'string'
            value: 'string'
          }
        ]
      }
    ]
    computeId: 'string'
    createdByUser: 'string'
    createdByUserId: 'string'
    customImageId: 'string'
    disallowPublicIpAddress: bool
    fqdn: 'string'
    galleryImageReference: {
      offer: 'string'
      osType: 'string'
      publisher: 'string'
      sku: 'string'
      version: 'string'
    }
    isAuthenticationWithSshKey: bool
    labSubnetName: 'string'
    labVirtualNetworkId: 'string'
    notes: 'string'
    osType: 'string'
    ownerObjectId: 'string'
    password: 'string'
    provisioningState: 'string'
    size: 'string'
    sshKey: 'string'
    userName: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

ArtifactDeploymentStatusProperties

名字 描述 价值
artifactsApplied 已成功应用的项目的总计数。 int
deploymentStatus 项目的部署状态。 字符串
totalArtifacts 暂时应用的项目总数。 int

ArtifactInstallProperties

名字 描述 价值
artifactId 项目的标识符。 字符串
参数 项目的参数。 ArtifactParameterProperties[]

ArtifactParameterProperties

名字 描述 价值
名字 项目参数的名称。 字符串
价值 项目参数的值。 字符串

GalleryImageReference

名字 描述 价值
提供 库映像的产品/服务。 字符串
osType 库映像的 OS 类型。 字符串
发行人 库映像的发布者。 字符串
sku 库映像的 SKU。 字符串
版本 库映像的版本。 字符串

LabVirtualMachineProperties

名字 描述 价值
artifactDeploymentStatus 虚拟机的项目部署状态。 ArtifactDeploymentStatusProperties
工件 要安装在虚拟机上的项目。 ArtifactInstallProperties[]
computeId 虚拟机的资源标识符(Microsoft.Compute)。 字符串
createdByUser 虚拟机创建者的电子邮件地址。 字符串
createdByUserId 虚拟机创建者的对象标识符。 字符串
customImageId 虚拟机的自定义映像标识符。 字符串
disallowPublicIpAddress 指示是否在不使用公共 IP 地址的情况下创建虚拟机。 bool
fqdn 虚拟机的完全限定域名。 字符串
galleryImageReference 虚拟机Microsoft Azure 市场映像参考。 GalleryImageReference
isAuthenticationWithSshKey 一个值,该值指示此虚拟机是否使用 SSH 密钥进行身份验证。 bool
labSubnetName 虚拟机的实验室子网名称。 字符串
labVirtualNetworkId 虚拟机的实验室虚拟网络标识符。 字符串
笔记 虚拟机的说明。 字符串
osType 虚拟机的 OS 类型。 字符串
ownerObjectId 虚拟机所有者的对象标识符。 字符串
密码 虚拟机管理员的密码。 字符串
provisioningState 资源的预配状态。 字符串
大小 虚拟机的大小。 字符串
sshKey 虚拟机管理员的 SSH 密钥。 字符串
userName 虚拟机的用户名。 字符串

LabVirtualMachineTags

名字 描述 价值

Microsoft.DevTestLab/labs/virtualmachines

名字 描述 价值
位置 资源的位置。 字符串
名字 资源名称 string (必需)
父母 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源
类型资源的符号名称:实验室
性能 资源的属性。 LabVirtualMachineProperties
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

快速入门示例

以下快速入门示例部署此资源类型。

Bicep 文件 描述
使用声明的 VM 在 Azure 开发测试实验室中创建实验室 此模板使用声明的 Windows Server 2019 Datacenter VM 创建一个新的开发测试实验室/DTL 实例。 https://github.com/Azure/azure-devtestlab/tree/master/ARMTemplates 提供了适用于 Azure 开发测试实验室的更多 Azure 资源管理器快速入门模板

ARM 模板资源定义

可以使用目标操作部署 labs/virtualmachines 资源类型:

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

资源格式

若要创建 Microsoft.DevTestLab/labs/virtualmachines 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.DevTestLab/labs/virtualmachines",
  "apiVersion": "2015-05-21-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "artifactDeploymentStatus": {
      "artifactsApplied": "int",
      "deploymentStatus": "string",
      "totalArtifacts": "int"
    },
    "artifacts": [
      {
        "artifactId": "string",
        "parameters": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      }
    ],
    "computeId": "string",
    "createdByUser": "string",
    "createdByUserId": "string",
    "customImageId": "string",
    "disallowPublicIpAddress": "bool",
    "fqdn": "string",
    "galleryImageReference": {
      "offer": "string",
      "osType": "string",
      "publisher": "string",
      "sku": "string",
      "version": "string"
    },
    "isAuthenticationWithSshKey": "bool",
    "labSubnetName": "string",
    "labVirtualNetworkId": "string",
    "notes": "string",
    "osType": "string",
    "ownerObjectId": "string",
    "password": "string",
    "provisioningState": "string",
    "size": "string",
    "sshKey": "string",
    "userName": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

ArtifactDeploymentStatusProperties

名字 描述 价值
artifactsApplied 已成功应用的项目的总计数。 int
deploymentStatus 项目的部署状态。 字符串
totalArtifacts 暂时应用的项目总数。 int

ArtifactInstallProperties

名字 描述 价值
artifactId 项目的标识符。 字符串
参数 项目的参数。 ArtifactParameterProperties[]

ArtifactParameterProperties

名字 描述 价值
名字 项目参数的名称。 字符串
价值 项目参数的值。 字符串

GalleryImageReference

名字 描述 价值
提供 库映像的产品/服务。 字符串
osType 库映像的 OS 类型。 字符串
发行人 库映像的发布者。 字符串
sku 库映像的 SKU。 字符串
版本 库映像的版本。 字符串

LabVirtualMachineProperties

名字 描述 价值
artifactDeploymentStatus 虚拟机的项目部署状态。 ArtifactDeploymentStatusProperties
工件 要安装在虚拟机上的项目。 ArtifactInstallProperties[]
computeId 虚拟机的资源标识符(Microsoft.Compute)。 字符串
createdByUser 虚拟机创建者的电子邮件地址。 字符串
createdByUserId 虚拟机创建者的对象标识符。 字符串
customImageId 虚拟机的自定义映像标识符。 字符串
disallowPublicIpAddress 指示是否在不使用公共 IP 地址的情况下创建虚拟机。 bool
fqdn 虚拟机的完全限定域名。 字符串
galleryImageReference 虚拟机Microsoft Azure 市场映像参考。 GalleryImageReference
isAuthenticationWithSshKey 一个值,该值指示此虚拟机是否使用 SSH 密钥进行身份验证。 bool
labSubnetName 虚拟机的实验室子网名称。 字符串
labVirtualNetworkId 虚拟机的实验室虚拟网络标识符。 字符串
笔记 虚拟机的说明。 字符串
osType 虚拟机的 OS 类型。 字符串
ownerObjectId 虚拟机所有者的对象标识符。 字符串
密码 虚拟机管理员的密码。 字符串
provisioningState 资源的预配状态。 字符串
大小 虚拟机的大小。 字符串
sshKey 虚拟机管理员的 SSH 密钥。 字符串
userName 虚拟机的用户名。 字符串

LabVirtualMachineTags

名字 描述 价值

Microsoft.DevTestLab/labs/virtualmachines

名字 描述 价值
apiVersion API 版本 '2015-05-21-preview'
位置 资源的位置。 字符串
名字 资源名称 string (必需)
性能 资源的属性。 LabVirtualMachineProperties
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 “Microsoft.DevTestLab/labs/virtualmachines”

快速入门模板

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

模板 描述
使用声明的 VM 在 Azure 开发测试实验室中创建实验室

部署到 Azure
此模板使用声明的 Windows Server 2019 Datacenter VM 创建一个新的开发测试实验室/DTL 实例。 https://github.com/Azure/azure-devtestlab/tree/master/ARMTemplates 提供了适用于 Azure 开发测试实验室的更多 Azure 资源管理器快速入门模板

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

可以使用目标操作部署 labs/virtualmachines 资源类型:

  • 资源组

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

资源格式

若要创建 Microsoft.DevTestLab/labs/virtualmachines 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DevTestLab/labs/virtualmachines@2015-05-21-preview"
  name = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = jsonencode({
    properties = {
      artifactDeploymentStatus = {
        artifactsApplied = int
        deploymentStatus = "string"
        totalArtifacts = int
      }
      artifacts = [
        {
          artifactId = "string"
          parameters = [
            {
              name = "string"
              value = "string"
            }
          ]
        }
      ]
      computeId = "string"
      createdByUser = "string"
      createdByUserId = "string"
      customImageId = "string"
      disallowPublicIpAddress = bool
      fqdn = "string"
      galleryImageReference = {
        offer = "string"
        osType = "string"
        publisher = "string"
        sku = "string"
        version = "string"
      }
      isAuthenticationWithSshKey = bool
      labSubnetName = "string"
      labVirtualNetworkId = "string"
      notes = "string"
      osType = "string"
      ownerObjectId = "string"
      password = "string"
      provisioningState = "string"
      size = "string"
      sshKey = "string"
      userName = "string"
    }
  })
}

属性值

ArtifactDeploymentStatusProperties

名字 描述 价值
artifactsApplied 已成功应用的项目的总计数。 int
deploymentStatus 项目的部署状态。 字符串
totalArtifacts 暂时应用的项目总数。 int

ArtifactInstallProperties

名字 描述 价值
artifactId 项目的标识符。 字符串
参数 项目的参数。 ArtifactParameterProperties[]

ArtifactParameterProperties

名字 描述 价值
名字 项目参数的名称。 字符串
价值 项目参数的值。 字符串

GalleryImageReference

名字 描述 价值
提供 库映像的产品/服务。 字符串
osType 库映像的 OS 类型。 字符串
发行人 库映像的发布者。 字符串
sku 库映像的 SKU。 字符串
版本 库映像的版本。 字符串

LabVirtualMachineProperties

名字 描述 价值
artifactDeploymentStatus 虚拟机的项目部署状态。 ArtifactDeploymentStatusProperties
工件 要安装在虚拟机上的项目。 ArtifactInstallProperties[]
computeId 虚拟机的资源标识符(Microsoft.Compute)。 字符串
createdByUser 虚拟机创建者的电子邮件地址。 字符串
createdByUserId 虚拟机创建者的对象标识符。 字符串
customImageId 虚拟机的自定义映像标识符。 字符串
disallowPublicIpAddress 指示是否在不使用公共 IP 地址的情况下创建虚拟机。 bool
fqdn 虚拟机的完全限定域名。 字符串
galleryImageReference 虚拟机Microsoft Azure 市场映像参考。 GalleryImageReference
isAuthenticationWithSshKey 一个值,该值指示此虚拟机是否使用 SSH 密钥进行身份验证。 bool
labSubnetName 虚拟机的实验室子网名称。 字符串
labVirtualNetworkId 虚拟机的实验室虚拟网络标识符。 字符串
笔记 虚拟机的说明。 字符串
osType 虚拟机的 OS 类型。 字符串
ownerObjectId 虚拟机所有者的对象标识符。 字符串
密码 虚拟机管理员的密码。 字符串
provisioningState 资源的预配状态。 字符串
大小 虚拟机的大小。 字符串
sshKey 虚拟机管理员的 SSH 密钥。 字符串
userName 虚拟机的用户名。 字符串

LabVirtualMachineTags

名字 描述 价值

Microsoft.DevTestLab/labs/virtualmachines

名字 描述 价值
位置 资源的位置。 字符串
名字 资源名称 string (必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:实验室
性能 资源的属性。 LabVirtualMachineProperties
标签 资源标记 标记名称和值的字典。
类型 资源类型 “Microsoft.DevTestLab/labs/virtualmachines@2015-05-21-preview”