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

com.pulumi.azure.devtest.WindowsVirtualMachineArgs Maven / Gradle / Ivy

// *** 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.azure.devtest;

import com.pulumi.azure.devtest.inputs.WindowsVirtualMachineGalleryImageReferenceArgs;
import com.pulumi.azure.devtest.inputs.WindowsVirtualMachineInboundNatRuleArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
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 WindowsVirtualMachineArgs extends com.pulumi.resources.ResourceArgs {

    public static final WindowsVirtualMachineArgs Empty = new WindowsVirtualMachineArgs();

    /**
     * Can this Virtual Machine be claimed by users? Defaults to `true`.
     * 
     */
    @Import(name="allowClaim")
    private @Nullable Output allowClaim;

    /**
     * @return Can this Virtual Machine be claimed by users? Defaults to `true`.
     * 
     */
    public Optional> allowClaim() {
        return Optional.ofNullable(this.allowClaim);
    }

    /**
     * Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
     * 
     */
    @Import(name="disallowPublicIpAddress")
    private @Nullable Output disallowPublicIpAddress;

    /**
     * @return Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
     * 
     */
    public Optional> disallowPublicIpAddress() {
        return Optional.ofNullable(this.disallowPublicIpAddress);
    }

    /**
     * A `gallery_image_reference` block as defined below.
     * 
     */
    @Import(name="galleryImageReference", required=true)
    private Output galleryImageReference;

    /**
     * @return A `gallery_image_reference` block as defined below.
     * 
     */
    public Output galleryImageReference() {
        return this.galleryImageReference;
    }

    /**
     * One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     * 
     */
    @Import(name="inboundNatRules")
    private @Nullable Output> inboundNatRules;

    /**
     * @return One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     * 
     */
    public Optional>> inboundNatRules() {
        return Optional.ofNullable(this.inboundNatRules);
    }

    /**
     * Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="labName", required=true)
    private Output labName;

    /**
     * @return Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output labName() {
        return this.labName;
    }

    /**
     * The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="labSubnetName", required=true)
    private Output labSubnetName;

    /**
     * @return The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
     * 
     */
    public Output labSubnetName() {
        return this.labSubnetName;
    }

    /**
     * The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="labVirtualNetworkId", required=true)
    private Output labVirtualNetworkId;

    /**
     * @return The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output labVirtualNetworkId() {
        return this.labVirtualNetworkId;
    }

    /**
     * Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Any notes about the Virtual Machine.
     * 
     */
    @Import(name="notes")
    private @Nullable Output notes;

    /**
     * @return Any notes about the Virtual Machine.
     * 
     */
    public Optional> notes() {
        return Optional.ofNullable(this.notes);
    }

    /**
     * The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="password", required=true)
    private Output password;

    /**
     * @return The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    public Output password() {
        return this.password;
    }

    /**
     * The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="size", required=true)
    private Output size;

    /**
     * @return The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
     * 
     */
    public Output size() {
        return this.size;
    }

    /**
     * The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="storageType", required=true)
    private Output storageType;

    /**
     * @return The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
     * 
     */
    public Output storageType() {
        return this.storageType;
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="username", required=true)
    private Output username;

    /**
     * @return The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    public Output username() {
        return this.username;
    }

    private WindowsVirtualMachineArgs() {}

    private WindowsVirtualMachineArgs(WindowsVirtualMachineArgs $) {
        this.allowClaim = $.allowClaim;
        this.disallowPublicIpAddress = $.disallowPublicIpAddress;
        this.galleryImageReference = $.galleryImageReference;
        this.inboundNatRules = $.inboundNatRules;
        this.labName = $.labName;
        this.labSubnetName = $.labSubnetName;
        this.labVirtualNetworkId = $.labVirtualNetworkId;
        this.location = $.location;
        this.name = $.name;
        this.notes = $.notes;
        this.password = $.password;
        this.resourceGroupName = $.resourceGroupName;
        this.size = $.size;
        this.storageType = $.storageType;
        this.tags = $.tags;
        this.username = $.username;
    }

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

    public static final class Builder {
        private WindowsVirtualMachineArgs $;

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

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

        /**
         * @param allowClaim Can this Virtual Machine be claimed by users? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder allowClaim(@Nullable Output allowClaim) {
            $.allowClaim = allowClaim;
            return this;
        }

        /**
         * @param allowClaim Can this Virtual Machine be claimed by users? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder allowClaim(Boolean allowClaim) {
            return allowClaim(Output.of(allowClaim));
        }

        /**
         * @param disallowPublicIpAddress Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder disallowPublicIpAddress(@Nullable Output disallowPublicIpAddress) {
            $.disallowPublicIpAddress = disallowPublicIpAddress;
            return this;
        }

        /**
         * @param disallowPublicIpAddress Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder disallowPublicIpAddress(Boolean disallowPublicIpAddress) {
            return disallowPublicIpAddress(Output.of(disallowPublicIpAddress));
        }

        /**
         * @param galleryImageReference A `gallery_image_reference` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder galleryImageReference(Output galleryImageReference) {
            $.galleryImageReference = galleryImageReference;
            return this;
        }

        /**
         * @param galleryImageReference A `gallery_image_reference` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder galleryImageReference(WindowsVirtualMachineGalleryImageReferenceArgs galleryImageReference) {
            return galleryImageReference(Output.of(galleryImageReference));
        }

        /**
         * @param inboundNatRules One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder inboundNatRules(@Nullable Output> inboundNatRules) {
            $.inboundNatRules = inboundNatRules;
            return this;
        }

        /**
         * @param inboundNatRules One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder inboundNatRules(List inboundNatRules) {
            return inboundNatRules(Output.of(inboundNatRules));
        }

        /**
         * @param inboundNatRules One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder inboundNatRules(WindowsVirtualMachineInboundNatRuleArgs... inboundNatRules) {
            return inboundNatRules(List.of(inboundNatRules));
        }

        /**
         * @param labName Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labName(Output labName) {
            $.labName = labName;
            return this;
        }

        /**
         * @param labName Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labName(String labName) {
            return labName(Output.of(labName));
        }

        /**
         * @param labSubnetName The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labSubnetName(Output labSubnetName) {
            $.labSubnetName = labSubnetName;
            return this;
        }

        /**
         * @param labSubnetName The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labSubnetName(String labSubnetName) {
            return labSubnetName(Output.of(labSubnetName));
        }

        /**
         * @param labVirtualNetworkId The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labVirtualNetworkId(Output labVirtualNetworkId) {
            $.labVirtualNetworkId = labVirtualNetworkId;
            return this;
        }

        /**
         * @param labVirtualNetworkId The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labVirtualNetworkId(String labVirtualNetworkId) {
            return labVirtualNetworkId(Output.of(labVirtualNetworkId));
        }

        /**
         * @param location Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param notes Any notes about the Virtual Machine.
         * 
         * @return builder
         * 
         */
        public Builder notes(@Nullable Output notes) {
            $.notes = notes;
            return this;
        }

        /**
         * @param notes Any notes about the Virtual Machine.
         * 
         * @return builder
         * 
         */
        public Builder notes(String notes) {
            return notes(Output.of(notes));
        }

        /**
         * @param password The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder password(Output password) {
            $.password = password;
            return this;
        }

        /**
         * @param password The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder password(String password) {
            return password(Output.of(password));
        }

        /**
         * @param resourceGroupName The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param size The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder size(Output size) {
            $.size = size;
            return this;
        }

        /**
         * @param size The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder size(String size) {
            return size(Output.of(size));
        }

        /**
         * @param storageType The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder storageType(Output storageType) {
            $.storageType = storageType;
            return this;
        }

        /**
         * @param storageType The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder storageType(String storageType) {
            return storageType(Output.of(storageType));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param username The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder username(Output username) {
            $.username = username;
            return this;
        }

        /**
         * @param username The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder username(String username) {
            return username(Output.of(username));
        }

        public WindowsVirtualMachineArgs build() {
            if ($.galleryImageReference == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "galleryImageReference");
            }
            if ($.labName == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "labName");
            }
            if ($.labSubnetName == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "labSubnetName");
            }
            if ($.labVirtualNetworkId == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "labVirtualNetworkId");
            }
            if ($.password == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "password");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "resourceGroupName");
            }
            if ($.size == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "size");
            }
            if ($.storageType == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "storageType");
            }
            if ($.username == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "username");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy