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

com.pulumi.azurenative.network.inputs.LoadBalancingRuleArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.network.inputs;

import com.pulumi.azurenative.network.enums.LoadDistribution;
import com.pulumi.azurenative.network.enums.TransportProtocol;
import com.pulumi.azurenative.network.inputs.SubResourceArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * A load balancing rule for a load balancer.
 * 
 */
public final class LoadBalancingRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final LoadBalancingRuleArgs Empty = new LoadBalancingRuleArgs();

    /**
     * A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
     * 
     */
    @Import(name="backendAddressPool")
    private @Nullable Output backendAddressPool;

    /**
     * @return A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
     * 
     */
    public Optional> backendAddressPool() {
        return Optional.ofNullable(this.backendAddressPool);
    }

    /**
     * An array of references to pool of DIPs.
     * 
     */
    @Import(name="backendAddressPools")
    private @Nullable Output> backendAddressPools;

    /**
     * @return An array of references to pool of DIPs.
     * 
     */
    public Optional>> backendAddressPools() {
        return Optional.ofNullable(this.backendAddressPools);
    }

    /**
     * The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
     * 
     */
    @Import(name="backendPort")
    private @Nullable Output backendPort;

    /**
     * @return The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
     * 
     */
    public Optional> backendPort() {
        return Optional.ofNullable(this.backendPort);
    }

    /**
     * Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
     * 
     */
    @Import(name="disableOutboundSnat")
    private @Nullable Output disableOutboundSnat;

    /**
     * @return Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
     * 
     */
    public Optional> disableOutboundSnat() {
        return Optional.ofNullable(this.disableOutboundSnat);
    }

    /**
     * Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
     * 
     */
    @Import(name="enableFloatingIP")
    private @Nullable Output enableFloatingIP;

    /**
     * @return Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
     * 
     */
    public Optional> enableFloatingIP() {
        return Optional.ofNullable(this.enableFloatingIP);
    }

    /**
     * Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
     * 
     */
    @Import(name="enableTcpReset")
    private @Nullable Output enableTcpReset;

    /**
     * @return Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
     * 
     */
    public Optional> enableTcpReset() {
        return Optional.ofNullable(this.enableTcpReset);
    }

    /**
     * A reference to frontend IP addresses.
     * 
     */
    @Import(name="frontendIPConfiguration")
    private @Nullable Output frontendIPConfiguration;

    /**
     * @return A reference to frontend IP addresses.
     * 
     */
    public Optional> frontendIPConfiguration() {
        return Optional.ofNullable(this.frontendIPConfiguration);
    }

    /**
     * The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port".
     * 
     */
    @Import(name="frontendPort", required=true)
    private Output frontendPort;

    /**
     * @return The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port".
     * 
     */
    public Output frontendPort() {
        return this.frontendPort;
    }

    /**
     * Resource ID.
     * 
     */
    @Import(name="id")
    private @Nullable Output id;

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

    /**
     * The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
     * 
     */
    @Import(name="idleTimeoutInMinutes")
    private @Nullable Output idleTimeoutInMinutes;

    /**
     * @return The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
     * 
     */
    public Optional> idleTimeoutInMinutes() {
        return Optional.ofNullable(this.idleTimeoutInMinutes);
    }

    /**
     * The load distribution policy for this rule.
     * 
     */
    @Import(name="loadDistribution")
    private @Nullable Output> loadDistribution;

    /**
     * @return The load distribution policy for this rule.
     * 
     */
    public Optional>> loadDistribution() {
        return Optional.ofNullable(this.loadDistribution);
    }

    /**
     * The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The reference to the load balancer probe used by the load balancing rule.
     * 
     */
    @Import(name="probe")
    private @Nullable Output probe;

    /**
     * @return The reference to the load balancer probe used by the load balancing rule.
     * 
     */
    public Optional> probe() {
        return Optional.ofNullable(this.probe);
    }

    /**
     * The reference to the transport protocol used by the load balancing rule.
     * 
     */
    @Import(name="protocol", required=true)
    private Output> protocol;

    /**
     * @return The reference to the transport protocol used by the load balancing rule.
     * 
     */
    public Output> protocol() {
        return this.protocol;
    }

    private LoadBalancingRuleArgs() {}

    private LoadBalancingRuleArgs(LoadBalancingRuleArgs $) {
        this.backendAddressPool = $.backendAddressPool;
        this.backendAddressPools = $.backendAddressPools;
        this.backendPort = $.backendPort;
        this.disableOutboundSnat = $.disableOutboundSnat;
        this.enableFloatingIP = $.enableFloatingIP;
        this.enableTcpReset = $.enableTcpReset;
        this.frontendIPConfiguration = $.frontendIPConfiguration;
        this.frontendPort = $.frontendPort;
        this.id = $.id;
        this.idleTimeoutInMinutes = $.idleTimeoutInMinutes;
        this.loadDistribution = $.loadDistribution;
        this.name = $.name;
        this.probe = $.probe;
        this.protocol = $.protocol;
    }

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

    public static final class Builder {
        private LoadBalancingRuleArgs $;

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

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

        /**
         * @param backendAddressPool A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
         * 
         * @return builder
         * 
         */
        public Builder backendAddressPool(@Nullable Output backendAddressPool) {
            $.backendAddressPool = backendAddressPool;
            return this;
        }

        /**
         * @param backendAddressPool A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
         * 
         * @return builder
         * 
         */
        public Builder backendAddressPool(SubResourceArgs backendAddressPool) {
            return backendAddressPool(Output.of(backendAddressPool));
        }

        /**
         * @param backendAddressPools An array of references to pool of DIPs.
         * 
         * @return builder
         * 
         */
        public Builder backendAddressPools(@Nullable Output> backendAddressPools) {
            $.backendAddressPools = backendAddressPools;
            return this;
        }

        /**
         * @param backendAddressPools An array of references to pool of DIPs.
         * 
         * @return builder
         * 
         */
        public Builder backendAddressPools(List backendAddressPools) {
            return backendAddressPools(Output.of(backendAddressPools));
        }

        /**
         * @param backendAddressPools An array of references to pool of DIPs.
         * 
         * @return builder
         * 
         */
        public Builder backendAddressPools(SubResourceArgs... backendAddressPools) {
            return backendAddressPools(List.of(backendAddressPools));
        }

        /**
         * @param backendPort The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
         * 
         * @return builder
         * 
         */
        public Builder backendPort(@Nullable Output backendPort) {
            $.backendPort = backendPort;
            return this;
        }

        /**
         * @param backendPort The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
         * 
         * @return builder
         * 
         */
        public Builder backendPort(Integer backendPort) {
            return backendPort(Output.of(backendPort));
        }

        /**
         * @param disableOutboundSnat Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
         * 
         * @return builder
         * 
         */
        public Builder disableOutboundSnat(@Nullable Output disableOutboundSnat) {
            $.disableOutboundSnat = disableOutboundSnat;
            return this;
        }

        /**
         * @param disableOutboundSnat Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
         * 
         * @return builder
         * 
         */
        public Builder disableOutboundSnat(Boolean disableOutboundSnat) {
            return disableOutboundSnat(Output.of(disableOutboundSnat));
        }

        /**
         * @param enableFloatingIP Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
         * 
         * @return builder
         * 
         */
        public Builder enableFloatingIP(@Nullable Output enableFloatingIP) {
            $.enableFloatingIP = enableFloatingIP;
            return this;
        }

        /**
         * @param enableFloatingIP Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
         * 
         * @return builder
         * 
         */
        public Builder enableFloatingIP(Boolean enableFloatingIP) {
            return enableFloatingIP(Output.of(enableFloatingIP));
        }

        /**
         * @param enableTcpReset Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
         * 
         * @return builder
         * 
         */
        public Builder enableTcpReset(@Nullable Output enableTcpReset) {
            $.enableTcpReset = enableTcpReset;
            return this;
        }

        /**
         * @param enableTcpReset Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
         * 
         * @return builder
         * 
         */
        public Builder enableTcpReset(Boolean enableTcpReset) {
            return enableTcpReset(Output.of(enableTcpReset));
        }

        /**
         * @param frontendIPConfiguration A reference to frontend IP addresses.
         * 
         * @return builder
         * 
         */
        public Builder frontendIPConfiguration(@Nullable Output frontendIPConfiguration) {
            $.frontendIPConfiguration = frontendIPConfiguration;
            return this;
        }

        /**
         * @param frontendIPConfiguration A reference to frontend IP addresses.
         * 
         * @return builder
         * 
         */
        public Builder frontendIPConfiguration(SubResourceArgs frontendIPConfiguration) {
            return frontendIPConfiguration(Output.of(frontendIPConfiguration));
        }

        /**
         * @param frontendPort The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port".
         * 
         * @return builder
         * 
         */
        public Builder frontendPort(Output frontendPort) {
            $.frontendPort = frontendPort;
            return this;
        }

        /**
         * @param frontendPort The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port".
         * 
         * @return builder
         * 
         */
        public Builder frontendPort(Integer frontendPort) {
            return frontendPort(Output.of(frontendPort));
        }

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

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

        /**
         * @param idleTimeoutInMinutes The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
         * 
         * @return builder
         * 
         */
        public Builder idleTimeoutInMinutes(@Nullable Output idleTimeoutInMinutes) {
            $.idleTimeoutInMinutes = idleTimeoutInMinutes;
            return this;
        }

        /**
         * @param idleTimeoutInMinutes The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
         * 
         * @return builder
         * 
         */
        public Builder idleTimeoutInMinutes(Integer idleTimeoutInMinutes) {
            return idleTimeoutInMinutes(Output.of(idleTimeoutInMinutes));
        }

        /**
         * @param loadDistribution The load distribution policy for this rule.
         * 
         * @return builder
         * 
         */
        public Builder loadDistribution(@Nullable Output> loadDistribution) {
            $.loadDistribution = loadDistribution;
            return this;
        }

        /**
         * @param loadDistribution The load distribution policy for this rule.
         * 
         * @return builder
         * 
         */
        public Builder loadDistribution(Either loadDistribution) {
            return loadDistribution(Output.of(loadDistribution));
        }

        /**
         * @param loadDistribution The load distribution policy for this rule.
         * 
         * @return builder
         * 
         */
        public Builder loadDistribution(String loadDistribution) {
            return loadDistribution(Either.ofLeft(loadDistribution));
        }

        /**
         * @param loadDistribution The load distribution policy for this rule.
         * 
         * @return builder
         * 
         */
        public Builder loadDistribution(LoadDistribution loadDistribution) {
            return loadDistribution(Either.ofRight(loadDistribution));
        }

        /**
         * @param name The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param probe The reference to the load balancer probe used by the load balancing rule.
         * 
         * @return builder
         * 
         */
        public Builder probe(@Nullable Output probe) {
            $.probe = probe;
            return this;
        }

        /**
         * @param probe The reference to the load balancer probe used by the load balancing rule.
         * 
         * @return builder
         * 
         */
        public Builder probe(SubResourceArgs probe) {
            return probe(Output.of(probe));
        }

        /**
         * @param protocol The reference to the transport protocol used by the load balancing rule.
         * 
         * @return builder
         * 
         */
        public Builder protocol(Output> protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol The reference to the transport protocol used by the load balancing rule.
         * 
         * @return builder
         * 
         */
        public Builder protocol(Either protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param protocol The reference to the transport protocol used by the load balancing rule.
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Either.ofLeft(protocol));
        }

        /**
         * @param protocol The reference to the transport protocol used by the load balancing rule.
         * 
         * @return builder
         * 
         */
        public Builder protocol(TransportProtocol protocol) {
            return protocol(Either.ofRight(protocol));
        }

        public LoadBalancingRuleArgs build() {
            if ($.frontendPort == null) {
                throw new MissingRequiredPropertyException("LoadBalancingRuleArgs", "frontendPort");
            }
            if ($.protocol == null) {
                throw new MissingRequiredPropertyException("LoadBalancingRuleArgs", "protocol");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy