All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.compute.VirtualMachineArgs Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.compute;

import com.pulumi.azurenative.compute.enums.VirtualMachineEvictionPolicyTypes;
import com.pulumi.azurenative.compute.enums.VirtualMachinePriorityTypes;
import com.pulumi.azurenative.compute.inputs.AdditionalCapabilitiesArgs;
import com.pulumi.azurenative.compute.inputs.ApplicationProfileArgs;
import com.pulumi.azurenative.compute.inputs.BillingProfileArgs;
import com.pulumi.azurenative.compute.inputs.CapacityReservationProfileArgs;
import com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;
import com.pulumi.azurenative.compute.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;
import com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.OSProfileArgs;
import com.pulumi.azurenative.compute.inputs.PlanArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsProfileArgs;
import com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;
import com.pulumi.azurenative.compute.inputs.StorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineIdentityArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class VirtualMachineArgs extends com.pulumi.resources.ResourceArgs {

    public static final VirtualMachineArgs Empty = new VirtualMachineArgs();

    /**
     * Specifies additional capabilities enabled or disabled on the virtual machine.
     * 
     */
    @Import(name="additionalCapabilities")
    private @Nullable Output additionalCapabilities;

    /**
     * @return Specifies additional capabilities enabled or disabled on the virtual machine.
     * 
     */
    public Optional> additionalCapabilities() {
        return Optional.ofNullable(this.additionalCapabilities);
    }

    /**
     * Specifies the gallery applications that should be made available to the VM/VMSS.
     * 
     */
    @Import(name="applicationProfile")
    private @Nullable Output applicationProfile;

    /**
     * @return Specifies the gallery applications that should be made available to the VM/VMSS.
     * 
     */
    public Optional> applicationProfile() {
        return Optional.ofNullable(this.applicationProfile);
    }

    /**
     * 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). 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). 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.
     * 
     */
    @Import(name="availabilitySet")
    private @Nullable Output availabilitySet;

    /**
     * @return 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). 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). 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.
     * 
     */
    public Optional> availabilitySet() {
        return Optional.ofNullable(this.availabilitySet);
    }

    /**
     * Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.
     * 
     */
    @Import(name="billingProfile")
    private @Nullable Output billingProfile;

    /**
     * @return Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.
     * 
     */
    public Optional> billingProfile() {
        return Optional.ofNullable(this.billingProfile);
    }

    /**
     * Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.
     * 
     */
    @Import(name="capacityReservation")
    private @Nullable Output capacityReservation;

    /**
     * @return Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.
     * 
     */
    public Optional> capacityReservation() {
        return Optional.ofNullable(this.capacityReservation);
    }

    /**
     * Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
     * 
     */
    @Import(name="diagnosticsProfile")
    private @Nullable Output diagnosticsProfile;

    /**
     * @return Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
     * 
     */
    public Optional> diagnosticsProfile() {
        return Optional.ofNullable(this.diagnosticsProfile);
    }

    /**
     * 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.
     * 
     */
    @Import(name="evictionPolicy")
    private @Nullable Output> evictionPolicy;

    /**
     * @return 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.
     * 
     */
    public Optional>> evictionPolicy() {
        return Optional.ofNullable(this.evictionPolicy);
    }

    /**
     * The extended location of the Virtual Machine.
     * 
     */
    @Import(name="extendedLocation")
    private @Nullable Output extendedLocation;

    /**
     * @return The extended location of the Virtual Machine.
     * 
     */
    public Optional> extendedLocation() {
        return Optional.ofNullable(this.extendedLocation);
    }

    /**
     * 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.
     * 
     */
    @Import(name="extensionsTimeBudget")
    private @Nullable Output extensionsTimeBudget;

    /**
     * @return 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.
     * 
     */
    public Optional> extensionsTimeBudget() {
        return Optional.ofNullable(this.extensionsTimeBudget);
    }

    /**
     * Specifies the hardware settings for the virtual machine.
     * 
     */
    @Import(name="hardwareProfile")
    private @Nullable Output hardwareProfile;

    /**
     * @return Specifies the hardware settings for the virtual machine.
     * 
     */
    public Optional> hardwareProfile() {
        return Optional.ofNullable(this.hardwareProfile);
    }

    /**
     * Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.
     * 
     */
    @Import(name="host")
    private @Nullable Output host;

    /**
     * @return Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.
     * 
     */
    public Optional> host() {
        return Optional.ofNullable(this.host);
    }

    /**
     * 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.
     * 
     */
    @Import(name="hostGroup")
    private @Nullable Output hostGroup;

    /**
     * @return 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.
     * 
     */
    public Optional> hostGroup() {
        return Optional.ofNullable(this.hostGroup);
    }

    /**
     * The identity of the virtual machine, if configured.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return The identity of the virtual machine, if configured.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * 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
     * 
     */
    @Import(name="licenseType")
    private @Nullable Output licenseType;

    /**
     * @return 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
     * 
     */
    public Optional> licenseType() {
        return Optional.ofNullable(this.licenseType);
    }

    /**
     * Resource location
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Resource location
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies the network interfaces of the virtual machine.
     * 
     */
    @Import(name="networkProfile")
    private @Nullable Output networkProfile;

    /**
     * @return Specifies the network interfaces of the virtual machine.
     * 
     */
    public Optional> networkProfile() {
        return Optional.ofNullable(this.networkProfile);
    }

    /**
     * Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
     * 
     */
    @Import(name="osProfile")
    private @Nullable Output osProfile;

    /**
     * @return Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
     * 
     */
    public Optional> osProfile() {
        return Optional.ofNullable(this.osProfile);
    }

    /**
     * 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**.
     * 
     */
    @Import(name="plan")
    private @Nullable Output plan;

    /**
     * @return 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**.
     * 
     */
    public Optional> plan() {
        return Optional.ofNullable(this.plan);
    }

    /**
     * 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.
     * 
     */
    @Import(name="platformFaultDomain")
    private @Nullable Output platformFaultDomain;

    /**
     * @return 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.
     * 
     */
    public Optional> platformFaultDomain() {
        return Optional.ofNullable(this.platformFaultDomain);
    }

    /**
     * Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01
     * 
     */
    @Import(name="priority")
    private @Nullable Output> priority;

    /**
     * @return Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01
     * 
     */
    public Optional>> priority() {
        return Optional.ofNullable(this.priority);
    }

    /**
     * Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.
     * 
     */
    @Import(name="proximityPlacementGroup")
    private @Nullable Output proximityPlacementGroup;

    /**
     * @return Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.
     * 
     */
    public Optional> proximityPlacementGroup() {
        return Optional.ofNullable(this.proximityPlacementGroup);
    }

    /**
     * The name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Specifies Scheduled Event related configurations.
     * 
     */
    @Import(name="scheduledEventsProfile")
    private @Nullable Output scheduledEventsProfile;

    /**
     * @return Specifies Scheduled Event related configurations.
     * 
     */
    public Optional> scheduledEventsProfile() {
        return Optional.ofNullable(this.scheduledEventsProfile);
    }

    /**
     * Specifies the Security related profile settings for the virtual machine.
     * 
     */
    @Import(name="securityProfile")
    private @Nullable Output securityProfile;

    /**
     * @return Specifies the Security related profile settings for the virtual machine.
     * 
     */
    public Optional> securityProfile() {
        return Optional.ofNullable(this.securityProfile);
    }

    /**
     * Specifies the storage settings for the virtual machine disks.
     * 
     */
    @Import(name="storageProfile")
    private @Nullable Output storageProfile;

    /**
     * @return Specifies the storage settings for the virtual machine disks.
     * 
     */
    public Optional> storageProfile() {
        return Optional.ofNullable(this.storageProfile);
    }

    /**
     * Resource tags
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.
     * 
     */
    @Import(name="userData")
    private @Nullable Output userData;

    /**
     * @return UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.
     * 
     */
    public Optional> userData() {
        return Optional.ofNullable(this.userData);
    }

    /**
     * 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.
     * 
     */
    @Import(name="virtualMachineScaleSet")
    private @Nullable Output virtualMachineScaleSet;

    /**
     * @return 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.
     * 
     */
    public Optional> virtualMachineScaleSet() {
        return Optional.ofNullable(this.virtualMachineScaleSet);
    }

    /**
     * The name of the virtual machine.
     * 
     */
    @Import(name="vmName")
    private @Nullable Output vmName;

    /**
     * @return The name of the virtual machine.
     * 
     */
    public Optional> vmName() {
        return Optional.ofNullable(this.vmName);
    }

    /**
     * The virtual machine zones.
     * 
     */
    @Import(name="zones")
    private @Nullable Output> zones;

    /**
     * @return The virtual machine zones.
     * 
     */
    public Optional>> zones() {
        return Optional.ofNullable(this.zones);
    }

    private VirtualMachineArgs() {}

    private VirtualMachineArgs(VirtualMachineArgs $) {
        this.additionalCapabilities = $.additionalCapabilities;
        this.applicationProfile = $.applicationProfile;
        this.availabilitySet = $.availabilitySet;
        this.billingProfile = $.billingProfile;
        this.capacityReservation = $.capacityReservation;
        this.diagnosticsProfile = $.diagnosticsProfile;
        this.evictionPolicy = $.evictionPolicy;
        this.extendedLocation = $.extendedLocation;
        this.extensionsTimeBudget = $.extensionsTimeBudget;
        this.hardwareProfile = $.hardwareProfile;
        this.host = $.host;
        this.hostGroup = $.hostGroup;
        this.identity = $.identity;
        this.licenseType = $.licenseType;
        this.location = $.location;
        this.networkProfile = $.networkProfile;
        this.osProfile = $.osProfile;
        this.plan = $.plan;
        this.platformFaultDomain = $.platformFaultDomain;
        this.priority = $.priority;
        this.proximityPlacementGroup = $.proximityPlacementGroup;
        this.resourceGroupName = $.resourceGroupName;
        this.scheduledEventsProfile = $.scheduledEventsProfile;
        this.securityProfile = $.securityProfile;
        this.storageProfile = $.storageProfile;
        this.tags = $.tags;
        this.userData = $.userData;
        this.virtualMachineScaleSet = $.virtualMachineScaleSet;
        this.vmName = $.vmName;
        this.zones = $.zones;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(VirtualMachineArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private VirtualMachineArgs $;

        public Builder() {
            $ = new VirtualMachineArgs();
        }

        public Builder(VirtualMachineArgs defaults) {
            $ = new VirtualMachineArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param additionalCapabilities Specifies additional capabilities enabled or disabled on the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder additionalCapabilities(@Nullable Output additionalCapabilities) {
            $.additionalCapabilities = additionalCapabilities;
            return this;
        }

        /**
         * @param additionalCapabilities Specifies additional capabilities enabled or disabled on the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder additionalCapabilities(AdditionalCapabilitiesArgs additionalCapabilities) {
            return additionalCapabilities(Output.of(additionalCapabilities));
        }

        /**
         * @param applicationProfile Specifies the gallery applications that should be made available to the VM/VMSS.
         * 
         * @return builder
         * 
         */
        public Builder applicationProfile(@Nullable Output applicationProfile) {
            $.applicationProfile = applicationProfile;
            return this;
        }

        /**
         * @param applicationProfile Specifies the gallery applications that should be made available to the VM/VMSS.
         * 
         * @return builder
         * 
         */
        public Builder applicationProfile(ApplicationProfileArgs applicationProfile) {
            return applicationProfile(Output.of(applicationProfile));
        }

        /**
         * @param 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). 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). 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.
         * 
         * @return builder
         * 
         */
        public Builder availabilitySet(@Nullable Output availabilitySet) {
            $.availabilitySet = availabilitySet;
            return this;
        }

        /**
         * @param 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). 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). 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.
         * 
         * @return builder
         * 
         */
        public Builder availabilitySet(SubResourceArgs availabilitySet) {
            return availabilitySet(Output.of(availabilitySet));
        }

        /**
         * @param billingProfile Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.
         * 
         * @return builder
         * 
         */
        public Builder billingProfile(@Nullable Output billingProfile) {
            $.billingProfile = billingProfile;
            return this;
        }

        /**
         * @param billingProfile Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.
         * 
         * @return builder
         * 
         */
        public Builder billingProfile(BillingProfileArgs billingProfile) {
            return billingProfile(Output.of(billingProfile));
        }

        /**
         * @param capacityReservation Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.
         * 
         * @return builder
         * 
         */
        public Builder capacityReservation(@Nullable Output capacityReservation) {
            $.capacityReservation = capacityReservation;
            return this;
        }

        /**
         * @param capacityReservation Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.
         * 
         * @return builder
         * 
         */
        public Builder capacityReservation(CapacityReservationProfileArgs capacityReservation) {
            return capacityReservation(Output.of(capacityReservation));
        }

        /**
         * @param diagnosticsProfile Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
         * 
         * @return builder
         * 
         */
        public Builder diagnosticsProfile(@Nullable Output diagnosticsProfile) {
            $.diagnosticsProfile = diagnosticsProfile;
            return this;
        }

        /**
         * @param diagnosticsProfile Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
         * 
         * @return builder
         * 
         */
        public Builder diagnosticsProfile(DiagnosticsProfileArgs diagnosticsProfile) {
            return diagnosticsProfile(Output.of(diagnosticsProfile));
        }

        /**
         * @param evictionPolicy 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.
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(@Nullable Output> evictionPolicy) {
            $.evictionPolicy = evictionPolicy;
            return this;
        }

        /**
         * @param evictionPolicy 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.
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(Either evictionPolicy) {
            return evictionPolicy(Output.of(evictionPolicy));
        }

        /**
         * @param evictionPolicy 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.
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(String evictionPolicy) {
            return evictionPolicy(Either.ofLeft(evictionPolicy));
        }

        /**
         * @param evictionPolicy 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.
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(VirtualMachineEvictionPolicyTypes evictionPolicy) {
            return evictionPolicy(Either.ofRight(evictionPolicy));
        }

        /**
         * @param extendedLocation The extended location of the Virtual Machine.
         * 
         * @return builder
         * 
         */
        public Builder extendedLocation(@Nullable Output extendedLocation) {
            $.extendedLocation = extendedLocation;
            return this;
        }

        /**
         * @param extendedLocation The extended location of the Virtual Machine.
         * 
         * @return builder
         * 
         */
        public Builder extendedLocation(ExtendedLocationArgs extendedLocation) {
            return extendedLocation(Output.of(extendedLocation));
        }

        /**
         * @param 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). Minimum api-version: 2020-06-01.
         * 
         * @return builder
         * 
         */
        public Builder extensionsTimeBudget(@Nullable Output extensionsTimeBudget) {
            $.extensionsTimeBudget = extensionsTimeBudget;
            return this;
        }

        /**
         * @param 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). Minimum api-version: 2020-06-01.
         * 
         * @return builder
         * 
         */
        public Builder extensionsTimeBudget(String extensionsTimeBudget) {
            return extensionsTimeBudget(Output.of(extensionsTimeBudget));
        }

        /**
         * @param hardwareProfile Specifies the hardware settings for the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder hardwareProfile(@Nullable Output hardwareProfile) {
            $.hardwareProfile = hardwareProfile;
            return this;
        }

        /**
         * @param hardwareProfile Specifies the hardware settings for the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder hardwareProfile(HardwareProfileArgs hardwareProfile) {
            return hardwareProfile(Output.of(hardwareProfile));
        }

        /**
         * @param host Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.
         * 
         * @return builder
         * 
         */
        public Builder host(@Nullable Output host) {
            $.host = host;
            return this;
        }

        /**
         * @param host Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.
         * 
         * @return builder
         * 
         */
        public Builder host(SubResourceArgs host) {
            return host(Output.of(host));
        }

        /**
         * @param hostGroup 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.
         * 
         * @return builder
         * 
         */
        public Builder hostGroup(@Nullable Output hostGroup) {
            $.hostGroup = hostGroup;
            return this;
        }

        /**
         * @param hostGroup 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.
         * 
         * @return builder
         * 
         */
        public Builder hostGroup(SubResourceArgs hostGroup) {
            return hostGroup(Output.of(hostGroup));
        }

        /**
         * @param identity The identity of the virtual machine, if configured.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity The identity of the virtual machine, if configured.
         * 
         * @return builder
         * 
         */
        public Builder identity(VirtualMachineIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param 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
         * 
         * @return builder
         * 
         */
        public Builder licenseType(@Nullable Output licenseType) {
            $.licenseType = licenseType;
            return this;
        }

        /**
         * @param 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
         * 
         * @return builder
         * 
         */
        public Builder licenseType(String licenseType) {
            return licenseType(Output.of(licenseType));
        }

        /**
         * @param location Resource location
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Resource location
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param networkProfile Specifies the network interfaces of the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder networkProfile(@Nullable Output networkProfile) {
            $.networkProfile = networkProfile;
            return this;
        }

        /**
         * @param networkProfile Specifies the network interfaces of the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder networkProfile(NetworkProfileArgs networkProfile) {
            return networkProfile(Output.of(networkProfile));
        }

        /**
         * @param osProfile Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
         * 
         * @return builder
         * 
         */
        public Builder osProfile(@Nullable Output osProfile) {
            $.osProfile = osProfile;
            return this;
        }

        /**
         * @param osProfile Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
         * 
         * @return builder
         * 
         */
        public Builder osProfile(OSProfileArgs osProfile) {
            return osProfile(Output.of(osProfile));
        }

        /**
         * @param 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**.
         * 
         * @return builder
         * 
         */
        public Builder plan(@Nullable Output plan) {
            $.plan = plan;
            return this;
        }

        /**
         * @param 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**.
         * 
         * @return builder
         * 
         */
        public Builder plan(PlanArgs plan) {
            return plan(Output.of(plan));
        }

        /**
         * @param 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. 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.
         * 
         * @return builder
         * 
         */
        public Builder platformFaultDomain(@Nullable Output platformFaultDomain) {
            $.platformFaultDomain = platformFaultDomain;
            return this;
        }

        /**
         * @param 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. 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.
         * 
         * @return builder
         * 
         */
        public Builder platformFaultDomain(Integer platformFaultDomain) {
            return platformFaultDomain(Output.of(platformFaultDomain));
        }

        /**
         * @param priority Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01
         * 
         * @return builder
         * 
         */
        public Builder priority(@Nullable Output> priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01
         * 
         * @return builder
         * 
         */
        public Builder priority(Either priority) {
            return priority(Output.of(priority));
        }

        /**
         * @param priority Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01
         * 
         * @return builder
         * 
         */
        public Builder priority(String priority) {
            return priority(Either.ofLeft(priority));
        }

        /**
         * @param priority Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01
         * 
         * @return builder
         * 
         */
        public Builder priority(VirtualMachinePriorityTypes priority) {
            return priority(Either.ofRight(priority));
        }

        /**
         * @param proximityPlacementGroup Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.
         * 
         * @return builder
         * 
         */
        public Builder proximityPlacementGroup(@Nullable Output proximityPlacementGroup) {
            $.proximityPlacementGroup = proximityPlacementGroup;
            return this;
        }

        /**
         * @param proximityPlacementGroup Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.
         * 
         * @return builder
         * 
         */
        public Builder proximityPlacementGroup(SubResourceArgs proximityPlacementGroup) {
            return proximityPlacementGroup(Output.of(proximityPlacementGroup));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param scheduledEventsProfile Specifies Scheduled Event related configurations.
         * 
         * @return builder
         * 
         */
        public Builder scheduledEventsProfile(@Nullable Output scheduledEventsProfile) {
            $.scheduledEventsProfile = scheduledEventsProfile;
            return this;
        }

        /**
         * @param scheduledEventsProfile Specifies Scheduled Event related configurations.
         * 
         * @return builder
         * 
         */
        public Builder scheduledEventsProfile(ScheduledEventsProfileArgs scheduledEventsProfile) {
            return scheduledEventsProfile(Output.of(scheduledEventsProfile));
        }

        /**
         * @param securityProfile Specifies the Security related profile settings for the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder securityProfile(@Nullable Output securityProfile) {
            $.securityProfile = securityProfile;
            return this;
        }

        /**
         * @param securityProfile Specifies the Security related profile settings for the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder securityProfile(SecurityProfileArgs securityProfile) {
            return securityProfile(Output.of(securityProfile));
        }

        /**
         * @param storageProfile Specifies the storage settings for the virtual machine disks.
         * 
         * @return builder
         * 
         */
        public Builder storageProfile(@Nullable Output storageProfile) {
            $.storageProfile = storageProfile;
            return this;
        }

        /**
         * @param storageProfile Specifies the storage settings for the virtual machine disks.
         * 
         * @return builder
         * 
         */
        public Builder storageProfile(StorageProfileArgs storageProfile) {
            return storageProfile(Output.of(storageProfile));
        }

        /**
         * @param tags Resource tags
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param userData UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.
         * 
         * @return builder
         * 
         */
        public Builder userData(@Nullable Output userData) {
            $.userData = userData;
            return this;
        }

        /**
         * @param userData UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.
         * 
         * @return builder
         * 
         */
        public Builder userData(String userData) {
            return userData(Output.of(userData));
        }

        /**
         * @param 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. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineScaleSet(@Nullable Output virtualMachineScaleSet) {
            $.virtualMachineScaleSet = virtualMachineScaleSet;
            return this;
        }

        /**
         * @param 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. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineScaleSet(SubResourceArgs virtualMachineScaleSet) {
            return virtualMachineScaleSet(Output.of(virtualMachineScaleSet));
        }

        /**
         * @param vmName The name of the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder vmName(@Nullable Output vmName) {
            $.vmName = vmName;
            return this;
        }

        /**
         * @param vmName The name of the virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder vmName(String vmName) {
            return vmName(Output.of(vmName));
        }

        /**
         * @param zones The virtual machine zones.
         * 
         * @return builder
         * 
         */
        public Builder zones(@Nullable Output> zones) {
            $.zones = zones;
            return this;
        }

        /**
         * @param zones The virtual machine zones.
         * 
         * @return builder
         * 
         */
        public Builder zones(List zones) {
            return zones(Output.of(zones));
        }

        /**
         * @param zones The virtual machine zones.
         * 
         * @return builder
         * 
         */
        public Builder zones(String... zones) {
            return zones(List.of(zones));
        }

        public VirtualMachineArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("VirtualMachineArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy