ArmComputeModelFactory.VirtualMachineData Method

Definition

Overloads

Name Description
VirtualMachineData(ResourceIdentifier, String, ResourceType, SystemData, IDictionary<String,String>, AzureLocation, VirtualMachineHardwareProfile, ScheduledEventsPolicy, VirtualMachineStorageProfile, AdditionalCapabilities, VirtualMachineOSProfile, VirtualMachineNetworkProfile, SecurityProfile, Nullable<VirtualMachinePriorityType>, Nullable<VirtualMachineEvictionPolicyType>, String, VirtualMachineInstanceView, String, String, String, Nullable<Int32>, ComputeScheduledEventsProfile, String, Nullable<DateTimeOffset>, BootDiagnostics, ResourceIdentifier, ResourceIdentifier, ResourceIdentifier, Nullable<Double>, ResourceIdentifier, ResourceIdentifier, ResourceIdentifier, ResourceIdentifier, IEnumerable<VirtualMachineGalleryApplication>, Nullable<Boolean>, ComputePlan, IEnumerable<VirtualMachineExtensionData>, ManagedServiceIdentity, IEnumerable<String>, ExtendedLocation, String, String, VirtualMachinePlacement)
VirtualMachineData(ResourceIdentifier, String, ResourceType, SystemData, IDictionary<String,String>, AzureLocation, ComputePlan, IEnumerable<VirtualMachineExtensionData>, ManagedServiceIdentity, IEnumerable<String>, ExtendedLocation, String, String, VirtualMachinePlacement, VirtualMachineHardwareProfile, ScheduledEventsPolicy, VirtualMachineStorageProfile, AdditionalCapabilities, VirtualMachineOSProfile, VirtualMachineNetworkProfile, SecurityProfile, BootDiagnostics, ResourceIdentifier, ResourceIdentifier, ResourceIdentifier, Nullable<VirtualMachinePriorityType>, Nullable<VirtualMachineEvictionPolicyType>, Nullable<Double>, ResourceIdentifier, ResourceIdentifier, String, VirtualMachineInstanceView, String, String, String, Nullable<Int32>, ComputeScheduledEventsProfile, String, ResourceIdentifier, IEnumerable<VirtualMachineGalleryApplication>, Nullable<DateTimeOffset>, Nullable<Boolean>)

Initializes a new instance of VirtualMachineData.

VirtualMachineData(ResourceIdentifier, String, ResourceType, SystemData, IDictionary<String,String>, AzureLocation, VirtualMachineHardwareProfile, ScheduledEventsPolicy, VirtualMachineStorageProfile, AdditionalCapabilities, VirtualMachineOSProfile, VirtualMachineNetworkProfile, SecurityProfile, Nullable<VirtualMachinePriorityType>, Nullable<VirtualMachineEvictionPolicyType>, String, VirtualMachineInstanceView, String, String, String, Nullable<Int32>, ComputeScheduledEventsProfile, String, Nullable<DateTimeOffset>, BootDiagnostics, ResourceIdentifier, ResourceIdentifier, ResourceIdentifier, Nullable<Double>, ResourceIdentifier, ResourceIdentifier, ResourceIdentifier, ResourceIdentifier, IEnumerable<VirtualMachineGalleryApplication>, Nullable<Boolean>, ComputePlan, IEnumerable<VirtualMachineExtensionData>, ManagedServiceIdentity, IEnumerable<String>, ExtendedLocation, String, String, VirtualMachinePlacement)

Source:
ArmComputeModelFactory.cs
public static Azure.ResourceManager.Compute.VirtualMachineData VirtualMachineData(Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, System.Collections.Generic.IDictionary<string,string> tags = default, Azure.Core.AzureLocation location = default, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile = default, Azure.ResourceManager.Compute.Models.ScheduledEventsPolicy scheduledEventsPolicy = default, Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile = default, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities = default, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile = default, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile = default, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = default, Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType? priority = default, Azure.ResourceManager.Compute.Models.VirtualMachineEvictionPolicyType? evictionPolicy = default, string provisioningState = default, Azure.ResourceManager.Compute.Models.VirtualMachineInstanceView instanceView = default, string licenseType = default, string vmId = default, string extensionsTimeBudget = default, int? platformFaultDomain = default, Azure.ResourceManager.Compute.Models.ComputeScheduledEventsProfile scheduledEventsProfile = default, string userData = default, DateTimeOffset? timeCreated = default, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = default, Azure.Core.ResourceIdentifier availabilitySetId = default, Azure.Core.ResourceIdentifier virtualMachineScaleSetId = default, Azure.Core.ResourceIdentifier proximityPlacementGroupId = default, double? billingMaxPrice = default, Azure.Core.ResourceIdentifier hostId = default, Azure.Core.ResourceIdentifier hostGroupId = default, Azure.Core.ResourceIdentifier capacityReservationGroupId = default, Azure.Core.ResourceIdentifier interconnectBlockId = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Compute.Models.VirtualMachineGalleryApplication> galleryApplications = default, bool? isEnabled = default, Azure.ResourceManager.Compute.Models.ComputePlan plan = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Compute.VirtualMachineExtensionData> resources = default, Azure.ResourceManager.Models.ManagedServiceIdentity identity = default, System.Collections.Generic.IEnumerable<string> zones = default, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = default, string managedBy = default, string eTag = default, Azure.ResourceManager.Compute.Models.VirtualMachinePlacement placement = default);
static member VirtualMachineData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * System.Collections.Generic.IDictionary<string, string> * Azure.Core.AzureLocation * Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile * Azure.ResourceManager.Compute.Models.ScheduledEventsPolicy * Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile * Azure.ResourceManager.Compute.Models.AdditionalCapabilities * Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile * Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile * Azure.ResourceManager.Compute.Models.SecurityProfile * Nullable<Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType> * Nullable<Azure.ResourceManager.Compute.Models.VirtualMachineEvictionPolicyType> * string * Azure.ResourceManager.Compute.Models.VirtualMachineInstanceView * string * string * string * Nullable<int> * Azure.ResourceManager.Compute.Models.ComputeScheduledEventsProfile * string * Nullable<DateTimeOffset> * Azure.ResourceManager.Compute.Models.BootDiagnostics * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Nullable<double> * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * seq<Azure.ResourceManager.Compute.Models.VirtualMachineGalleryApplication> * Nullable<bool> * Azure.ResourceManager.Compute.Models.ComputePlan * seq<Azure.ResourceManager.Compute.VirtualMachineExtensionData> * Azure.ResourceManager.Models.ManagedServiceIdentity * seq<string> * Azure.ResourceManager.Resources.Models.ExtendedLocation * string * string * Azure.ResourceManager.Compute.Models.VirtualMachinePlacement -> Azure.ResourceManager.Compute.VirtualMachineData
Public Shared Function VirtualMachineData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional location As AzureLocation = Nothing, Optional hardwareProfile As VirtualMachineHardwareProfile = Nothing, Optional scheduledEventsPolicy As ScheduledEventsPolicy = Nothing, Optional storageProfile As VirtualMachineStorageProfile = Nothing, Optional additionalCapabilities As AdditionalCapabilities = Nothing, Optional osProfile As VirtualMachineOSProfile = Nothing, Optional networkProfile As VirtualMachineNetworkProfile = Nothing, Optional securityProfile As SecurityProfile = Nothing, Optional priority As Nullable(Of VirtualMachinePriorityType) = Nothing, Optional evictionPolicy As Nullable(Of VirtualMachineEvictionPolicyType) = Nothing, Optional provisioningState As String = Nothing, Optional instanceView As VirtualMachineInstanceView = Nothing, Optional licenseType As String = Nothing, Optional vmId As String = Nothing, Optional extensionsTimeBudget As String = Nothing, Optional platformFaultDomain As Nullable(Of Integer) = Nothing, Optional scheduledEventsProfile As ComputeScheduledEventsProfile = Nothing, Optional userData As String = Nothing, Optional timeCreated As Nullable(Of DateTimeOffset) = Nothing, Optional bootDiagnostics As BootDiagnostics = Nothing, Optional availabilitySetId As ResourceIdentifier = Nothing, Optional virtualMachineScaleSetId As ResourceIdentifier = Nothing, Optional proximityPlacementGroupId As ResourceIdentifier = Nothing, Optional billingMaxPrice As Nullable(Of Double) = Nothing, Optional hostId As ResourceIdentifier = Nothing, Optional hostGroupId As ResourceIdentifier = Nothing, Optional capacityReservationGroupId As ResourceIdentifier = Nothing, Optional interconnectBlockId As ResourceIdentifier = Nothing, Optional galleryApplications As IEnumerable(Of VirtualMachineGalleryApplication) = Nothing, Optional isEnabled As Nullable(Of Boolean) = Nothing, Optional plan As ComputePlan = Nothing, Optional resources As IEnumerable(Of VirtualMachineExtensionData) = Nothing, Optional identity As ManagedServiceIdentity = Nothing, Optional zones As IEnumerable(Of String) = Nothing, Optional extendedLocation As ExtendedLocation = Nothing, Optional managedBy As String = Nothing, Optional eTag As String = Nothing, Optional placement As VirtualMachinePlacement = Nothing) As VirtualMachineData

Parameters

id
ResourceIdentifier

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

name
String

The name of the resource.

resourceType
ResourceType

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

systemData
SystemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags
IDictionary<String,String>

Resource tags.

location
AzureLocation

The geo-location where the resource lives.

hardwareProfile
VirtualMachineHardwareProfile

Specifies the hardware settings for the virtual machine.

scheduledEventsPolicy
ScheduledEventsPolicy

Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the virtual machine.

storageProfile
VirtualMachineStorageProfile

Specifies the storage settings for the virtual machine disks.

additionalCapabilities
AdditionalCapabilities

Specifies additional capabilities enabled or disabled on the virtual machine.

osProfile
VirtualMachineOSProfile

Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.

networkProfile
VirtualMachineNetworkProfile

Specifies the network interfaces of the virtual machine.

securityProfile
SecurityProfile

Specifies the Security related profile settings for the virtual machine.

priority
Nullable<VirtualMachinePriorityType>

Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01.

evictionPolicy
Nullable<VirtualMachineEvictionPolicyType>

Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.

provisioningState
String

The provisioning state, which only appears in the response.

instanceView
VirtualMachineInstanceView

The virtual machine instance view.

licenseType
String

Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see Azure Hybrid Use Benefit for Windows Server <br><br> Azure Hybrid Use Benefit for Linux Server <br><br> Minimum api-version: 2015-06-15.

vmId
String

Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.

extensionsTimeBudget
String

Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01.

platformFaultDomain
Nullable<Int32>

Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01.

scheduledEventsProfile
ComputeScheduledEventsProfile

Specifies Scheduled Event related configurations.

userData
String

UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.

timeCreated
Nullable<DateTimeOffset>

Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01.

bootDiagnostics
BootDiagnostics

Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.

availabilitySetId
ResourceIdentifier

Resource Id.

virtualMachineScaleSetId
ResourceIdentifier

Resource Id.

proximityPlacementGroupId
ResourceIdentifier

Resource Id.

billingMaxPrice
Nullable<Double>

Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01.

hostId
ResourceIdentifier

Resource Id.

hostGroupId
ResourceIdentifier

Resource Id.

capacityReservationGroupId
ResourceIdentifier

Resource Id.

interconnectBlockId
ResourceIdentifier

The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...

galleryApplications
IEnumerable<VirtualMachineGalleryApplication>

Specifies the gallery applications that should be made available to the VM/VMSS.

isEnabled
Nullable<Boolean>

Indicates if zone movement is enabled. By default isEnabled is set to false i.e VM can't be moved from one zone to another.

plan
ComputePlan

Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

resources
IEnumerable<VirtualMachineExtensionData>

The virtual machine child extension resources.

identity
ManagedServiceIdentity

The identity of the virtual machine, if configured.

zones
IEnumerable<String>

The availability zones.

extendedLocation
ExtendedLocation

The extended location of the Virtual Machine.

managedBy
String

ManagedBy is set to Virtual Machine Scale Set(VMSS) flex ARM resourceID, if the VM is part of the VMSS. This property is used by platform for internal resource group delete optimization.

eTag
String

Etag is property returned in Create/Update/Get response of the VM, so that customer can supply it in the header to ensure optimistic updates.

placement
VirtualMachinePlacement

Placement section specifies the user-defined constraints for virtual machine hardware placement. This property cannot be changed once VM is provisioned. Minimum api-version: 2024-11-01.

Returns

A new VirtualMachineData instance for mocking.

Applies to

VirtualMachineData(ResourceIdentifier, String, ResourceType, SystemData, IDictionary<String,String>, AzureLocation, ComputePlan, IEnumerable<VirtualMachineExtensionData>, ManagedServiceIdentity, IEnumerable<String>, ExtendedLocation, String, String, VirtualMachinePlacement, VirtualMachineHardwareProfile, ScheduledEventsPolicy, VirtualMachineStorageProfile, AdditionalCapabilities, VirtualMachineOSProfile, VirtualMachineNetworkProfile, SecurityProfile, BootDiagnostics, ResourceIdentifier, ResourceIdentifier, ResourceIdentifier, Nullable<VirtualMachinePriorityType>, Nullable<VirtualMachineEvictionPolicyType>, Nullable<Double>, ResourceIdentifier, ResourceIdentifier, String, VirtualMachineInstanceView, String, String, String, Nullable<Int32>, ComputeScheduledEventsProfile, String, ResourceIdentifier, IEnumerable<VirtualMachineGalleryApplication>, Nullable<DateTimeOffset>, Nullable<Boolean>)

Source:
ArmComputeModelFactory.cs

Initializes a new instance of VirtualMachineData.

public static Azure.ResourceManager.Compute.VirtualMachineData VirtualMachineData(Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, System.Collections.Generic.IDictionary<string,string> tags = default, Azure.Core.AzureLocation location = default, Azure.ResourceManager.Compute.Models.ComputePlan plan = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Compute.VirtualMachineExtensionData> resources = default, Azure.ResourceManager.Models.ManagedServiceIdentity identity = default, System.Collections.Generic.IEnumerable<string> zones = default, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = default, string managedBy = default, string etag = default, Azure.ResourceManager.Compute.Models.VirtualMachinePlacement placement = default, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile = default, Azure.ResourceManager.Compute.Models.ScheduledEventsPolicy scheduledEventsPolicy = default, Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile = default, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities = default, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile = default, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile = default, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = default, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = default, Azure.Core.ResourceIdentifier availabilitySetId = default, Azure.Core.ResourceIdentifier virtualMachineScaleSetId = default, Azure.Core.ResourceIdentifier proximityPlacementGroupId = default, Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType? priority = default, Azure.ResourceManager.Compute.Models.VirtualMachineEvictionPolicyType? evictionPolicy = default, double? billingMaxPrice = default, Azure.Core.ResourceIdentifier hostId = default, Azure.Core.ResourceIdentifier hostGroupId = default, string provisioningState = default, Azure.ResourceManager.Compute.Models.VirtualMachineInstanceView instanceView = default, string licenseType = default, string vmId = default, string extensionsTimeBudget = default, int? platformFaultDomain = default, Azure.ResourceManager.Compute.Models.ComputeScheduledEventsProfile scheduledEventsProfile = default, string userData = default, Azure.Core.ResourceIdentifier capacityReservationGroupId = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Compute.Models.VirtualMachineGalleryApplication> galleryApplications = default, DateTimeOffset? timeCreated = default, bool? isEnabled = default);
static member VirtualMachineData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * System.Collections.Generic.IDictionary<string, string> * Azure.Core.AzureLocation * Azure.ResourceManager.Compute.Models.ComputePlan * seq<Azure.ResourceManager.Compute.VirtualMachineExtensionData> * Azure.ResourceManager.Models.ManagedServiceIdentity * seq<string> * Azure.ResourceManager.Resources.Models.ExtendedLocation * string * string * Azure.ResourceManager.Compute.Models.VirtualMachinePlacement * Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile * Azure.ResourceManager.Compute.Models.ScheduledEventsPolicy * Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile * Azure.ResourceManager.Compute.Models.AdditionalCapabilities * Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile * Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile * Azure.ResourceManager.Compute.Models.SecurityProfile * Azure.ResourceManager.Compute.Models.BootDiagnostics * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Nullable<Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType> * Nullable<Azure.ResourceManager.Compute.Models.VirtualMachineEvictionPolicyType> * Nullable<double> * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * string * Azure.ResourceManager.Compute.Models.VirtualMachineInstanceView * string * string * string * Nullable<int> * Azure.ResourceManager.Compute.Models.ComputeScheduledEventsProfile * string * Azure.Core.ResourceIdentifier * seq<Azure.ResourceManager.Compute.Models.VirtualMachineGalleryApplication> * Nullable<DateTimeOffset> * Nullable<bool> -> Azure.ResourceManager.Compute.VirtualMachineData
Public Shared Function VirtualMachineData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional location As AzureLocation = Nothing, Optional plan As ComputePlan = Nothing, Optional resources As IEnumerable(Of VirtualMachineExtensionData) = Nothing, Optional identity As ManagedServiceIdentity = Nothing, Optional zones As IEnumerable(Of String) = Nothing, Optional extendedLocation As ExtendedLocation = Nothing, Optional managedBy As String = Nothing, Optional etag As String = Nothing, Optional placement As VirtualMachinePlacement = Nothing, Optional hardwareProfile As VirtualMachineHardwareProfile = Nothing, Optional scheduledEventsPolicy As ScheduledEventsPolicy = Nothing, Optional storageProfile As VirtualMachineStorageProfile = Nothing, Optional additionalCapabilities As AdditionalCapabilities = Nothing, Optional osProfile As VirtualMachineOSProfile = Nothing, Optional networkProfile As VirtualMachineNetworkProfile = Nothing, Optional securityProfile As SecurityProfile = Nothing, Optional bootDiagnostics As BootDiagnostics = Nothing, Optional availabilitySetId As ResourceIdentifier = Nothing, Optional virtualMachineScaleSetId As ResourceIdentifier = Nothing, Optional proximityPlacementGroupId As ResourceIdentifier = Nothing, Optional priority As Nullable(Of VirtualMachinePriorityType) = Nothing, Optional evictionPolicy As Nullable(Of VirtualMachineEvictionPolicyType) = Nothing, Optional billingMaxPrice As Nullable(Of Double) = Nothing, Optional hostId As ResourceIdentifier = Nothing, Optional hostGroupId As ResourceIdentifier = Nothing, Optional provisioningState As String = Nothing, Optional instanceView As VirtualMachineInstanceView = Nothing, Optional licenseType As String = Nothing, Optional vmId As String = Nothing, Optional extensionsTimeBudget As String = Nothing, Optional platformFaultDomain As Nullable(Of Integer) = Nothing, Optional scheduledEventsProfile As ComputeScheduledEventsProfile = Nothing, Optional userData As String = Nothing, Optional capacityReservationGroupId As ResourceIdentifier = Nothing, Optional galleryApplications As IEnumerable(Of VirtualMachineGalleryApplication) = Nothing, Optional timeCreated As Nullable(Of DateTimeOffset) = Nothing, Optional isEnabled As Nullable(Of Boolean) = Nothing) As VirtualMachineData

