com.azure.resourcemanager.network.models.LoadBalancerOutboundRule Maven / Gradle / Ivy
Show all versions of azure-resourcemanager-network Show documentation
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.resourcemanager.network.models;
import com.azure.resourcemanager.network.fluent.models.OutboundRuleInner;
import com.azure.resourcemanager.resources.fluentcore.arm.models.ChildResource;
import com.azure.resourcemanager.resources.fluentcore.model.Attachable;
import com.azure.resourcemanager.resources.fluentcore.model.HasInnerModel;
import com.azure.resourcemanager.resources.fluentcore.model.Settable;
import java.util.List;
import java.util.Map;
/** An immutable client-side representation of an outbound rule. */
public interface LoadBalancerOutboundRule
extends HasInnerModel,
HasProtocol,
ChildResource {
/** @return the associated frontends */
Map frontends();
/** @return the associated backend */
LoadBalancerBackend backend();
/** @return the number of outbound ports to be used for NAT */
int allocatedOutboundPorts();
/** @return the provisioning state of the outbound rule resource */
ProvisioningState provisioningState();
/** @return the number of minutes before an idle connection is closed */
int idleTimeoutInMinutes();
/** @return if TCP reset is enabled */
boolean tcpResetEnabled();
/** @return outbound rule protocol */
LoadBalancerOutboundRuleProtocol protocol();
/** Grouping of outbound rule definition stages. */
interface DefinitionStages {
/**
* The first stage of the outbound rule definition.
*
* @param the stage of the parent definition to return to after attaching this definition
*/
interface Blank extends LoadBalancerOutboundRule.DefinitionStages.WithProtocol {
}
/**
* The final stage of the outbound rule definition.
*
* At this stage, any remaining optional settings can be specified, or the outbound 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,
LoadBalancerOutboundRule.DefinitionStages.WithEnableTcpReset,
LoadBalancerOutboundRule.DefinitionStages.WithIdleTimeout {
}
/**
* The stage of an outbound rule definition allowing to specify the transport protocol.
*
* @param the stage of the parent definition to return to after attaching this definition
*/
interface WithProtocol
extends HasProtocol.DefinitionStages.WithProtocol, LoadBalancerOutboundRuleProtocol> {
}
/**
* The stage of an outbound rule definition allowing to specify a backend pool for the rule to apply to.
*
* @param the stage of the parent definition to return to after attaching this definition
*/
interface WithBackend {
/**
* Specifies a backend for outbound rule to apply to
* @param name the backend name
* @return the next stage of the definition
*/
LoadBalancerOutboundRule.DefinitionStages.WithFrontend fromBackend(String name);
}
/**
* The stage of an outbound rule definition allowing to specify the frontend IP address.
*
* @param the stage of the parent definition to return to after attaching this definition
*/
interface WithFrontend {
/**
* Specifies a frontend for outbound rule to apply to
* @param name the frontend name
* @return the next stage of the definition
*/
LoadBalancerOutboundRule.DefinitionStages.WithAttach toFrontend(String name);
/**
* Specifies a list of frontends for outbound rule to apply to
* @param names a list of frontend names
* @return the next stage of the definition
*/
LoadBalancerOutboundRule.DefinitionStages.WithAttach toFrontends(List names);
}
/**
* The stage of an outbound rule definition allowing to specify the idle connection timeout for this outbound
* rule.
*
* @param the stage of the parent definition to return to after attaching this definition
*/
interface WithIdleTimeout {
/**
* Specifies the idle connection timeout in minutes.
*
* @param minutes a number of minutes
* @return the next stage of the definition
*/
LoadBalancerOutboundRule.DefinitionStages.WithAttach withIdleTimeoutInMinutes(int minutes);
}
/**
* The stage of an outbound rule definition allowing to specify the TCP reset enablement for this outbound
* rule.
*
* @param the stage of the parent definition to return to after attaching this definition
*/
interface WithEnableTcpReset {
/**
* Specifies the TCP reset enablement for this outbound rule
* @param enableTcpReset boolean value indicating enable TCP reset or not
* @return the next stage of the definition
*/
LoadBalancerOutboundRule.DefinitionStages.WithAttach withEnableTcpReset(boolean enableTcpReset);
}
}
/**
* The entirety of an outbound rule definition.
*
* @param the stage of the parent definition to return to after attaching this definition
*/
interface Definition
extends LoadBalancerOutboundRule.DefinitionStages.Blank,
LoadBalancerOutboundRule.DefinitionStages.WithProtocol,
LoadBalancerOutboundRule.DefinitionStages.WithBackend,
LoadBalancerOutboundRule.DefinitionStages.WithFrontend,
LoadBalancerOutboundRule.DefinitionStages.WithAttach {
}
/** Grouping of outbound rule update stages. */
interface UpdateStages {
/** The stage of an outbound rule update allowing to specify the backend pool. */
interface WithBackend {
/**
* Specifies the backend pool.
*
* @param name backend pool name
* @return the next stage of the update
*/
Update fromBackend(String name);
}
/** The stage of an outbound rule update allowing to specify a frontend for the rule to apply to. */
interface WithFrontend {
/**
* Specifies the frontend IP Address
* @param name frontend name
* @return the next stage of the update
*/
Update toFrontend(String name);
/**
* Specifies the frontend IP Addresses
* @param names a list of frontend names
* @return the next stage of the update
*/
Update toFrontends(List names);
}
/**
* The stage of an outbound rule update allowing to specify the transport protocol for the rule to apply to.
*/
interface WithProtocol extends HasProtocol.UpdateStages.WithProtocol, LoadBalancerOutboundRuleProtocol> {
}
/**
* The stage of an outbound rule definition allowing to update the TCP reset enablement for this outbound
* rule.
*
*/
interface WithEnableTcpReset {
/**
* Specifies the idle connection timeout in minutes.
*
* @param enableTcpReset the TCP reset enablement boolean
* @return the next stage of the update
*/
Update withEnableTcpReset(boolean enableTcpReset);
}
/**
* The stage of an inbound NAT rule update allowing to specify the idle connection timeout for this inbound NAT
* rule.
*/
interface WithIdleTimeout {
/**
* Specifies the idle connection timeout in minutes.
*
* @param minutes a number of minutes
* @return the next stage of the update
*/
Update withIdleTimeoutInMinutes(int minutes);
}
}
/** The entirety of an inbound NAT rule update as part of a load balancer update. */
interface Update
extends Settable,
LoadBalancerOutboundRule.UpdateStages.WithProtocol,
LoadBalancerOutboundRule.UpdateStages.WithBackend,
LoadBalancerOutboundRule.UpdateStages.WithFrontend,
LoadBalancerOutboundRule.UpdateStages.WithEnableTcpReset,
LoadBalancerOutboundRule.UpdateStages.WithIdleTimeout {
}
}