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

com.microsoft.azure.management.network.LoadBalancingRule Maven / Gradle / Ivy

There is a newer version: 1.41.4
Show newest version
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 */
package com.microsoft.azure.management.network;

import java.util.Collection;

import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.network.implementation.LoadBalancingRuleInner;
import com.microsoft.azure.management.network.model.HasBackendPort;
import com.microsoft.azure.management.network.model.HasFloatingIP;
import com.microsoft.azure.management.network.model.HasFrontend;
import com.microsoft.azure.management.network.model.HasFrontendPort;
import com.microsoft.azure.management.network.model.HasNetworkInterfaces;
import com.microsoft.azure.management.network.model.HasProtocol;
import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource;
import com.microsoft.azure.management.resources.fluentcore.model.Attachable;
import com.microsoft.azure.management.resources.fluentcore.model.Settable;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;

/**
 * A client-side representation of an HTTP load balancing rule.
 */
@Fluent()
public interface LoadBalancingRule extends
    HasInner,
    ChildResource,
    HasBackendPort,
    HasFrontend,
    HasFloatingIP,
    HasProtocol,
    HasFrontendPort {

    /**
     * @return the method of load distribution
     */
    LoadDistribution loadDistribution();

    /**
     * @return the number of minutes before an inactive connection is closed
     */
    int idleTimeoutInMinutes();

    /**
     * @return the backend associated with the load balancing rule
     */
    LoadBalancerBackend backend();

    /**
     * @return the probe associated with the load balancing rule
     */
    LoadBalancerProbe probe();

    /**
     * Grouping of load balancing rule definition stages.
     */
    interface DefinitionStages {
        /**
         * The first stage of the load balancing rule definition.
         * @param  the stage of the parent definition to return to after attaching this definition
         */
        interface Blank extends WithProtocol {
        }

        /**
         * The stage of a load balancing rule definition allowing to specify the transport protocol to apply the rule to.
         * @param  the stage of the parent definition to return to after attaching this definition
         */
        interface WithProtocol extends
            HasProtocol.DefinitionStages.WithProtocol, TransportProtocol> {
        }

        /**
         * The stage of a load balancing rule definition allowing to specify the frontend port to load balance.
         * @param  the stage of the parent definition to return to after attaching this definition
         */
        interface WithFrontendPort extends HasFrontendPort.DefinitionStages.WithFrontendPort> {
        }

        /**
         * The stage of a load balancing rule definition allowing to specify the frontend to associate with the rule.
         * @param  the stage of the parent definition to return to after attaching this definition
         */
        interface WithFrontend extends
            HasFrontend.DefinitionStages.WithFrontend> {
        }

        /**
         * The stage of a load balancing rule definition allowing to specify the probe to associate with the rule.
         * @param  the stage of the parent definition to return to after attaching this definition
         */
        interface WithProbe {
            /**
             * Associates the specified existing HTTP or TCP probe of this load balancer with the load balancing rule.
             * @param name the name of an existing HTTP or TCP probe
             * @return the next stage of the definition
             */
            WithAttach withProbe(String name);
        }

        /** The stage of a load balancing rule definition allowing to specify the backend to associate the rule with.
         * @param  the stage of the parent definition to return to after attaching this definition
         */
        interface WithBackend extends WithVirtualMachine {
            /**
             * Specifies a backend on this load balancer to send network traffic to.
             * 

* If a backend with the specified name does not yet exist on this load balancer, it will be created automatically. * @param backendName the name of a backend * @return the next stage of the definition */ WithBackendPort toBackend(String backendName); } /** * The stage of a load balancing rule definition allowing to select a set of virtual machines to load balance * the network traffic among. * @param the next stage of the definition */ interface WithVirtualMachine { /** * Adds the specified set of virtual machines, assuming they are from the same * availability set, to a new back end address pool to be associated with this load balancing rule. *

* This will add references to the primary IP configurations of the primary network interfaces of * the provided set of virtual machines. *

* If the virtual machines are not in the same availability set, they will not be associated with the backend. *

* Only those virtual machines will be associated with the load balancer that already have an existing * network interface. Virtual machines without a network interface will be skipped. * @param vms existing virtual machines * @return the next stage of the definition */ WithBackendPort toExistingVirtualMachines(HasNetworkInterfaces...vms); /** * Adds the specified set of virtual machines, assuming they are from the same * availability set, to a new back end address pool to be associated with this load balancing rule. *

* This will add references to the primary IP configurations of the primary network interfaces of * the provided set of virtual machines. *

* If the virtual machines are not in the same availability set, they will not be associated with the backend. *

* Only those virtual machines will be associated with the load balancer that already have an existing * network interface. Virtual machines without a network interface will be skipped. * @param vms existing virtual machines * @return the next stage of the definition */ WithBackendPort toExistingVirtualMachines(Collection vms); } /** * The stage of a load balancing rule definition allowing to specify the backend port to send the load-balanced traffic to. * @param the stage of the parent definition to return to after attaching this definition */ interface WithBackendPort extends HasBackendPort.DefinitionStages.WithBackendPort>, WithAttach { } /** * The final stage of the load balancing rule definition. *

* At this stage, any remaining optional settings can be specified, or the load balancing rule definition * can be attached to the parent load balancer definition. * @param the stage of the parent definition to return to after attaching this definition */ interface WithAttach extends Attachable.InDefinition, DefinitionStages.WithFloatingIP, DefinitionStages.WithIdleTimeoutInMinutes, DefinitionStages.WithLoadDistribution, DefinitionStages.WithProbe { } /** * The stage of a load balancing rule definition allowing to enable the floating IP functionality. * @param the stage of the parent definition to return to after attaching this definition */ interface WithFloatingIP extends HasFloatingIP.DefinitionStages.WithFloatingIP> { } /** * The stage of a load balancing rule definition allowing to specify the connection timeout for idle connections. * @param the stage of the parent definition to return to after attaching this definition */ interface WithIdleTimeoutInMinutes { /** * Specifies the number of minutes before an idle connection is closed. * @param minutes the desired number of minutes * @return the next stage of the definition */ WithAttach withIdleTimeoutInMinutes(int minutes); } /** * The stage of a load balancing rule definition allowing to specify the load distribution. * @param the stage of the parent definition to return to after attaching this definition */ interface WithLoadDistribution { /** * Specifies the load distribution mode. * @param loadDistribution a supported load distribution mode * @return the next stage of the definition */ WithAttach withLoadDistribution(LoadDistribution loadDistribution); } } /** The entirety of a load balancing rule definition. * @param the stage of the parent definition to return to after attaching this definition */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, DefinitionStages.WithProtocol, DefinitionStages.WithFrontendPort, DefinitionStages.WithFrontend, DefinitionStages.WithBackend, DefinitionStages.WithBackendPort { } /** * Grouping of load balancing rule update stages. */ interface UpdateStages { /** * The stage of a load balancing rule update allowing to modify the transport protocol the rule applies to. */ interface WithProtocol extends HasProtocol.UpdateStages.WithProtocol { } /** * The stage of a load balancing rule update allowing to modify the frontend port. */ interface WithFrontendPort extends HasFrontendPort.UpdateStages.WithFrontendPort { } /** * The stage of a load balancing rule update allowing to modify the frontend reference. */ interface WithFrontend extends HasFrontend.UpdateStages.WithFrontend { } /** * The stage of a load balancing rule update allowing to modify the backend port. */ interface WithBackendPort extends HasBackendPort.UpdateStages.WithBackendPort { } /** * The stage of a load balancing rule update allowing to enable the floating IP functionality. */ interface WithFloatingIP extends HasFloatingIP.UpdateStages.WithFloatingIP { } /** * The stage of a load balancing rule update allowing to modify the connection timeout for idle connections. */ interface WithIdleTimeoutInMinutes { /** * Specifies the number of minutes before an idle connection is closed. * @param minutes the desired number of minutes * @return the next stage of the update */ Update withIdleTimeoutInMinutes(int minutes); } /** * The stage of a load balancing rule update allowing to specify the probe to associate with the rule. */ interface WithProbe { /** * Associates the specified existing HTTP or TCP probe of this load balancer with the load balancing rule. * @param name the name of an existing HTTP or TCP probe * @return the next stage of the update */ Update withProbe(String name); /** * Removes any association with a probe and falls back to Azure's default probing mechanism. * @return the next stage of the update */ Update withoutProbe(); } /** * The stage of a load balancing rule update allowing to modify the load distribution. */ interface WithLoadDistribution { /** * Specifies the load distribution mode. * @param loadDistribution a supported load distribution mode * @return the next stage of the definition */ Update withLoadDistribution(LoadDistribution loadDistribution); } } /** * The entirety of a load balancing rule update as part of a load balancer update. */ interface Update extends Settable, UpdateStages.WithFrontendPort, UpdateStages.WithFrontend, UpdateStages.WithProtocol, UpdateStages.WithBackendPort, UpdateStages.WithFloatingIP, UpdateStages.WithIdleTimeoutInMinutes, UpdateStages.WithLoadDistribution, UpdateStages.WithProbe { } /** * Grouping of load balancing rule definition stages applicable as part of a load balancer update. */ interface UpdateDefinitionStages { /** * The first stage of the load balancing rule definition. * @param the stage of the parent definition to return to after attaching this definition */ interface Blank extends WithProtocol { } /** * The stage of a load balancing rule definition allowing to specify the transport protocol to apply the rule to. * @param the stage of the parent definition to return to after attaching this definition */ interface WithProtocol extends HasProtocol.UpdateDefinitionStages.WithProtocol, TransportProtocol> { } /** * The stage of a load balancing rule definition allowing to specify the frontend port to load balance. * @param the stage of the parent definition to return to after attaching this definition */ interface WithFrontendPort extends HasFrontendPort.UpdateDefinitionStages.WithFrontendPort> { } /** * The stage of a load balancing rule definition allowing to specify the frontend to associate with the rule. * @param the stage of the parent definition to return to after attaching this definition */ interface WithFrontend extends HasFrontend.UpdateDefinitionStages.WithFrontend> { } /** * The stage of a load balancing rule definition allowing to specify the probe to associate with the rule. * @param the stage of the parent definition to return to after attaching this definition */ interface WithProbe { /** * Associates the specified existing HTTP or TCP probe of this load balancer with the load balancing rule. * @param name the name of an existing HTTP or TCP probe * @return the next stage of the definition */ WithAttach withProbe(String name); } /** The stage of a load balancing rule definition allowing to specify the backend to associate the rule with. * @param the stage of the parent definition to return to after attaching this definition */ interface WithBackend extends WithVirtualMachine { /** * Specifies a backend on this load balancer to send network traffic to. *

* If a backend with the specified name does not yet exist, it will be created automatically. * @param backendName the name of an existing backend * @return the next stage of the definition */ WithBackendPort toBackend(String backendName); } /** * The stage of a load balancing rule definition allowing to select a set of virtual machines to load balance * the network traffic among. * @param the next stage of the definition */ interface WithVirtualMachine { /** * Adds the specified set of virtual machines, assuming they are from the same * availability set, to a new back end address pool to be associated with this load balancing rule. *

* This will add references to the primary IP configurations of the primary network interfaces of * the provided set of virtual machines. *

* If the virtual machines are not in the same availability set, they will not be associated with the backend. *

* Only those virtual machines will be associated with the load balancer that already have an existing * network interface. Virtual machines without a network interface will be skipped. * @param vms existing virtual machines * @return the next stage of the definition */ WithBackendPort toExistingVirtualMachines(HasNetworkInterfaces...vms); /** * Adds the specified set of virtual machines, assuming they are from the same * availability set, to a new back end address pool to be associated with this load balancing rule. *

* This will add references to the primary IP configurations of the primary network interfaces of * the provided set of virtual machines. *

* If the virtual machines are not in the same availability set, they will not be associated with the backend. *

* Only those virtual machines will be associated with the load balancer that already have an existing * network interface. Virtual machines without a network interface will be skipped. * @param vms existing virtual machines * @return the next stage of the definition */ WithBackendPort toExistingVirtualMachines(Collection vms); } /** * The stage of a load balancing rule definition allowing to specify the backend port to send the load-balanced traffic to. * @param the stage of the parent definition to return to after attaching this definition */ interface WithBackendPort extends HasBackendPort.UpdateDefinitionStages.WithBackendPort>, WithAttach { } /** * The stage of a load balancing rule definition allowing to enable the floating IP functionality. * @param the stage of the parent definition to return to after attaching this definition */ interface WithFloatingIP extends HasFloatingIP.UpdateDefinitionStages.WithFloatingIP> { } /** * The stage of a load balancing rule definition allowing to specify the connection timeout for idle connections. * @param the stage of the parent definition to return to after attaching this definition */ interface WithIdleTimeoutInMinutes { /** * Specifies the number of minutes before an idle connection is closed. * @param minutes the desired number of minutes * @return the next stage of the definition */ WithAttach withIdleTimeoutInMinutes(int minutes); } /** * The stage of a load balancing rule definition allowing to specify the load distribution. * @param the stage of the parent definition to return to after attaching this definition */ interface WithLoadDistribution { /** * Specifies the load distribution mode. * @param loadDistribution a supported load distribution mode * @return the next stage of the definition */ WithAttach withLoadDistribution(LoadDistribution loadDistribution); } /** * The final stage of the load balancing rule definition. *

* At this stage, any remaining optional settings can be specified, or the load balancing rule definition * can be attached to the parent load balancer definition. * @param the stage of the parent definition to return to after attaching this definition */ interface WithAttach extends Attachable.InUpdate, UpdateDefinitionStages.WithFloatingIP, UpdateDefinitionStages.WithIdleTimeoutInMinutes, UpdateDefinitionStages.WithLoadDistribution, UpdateDefinitionStages.WithProbe { } } /** The entirety of a load balancing rule definition as part of a load balancer update. * @param the stage of the parent definition to return to after attaching this definition */ interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, UpdateDefinitionStages.WithProtocol, UpdateDefinitionStages.WithFrontendPort, UpdateDefinitionStages.WithFrontend, UpdateDefinitionStages.WithBackend, UpdateDefinitionStages.WithBackendPort { } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy