Package com.vmware.nsx_policy.model
Class LBRuleAction
- java.lang.Object
-
- com.vmware.nsx_policy.model.LBRuleAction
-
- All Implemented Interfaces:
com.vmware.vapi.bindings.StaticStructure
,com.vmware.vapi.bindings.Structure
,java.io.Serializable
public final class LBRuleAction extends java.lang.Object implements java.io.Serializable, com.vmware.vapi.bindings.StaticStructure
Load balancer rule actions are used to manipulate application traffic. Currently load balancer rules can be used at three load balancer processing phases. Each phase has its own supported type of actions. Supported actions in HTTP_REQUST_REWRITE phase are: LBHttpRequestUriRewriteAction LBHttpRequestHeaderRewriteAction LBHttpRequestHeaderDeleteAction LBVariableAssignmentAction Supported actions in HTTP_FORWARDING phase are: LBHttpRejectAction LBHttpRedirectAction LBSelectPoolAction LBVariablePersistenceOnAction LBConnectionDropAction Supported action in HTTP_RESPONSE_REWRITE phase is: LBHttpResponseHeaderRewriteAction LBHttpResponseHeaderDeleteAction LBVariablePersistenceLearnAction Supported action in HTTP_ACCESS phase is: LBJwtAuthAction LBConnectionDropAction LBVariableAssignmentAction Supported action in TRANSPORT phase is: LBSslModeSelectionAction LBSelectPoolAction If the match type of an LBRuleCondition field is specified as REGEX and named capturing groups are used in the specified regular expression. The groups can be used as variables in LBRuleAction fields. For example, define a rule with LBHttpRequestUriCondition as match condition and LBHttpRequestUriRewriteAction as action. Set match_type field of LBHttpRequestUriCondition to REGEX, and set uri field to \"/news/(?<year>\\d+)/(?<month>\\d+)/(?<article>.*)\". Set uri field of LBHttpRequestUriRewriteAction to: \"/news/$year-$month/$article\" In uri field of LBHttpRequestUriCondition, the (?<year>\\d+), (?<month>\\d+) and (?<article>.*) are named capturing groups, they define variables named $year, $month and $article respectively. The defined variables are used in LBHttpRequestUriRewriteAction. For a matched HTTP request with URI \"/news/2017/06/xyz.html\", the substring \"2017\" is captured in variable $year, \"06\" is captured in variable $month, and \"xyz.html\" is captured in variable $article. The LBHttpRequestUriRewriteAction will rewrite the URI to: \"/news/2017-06/xyz.html\" A set of built-in variables can be used in LBRuleAction as well. The name of built-in variables start with underscore, the name of user defined variables is not allowed to start with underscore. Following are some of the built-in variables: $_scheme: Reference the scheme part of matched HTTP messages, could be \"http\" or \"https\". $_host: Host of matched HTTP messages, for example \"www.example.com\". $_server_port: Port part of URI, it is also the port of the server which accepted a request. Default port is 80 for http and 443 for https. $_uri: The URI path, for example \"/products/sample.html\". $_request_uri: Full original request URI with arguments, for example, \"/products/sample.html?a=b&c=d\". $_args: URI arguments, for instance \"a=b&c=d\" $_is_args: \"?\" if a request has URI arguments, or an empty string otherwise. For the full list of built-in variables, please reference the NSX-T Administrator's Guide.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LBRuleAction.Builder
Builder class forLBRuleAction
.
-
Field Summary
Fields Modifier and Type Field Description protected com.vmware.vapi.data.StructValue
__dynamicStructureFields
static java.lang.String
_TYPE_IDENTIFIER
Identifier denoting this class, when it is used in polymorphic context.static java.lang.String
TYPE_LBCONNECTIONDROPACTION
static java.lang.String
TYPE_LBHTTPREDIRECTACTION
static java.lang.String
TYPE_LBHTTPREJECTACTION
static java.lang.String
TYPE_LBHTTPREQUESTHEADERDELETEACTION
static java.lang.String
TYPE_LBHTTPREQUESTHEADERREWRITEACTION
static java.lang.String
TYPE_LBHTTPREQUESTURIREWRITEACTION
static java.lang.String
TYPE_LBHTTPRESPONSEHEADERDELETEACTION
static java.lang.String
TYPE_LBHTTPRESPONSEHEADERREWRITEACTION
static java.lang.String
TYPE_LBJWTAUTHACTION
static java.lang.String
TYPE_LBSELECTPOOLACTION
static java.lang.String
TYPE_LBSSLMODESELECTIONACTION
static java.lang.String
TYPE_LBVARIABLEASSIGNMENTACTION
static java.lang.String
TYPE_LBVARIABLEPERSISTENCELEARNACTION
static java.lang.String
TYPE_LBVARIABLEPERSISTENCEONACTION
-
Constructor Summary
Constructors Modifier Constructor Description LBRuleAction()
Default constructor.protected
LBRuleAction(com.vmware.vapi.data.StructValue __dynamicStructureFields)
-
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 LBRuleAction
_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 LBRuleAction
_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()
boolean
equals(java.lang.Object obj)
java.lang.String
getType()
Possible values are:TYPE_LBSELECTPOOLACTION
TYPE_LBHTTPREQUESTURIREWRITEACTION
TYPE_LBHTTPREQUESTHEADERREWRITEACTION
TYPE_LBHTTPREJECTACTION
TYPE_LBHTTPREDIRECTACTION
TYPE_LBHTTPRESPONSEHEADERREWRITEACTION
TYPE_LBHTTPREQUESTHEADERDELETEACTION
TYPE_LBHTTPRESPONSEHEADERDELETEACTION
TYPE_LBVARIABLEASSIGNMENTACTION
TYPE_LBVARIABLEPERSISTENCEONACTION
TYPE_LBVARIABLEPERSISTENCELEARNACTION
TYPE_LBJWTAUTHACTION
TYPE_LBSSLMODESELECTIONACTION
TYPE_LBCONNECTIONDROPACTION
The property identifies the load balancer rule action type.int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
_TYPE_IDENTIFIER
public static final java.lang.String _TYPE_IDENTIFIER
Identifier denoting this class, when it is used in polymorphic context.This value should be assigned to the property which is used to discriminate the actual type used in the polymorphic context.
- See Also:
- Constant Field Values
-
TYPE_LBSELECTPOOLACTION
public static final java.lang.String TYPE_LBSELECTPOOLACTION
- See Also:
- Constant Field Values
-
TYPE_LBHTTPREQUESTURIREWRITEACTION
public static final java.lang.String TYPE_LBHTTPREQUESTURIREWRITEACTION
- See Also:
- Constant Field Values
-
TYPE_LBHTTPREQUESTHEADERREWRITEACTION
public static final java.lang.String TYPE_LBHTTPREQUESTHEADERREWRITEACTION
- See Also:
- Constant Field Values
-
TYPE_LBHTTPREJECTACTION
public static final java.lang.String TYPE_LBHTTPREJECTACTION
- See Also:
- Constant Field Values
-
TYPE_LBHTTPREDIRECTACTION
public static final java.lang.String TYPE_LBHTTPREDIRECTACTION
- See Also:
- Constant Field Values
-
TYPE_LBHTTPRESPONSEHEADERREWRITEACTION
public static final java.lang.String TYPE_LBHTTPRESPONSEHEADERREWRITEACTION
- See Also:
- Constant Field Values
-
TYPE_LBHTTPREQUESTHEADERDELETEACTION
public static final java.lang.String TYPE_LBHTTPREQUESTHEADERDELETEACTION
- See Also:
- Constant Field Values
-
TYPE_LBHTTPRESPONSEHEADERDELETEACTION
public static final java.lang.String TYPE_LBHTTPRESPONSEHEADERDELETEACTION
- See Also:
- Constant Field Values
-
TYPE_LBVARIABLEASSIGNMENTACTION
public static final java.lang.String TYPE_LBVARIABLEASSIGNMENTACTION
- See Also:
- Constant Field Values
-
TYPE_LBVARIABLEPERSISTENCEONACTION
public static final java.lang.String TYPE_LBVARIABLEPERSISTENCEONACTION
- See Also:
- Constant Field Values
-
TYPE_LBVARIABLEPERSISTENCELEARNACTION
public static final java.lang.String TYPE_LBVARIABLEPERSISTENCELEARNACTION
- See Also:
- Constant Field Values
-
TYPE_LBJWTAUTHACTION
public static final java.lang.String TYPE_LBJWTAUTHACTION
- See Also:
- Constant Field Values
-
TYPE_LBSSLMODESELECTIONACTION
public static final java.lang.String TYPE_LBSSLMODESELECTIONACTION
- See Also:
- Constant Field Values
-
TYPE_LBCONNECTIONDROPACTION
public static final java.lang.String TYPE_LBCONNECTIONDROPACTION
- See Also:
- Constant Field Values
-
__dynamicStructureFields
protected com.vmware.vapi.data.StructValue __dynamicStructureFields
-
-
Method Detail
-
getType
public java.lang.String getType()
Possible values are:-
TYPE_LBSELECTPOOLACTION
-
TYPE_LBHTTPREQUESTURIREWRITEACTION
-
TYPE_LBHTTPREQUESTHEADERREWRITEACTION
-
TYPE_LBHTTPREJECTACTION
-
TYPE_LBHTTPREDIRECTACTION
-
TYPE_LBHTTPRESPONSEHEADERREWRITEACTION
-
TYPE_LBHTTPREQUESTHEADERDELETEACTION
-
TYPE_LBHTTPRESPONSEHEADERDELETEACTION
-
TYPE_LBVARIABLEASSIGNMENTACTION
-
TYPE_LBVARIABLEPERSISTENCEONACTION
-
TYPE_LBVARIABLEPERSISTENCELEARNACTION
-
TYPE_LBJWTAUTHACTION
-
TYPE_LBSSLMODESELECTIONACTION
-
TYPE_LBCONNECTIONDROPACTION
"LBRuleAction"
.- Returns:
- The current value of the property.
-
-
_getType
public com.vmware.vapi.bindings.type.StructType _getType()
- Specified by:
_getType
in interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDataValue
public com.vmware.vapi.data.StructValue _getDataValue()
- Specified by:
_getDataValue
in interfacecom.vmware.vapi.bindings.Structure
-
_updateDataValue
protected void _updateDataValue(com.vmware.vapi.data.StructValue structValue)
-
_validate
public void _validate()
- Specified by:
_validate
in interfacecom.vmware.vapi.bindings.StaticStructure
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfacecom.vmware.vapi.bindings.StaticStructure
- Overrides:
toString
in classjava.lang.Object
-
_hasTypeNameOf
public boolean _hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)
- Specified by:
_hasTypeNameOf
in interfacecom.vmware.vapi.bindings.Structure
-
_convertTo
public <T extends com.vmware.vapi.bindings.Structure> T _convertTo(java.lang.Class<T> clazz)
- Specified by:
_convertTo
in interfacecom.vmware.vapi.bindings.Structure
-
_setDynamicField
public void _setDynamicField(java.lang.String fieldName, com.vmware.vapi.data.DataValue fieldValue)
- Specified by:
_setDynamicField
in interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDynamicField
public com.vmware.vapi.data.DataValue _getDynamicField(java.lang.String fieldName)
- Specified by:
_getDynamicField
in interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDynamicFieldNames
public java.util.Set<java.lang.String> _getDynamicFieldNames()
- Specified by:
_getDynamicFieldNames
in 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:
StructType
instance representing the static bindings type for thisStructure
.
-
_getCanonicalName
public java.lang.String _getCanonicalName()
- Specified by:
_getCanonicalName
in 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 LBRuleAction _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 LBRuleAction _newInstance2(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Serves as a versioning mechanism.
-
-