Package com.vmware.nsx_policy.model
Class LBRule
- java.lang.Object
-
- com.vmware.nsx_policy.model.LBRule
-
- All Implemented Interfaces:
com.vmware.vapi.bindings.StaticStructure,com.vmware.vapi.bindings.Structure,java.io.Serializable
public final class LBRule extends java.lang.Object implements java.io.Serializable, com.vmware.vapi.bindings.StaticStructureBinding of a LBPool and Group to a LBVirtualServer used to route application traffic passing through load balancers. LBRule uses match conditions to match application traffic passing through a LBVirtualServer using HTTP or HTTPS. Can bind multiple LBVirtualServers to a Group. Each LBRule consists of two optional match conditions, each match contidion defines a criterion for application traffic. If no match conditions are specified, then the LBRule will always match and it is used typically to define default rules. If more than one match condition is specified, then matching strategy determines if all conditions should match or any one condition should match for the LBRule to be considered a match. A match indicates that the LBVirtualServer should route the request to the Group (parent of LBRule). LBRule is deprecated as NSX-T Load Balancer is deprecated.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLBRule.BuilderBuilder class forLBRule.
-
Field Summary
Fields Modifier and Type Field Description protected com.vmware.vapi.data.StructValue__dynamicStructureFieldsstatic java.lang.StringMATCH_STRATEGY_ALLstatic java.lang.StringMATCH_STRATEGY_ANYstatic java.lang.StringPHASE_HTTP_ACCESSstatic java.lang.StringPHASE_HTTP_FORWARDINGstatic java.lang.StringPHASE_HTTP_REQUEST_REWRITEstatic java.lang.StringPHASE_HTTP_RESPONSE_REWRITEstatic java.lang.StringPHASE_TRANSPORT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends com.vmware.vapi.bindings.Structure>
T_convertTo(java.lang.Class<T> clazz)java.lang.String_getCanonicalName()static java.lang.String_getCanonicalTypeName()Returns the canonical type name.static com.vmware.vapi.bindings.type.StructType_getClassType()WARNING: Internal method, subject to change in future versions.com.vmware.vapi.data.StructValue_getDataValue()com.vmware.vapi.data.DataValue_getDynamicField(java.lang.String fieldName)java.util.Set<java.lang.String>_getDynamicFieldNames()com.vmware.vapi.bindings.type.StructType_getType()boolean_hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)static LBRule_newInstance(com.vmware.vapi.data.StructValue structValue)WARNING: Internal method, subject to change in future versions.
Returns new instance of this binding class and injects the provided data value.
WARNING: The returned object is not fully initialized.static LBRule_newInstance2(com.vmware.vapi.data.StructValue structValue)WARNING: Internal method, subject to change in future versions.
Serves as a versioning mechanism.void_setDynamicField(java.lang.String fieldName, com.vmware.vapi.data.DataValue fieldValue)protected void_updateDataValue(com.vmware.vapi.data.StructValue structValue)void_validate()booleanequals(java.lang.Object obj)java.util.List<com.vmware.vapi.bindings.Structure>getActions()A list of actions to be executed at specified phase when load balancer rule matches.java.lang.StringgetDisplayName()A display name useful for identifying an LBRule.java.util.List<com.vmware.vapi.bindings.Structure>getMatchConditions()A list of match conditions used to match application traffic.java.lang.StringgetMatchStrategy()Possible values are:MATCH_STRATEGY_ALLMATCH_STRATEGY_ANYIf more than one match condition is specified, then matching strategy determines if all conditions should match or any one condition should match for the LB Rule to be considered a match.java.lang.StringgetPhase()Possible values are:PHASE_HTTP_REQUEST_REWRITEPHASE_HTTP_FORWARDINGPHASE_HTTP_RESPONSE_REWRITEPHASE_HTTP_ACCESSPHASE_TRANSPORTEach load balancer rule is used at a specific phase of load balancer processing.inthashCode()voidsetActions(java.util.List<com.vmware.vapi.bindings.Structure> actions)A list of actions to be executed at specified phase when load balancer rule matches.voidsetDisplayName(java.lang.String displayName)A display name useful for identifying an LBRule.voidsetMatchConditions(java.util.List<com.vmware.vapi.bindings.Structure> matchConditions)A list of match conditions used to match application traffic.voidsetMatchStrategy(java.lang.String matchStrategy)Possible values are:MATCH_STRATEGY_ALLMATCH_STRATEGY_ANYIf more than one match condition is specified, then matching strategy determines if all conditions should match or any one condition should match for the LB Rule to be considered a match.voidsetPhase(java.lang.String phase)Possible values are:PHASE_HTTP_REQUEST_REWRITEPHASE_HTTP_FORWARDINGPHASE_HTTP_RESPONSE_REWRITEPHASE_HTTP_ACCESSPHASE_TRANSPORTEach load balancer rule is used at a specific phase of load balancer processing.java.lang.StringtoString()
-
-
-
Field Detail
-
MATCH_STRATEGY_ALL
public static final java.lang.String MATCH_STRATEGY_ALL
- See Also:
- Constant Field Values
-
MATCH_STRATEGY_ANY
public static final java.lang.String MATCH_STRATEGY_ANY
- See Also:
- Constant Field Values
-
PHASE_HTTP_REQUEST_REWRITE
public static final java.lang.String PHASE_HTTP_REQUEST_REWRITE
- See Also:
- Constant Field Values
-
PHASE_HTTP_FORWARDING
public static final java.lang.String PHASE_HTTP_FORWARDING
- See Also:
- Constant Field Values
-
PHASE_HTTP_RESPONSE_REWRITE
public static final java.lang.String PHASE_HTTP_RESPONSE_REWRITE
- See Also:
- Constant Field Values
-
PHASE_HTTP_ACCESS
public static final java.lang.String PHASE_HTTP_ACCESS
- See Also:
- Constant Field Values
-
PHASE_TRANSPORT
public static final java.lang.String PHASE_TRANSPORT
- See Also:
- Constant Field Values
-
__dynamicStructureFields
protected com.vmware.vapi.data.StructValue __dynamicStructureFields
-
-
Method Detail
-
getActions
public java.util.List<com.vmware.vapi.bindings.Structure> getActions()
A list of actions to be executed at specified phase when load balancer rule matches. The actions are used to manipulate application traffic, such as rewrite URI of HTTP messages, redirect HTTP messages, etc.- Returns:
- The current value of the property.
When clients pass a value of this class as a parameter, the property must
contain all the properties defined in
LBRuleAction. When methods return a value of this class as a return value, the property will contain all the properties defined inLBRuleAction.
-
setActions
public void setActions(java.util.List<com.vmware.vapi.bindings.Structure> actions)
A list of actions to be executed at specified phase when load balancer rule matches. The actions are used to manipulate application traffic, such as rewrite URI of HTTP messages, redirect HTTP messages, etc.- Parameters:
actions- New value for the property. When clients pass a value of this class as a parameter, the property must contain all the properties defined inLBRuleAction. When methods return a value of this class as a return value, the property will contain all the properties defined inLBRuleAction.
-
getDisplayName
public java.lang.String getDisplayName()
A display name useful for identifying an LBRule.- Returns:
- The current value of the property.
-
setDisplayName
public void setDisplayName(java.lang.String displayName)
A display name useful for identifying an LBRule.- Parameters:
displayName- New value for the property.
-
getMatchConditions
public java.util.List<com.vmware.vapi.bindings.Structure> getMatchConditions()
A list of match conditions used to match application traffic. Multiple match conditions can be specified in one load balancer rule, each match condition defines a criterion to match application traffic. If no match conditions are specified, then the load balancer rule will always match and it is used typically to define default rules. If more than one match condition is specified, then match strategy determines if all conditions should match or any one condition should match for the load balancer rule to considered a match.- Returns:
- The current value of the property.
When clients pass a value of this class as a parameter, the property must
contain all the properties defined in
LBRuleCondition. When methods return a value of this class as a return value, the property will contain all the properties defined inLBRuleCondition.
-
setMatchConditions
public void setMatchConditions(java.util.List<com.vmware.vapi.bindings.Structure> matchConditions)
A list of match conditions used to match application traffic. Multiple match conditions can be specified in one load balancer rule, each match condition defines a criterion to match application traffic. If no match conditions are specified, then the load balancer rule will always match and it is used typically to define default rules. If more than one match condition is specified, then match strategy determines if all conditions should match or any one condition should match for the load balancer rule to considered a match.- Parameters:
matchConditions- New value for the property. When clients pass a value of this class as a parameter, the property must contain all the properties defined inLBRuleCondition. When methods return a value of this class as a return value, the property will contain all the properties defined inLBRuleCondition.
-
getMatchStrategy
public java.lang.String getMatchStrategy()
Possible values are: If more than one match condition is specified, then matching strategy determines if all conditions should match or any one condition should match for the LB Rule to be considered a match. - ALL indicates that both host_match and path_match must match for this LBRule to be considered a match. - ANY indicates that either host_match or patch match may match for this LBRule to be considered a match.- Returns:
- The current value of the property.
-
setMatchStrategy
public void setMatchStrategy(java.lang.String matchStrategy)
Possible values are: If more than one match condition is specified, then matching strategy determines if all conditions should match or any one condition should match for the LB Rule to be considered a match. - ALL indicates that both host_match and path_match must match for this LBRule to be considered a match. - ANY indicates that either host_match or patch match may match for this LBRule to be considered a match.- Parameters:
matchStrategy- New value for the property.
-
getPhase
public java.lang.String getPhase()
Possible values are: Each load balancer rule is used at a specific phase of load balancer processing. Currently five phases are supported, HTTP_REQUEST_REWRITE, HTTP_FORWARDING, HTTP_RESPONSE_REWRITE, HTTP_ACCESS and TRANSPORT. When an HTTP request message is received by load balancer, all HTTP_REQUEST_REWRITE rules, if present are executed in the order they are applied to virtual server. And then if HTTP_FORWARDING rules present, only first matching rule's action is executed, remaining rules are not checked. HTTP_FORWARDING rules can have only one action. If the request is forwarded to a backend server and the response goes back to load balancer, all HTTP_RESPONSE_REWRITE rules, if present, are executed in the order they are applied to the virtual server. In HTTP_ACCESS phase, user can define action to control access using JWT authentication. In TRANSPORT phase, user can define the condition to match SNI in TLS client hello and define the action to do SSL end-to-end, SSL offloading or SSL passthrough using a specific load balancer server pool.- Returns:
- The current value of the property.
-
setPhase
public void setPhase(java.lang.String phase)
Possible values are: Each load balancer rule is used at a specific phase of load balancer processing. Currently five phases are supported, HTTP_REQUEST_REWRITE, HTTP_FORWARDING, HTTP_RESPONSE_REWRITE, HTTP_ACCESS and TRANSPORT. When an HTTP request message is received by load balancer, all HTTP_REQUEST_REWRITE rules, if present are executed in the order they are applied to virtual server. And then if HTTP_FORWARDING rules present, only first matching rule's action is executed, remaining rules are not checked. HTTP_FORWARDING rules can have only one action. If the request is forwarded to a backend server and the response goes back to load balancer, all HTTP_RESPONSE_REWRITE rules, if present, are executed in the order they are applied to the virtual server. In HTTP_ACCESS phase, user can define action to control access using JWT authentication. In TRANSPORT phase, user can define the condition to match SNI in TLS client hello and define the action to do SSL end-to-end, SSL offloading or SSL passthrough using a specific load balancer server pool.- Parameters:
phase- New value for the property.
-
_getType
public com.vmware.vapi.bindings.type.StructType _getType()
- Specified by:
_getTypein interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDataValue
public com.vmware.vapi.data.StructValue _getDataValue()
- Specified by:
_getDataValuein interfacecom.vmware.vapi.bindings.Structure
-
_updateDataValue
protected void _updateDataValue(com.vmware.vapi.data.StructValue structValue)
-
_validate
public void _validate()
- Specified by:
_validatein interfacecom.vmware.vapi.bindings.StaticStructure
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfacecom.vmware.vapi.bindings.StaticStructure- Overrides:
toStringin classjava.lang.Object
-
_hasTypeNameOf
public boolean _hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)
- Specified by:
_hasTypeNameOfin interfacecom.vmware.vapi.bindings.Structure
-
_convertTo
public <T extends com.vmware.vapi.bindings.Structure> T _convertTo(java.lang.Class<T> clazz)
- Specified by:
_convertToin interfacecom.vmware.vapi.bindings.Structure
-
_setDynamicField
public void _setDynamicField(java.lang.String fieldName, com.vmware.vapi.data.DataValue fieldValue)- Specified by:
_setDynamicFieldin interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDynamicField
public com.vmware.vapi.data.DataValue _getDynamicField(java.lang.String fieldName)
- Specified by:
_getDynamicFieldin interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDynamicFieldNames
public java.util.Set<java.lang.String> _getDynamicFieldNames()
- Specified by:
_getDynamicFieldNamesin interfacecom.vmware.vapi.bindings.StaticStructure
-
_getClassType
public static com.vmware.vapi.bindings.type.StructType _getClassType()
WARNING: Internal method, subject to change in future versions.- Returns:
StructTypeinstance representing the static bindings type for thisStructure.
-
_getCanonicalName
public java.lang.String _getCanonicalName()
- Specified by:
_getCanonicalNamein interfacecom.vmware.vapi.bindings.Structure
-
_getCanonicalTypeName
public static java.lang.String _getCanonicalTypeName()
Returns the canonical type name. See_getCanonicalName().- Returns:
- canonical type name
-
_newInstance
public static LBRule _newInstance(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Returns new instance of this binding class and injects the provided data value.
WARNING: The returned object is not fully initialized.- Parameters:
structValue- the source of the data contained in the binding object. Could contain more data than fields of this class can describe i.e. newer version of the binding object. Could be null.- Returns:
- the static bindings
StructType
-
_newInstance2
public static LBRule _newInstance2(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Serves as a versioning mechanism.
-
-