Class 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.StaticStructure
    Binding 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
    • 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
      • __dynamicStructureFields

        protected com.vmware.vapi.data.StructValue __dynamicStructureFields
    • Constructor Detail

      • LBRule

        public LBRule()
        Default constructor.
      • LBRule

        protected LBRule​(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 in LBRuleAction.
      • 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 in LBRuleAction. When methods return a value of this class as a return value, the property will contain all the properties defined in LBRuleAction.
      • 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 in LBRuleCondition.
      • 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 in LBRuleCondition. When methods return a value of this class as a return value, the property will contain all the properties defined in LBRuleCondition.
      • 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:
        _getType in interface com.vmware.vapi.bindings.StaticStructure
      • _getDataValue

        public com.vmware.vapi.data.StructValue _getDataValue()
        Specified by:
        _getDataValue in interface com.vmware.vapi.bindings.Structure
      • _updateDataValue

        protected void _updateDataValue​(com.vmware.vapi.data.StructValue structValue)
      • _validate

        public void _validate()
        Specified by:
        _validate in interface com.vmware.vapi.bindings.StaticStructure
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface com.vmware.vapi.bindings.StaticStructure
        Overrides:
        toString in class java.lang.Object
      • _hasTypeNameOf

        public boolean _hasTypeNameOf​(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)
        Specified by:
        _hasTypeNameOf in interface com.vmware.vapi.bindings.Structure
      • _convertTo

        public <T extends com.vmware.vapi.bindings.Structure> T _convertTo​(java.lang.Class<T> clazz)
        Specified by:
        _convertTo in interface com.vmware.vapi.bindings.Structure
      • _setDynamicField

        public void _setDynamicField​(java.lang.String fieldName,
                                     com.vmware.vapi.data.DataValue fieldValue)
        Specified by:
        _setDynamicField in interface com.vmware.vapi.bindings.StaticStructure
      • _getDynamicField

        public com.vmware.vapi.data.DataValue _getDynamicField​(java.lang.String fieldName)
        Specified by:
        _getDynamicField in interface com.vmware.vapi.bindings.StaticStructure
      • _getDynamicFieldNames

        public java.util.Set<java.lang.String> _getDynamicFieldNames()
        Specified by:
        _getDynamicFieldNames in interface com.vmware.vapi.bindings.StaticStructure
      • _getClassType

        public static com.vmware.vapi.bindings.type.StructType _getClassType()
        WARNING: Internal method, subject to change in future versions.
        Returns:
        StructType instance representing the static bindings type for this Structure.
      • _getCanonicalName

        public java.lang.String _getCanonicalName()
        Specified by:
        _getCanonicalName in interface com.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.