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

com.pulumi.azurenative.networkcloud.inputs.NetworkAttachmentArgs 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.networkcloud.inputs;

import com.pulumi.azurenative.networkcloud.enums.DefaultGateway;
import com.pulumi.azurenative.networkcloud.enums.VirtualMachineIPAllocationMethod;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final NetworkAttachmentArgs Empty = new NetworkAttachmentArgs();

    /**
     * The resource ID of the associated network attached to the virtual machine.
     * It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources.
     * 
     */
    @Import(name="attachedNetworkId", required=true)
    private Output attachedNetworkId;

    /**
     * @return The resource ID of the associated network attached to the virtual machine.
     * It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources.
     * 
     */
    public Output attachedNetworkId() {
        return this.attachedNetworkId;
    }

    /**
     * The indicator of whether this is the default gateway.
     * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.
     * 
     */
    @Import(name="defaultGateway")
    private @Nullable Output> defaultGateway;

    /**
     * @return The indicator of whether this is the default gateway.
     * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.
     * 
     */
    public Optional>> defaultGateway() {
        return Optional.ofNullable(this.defaultGateway);
    }

    /**
     * The IP allocation mechanism for the virtual machine.
     * Dynamic and Static are only valid for l3Network which may also specify Disabled.
     * Otherwise, Disabled is the only permitted value.
     * 
     */
    @Import(name="ipAllocationMethod", required=true)
    private Output> ipAllocationMethod;

    /**
     * @return The IP allocation mechanism for the virtual machine.
     * Dynamic and Static are only valid for l3Network which may also specify Disabled.
     * Otherwise, Disabled is the only permitted value.
     * 
     */
    public Output> ipAllocationMethod() {
        return this.ipAllocationMethod;
    }

    /**
     * The IPv4 address of the virtual machine.
     * 
     * This field is used only if the attached network has IPAllocationType of IPV4 or DualStack.
     * 
     * If IPAllocationMethod is:
     * Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached network.
     * Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the attached network.
     * Disabled - this field will be empty.
     * 
     */
    @Import(name="ipv4Address")
    private @Nullable Output ipv4Address;

    /**
     * @return The IPv4 address of the virtual machine.
     * 
     * This field is used only if the attached network has IPAllocationType of IPV4 or DualStack.
     * 
     * If IPAllocationMethod is:
     * Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached network.
     * Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the attached network.
     * Disabled - this field will be empty.
     * 
     */
    public Optional> ipv4Address() {
        return Optional.ofNullable(this.ipv4Address);
    }

    /**
     * The IPv6 address of the virtual machine.
     * 
     * This field is used only if the attached network has IPAllocationType of IPV6 or DualStack.
     * 
     * If IPAllocationMethod is:
     * Static - this field must contain an IPv6 address range from within the range specified in the attached network.
     * Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the attached network.
     * Disabled - this field will be empty.
     * 
     */
    @Import(name="ipv6Address")
    private @Nullable Output ipv6Address;

    /**
     * @return The IPv6 address of the virtual machine.
     * 
     * This field is used only if the attached network has IPAllocationType of IPV6 or DualStack.
     * 
     * If IPAllocationMethod is:
     * Static - this field must contain an IPv6 address range from within the range specified in the attached network.
     * Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the attached network.
     * Disabled - this field will be empty.
     * 
     */
    public Optional> ipv6Address() {
        return Optional.ofNullable(this.ipv6Address);
    }

    /**
     * The associated network's interface name.
     * If specified, the network attachment name has a maximum length of 15 characters and must be unique to this virtual machine.
     * If the user doesn’t specify this value, the default interface name of the network resource will be used.
     * For a CloudServicesNetwork resource, this name will be ignored.
     * 
     */
    @Import(name="networkAttachmentName")
    private @Nullable Output networkAttachmentName;

    /**
     * @return The associated network's interface name.
     * If specified, the network attachment name has a maximum length of 15 characters and must be unique to this virtual machine.
     * If the user doesn’t specify this value, the default interface name of the network resource will be used.
     * For a CloudServicesNetwork resource, this name will be ignored.
     * 
     */
    public Optional> networkAttachmentName() {
        return Optional.ofNullable(this.networkAttachmentName);
    }

    private NetworkAttachmentArgs() {}

    private NetworkAttachmentArgs(NetworkAttachmentArgs $) {
        this.attachedNetworkId = $.attachedNetworkId;
        this.defaultGateway = $.defaultGateway;
        this.ipAllocationMethod = $.ipAllocationMethod;
        this.ipv4Address = $.ipv4Address;
        this.ipv6Address = $.ipv6Address;
        this.networkAttachmentName = $.networkAttachmentName;
    }

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

    public static final class Builder {
        private NetworkAttachmentArgs $;

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

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

        /**
         * @param attachedNetworkId The resource ID of the associated network attached to the virtual machine.
         * It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources.
         * 
         * @return builder
         * 
         */
        public Builder attachedNetworkId(Output attachedNetworkId) {
            $.attachedNetworkId = attachedNetworkId;
            return this;
        }

        /**
         * @param attachedNetworkId The resource ID of the associated network attached to the virtual machine.
         * It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources.
         * 
         * @return builder
         * 
         */
        public Builder attachedNetworkId(String attachedNetworkId) {
            return attachedNetworkId(Output.of(attachedNetworkId));
        }

        /**
         * @param defaultGateway The indicator of whether this is the default gateway.
         * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.
         * 
         * @return builder
         * 
         */
        public Builder defaultGateway(@Nullable Output> defaultGateway) {
            $.defaultGateway = defaultGateway;
            return this;
        }

        /**
         * @param defaultGateway The indicator of whether this is the default gateway.
         * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.
         * 
         * @return builder
         * 
         */
        public Builder defaultGateway(Either defaultGateway) {
            return defaultGateway(Output.of(defaultGateway));
        }

        /**
         * @param defaultGateway The indicator of whether this is the default gateway.
         * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.
         * 
         * @return builder
         * 
         */
        public Builder defaultGateway(String defaultGateway) {
            return defaultGateway(Either.ofLeft(defaultGateway));
        }

        /**
         * @param defaultGateway The indicator of whether this is the default gateway.
         * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.
         * 
         * @return builder
         * 
         */
        public Builder defaultGateway(DefaultGateway defaultGateway) {
            return defaultGateway(Either.ofRight(defaultGateway));
        }

        /**
         * @param ipAllocationMethod The IP allocation mechanism for the virtual machine.
         * Dynamic and Static are only valid for l3Network which may also specify Disabled.
         * Otherwise, Disabled is the only permitted value.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocationMethod(Output> ipAllocationMethod) {
            $.ipAllocationMethod = ipAllocationMethod;
            return this;
        }

        /**
         * @param ipAllocationMethod The IP allocation mechanism for the virtual machine.
         * Dynamic and Static are only valid for l3Network which may also specify Disabled.
         * Otherwise, Disabled is the only permitted value.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocationMethod(Either ipAllocationMethod) {
            return ipAllocationMethod(Output.of(ipAllocationMethod));
        }

        /**
         * @param ipAllocationMethod The IP allocation mechanism for the virtual machine.
         * Dynamic and Static are only valid for l3Network which may also specify Disabled.
         * Otherwise, Disabled is the only permitted value.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocationMethod(String ipAllocationMethod) {
            return ipAllocationMethod(Either.ofLeft(ipAllocationMethod));
        }

        /**
         * @param ipAllocationMethod The IP allocation mechanism for the virtual machine.
         * Dynamic and Static are only valid for l3Network which may also specify Disabled.
         * Otherwise, Disabled is the only permitted value.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocationMethod(VirtualMachineIPAllocationMethod ipAllocationMethod) {
            return ipAllocationMethod(Either.ofRight(ipAllocationMethod));
        }

        /**
         * @param ipv4Address The IPv4 address of the virtual machine.
         * 
         * This field is used only if the attached network has IPAllocationType of IPV4 or DualStack.
         * 
         * If IPAllocationMethod is:
         * Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached network.
         * Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the attached network.
         * Disabled - this field will be empty.
         * 
         * @return builder
         * 
         */
        public Builder ipv4Address(@Nullable Output ipv4Address) {
            $.ipv4Address = ipv4Address;
            return this;
        }

        /**
         * @param ipv4Address The IPv4 address of the virtual machine.
         * 
         * This field is used only if the attached network has IPAllocationType of IPV4 or DualStack.
         * 
         * If IPAllocationMethod is:
         * Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached network.
         * Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the attached network.
         * Disabled - this field will be empty.
         * 
         * @return builder
         * 
         */
        public Builder ipv4Address(String ipv4Address) {
            return ipv4Address(Output.of(ipv4Address));
        }

        /**
         * @param ipv6Address The IPv6 address of the virtual machine.
         * 
         * This field is used only if the attached network has IPAllocationType of IPV6 or DualStack.
         * 
         * If IPAllocationMethod is:
         * Static - this field must contain an IPv6 address range from within the range specified in the attached network.
         * Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the attached network.
         * Disabled - this field will be empty.
         * 
         * @return builder
         * 
         */
        public Builder ipv6Address(@Nullable Output ipv6Address) {
            $.ipv6Address = ipv6Address;
            return this;
        }

        /**
         * @param ipv6Address The IPv6 address of the virtual machine.
         * 
         * This field is used only if the attached network has IPAllocationType of IPV6 or DualStack.
         * 
         * If IPAllocationMethod is:
         * Static - this field must contain an IPv6 address range from within the range specified in the attached network.
         * Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the attached network.
         * Disabled - this field will be empty.
         * 
         * @return builder
         * 
         */
        public Builder ipv6Address(String ipv6Address) {
            return ipv6Address(Output.of(ipv6Address));
        }

        /**
         * @param networkAttachmentName The associated network's interface name.
         * If specified, the network attachment name has a maximum length of 15 characters and must be unique to this virtual machine.
         * If the user doesn’t specify this value, the default interface name of the network resource will be used.
         * For a CloudServicesNetwork resource, this name will be ignored.
         * 
         * @return builder
         * 
         */
        public Builder networkAttachmentName(@Nullable Output networkAttachmentName) {
            $.networkAttachmentName = networkAttachmentName;
            return this;
        }

        /**
         * @param networkAttachmentName The associated network's interface name.
         * If specified, the network attachment name has a maximum length of 15 characters and must be unique to this virtual machine.
         * If the user doesn’t specify this value, the default interface name of the network resource will be used.
         * For a CloudServicesNetwork resource, this name will be ignored.
         * 
         * @return builder
         * 
         */
        public Builder networkAttachmentName(String networkAttachmentName) {
            return networkAttachmentName(Output.of(networkAttachmentName));
        }

        public NetworkAttachmentArgs build() {
            if ($.attachedNetworkId == null) {
                throw new MissingRequiredPropertyException("NetworkAttachmentArgs", "attachedNetworkId");
            }
            if ($.ipAllocationMethod == null) {
                throw new MissingRequiredPropertyException("NetworkAttachmentArgs", "ipAllocationMethod");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy