public override void ExecuteCmdlet() { var storageProfile = this.VM.StorageProfile; if (storageProfile == null) { storageProfile = new StorageProfile(); } if (storageProfile.DataDisks == null) { storageProfile.DataDisks = new List<DataDisk>(); } storageProfile.DataDisks.Add(new DataDisk { Name = this.Name, Caching = this.Caching, DiskSizeGB = this.DiskSizeInGB, Lun = this.Lun.GetValueOrDefault(), Vhd = new VirtualHardDisk { Uri = this.VhdUri }, CreateOption = this.CreateOption, Image = string.IsNullOrEmpty(this.SourceImageUri) ? null : new VirtualHardDisk { Uri = this.SourceImageUri } }); this.VM.StorageProfile = storageProfile; WriteObject(this.VM); }
/// <summary> /// Initializes a new instance of the VirtualMachineUpdate class. /// </summary> /// <param name="tags">Resource tags</param> /// <param name="plan">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**.</param> /// <param name="hardwareProfile">Specifies the hardware settings for /// the virtual machine.</param> /// <param name="storageProfile">Specifies the storage settings for the /// virtual machine disks.</param> /// <param name="additionalCapabilities">Specifies additional /// capabilities enabled or disabled on the virtual machine.</param> /// <param name="osProfile">Specifies the operating system settings /// used while creating the virtual machine. Some of the settings /// cannot be changed once VM is provisioned.</param> /// <param name="networkProfile">Specifies the network interfaces of /// the virtual machine.</param> /// <param name="securityProfile">Specifies the Security related /// profile settings for the virtual machine.</param> /// <param name="diagnosticsProfile">Specifies the boot diagnostic /// settings state. <br><br>Minimum api-version: /// 2015-06-15.</param> /// <param name="availabilitySet">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 [Manage the availability /// of virtual /// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). /// <br><br> For more information on Azure planned /// maintenance, see [Planned maintenance for virtual machines in /// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) /// <br><br> 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. <br><br>This property cannot exist /// along with a non-null properties.virtualMachineScaleSet /// reference.</param> /// <param name="virtualMachineScaleSet">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. <br><br>This property cannot /// exist along with a non-null properties.availabilitySet reference. /// <br><br>Minimum api‐version: 2019‐03‐01</param> /// <param name="proximityPlacementGroup">Specifies information about /// the proximity placement group that the virtual machine should be /// assigned to. <br><br>Minimum api-version: /// 2018-04-01.</param> /// <param name="priority">Specifies the priority for the virtual /// machine. <br><br>Minimum api-version: 2019-03-01. /// Possible values include: 'Regular', 'Low', 'Spot'</param> /// <param name="evictionPolicy">Specifies the eviction policy for the /// Azure Spot virtual machine and Azure Spot scale set. /// <br><br>For Azure Spot virtual machines, both /// 'Deallocate' and 'Delete' are supported and the minimum api-version /// is 2019-03-01. <br><br>For Azure Spot scale sets, both /// 'Deallocate' and 'Delete' are supported and the minimum api-version /// is 2017-10-30-preview. Possible values include: 'Deallocate', /// 'Delete'</param> /// <param name="billingProfile">Specifies the billing related details /// of a Azure Spot virtual machine. <br><br>Minimum /// api-version: 2019-03-01.</param> /// <param name="host">Specifies information about the dedicated host /// that the virtual machine resides in. <br><br>Minimum /// api-version: 2018-10-01.</param> /// <param name="hostGroup">Specifies information about the dedicated /// host group that the virtual machine resides in. /// <br><br>Minimum api-version: 2020-06-01. /// <br><br>NOTE: User cannot specify both host and /// hostGroup properties.</param> /// <param name="provisioningState">The provisioning state, which only /// appears in the response.</param> /// <param name="instanceView">The virtual machine instance /// view.</param> /// <param name="licenseType">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](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) /// <br><br> [Azure Hybrid Use Benefit for Linux /// Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) /// <br><br> Minimum api-version: 2015-06-15</param> /// <param name="vmId">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.</param> /// <param name="extensionsTimeBudget">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). /// <br><br> Minimum api-version: 2020-06-01</param> /// <param name="identity">The identity of the virtual machine, if /// configured.</param> /// <param name="zones">The virtual machine zones.</param> public VirtualMachineUpdate(IDictionary <string, string> tags, Plan plan, HardwareProfile hardwareProfile, StorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, OSProfile osProfile, NetworkProfile networkProfile, SecurityProfile securityProfile, DiagnosticsProfile diagnosticsProfile, SubResource availabilitySet, SubResource virtualMachineScaleSet, SubResource proximityPlacementGroup, string priority, string evictionPolicy, BillingProfile billingProfile, SubResource host, SubResource hostGroup, string provisioningState, VirtualMachineInstanceView instanceView, string licenseType, string vmId, string extensionsTimeBudget, VirtualMachineIdentity identity, IList <string> zones) : base(tags) { Plan = plan; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; NetworkProfile = networkProfile; SecurityProfile = securityProfile; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; VirtualMachineScaleSet = virtualMachineScaleSet; ProximityPlacementGroup = proximityPlacementGroup; Priority = priority; EvictionPolicy = evictionPolicy; BillingProfile = billingProfile; Host = host; HostGroup = hostGroup; ProvisioningState = provisioningState; InstanceView = instanceView; LicenseType = licenseType; VmId = vmId; ExtensionsTimeBudget = extensionsTimeBudget; Identity = identity; Zones = zones; CustomInit(); }
protected override void ProcessRecord() { var storageProfile = this.VM.StorageProfile; if (storageProfile == null) { storageProfile = new StorageProfile(); } if (storageProfile.DataDisks == null) { storageProfile.DataDisks = new List<DataDisk>(); } storageProfile.DataDisks.Add(new DataDisk { Name = this.Name, Caching = this.Caching, DiskSizeGB = this.DiskSizeInGB, Lun = this.Lun == null ? 0 : this.Lun.Value, VirtualHardDisk = string.IsNullOrEmpty(this.VhdUri) ? null : new VirtualHardDisk { Uri = this.VhdUri }, CreateOption = this.CreateOption, SourceImage = string.IsNullOrEmpty(this.SourceImageUri) ? null : new VirtualHardDisk { Uri = this.SourceImageUri } }); this.VM.StorageProfile = storageProfile; WriteObject(this.VM); }
/// <summary> /// Initializes a new instance of the VirtualMachineUpdate class. /// </summary> /// <param name="tags">Resource tags</param> /// <param name="plan">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**.</param> /// <param name="hardwareProfile">Specifies the hardware settings for /// the virtual machine.</param> /// <param name="storageProfile">Specifies the storage settings for the /// virtual machine disks.</param> /// <param name="additionalCapabilities">Specifies additional /// capabilities enabled or disabled on the virtual machine.</param> /// <param name="osProfile">Specifies the operating system settings /// used while creating the virtual machine. Some of the settings /// cannot be changed once VM is provisioned.</param> /// <param name="networkProfile">Specifies the network interfaces of /// the virtual machine.</param> /// <param name="securityProfile">Specifies the Security related /// profile settings for the virtual machine.</param> /// <param name="diagnosticsProfile">Specifies the boot diagnostic /// settings state. <br><br>Minimum api-version: /// 2015-06-15.</param> /// <param name="availabilitySet">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 [Manage the availability /// of virtual /// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). /// <br><br> For more information on Azure planned /// maintenance, see [Planned maintenance for virtual machines in /// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) /// <br><br> 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. <br><br>This property cannot exist /// along with a non-null properties.virtualMachineScaleSet /// reference.</param> /// <param name="virtualMachineScaleSet">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. <br><br>This property cannot /// exist along with a non-null properties.availabilitySet reference. /// <br><br>Minimum api‐version: 2019‐03‐01</param> /// <param name="proximityPlacementGroup">Specifies information about /// the proximity placement group that the virtual machine should be /// assigned to. <br><br>Minimum api-version: /// 2018-04-01.</param> /// <param name="priority">Specifies the priority for the virtual /// machine. <br><br>Minimum api-version: 2019-03-01. /// Possible values include: 'Regular', 'Low', 'Spot'</param> /// <param name="evictionPolicy">Specifies the eviction policy for the /// Azure Spot virtual machine and Azure Spot scale set. /// <br><br>For Azure Spot virtual machines, the only /// supported value is 'Deallocate' and the minimum api-version is /// 2019-03-01. <br><br>For Azure Spot scale sets, both /// 'Deallocate' and 'Delete' are supported and the minimum api-version /// is 2017-10-30-preview. Possible values include: 'Deallocate', /// 'Delete'</param> /// <param name="billingProfile">Specifies the billing related details /// of a Azure Spot virtual machine. <br><br>Minimum /// api-version: 2019-03-01.</param> /// <param name="host">Specifies information about the dedicated host /// that the virtual machine resides in. <br><br>Minimum /// api-version: 2018-10-01.</param> /// <param name="provisioningState">The provisioning state, which only /// appears in the response.</param> /// <param name="instanceView">The virtual machine instance /// view.</param> /// <param name="licenseType">Specifies that the image or disk that is /// being used was licensed on-premises. This element is only used for /// images that contain the Windows Server operating system. /// <br><br> Possible values are: <br><br> /// Windows_Client <br><br> Windows_Server /// <br><br> If this element is included in a request for /// an update, the value must match the initial value. This value /// cannot be updated. <br><br> For more information, see /// [Azure Hybrid Use Benefit for Windows /// Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) /// <br><br> Minimum api-version: 2015-06-15</param> /// <param name="vmId">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.</param> /// <param name="identity">The identity of the virtual machine, if /// configured.</param> /// <param name="zones">The virtual machine zones.</param> public VirtualMachineUpdate(IDictionary <string, string> tags = default(IDictionary <string, string>), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), SubResource virtualMachineScaleSet = default(SubResource), SubResource proximityPlacementGroup = default(SubResource), string priority = default(string), string evictionPolicy = default(string), BillingProfile billingProfile = default(BillingProfile), SubResource host = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList <string> zones = default(IList <string>)) : base(tags) { Plan = plan; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; NetworkProfile = networkProfile; SecurityProfile = securityProfile; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; VirtualMachineScaleSet = virtualMachineScaleSet; ProximityPlacementGroup = proximityPlacementGroup; Priority = priority; EvictionPolicy = evictionPolicy; BillingProfile = billingProfile; Host = host; ProvisioningState = provisioningState; InstanceView = instanceView; LicenseType = licenseType; VmId = vmId; Identity = identity; Zones = zones; CustomInit(); }
/// <summary> /// Initializes a new instance of the VirtualMachineUpdate class. /// </summary> /// <param name="tags">Resource tags</param> /// <param name="plan">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**.</param> /// <param name="hardwareProfile">Specifies the hardware settings for /// the virtual machine.</param> /// <param name="storageProfile">Specifies the storage settings for the /// virtual machine disks.</param> /// <param name="additionalCapabilities">Specifies additional /// capabilities enabled or disabled on the virtual machine.</param> /// <param name="osProfile">Specifies the operating system settings for /// the virtual machine.</param> /// <param name="networkProfile">Specifies the network interfaces of /// the virtual machine.</param> /// <param name="diagnosticsProfile">Specifies the boot diagnostic /// settings state. <br><br>Minimum api-version: /// 2015-06-15.</param> /// <param name="availabilitySet">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 [Manage the availability /// of virtual /// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). /// <br><br> For more information on Azure planned /// maintenance, see [Planned maintenance for virtual machines in /// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) /// <br><br> Currently, a VM can only be added to /// availability set at creation time. An existing VM cannot be added /// to an availability set.</param> /// <param name="provisioningState">The provisioning state, which only /// appears in the response.</param> /// <param name="instanceView">The virtual machine instance /// view.</param> /// <param name="licenseType">Specifies that the image or disk that is /// being used was licensed on-premises. This element is only used for /// images that contain the Windows Server operating system. /// <br><br> Possible values are: <br><br> /// Windows_Client <br><br> Windows_Server /// <br><br> If this element is included in a request for /// an update, the value must match the initial value. This value /// cannot be updated. <br><br> For more information, see /// [Azure Hybrid Use Benefit for Windows /// Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) /// <br><br> Minimum api-version: 2015-06-15</param> /// <param name="vmId">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.</param> /// <param name="identity">The identity of the virtual machine, if /// configured.</param> /// <param name="zones">The virtual machine zones.</param> public VirtualMachineUpdate(IDictionary <string, string> tags = default(IDictionary <string, string>), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList <string> zones = default(IList <string>)) : base(tags) { Plan = plan; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; NetworkProfile = networkProfile; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; ProvisioningState = provisioningState; InstanceView = instanceView; LicenseType = licenseType; VmId = vmId; Identity = identity; Zones = zones; CustomInit(); }
/// <summary> /// Initializes a new instance of the VirtualMachineUpdate class. /// </summary> /// <param name="tags">Resource tags</param> /// <param name="plan">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**.</param> /// <param name="hardwareProfile">Specifies the hardware settings for /// the virtual machine.</param> /// <param name="storageProfile">Specifies the storage settings for the /// virtual machine disks.</param> /// <param name="additionalCapabilities">Specifies additional /// capabilities enabled or disabled on the virtual machine.</param> /// <param name="osProfile">Specifies the operating system settings /// used while creating the virtual machine. Some of the settings /// cannot be changed once VM is provisioned.</param> /// <param name="networkProfile">Specifies the network interfaces of /// the virtual machine.</param> /// <param name="securityProfile">Specifies the Security related /// profile settings for the virtual machine.</param> /// <param name="diagnosticsProfile">Specifies the boot diagnostic /// settings state. <br><br>Minimum api-version: /// 2015-06-15.</param> /// <param name="availabilitySet">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](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). /// <br><br> For more information on Azure planned /// maintenance, see [Maintenance and updates for Virtual Machines in /// Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) /// <br><br> 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. <br><br>This property cannot exist /// along with a non-null properties.virtualMachineScaleSet /// reference.</param> /// <param name="virtualMachineScaleSet">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. <br><br>This property cannot /// exist along with a non-null properties.availabilitySet reference. /// <br><br>Minimum api‐version: 2019‐03‐01</param> /// <param name="proximityPlacementGroup">Specifies information about /// the proximity placement group that the virtual machine should be /// assigned to. <br><br>Minimum api-version: /// 2018-04-01.</param> /// <param name="priority">Specifies the priority for the virtual /// machine. <br><br>Minimum api-version: 2019-03-01. /// Possible values include: 'Regular', 'Low', 'Spot'</param> /// <param name="evictionPolicy">Specifies the eviction policy for the /// Azure Spot virtual machine and Azure Spot scale set. /// <br><br>For Azure Spot virtual machines, both /// 'Deallocate' and 'Delete' are supported and the minimum api-version /// is 2019-03-01. <br><br>For Azure Spot scale sets, both /// 'Deallocate' and 'Delete' are supported and the minimum api-version /// is 2017-10-30-preview. Possible values include: 'Deallocate', /// 'Delete'</param> /// <param name="billingProfile">Specifies the billing related details /// of a Azure Spot virtual machine. <br><br>Minimum /// api-version: 2019-03-01.</param> /// <param name="host">Specifies information about the dedicated host /// that the virtual machine resides in. <br><br>Minimum /// api-version: 2018-10-01.</param> /// <param name="hostGroup">Specifies information about the dedicated /// host group that the virtual machine resides in. /// <br><br>Minimum api-version: 2020-06-01. /// <br><br>NOTE: User cannot specify both host and /// hostGroup properties.</param> /// <param name="provisioningState">The provisioning state, which only /// appears in the response.</param> /// <param name="instanceView">The virtual machine instance /// view.</param> /// <param name="licenseType">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](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) /// <br><br> [Azure Hybrid Use Benefit for Linux /// Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) /// <br><br> Minimum api-version: 2015-06-15</param> /// <param name="vmId">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.</param> /// <param name="extensionsTimeBudget">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). /// <br><br> Minimum api-version: 2020-06-01</param> /// <param name="platformFaultDomain">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.<br><li>This is applicable only if the /// 'virtualMachineScaleSet' property of this Virtual Machine is /// set.<li>The Virtual Machine Scale Set that is referenced, /// must have 'platformFaultDomainCount' &gt; 1.<li>This /// property cannot be updated once the Virtual Machine is /// created.<li>Fault domain assignment can be viewed in the /// Virtual Machine Instance View.<br><br>Minimum /// api‐version: 2020‐12‐01</param> /// <param name="scheduledEventsProfile">Specifies Scheduled Event /// related configurations.</param> /// <param name="userData">UserData for the VM, which must be base-64 /// encoded. Customer should not pass any secrets in here. /// <br><br>Minimum api-version: 2021-03-01</param> /// <param name="capacityReservation">Specifies information about the /// capacity reservation that is used to allocate virtual machine. /// <br><br>Minimum api-version: 2021-04-01.</param> /// <param name="applicationProfile">Specifies the gallery applications /// that should be made available to the VM/VMSS</param> /// <param name="identity">The identity of the virtual machine, if /// configured.</param> /// <param name="zones">The virtual machine zones.</param> public VirtualMachineUpdate(IDictionary <string, string> tags = default(IDictionary <string, string>), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), SubResource virtualMachineScaleSet = default(SubResource), SubResource proximityPlacementGroup = default(SubResource), string priority = default(string), string evictionPolicy = default(string), BillingProfile billingProfile = default(BillingProfile), SubResource host = default(SubResource), SubResource hostGroup = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), string extensionsTimeBudget = default(string), int?platformFaultDomain = default(int?), ScheduledEventsProfile scheduledEventsProfile = default(ScheduledEventsProfile), string userData = default(string), CapacityReservationProfile capacityReservation = default(CapacityReservationProfile), ApplicationProfile applicationProfile = default(ApplicationProfile), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList <string> zones = default(IList <string>)) : base(tags) { Plan = plan; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; NetworkProfile = networkProfile; SecurityProfile = securityProfile; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; VirtualMachineScaleSet = virtualMachineScaleSet; ProximityPlacementGroup = proximityPlacementGroup; Priority = priority; EvictionPolicy = evictionPolicy; BillingProfile = billingProfile; Host = host; HostGroup = hostGroup; ProvisioningState = provisioningState; InstanceView = instanceView; LicenseType = licenseType; VmId = vmId; ExtensionsTimeBudget = extensionsTimeBudget; PlatformFaultDomain = platformFaultDomain; ScheduledEventsProfile = scheduledEventsProfile; UserData = userData; CapacityReservation = capacityReservation; ApplicationProfile = applicationProfile; Identity = identity; Zones = zones; CustomInit(); }
/// <summary> /// Initializes a new instance of the VirtualMachineScaleSetVM class. /// </summary> /// <param name="location">Resource location</param> /// <param name="id">Resource Id</param> /// <param name="name">Resource name</param> /// <param name="type">Resource type</param> /// <param name="tags">Resource tags</param> /// <param name="instanceId">The virtual machine instance ID.</param> /// <param name="sku">The virtual machine SKU.</param> /// <param name="latestModelApplied">Specifies whether the latest model /// has been applied to the virtual machine.</param> /// <param name="vmId">Azure VM unique ID.</param> /// <param name="instanceView">The virtual machine instance /// view.</param> /// <param name="hardwareProfile">Specifies the hardware settings for /// the virtual machine.</param> /// <param name="storageProfile">Specifies the storage settings for the /// virtual machine disks.</param> /// <param name="additionalCapabilities">Specifies additional /// capabilities enabled or disabled on the virtual machine in the /// scale set. For instance: whether the virtual machine has the /// capability to support attaching managed data disks with /// UltraSSD_LRS storage account type.</param> /// <param name="osProfile">Specifies the operating system settings for /// the virtual machine.</param> /// <param name="securityProfile">Specifies the Security related /// profile settings for the virtual machine.</param> /// <param name="networkProfile">Specifies the network interfaces of /// the virtual machine.</param> /// <param name="networkProfileConfiguration">Specifies the network /// profile configuration of the virtual machine.</param> /// <param name="diagnosticsProfile">Specifies the boot diagnostic /// settings state. <br><br>Minimum api-version: /// 2015-06-15.</param> /// <param name="availabilitySet">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](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). /// <br><br> For more information on Azure planned /// maintenance, see [Maintenance and updates for Virtual Machines in /// Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) /// <br><br> Currently, a VM can only be added to /// availability set at creation time. An existing VM cannot be added /// to an availability set.</param> /// <param name="provisioningState">The provisioning state, which only /// appears in the response.</param> /// <param name="licenseType">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](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) /// <br><br> [Azure Hybrid Use Benefit for Linux /// Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) /// <br><br> Minimum api-version: 2015-06-15</param> /// <param name="modelDefinitionApplied">Specifies whether the model /// applied to the virtual machine is the model of the virtual machine /// scale set or the customized model for the virtual machine.</param> /// <param name="protectionPolicy">Specifies the protection policy of /// the virtual machine.</param> /// <param name="plan">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**.</param> /// <param name="resources">The virtual machine child extension /// resources.</param> /// <param name="zones">The virtual machine zones.</param> public VirtualMachineScaleSetVM(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), string instanceId = default(string), Sku sku = default(Sku), bool?latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), SecurityProfile securityProfile = default(SecurityProfile), NetworkProfile networkProfile = default(NetworkProfile), VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration = default(VirtualMachineScaleSetVMNetworkProfileConfiguration), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), string licenseType = default(string), string modelDefinitionApplied = default(string), VirtualMachineScaleSetVMProtectionPolicy protectionPolicy = default(VirtualMachineScaleSetVMProtectionPolicy), Plan plan = default(Plan), IList <VirtualMachineExtension> resources = default(IList <VirtualMachineExtension>), IList <string> zones = default(IList <string>)) : base(location, id, name, type, tags) { InstanceId = instanceId; Sku = sku; LatestModelApplied = latestModelApplied; VmId = vmId; InstanceView = instanceView; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; SecurityProfile = securityProfile; NetworkProfile = networkProfile; NetworkProfileConfiguration = networkProfileConfiguration; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; ProvisioningState = provisioningState; LicenseType = licenseType; ModelDefinitionApplied = modelDefinitionApplied; ProtectionPolicy = protectionPolicy; Plan = plan; Resources = resources; Zones = zones; CustomInit(); }
/// <summary> /// Initializes a new instance of the VirtualMachineScaleSetVM class. /// </summary> public VirtualMachineScaleSetVM(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), string instanceId = default(string), Sku sku = default(Sku), Plan plan = default(Plan), IList <VirtualMachineExtension> resources = default(IList <VirtualMachineExtension>), bool?latestModelApplied = default(bool?), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), string licenseType = default(string)) : base(location, id, name, type, tags) { InstanceId = instanceId; Sku = sku; Plan = plan; Resources = resources; LatestModelApplied = latestModelApplied; InstanceView = instanceView; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; OsProfile = osProfile; NetworkProfile = networkProfile; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; ProvisioningState = provisioningState; LicenseType = licenseType; }
/// <summary> /// Initializes a new instance of the VirtualMachine class. /// </summary> public VirtualMachine(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), IList <VirtualMachineExtension> resources = default(IList <VirtualMachineExtension>)) : base(location, id, name, type, tags) { Plan = plan; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; OsProfile = osProfile; NetworkProfile = networkProfile; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; ProvisioningState = provisioningState; InstanceView = instanceView; LicenseType = licenseType; VmId = vmId; Resources = resources; }
public VirtualMachine(string location, string id, string name, string type, IDictionary <string, string> tags, Plan plan, HardwareProfile hardwareProfile, StorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, OSProfile osProfile, NetworkProfile networkProfile, SecurityProfile securityProfile, DiagnosticsProfile diagnosticsProfile, SubResource availabilitySet, SubResource virtualMachineScaleSet, SubResource proximityPlacementGroup, string priority, string evictionPolicy, BillingProfile billingProfile, SubResource host, SubResource hostGroup, string provisioningState, VirtualMachineInstanceView instanceView, string licenseType, string vmId, string extensionsTimeBudget, int?platformFaultDomain, ScheduledEventsProfile scheduledEventsProfile, string userData, CapacityReservationProfile capacityReservation, IList <VirtualMachineExtension> resources, VirtualMachineIdentity identity, IList <string> zones) : base(location, id, name, type, tags) { Plan = plan; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; NetworkProfile = networkProfile; SecurityProfile = securityProfile; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; VirtualMachineScaleSet = virtualMachineScaleSet; ProximityPlacementGroup = proximityPlacementGroup; Priority = priority; EvictionPolicy = evictionPolicy; BillingProfile = billingProfile; Host = host; HostGroup = hostGroup; ProvisioningState = provisioningState; InstanceView = instanceView; LicenseType = licenseType; VmId = vmId; ExtensionsTimeBudget = extensionsTimeBudget; PlatformFaultDomain = platformFaultDomain; ScheduledEventsProfile = scheduledEventsProfile; UserData = userData; CapacityReservation = capacityReservation; Resources = resources; Identity = identity; Zones = zones; CustomInit(); }