Microsoft.DevTestLab labs/virtualmachines 2016-05-15
Bicep 資源定義
實驗室/virtualmachines 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.DevTestLab/labs/virtualmachines 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.DevTestLab/labs/virtualmachines@2016-05-15' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
allowClaim: bool
applicableSchedule: {
location: 'string'
properties: {
labVmsShutdown: {
location: 'string'
properties: {
dailyRecurrence: {
time: 'string'
}
hourlyRecurrence: {
minute: int
}
notificationSettings: {
status: 'string'
timeInMinutes: int
webhookUrl: 'string'
}
provisioningState: 'string'
status: 'string'
targetResourceId: 'string'
taskType: 'string'
timeZoneId: 'string'
uniqueIdentifier: 'string'
weeklyRecurrence: {
time: 'string'
weekdays: [
'string'
]
}
}
tags: {
{customized property}: 'string'
}
}
labVmsStartup: {
location: 'string'
properties: {
dailyRecurrence: {
time: 'string'
}
hourlyRecurrence: {
minute: int
}
notificationSettings: {
status: 'string'
timeInMinutes: int
webhookUrl: 'string'
}
provisioningState: 'string'
status: 'string'
targetResourceId: 'string'
taskType: 'string'
timeZoneId: 'string'
uniqueIdentifier: 'string'
weeklyRecurrence: {
time: 'string'
weekdays: [
'string'
]
}
}
tags: {
{customized property}: 'string'
}
}
}
tags: {
{customized property}: 'string'
}
}
artifactDeploymentStatus: {
artifactsApplied: int
deploymentStatus: 'string'
totalArtifacts: int
}
artifacts: [
{
artifactId: 'string'
deploymentStatusMessage: 'string'
installTime: 'string'
parameters: [
{
name: 'string'
value: 'string'
}
]
status: 'string'
vmExtensionStatusMessage: 'string'
}
]
computeVm: {
dataDiskIds: [
'string'
]
dataDisks: [
{
diskSizeGiB: int
diskUri: 'string'
managedDiskId: 'string'
name: 'string'
}
]
networkInterfaceId: 'string'
osDiskId: 'string'
osType: 'string'
statuses: [
{
code: 'string'
displayStatus: 'string'
message: 'string'
}
]
vmSize: 'string'
}
createdByUser: 'string'
createdByUserId: 'string'
createdDate: 'string'
customImageId: 'string'
disallowPublicIpAddress: bool
environmentId: 'string'
expirationDate: 'string'
fqdn: 'string'
galleryImageReference: {
offer: 'string'
osType: 'string'
publisher: 'string'
sku: 'string'
version: 'string'
}
isAuthenticationWithSshKey: bool
labSubnetName: 'string'
labVirtualNetworkId: 'string'
networkInterface: {
dnsName: 'string'
privateIpAddress: 'string'
publicIpAddress: 'string'
publicIpAddressId: 'string'
rdpAuthority: 'string'
sharedPublicIpAddressConfiguration: {
inboundNatRules: [
{
backendPort: int
frontendPort: int
transportProtocol: 'string'
}
]
}
sshAuthority: 'string'
subnetId: 'string'
virtualNetworkId: 'string'
}
notes: 'string'
osType: 'string'
ownerObjectId: 'string'
ownerUserPrincipalName: 'string'
password: 'string'
provisioningState: 'string'
size: 'string'
sshKey: 'string'
storageType: 'string'
uniqueIdentifier: 'string'
userName: 'string'
virtualMachineCreationSource: 'string'
}
tags: {
{customized property}: 'string'
}
}
屬性值
ApplicableSchedule
名字 | 描述 | 價值 |
---|---|---|
位置 | 資源的位置。 | 字串 |
性能 | 資源的屬性。 | ApplicableScheduleProperties (必要) |
標籤 | 資源的標記。 | ResourceTags |
ApplicableScheduleProperties
名字 | 描述 | 價值 |
---|---|---|
labVmsShutdown | 如果已在實驗室或實驗室資源層級設定自動關機排程。 | 排程 |
labVmsStartup | 如果已在實驗室或實驗室資源層級設定自動啟動排程。 | 排程 |
ArtifactDeploymentStatusProperties
名字 | 描述 | 價值 |
---|---|---|
artifactsApplied | 成功套用的成品總數。 | int |
deploymentStatus | 成品的部署狀態。 | 字串 |
totalArtifacts | 暫定套用的成品總數。 | int |
ArtifactInstallProperties
名字 | 描述 | 價值 |
---|---|---|
artifactId | 成品的標識碼。 | 字串 |
deploymentStatusMessage | 來自部署的狀態消息。 | 字串 |
installTime | 成品開始在虛擬機上安裝的時間。 | 字串 |
參數 | 成品的參數。 | ArtifactParameterProperties[] |
地位 | 成品的狀態。 | 字串 |
vmExtensionStatusMessage | 虛擬機擴充功能的狀態消息。 | 字串 |
ArtifactParameterProperties
名字 | 描述 | 價值 |
---|---|---|
名字 | 成品參數的名稱。 | 字串 |
價值 | 成品參數的值。 | 字串 |
ComputeDataDisk
名字 | 描述 | 價值 |
---|---|---|
diskSizeGiB | 取得 GiB 中的數據磁碟大小。 | int |
diskUri | 由 Blob 支援時,基礎 Blob 的 URI。 | 字串 |
managedDiskId | 受受控磁碟支援時,這是計算磁碟資源的標識碼。 | 字串 |
名字 | 取得數據磁碟名稱。 | 字串 |
ComputeVmInstanceViewStatus
名字 | 描述 | 價值 |
---|---|---|
法典 | 取得狀態代碼。 | 字串 |
displayStatus | 取得狀態的簡短可本地化標籤。 | 字串 |
消息 | 取得與狀態相關聯的訊息。 | 字串 |
ComputeVmProperties
名字 | 描述 | 價值 |
---|---|---|
dataDiskIds | 取得虛擬機的數據磁碟 Blob URI。 | string[] |
dataDisks | 取得連接至虛擬機的所有數據磁碟。 | ComputeDataDisk[] |
networkInterfaceId | 取得虛擬機的網路介面標識碼。 | 字串 |
osDiskId | 取得虛擬機的 OS 磁碟 Blob URI。 | 字串 |
osType | 取得虛擬機的 OS 類型。 | 字串 |
狀態 | 取得虛擬機的狀態。 | ComputeVmInstanceViewStatus[] |
vmSize | 取得虛擬機的大小。 | 字串 |
DayDetails
名字 | 描述 | 價值 |
---|---|---|
時間 | 排程將發生的一天時間。 | 字串 |
GalleryImageReference
名字 | 描述 | 價值 |
---|---|---|
提供 | 資源庫映像的供應專案。 | 字串 |
osType | 資源庫映像的OS類型。 | 字串 |
發行人 | 資源庫映像的發行者。 | 字串 |
sku | 資源庫映像的SKU。 | 字串 |
版本 | 資源庫映像的版本。 | 字串 |
HourDetails
名字 | 描述 | 價值 |
---|---|---|
分鐘 | 排程將執行的小時分鐘數。 | int |
InboundNatRule
名字 | 描述 | 價值 |
---|---|---|
backendPort | 將重新導向外部流量的埠。 | int |
frontendPort | 輸入連線的外部埠。 可能的值範圍介於 1 到 65535 之間,內含。 如果未指定,則會自動配置值。 | int |
transportProtocol | 端點的傳輸通訊協定。 | 'Tcp' 'Udp' |
LabVirtualMachineProperties
名字 | 描述 | 價值 |
---|---|---|
allowClaim | 指出其他使用者是否可以取得虛擬機的擁有權 | bool |
applicableSchedule | 虛擬機適用的排程。 | ApplicableSchedule |
artifactDeploymentStatus | 虛擬機的成品部署狀態。 | ArtifactDeploymentStatusProperties |
工件 | 要安裝在虛擬機上的成品。 | ArtifactInstallProperties[] |
computeVm | 計算虛擬機屬性。 | ComputeVmProperties |
createdByUser | 虛擬機建立者的電子郵件位址。 | 字串 |
createdByUserId | 虛擬機建立者的物件標識碼。 | 字串 |
createdDate | 虛擬機的建立日期。 | 字串 |
customImageId | 虛擬機的自定義映像標識碼。 | 字串 |
disallowPublicIpAddress | 指出是否要建立沒有公用IP位址的虛擬機。 | bool |
environmentId | 包含此虛擬機之環境的資源標識碼,如果有的話。 | 字串 |
expirationDate | VM 的到期日。 | 字串 |
fqdn | 虛擬機的完整功能變數名稱。 | 字串 |
galleryImageReference | 虛擬機Microsoft Azure Marketplace 映像參考。 | GalleryImageReference |
isAuthenticationWithSshKey | 指出此虛擬機是否使用 SSH 金鑰進行驗證。 | bool |
labSubnetName | 虛擬機的實驗室子網名稱。 | 字串 |
labVirtualNetworkId | 虛擬機的實驗室虛擬網路標識碼。 | 字串 |
networkInterface | 網路介面屬性。 | NetworkInterfaceProperties |
筆記 | 虛擬機的附注。 | 字串 |
osType | 虛擬機的OS類型。 | 字串 |
ownerObjectId | 虛擬機擁有者的物件標識碼。 | 字串 |
ownerUserPrincipalName | 虛擬機擁有者的用戶主體名稱。 | 字串 |
密碼 | 虛擬機器系統管理員的密碼。 | 字串 |
provisioningState | 資源的布建狀態。 | 字串 |
大小 | 虛擬機的大小。 | 字串 |
sshKey | 虛擬機器系統管理員的 SSH 金鑰。 | 字串 |
storageType | 要用於虛擬機的記憶體類型(例如標準、進階)。 | 字串 |
uniqueIdentifier | 資源的唯一不可變標識碼 (Guid)。 | 字串 |
userName | 虛擬機的用戶名稱。 | 字串 |
virtualMachineCreationSource | 告知實驗室虛擬機的建立來源。 僅輸出屬性。 | 'FromCustomImage' 'FromGalleryImage' |
Microsoft.DevTestLab/labs/virtualmachines
名字 | 描述 | 價值 |
---|---|---|
位置 | 資源的位置。 | 字串 |
名字 | 資源名稱 | 字串 (必要) |
父母 | 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。 如需詳細資訊,請參閱 父資源外部的子資源。 |
類型資源的符號名稱:實驗室 |
性能 | 資源的屬性。 | LabVirtualMachineProperties (必要) |
標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
NetworkInterfaceProperties
名字 | 描述 | 價值 |
---|---|---|
dnsName | DNS 名稱。 | 字串 |
privateIpAddress | 私人IP位址。 | 字串 |
publicIpAddress | 公用IP位址。 | 字串 |
publicIpAddressId | 公用IP位址的資源識別碼。 | 字串 |
rdpAuthority | RdpAuthority 屬性是伺服器 DNS 主機名或IP位址,後面接著 RDP 的服務埠號碼(遠端桌面通訊協定)。 | 字串 |
sharedPublicIpAddressConfiguration | 用於跨多部虛擬機共用公用IP位址的組態。 | SharedPublicIpAddressConfiguration |
sshAuthority | SshAuthority 屬性是伺服器 DNS 主機名或IP位址,後面接著 SSH 的服務埠號碼。 | 字串 |
subnetId | 子網路的資源標識碼。 | 字串 |
virtualNetworkId | 虛擬網路的資源識別碼。 | 字串 |
NotificationSettings
名字 | 描述 | 價值 |
---|---|---|
地位 | 如果此排程已啟用通知(亦即已啟用、已停用)。 | 'Disabled' 'Enabled' |
timeInMinutes | 在事件傳送通知前幾分鐘的時間。 | int |
webhookUrl | 將傳送通知的 Webhook URL。 | 字串 |
ResourceTags
名字 | 描述 | 價值 |
---|
ResourceTags
名字 | 描述 | 價值 |
---|
ResourceTags
名字 | 描述 | 價值 |
---|
附表
名字 | 描述 | 價值 |
---|---|---|
位置 | 資源的位置。 | 字串 |
性能 | 資源的屬性。 | ScheduleProperties (必要) |
標籤 | 資源的標記。 | ResourceTags |
ScheduleProperties
名字 | 描述 | 價值 |
---|---|---|
dailyRecurrence | 如果排程將每周發生一次,請指定每日週期。 | DayDetails |
hourlyRecurrence | 如果排程每天發生多次,請指定每小時週期。 | HourDetails |
notificationSettings | 通知設定。 | NotificationSettings |
provisioningState | 資源的布建狀態。 | 字串 |
地位 | 排程的狀態(即已啟用、已停用) | 'Disabled' 'Enabled' |
targetResourceId | 排程所屬的資源標識碼 | 字串 |
taskType | 排程的工作類型(例如 LabVmsShutdownTask、LabVmAutoStart)。 | 字串 |
timeZoneId | 時區標識碼(例如太平洋標準時間)。 | 字串 |
uniqueIdentifier | 資源的唯一不可變標識碼 (Guid)。 | 字串 |
weeklyRecurrence | 如果排程只會在一周的某幾天發生,請指定每周週期。 | WeekDetails |
SharedPublicIpAddressConfiguration
名字 | 描述 | 價值 |
---|---|---|
inboundNatRules | 傳入 NAT 規則 | InboundNatRule[] |
WeekDetails
名字 | 描述 | 價值 |
---|---|---|
時間 | 排程將發生的一天時間。 | 字串 |
平日 | 排程設定的星期幾(例如星期日、星期一、星期二等)。 | string[] |
使用範例
Azure 快速入門範例
下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。
Bicep 檔案 | 描述 |
---|---|
使用宣告的 VM 在 Azure DevTest Labs 中建立實驗室 | 此範本會在其中建立具有宣告 Windows Server 2019 Datacenter VM 的新 DevTest Lab / DTL 實例。 如需更多適用於 Azure DevTest Labs 的 Azure Resource Manager 快速入門範本,請參閱 https://github.com/Azure/azure-devtestlab/tree/master/ARMTemplates |
ARM 樣本資源定義
實驗室/virtualmachines 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.DevTestLab/labs/virtualmachines 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.DevTestLab/labs/virtualmachines",
"apiVersion": "2016-05-15",
"name": "string",
"location": "string",
"properties": {
"allowClaim": "bool",
"applicableSchedule": {
"location": "string",
"properties": {
"labVmsShutdown": {
"location": "string",
"properties": {
"dailyRecurrence": {
"time": "string"
},
"hourlyRecurrence": {
"minute": "int"
},
"notificationSettings": {
"status": "string",
"timeInMinutes": "int",
"webhookUrl": "string"
},
"provisioningState": "string",
"status": "string",
"targetResourceId": "string",
"taskType": "string",
"timeZoneId": "string",
"uniqueIdentifier": "string",
"weeklyRecurrence": {
"time": "string",
"weekdays": [ "string" ]
}
},
"tags": {
"{customized property}": "string"
}
},
"labVmsStartup": {
"location": "string",
"properties": {
"dailyRecurrence": {
"time": "string"
},
"hourlyRecurrence": {
"minute": "int"
},
"notificationSettings": {
"status": "string",
"timeInMinutes": "int",
"webhookUrl": "string"
},
"provisioningState": "string",
"status": "string",
"targetResourceId": "string",
"taskType": "string",
"timeZoneId": "string",
"uniqueIdentifier": "string",
"weeklyRecurrence": {
"time": "string",
"weekdays": [ "string" ]
}
},
"tags": {
"{customized property}": "string"
}
}
},
"tags": {
"{customized property}": "string"
}
},
"artifactDeploymentStatus": {
"artifactsApplied": "int",
"deploymentStatus": "string",
"totalArtifacts": "int"
},
"artifacts": [
{
"artifactId": "string",
"deploymentStatusMessage": "string",
"installTime": "string",
"parameters": [
{
"name": "string",
"value": "string"
}
],
"status": "string",
"vmExtensionStatusMessage": "string"
}
],
"computeVm": {
"dataDiskIds": [ "string" ],
"dataDisks": [
{
"diskSizeGiB": "int",
"diskUri": "string",
"managedDiskId": "string",
"name": "string"
}
],
"networkInterfaceId": "string",
"osDiskId": "string",
"osType": "string",
"statuses": [
{
"code": "string",
"displayStatus": "string",
"message": "string"
}
],
"vmSize": "string"
},
"createdByUser": "string",
"createdByUserId": "string",
"createdDate": "string",
"customImageId": "string",
"disallowPublicIpAddress": "bool",
"environmentId": "string",
"expirationDate": "string",
"fqdn": "string",
"galleryImageReference": {
"offer": "string",
"osType": "string",
"publisher": "string",
"sku": "string",
"version": "string"
},
"isAuthenticationWithSshKey": "bool",
"labSubnetName": "string",
"labVirtualNetworkId": "string",
"networkInterface": {
"dnsName": "string",
"privateIpAddress": "string",
"publicIpAddress": "string",
"publicIpAddressId": "string",
"rdpAuthority": "string",
"sharedPublicIpAddressConfiguration": {
"inboundNatRules": [
{
"backendPort": "int",
"frontendPort": "int",
"transportProtocol": "string"
}
]
},
"sshAuthority": "string",
"subnetId": "string",
"virtualNetworkId": "string"
},
"notes": "string",
"osType": "string",
"ownerObjectId": "string",
"ownerUserPrincipalName": "string",
"password": "string",
"provisioningState": "string",
"size": "string",
"sshKey": "string",
"storageType": "string",
"uniqueIdentifier": "string",
"userName": "string",
"virtualMachineCreationSource": "string"
},
"tags": {
"{customized property}": "string"
}
}
屬性值
ApplicableSchedule
名字 | 描述 | 價值 |
---|---|---|
位置 | 資源的位置。 | 字串 |
性能 | 資源的屬性。 | ApplicableScheduleProperties (必要) |
標籤 | 資源的標記。 | ResourceTags |
ApplicableScheduleProperties
名字 | 描述 | 價值 |
---|---|---|
labVmsShutdown | 如果已在實驗室或實驗室資源層級設定自動關機排程。 | 排程 |
labVmsStartup | 如果已在實驗室或實驗室資源層級設定自動啟動排程。 | 排程 |
ArtifactDeploymentStatusProperties
名字 | 描述 | 價值 |
---|---|---|
artifactsApplied | 成功套用的成品總數。 | int |
deploymentStatus | 成品的部署狀態。 | 字串 |
totalArtifacts | 暫定套用的成品總數。 | int |
ArtifactInstallProperties
名字 | 描述 | 價值 |
---|---|---|
artifactId | 成品的標識碼。 | 字串 |
deploymentStatusMessage | 來自部署的狀態消息。 | 字串 |
installTime | 成品開始在虛擬機上安裝的時間。 | 字串 |
參數 | 成品的參數。 | ArtifactParameterProperties[] |
地位 | 成品的狀態。 | 字串 |
vmExtensionStatusMessage | 虛擬機擴充功能的狀態消息。 | 字串 |
ArtifactParameterProperties
名字 | 描述 | 價值 |
---|---|---|
名字 | 成品參數的名稱。 | 字串 |
價值 | 成品參數的值。 | 字串 |
ComputeDataDisk
名字 | 描述 | 價值 |
---|---|---|
diskSizeGiB | 取得 GiB 中的數據磁碟大小。 | int |
diskUri | 由 Blob 支援時,基礎 Blob 的 URI。 | 字串 |
managedDiskId | 受受控磁碟支援時,這是計算磁碟資源的標識碼。 | 字串 |
名字 | 取得數據磁碟名稱。 | 字串 |
ComputeVmInstanceViewStatus
名字 | 描述 | 價值 |
---|---|---|
法典 | 取得狀態代碼。 | 字串 |
displayStatus | 取得狀態的簡短可本地化標籤。 | 字串 |
消息 | 取得與狀態相關聯的訊息。 | 字串 |
ComputeVmProperties
名字 | 描述 | 價值 |
---|---|---|
dataDiskIds | 取得虛擬機的數據磁碟 Blob URI。 | string[] |
dataDisks | 取得連接至虛擬機的所有數據磁碟。 | ComputeDataDisk[] |
networkInterfaceId | 取得虛擬機的網路介面標識碼。 | 字串 |
osDiskId | 取得虛擬機的 OS 磁碟 Blob URI。 | 字串 |
osType | 取得虛擬機的 OS 類型。 | 字串 |
狀態 | 取得虛擬機的狀態。 | ComputeVmInstanceViewStatus[] |
vmSize | 取得虛擬機的大小。 | 字串 |
DayDetails
名字 | 描述 | 價值 |
---|---|---|
時間 | 排程將發生的一天時間。 | 字串 |
GalleryImageReference
名字 | 描述 | 價值 |
---|---|---|
提供 | 資源庫映像的供應專案。 | 字串 |
osType | 資源庫映像的OS類型。 | 字串 |
發行人 | 資源庫映像的發行者。 | 字串 |
sku | 資源庫映像的SKU。 | 字串 |
版本 | 資源庫映像的版本。 | 字串 |
HourDetails
名字 | 描述 | 價值 |
---|---|---|
分鐘 | 排程將執行的小時分鐘數。 | int |
InboundNatRule
名字 | 描述 | 價值 |
---|---|---|
backendPort | 將重新導向外部流量的埠。 | int |
frontendPort | 輸入連線的外部埠。 可能的值範圍介於 1 到 65535 之間,內含。 如果未指定,則會自動配置值。 | int |
transportProtocol | 端點的傳輸通訊協定。 | 'Tcp' 'Udp' |
LabVirtualMachineProperties
名字 | 描述 | 價值 |
---|---|---|
allowClaim | 指出其他使用者是否可以取得虛擬機的擁有權 | bool |
applicableSchedule | 虛擬機適用的排程。 | ApplicableSchedule |
artifactDeploymentStatus | 虛擬機的成品部署狀態。 | ArtifactDeploymentStatusProperties |
工件 | 要安裝在虛擬機上的成品。 | ArtifactInstallProperties[] |
computeVm | 計算虛擬機屬性。 | ComputeVmProperties |
createdByUser | 虛擬機建立者的電子郵件位址。 | 字串 |
createdByUserId | 虛擬機建立者的物件標識碼。 | 字串 |
createdDate | 虛擬機的建立日期。 | 字串 |
customImageId | 虛擬機的自定義映像標識碼。 | 字串 |
disallowPublicIpAddress | 指出是否要建立沒有公用IP位址的虛擬機。 | bool |
environmentId | 包含此虛擬機之環境的資源標識碼,如果有的話。 | 字串 |
expirationDate | VM 的到期日。 | 字串 |
fqdn | 虛擬機的完整功能變數名稱。 | 字串 |
galleryImageReference | 虛擬機Microsoft Azure Marketplace 映像參考。 | GalleryImageReference |
isAuthenticationWithSshKey | 指出此虛擬機是否使用 SSH 金鑰進行驗證。 | bool |
labSubnetName | 虛擬機的實驗室子網名稱。 | 字串 |
labVirtualNetworkId | 虛擬機的實驗室虛擬網路標識碼。 | 字串 |
networkInterface | 網路介面屬性。 | NetworkInterfaceProperties |
筆記 | 虛擬機的附注。 | 字串 |
osType | 虛擬機的OS類型。 | 字串 |
ownerObjectId | 虛擬機擁有者的物件標識碼。 | 字串 |
ownerUserPrincipalName | 虛擬機擁有者的用戶主體名稱。 | 字串 |
密碼 | 虛擬機器系統管理員的密碼。 | 字串 |
provisioningState | 資源的布建狀態。 | 字串 |
大小 | 虛擬機的大小。 | 字串 |
sshKey | 虛擬機器系統管理員的 SSH 金鑰。 | 字串 |
storageType | 要用於虛擬機的記憶體類型(例如標準、進階)。 | 字串 |
uniqueIdentifier | 資源的唯一不可變標識碼 (Guid)。 | 字串 |
userName | 虛擬機的用戶名稱。 | 字串 |
virtualMachineCreationSource | 告知實驗室虛擬機的建立來源。 僅輸出屬性。 | 'FromCustomImage' 'FromGalleryImage' |
Microsoft.DevTestLab/labs/virtualmachines
名字 | 描述 | 價值 |
---|---|---|
apiVersion | API 版本 | '2016-05-15' |
位置 | 資源的位置。 | 字串 |
名字 | 資源名稱 | 字串 (必要) |
性能 | 資源的屬性。 | LabVirtualMachineProperties (必要) |
標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
類型 | 資源類型 | 'Microsoft.DevTestLab/labs/virtualmachines' |
NetworkInterfaceProperties
名字 | 描述 | 價值 |
---|---|---|
dnsName | DNS 名稱。 | 字串 |
privateIpAddress | 私人IP位址。 | 字串 |
publicIpAddress | 公用IP位址。 | 字串 |
publicIpAddressId | 公用IP位址的資源識別碼。 | 字串 |
rdpAuthority | RdpAuthority 屬性是伺服器 DNS 主機名或IP位址,後面接著 RDP 的服務埠號碼(遠端桌面通訊協定)。 | 字串 |
sharedPublicIpAddressConfiguration | 用於跨多部虛擬機共用公用IP位址的組態。 | SharedPublicIpAddressConfiguration |
sshAuthority | SshAuthority 屬性是伺服器 DNS 主機名或IP位址,後面接著 SSH 的服務埠號碼。 | 字串 |
subnetId | 子網路的資源標識碼。 | 字串 |
virtualNetworkId | 虛擬網路的資源識別碼。 | 字串 |
NotificationSettings
名字 | 描述 | 價值 |
---|---|---|
地位 | 如果此排程已啟用通知(亦即已啟用、已停用)。 | 'Disabled' 'Enabled' |
timeInMinutes | 在事件傳送通知前幾分鐘的時間。 | int |
webhookUrl | 將傳送通知的 Webhook URL。 | 字串 |
ResourceTags
名字 | 描述 | 價值 |
---|
ResourceTags
名字 | 描述 | 價值 |
---|
ResourceTags
名字 | 描述 | 價值 |
---|
附表
名字 | 描述 | 價值 |
---|---|---|
位置 | 資源的位置。 | 字串 |
性能 | 資源的屬性。 | ScheduleProperties (必要) |
標籤 | 資源的標記。 | ResourceTags |
ScheduleProperties
名字 | 描述 | 價值 |
---|---|---|
dailyRecurrence | 如果排程將每周發生一次,請指定每日週期。 | DayDetails |
hourlyRecurrence | 如果排程每天發生多次,請指定每小時週期。 | HourDetails |
notificationSettings | 通知設定。 | NotificationSettings |
provisioningState | 資源的布建狀態。 | 字串 |
地位 | 排程的狀態(即已啟用、已停用) | 'Disabled' 'Enabled' |
targetResourceId | 排程所屬的資源標識碼 | 字串 |
taskType | 排程的工作類型(例如 LabVmsShutdownTask、LabVmAutoStart)。 | 字串 |
timeZoneId | 時區標識碼(例如太平洋標準時間)。 | 字串 |
uniqueIdentifier | 資源的唯一不可變標識碼 (Guid)。 | 字串 |
weeklyRecurrence | 如果排程只會在一周的某幾天發生,請指定每周週期。 | WeekDetails |
SharedPublicIpAddressConfiguration
名字 | 描述 | 價值 |
---|---|---|
inboundNatRules | 傳入 NAT 規則 | InboundNatRule[] |
WeekDetails
名字 | 描述 | 價值 |
---|---|---|
時間 | 排程將發生的一天時間。 | 字串 |
平日 | 排程設定的星期幾(例如星期日、星期一、星期二等)。 | string[] |
使用範例
Azure 快速入門範本
下列 Azure 快速入門範本 部署此資源類型。
範本 | 描述 |
---|---|
使用宣告的 VM 在 Azure DevTest Labs 中建立實驗室 |
此範本會在其中建立具有宣告 Windows Server 2019 Datacenter VM 的新 DevTest Lab / DTL 實例。 如需更多適用於 Azure DevTest Labs 的 Azure Resource Manager 快速入門範本,請參閱 https://github.com/Azure/azure-devtestlab/tree/master/ARMTemplates |
Terraform (AzAPI 提供者) 資源定義
實驗室/virtualmachines 資源類型可以使用目標作業來部署:
- 資源群組
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.DevTestLab/labs/virtualmachines 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DevTestLab/labs/virtualmachines@2016-05-15"
name = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
allowClaim = bool
applicableSchedule = {
location = "string"
properties = {
labVmsShutdown = {
location = "string"
properties = {
dailyRecurrence = {
time = "string"
}
hourlyRecurrence = {
minute = int
}
notificationSettings = {
status = "string"
timeInMinutes = int
webhookUrl = "string"
}
provisioningState = "string"
status = "string"
targetResourceId = "string"
taskType = "string"
timeZoneId = "string"
uniqueIdentifier = "string"
weeklyRecurrence = {
time = "string"
weekdays = [
"string"
]
}
}
tags = {
{customized property} = "string"
}
}
labVmsStartup = {
location = "string"
properties = {
dailyRecurrence = {
time = "string"
}
hourlyRecurrence = {
minute = int
}
notificationSettings = {
status = "string"
timeInMinutes = int
webhookUrl = "string"
}
provisioningState = "string"
status = "string"
targetResourceId = "string"
taskType = "string"
timeZoneId = "string"
uniqueIdentifier = "string"
weeklyRecurrence = {
time = "string"
weekdays = [
"string"
]
}
}
tags = {
{customized property} = "string"
}
}
}
tags = {
{customized property} = "string"
}
}
artifactDeploymentStatus = {
artifactsApplied = int
deploymentStatus = "string"
totalArtifacts = int
}
artifacts = [
{
artifactId = "string"
deploymentStatusMessage = "string"
installTime = "string"
parameters = [
{
name = "string"
value = "string"
}
]
status = "string"
vmExtensionStatusMessage = "string"
}
]
computeVm = {
dataDiskIds = [
"string"
]
dataDisks = [
{
diskSizeGiB = int
diskUri = "string"
managedDiskId = "string"
name = "string"
}
]
networkInterfaceId = "string"
osDiskId = "string"
osType = "string"
statuses = [
{
code = "string"
displayStatus = "string"
message = "string"
}
]
vmSize = "string"
}
createdByUser = "string"
createdByUserId = "string"
createdDate = "string"
customImageId = "string"
disallowPublicIpAddress = bool
environmentId = "string"
expirationDate = "string"
fqdn = "string"
galleryImageReference = {
offer = "string"
osType = "string"
publisher = "string"
sku = "string"
version = "string"
}
isAuthenticationWithSshKey = bool
labSubnetName = "string"
labVirtualNetworkId = "string"
networkInterface = {
dnsName = "string"
privateIpAddress = "string"
publicIpAddress = "string"
publicIpAddressId = "string"
rdpAuthority = "string"
sharedPublicIpAddressConfiguration = {
inboundNatRules = [
{
backendPort = int
frontendPort = int
transportProtocol = "string"
}
]
}
sshAuthority = "string"
subnetId = "string"
virtualNetworkId = "string"
}
notes = "string"
osType = "string"
ownerObjectId = "string"
ownerUserPrincipalName = "string"
password = "string"
provisioningState = "string"
size = "string"
sshKey = "string"
storageType = "string"
uniqueIdentifier = "string"
userName = "string"
virtualMachineCreationSource = "string"
}
})
}
屬性值
ApplicableSchedule
名字 | 描述 | 價值 |
---|---|---|
位置 | 資源的位置。 | 字串 |
性能 | 資源的屬性。 | ApplicableScheduleProperties (必要) |
標籤 | 資源的標記。 | ResourceTags |
ApplicableScheduleProperties
名字 | 描述 | 價值 |
---|---|---|
labVmsShutdown | 如果已在實驗室或實驗室資源層級設定自動關機排程。 | 排程 |
labVmsStartup | 如果已在實驗室或實驗室資源層級設定自動啟動排程。 | 排程 |
ArtifactDeploymentStatusProperties
名字 | 描述 | 價值 |
---|---|---|
artifactsApplied | 成功套用的成品總數。 | int |
deploymentStatus | 成品的部署狀態。 | 字串 |
totalArtifacts | 暫定套用的成品總數。 | int |
ArtifactInstallProperties
名字 | 描述 | 價值 |
---|---|---|
artifactId | 成品的標識碼。 | 字串 |
deploymentStatusMessage | 來自部署的狀態消息。 | 字串 |
installTime | 成品開始在虛擬機上安裝的時間。 | 字串 |
參數 | 成品的參數。 | ArtifactParameterProperties[] |
地位 | 成品的狀態。 | 字串 |
vmExtensionStatusMessage | 虛擬機擴充功能的狀態消息。 | 字串 |
ArtifactParameterProperties
名字 | 描述 | 價值 |
---|---|---|
名字 | 成品參數的名稱。 | 字串 |
價值 | 成品參數的值。 | 字串 |
ComputeDataDisk
名字 | 描述 | 價值 |
---|---|---|
diskSizeGiB | 取得 GiB 中的數據磁碟大小。 | int |
diskUri | 由 Blob 支援時,基礎 Blob 的 URI。 | 字串 |
managedDiskId | 受受控磁碟支援時,這是計算磁碟資源的標識碼。 | 字串 |
名字 | 取得數據磁碟名稱。 | 字串 |
ComputeVmInstanceViewStatus
名字 | 描述 | 價值 |
---|---|---|
法典 | 取得狀態代碼。 | 字串 |
displayStatus | 取得狀態的簡短可本地化標籤。 | 字串 |
消息 | 取得與狀態相關聯的訊息。 | 字串 |
ComputeVmProperties
名字 | 描述 | 價值 |
---|---|---|
dataDiskIds | 取得虛擬機的數據磁碟 Blob URI。 | string[] |
dataDisks | 取得連接至虛擬機的所有數據磁碟。 | ComputeDataDisk[] |
networkInterfaceId | 取得虛擬機的網路介面標識碼。 | 字串 |
osDiskId | 取得虛擬機的 OS 磁碟 Blob URI。 | 字串 |
osType | 取得虛擬機的 OS 類型。 | 字串 |
狀態 | 取得虛擬機的狀態。 | ComputeVmInstanceViewStatus[] |
vmSize | 取得虛擬機的大小。 | 字串 |
DayDetails
名字 | 描述 | 價值 |
---|---|---|
時間 | 排程將發生的一天時間。 | 字串 |
GalleryImageReference
名字 | 描述 | 價值 |
---|---|---|
提供 | 資源庫映像的供應專案。 | 字串 |
osType | 資源庫映像的OS類型。 | 字串 |
發行人 | 資源庫映像的發行者。 | 字串 |
sku | 資源庫映像的SKU。 | 字串 |
版本 | 資源庫映像的版本。 | 字串 |
HourDetails
名字 | 描述 | 價值 |
---|---|---|
分鐘 | 排程將執行的小時分鐘數。 | int |
InboundNatRule
名字 | 描述 | 價值 |
---|---|---|
backendPort | 將重新導向外部流量的埠。 | int |
frontendPort | 輸入連線的外部埠。 可能的值範圍介於 1 到 65535 之間,內含。 如果未指定,則會自動配置值。 | int |
transportProtocol | 端點的傳輸通訊協定。 | 'Tcp' 'Udp' |
LabVirtualMachineProperties
名字 | 描述 | 價值 |
---|---|---|
allowClaim | 指出其他使用者是否可以取得虛擬機的擁有權 | bool |
applicableSchedule | 虛擬機適用的排程。 | ApplicableSchedule |
artifactDeploymentStatus | 虛擬機的成品部署狀態。 | ArtifactDeploymentStatusProperties |
工件 | 要安裝在虛擬機上的成品。 | ArtifactInstallProperties[] |
computeVm | 計算虛擬機屬性。 | ComputeVmProperties |
createdByUser | 虛擬機建立者的電子郵件位址。 | 字串 |
createdByUserId | 虛擬機建立者的物件標識碼。 | 字串 |
createdDate | 虛擬機的建立日期。 | 字串 |
customImageId | 虛擬機的自定義映像標識碼。 | 字串 |
disallowPublicIpAddress | 指出是否要建立沒有公用IP位址的虛擬機。 | bool |
environmentId | 包含此虛擬機之環境的資源標識碼,如果有的話。 | 字串 |
expirationDate | VM 的到期日。 | 字串 |
fqdn | 虛擬機的完整功能變數名稱。 | 字串 |
galleryImageReference | 虛擬機Microsoft Azure Marketplace 映像參考。 | GalleryImageReference |
isAuthenticationWithSshKey | 指出此虛擬機是否使用 SSH 金鑰進行驗證。 | bool |
labSubnetName | 虛擬機的實驗室子網名稱。 | 字串 |
labVirtualNetworkId | 虛擬機的實驗室虛擬網路標識碼。 | 字串 |
networkInterface | 網路介面屬性。 | NetworkInterfaceProperties |
筆記 | 虛擬機的附注。 | 字串 |
osType | 虛擬機的OS類型。 | 字串 |
ownerObjectId | 虛擬機擁有者的物件標識碼。 | 字串 |
ownerUserPrincipalName | 虛擬機擁有者的用戶主體名稱。 | 字串 |
密碼 | 虛擬機器系統管理員的密碼。 | 字串 |
provisioningState | 資源的布建狀態。 | 字串 |
大小 | 虛擬機的大小。 | 字串 |
sshKey | 虛擬機器系統管理員的 SSH 金鑰。 | 字串 |
storageType | 要用於虛擬機的記憶體類型(例如標準、進階)。 | 字串 |
uniqueIdentifier | 資源的唯一不可變標識碼 (Guid)。 | 字串 |
userName | 虛擬機的用戶名稱。 | 字串 |
virtualMachineCreationSource | 告知實驗室虛擬機的建立來源。 僅輸出屬性。 | 'FromCustomImage' 'FromGalleryImage' |
Microsoft.DevTestLab/labs/virtualmachines
名字 | 描述 | 價值 |
---|---|---|
位置 | 資源的位置。 | 字串 |
名字 | 資源名稱 | 字串 (必要) |
parent_id | 此資源為父系之資源的標識碼。 | 類型的資源標識碼:實驗室 |
性能 | 資源的屬性。 | LabVirtualMachineProperties (必要) |
標籤 | 資源標籤 | 標記名稱和值的字典。 |
類型 | 資源類型 | “Microsoft.DevTestLab/labs/virtualmachines@2016-05-15” |
NetworkInterfaceProperties
名字 | 描述 | 價值 |
---|---|---|
dnsName | DNS 名稱。 | 字串 |
privateIpAddress | 私人IP位址。 | 字串 |
publicIpAddress | 公用IP位址。 | 字串 |
publicIpAddressId | 公用IP位址的資源識別碼。 | 字串 |
rdpAuthority | RdpAuthority 屬性是伺服器 DNS 主機名或IP位址,後面接著 RDP 的服務埠號碼(遠端桌面通訊協定)。 | 字串 |
sharedPublicIpAddressConfiguration | 用於跨多部虛擬機共用公用IP位址的組態。 | SharedPublicIpAddressConfiguration |
sshAuthority | SshAuthority 屬性是伺服器 DNS 主機名或IP位址,後面接著 SSH 的服務埠號碼。 | 字串 |
subnetId | 子網路的資源標識碼。 | 字串 |
virtualNetworkId | 虛擬網路的資源識別碼。 | 字串 |
NotificationSettings
名字 | 描述 | 價值 |
---|---|---|
地位 | 如果此排程已啟用通知(亦即已啟用、已停用)。 | 'Disabled' 'Enabled' |
timeInMinutes | 在事件傳送通知前幾分鐘的時間。 | int |
webhookUrl | 將傳送通知的 Webhook URL。 | 字串 |
ResourceTags
名字 | 描述 | 價值 |
---|
ResourceTags
名字 | 描述 | 價值 |
---|
ResourceTags
名字 | 描述 | 價值 |
---|
附表
名字 | 描述 | 價值 |
---|---|---|
位置 | 資源的位置。 | 字串 |
性能 | 資源的屬性。 | ScheduleProperties (必要) |
標籤 | 資源的標記。 | ResourceTags |
ScheduleProperties
名字 | 描述 | 價值 |
---|---|---|
dailyRecurrence | 如果排程將每周發生一次,請指定每日週期。 | DayDetails |
hourlyRecurrence | 如果排程每天發生多次,請指定每小時週期。 | HourDetails |
notificationSettings | 通知設定。 | NotificationSettings |
provisioningState | 資源的布建狀態。 | 字串 |
地位 | 排程的狀態(即已啟用、已停用) | 'Disabled' 'Enabled' |
targetResourceId | 排程所屬的資源標識碼 | 字串 |
taskType | 排程的工作類型(例如 LabVmsShutdownTask、LabVmAutoStart)。 | 字串 |
timeZoneId | 時區標識碼(例如太平洋標準時間)。 | 字串 |
uniqueIdentifier | 資源的唯一不可變標識碼 (Guid)。 | 字串 |
weeklyRecurrence | 如果排程只會在一周的某幾天發生,請指定每周週期。 | WeekDetails |
SharedPublicIpAddressConfiguration
名字 | 描述 | 價值 |
---|---|---|
inboundNatRules | 傳入 NAT 規則 | InboundNatRule[] |
WeekDetails
名字 | 描述 | 價值 |
---|---|---|
時間 | 排程將發生的一天時間。 | 字串 |
平日 | 排程設定的星期幾(例如星期日、星期一、星期二等)。 | string[] |