Parameters

id
ResourceIdentifier

The id.

name
String

The name.

resourceType
ResourceType

The resourceType.

systemData
SystemData

The systemData.

tags
IDictionary<String,String>

The tags.

location
AzureLocation

The location.

plan
ComputePlan

Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

resources
IEnumerable<VirtualMachineExtensionData>

The virtual machine child extension resources.

identity
ManagedServiceIdentity

The identity of the virtual machine, if configured.

zones
IEnumerable<String>

The availability zones.

extendedLocation
ExtendedLocation

The extended location of the Virtual Machine.

managedBy
String

ManagedBy is set to Virtual Machine Scale Set(VMSS) flex ARM resourceID, if the VM is part of the VMSS. This property is used by platform for internal resource group delete optimization.

etag
String

Etag is property returned in Create/Update/Get response of the VM, so that customer can supply it in the header to ensure optimistic updates.

placement
VirtualMachinePlacement

Placement section specifies the user-defined constraints for virtual machine hardware placement. This property cannot be changed once VM is provisioned. Minimum api-version: 2024-11-01.

hardwareProfile
VirtualMachineHardwareProfile

Specifies the hardware settings for the virtual machine.

scheduledEventsPolicy
ScheduledEventsPolicy

Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the virtual machine.

storageProfile
VirtualMachineStorageProfile

Specifies the storage settings for the virtual machine disks.

additionalCapabilities
AdditionalCapabilities

Specifies additional capabilities enabled or disabled on the virtual machine.

osProfile
VirtualMachineOSProfile

Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.

networkProfile
VirtualMachineNetworkProfile

Specifies the network interfaces of the virtual machine.

securityProfile
SecurityProfile

Specifies the Security related profile settings for the virtual machine.

bootDiagnostics
BootDiagnostics

Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.

availabilitySetId
ResourceIdentifier

Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Availability sets overview. For more information on Azure planned maintenance, see Maintenance and updates for Virtual Machines in Azure. Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.

virtualMachineScaleSetId
ResourceIdentifier

Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01.

proximityPlacementGroupId
ResourceIdentifier

Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.

priority
Nullable<VirtualMachinePriorityType>

Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01.

evictionPolicy
Nullable<VirtualMachineEvictionPolicyType>

Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.

billingMaxPrice
Nullable<Double>

Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.

hostId
ResourceIdentifier

Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.

hostGroupId
ResourceIdentifier

Specifies information about the dedicated host group that the virtual machine resides in. Note: User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01.

provisioningState
String

The provisioning state, which only appears in the response.

instanceView
VirtualMachineInstanceView

The virtual machine instance view.

licenseType
String

Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see Azure Hybrid Use Benefit for Windows Server <br><br> Azure Hybrid Use Benefit for Linux Server <br><br> Minimum api-version: 2015-06-15.

vmId
String

Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.

extensionsTimeBudget
String

Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01.

platformFaultDomain
Nullable<Int32>

Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01.

scheduledEventsProfile
ComputeScheduledEventsProfile

Specifies Scheduled Event related configurations.

userData
String

UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.

capacityReservationGroupId
ResourceIdentifier

Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.

galleryApplications
IEnumerable<VirtualMachineGalleryApplication>

Specifies the gallery applications that should be made available to the VM/VMSS.

timeCreated
Nullable<DateTimeOffset>

Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01.

isEnabled
Nullable<Boolean>

Resiliency profile for the virtual machine.

Returns

A new VirtualMachineData instance for mocking.

Applies to