github.com/vmware/go-vmware-nsxt@v0.0.0-20230223012718-d31b8a1ca05e/loadbalancer/lb_rule_condition.go (about) 1 /* 2 * NSX API 3 * 4 * VMware NSX REST API 5 * 6 * API version: 1.0.0 7 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) 8 */ 9 10 package loadbalancer 11 12 // Match conditions are used to match application traffic passing through load balancers. Multiple match conditions can be specified in one load balancer rule, each match condition defines a criterion for application traffic. If inverse field is set to true, the match result of the condition is inverted. If more than one match condition is specified, match strategy determines if all conditions should match or any one condition should match for the load balancer rule to be considered a match. Currently only HTTP messages are supported by load balancer rules. Each load balancer rule is used at a specific phase of load balancer processing. Currently three phases are supported, HTTP_REQUEST_REWRITE, HTTP_FORWARDING and HTTP_RESPONSE_REWRITE. Each phase supports certain types of match conditions, supported match conditions in HTTP_REQUEST_REWRITE phase are: LbHttpRequestMethodCondition LbHttpRequestUriCondition LbHttpRequestUriArgumentsCondition LbHttpRequestVersionCondition LbHttpRequestHeaderCondition LbHttpRequestCookieCondition LbHttpRequestBodyCondition LbTcpHeaderCondition LbIpHeaderCondition Supported match conditions in HTTP_FORWARDING phase are: LbHttpRequestMethodCondition LbHttpRequestUriCondition LbHttpRequestVersionCondition LbHttpRequestHeaderCondition LbHttpRequestCookieCondition LbHttpRequestBodyCondition LbTcpHeaderCondition LbIpHeaderCondition Supported match condition in HTTP_RESPONSE_REWRITE phase is: LbHttpResponseHeaderCondition 13 type LbRuleCondition struct { 14 15 // A flag to indicate whether reverse the match result of this condition 16 Inverse bool `json:"inverse"` 17 18 // Type of load balancer rule condition 19 Type_ string `json:"type"` 20 21 // Source IP address of HTTP message 22 SourceAddress string `json:"source_address,omitempty"` 23 24 // TCP source port of HTTP message 25 SourcePort string `json:"source_port,omitempty"` 26 27 // HTTP version 28 Version string `json:"version,omitempty"` 29 30 // Type of HTTP request method 31 Method string `json:"method,omitempty"` 32 33 // If true, case is significant 34 CaseSensitive *bool `json:"case_sensitive,omitempty"` 35 36 // Match type 37 MatchType string `json:"match_type,omitempty"` 38 39 // A string used to identify resource 40 Uri string `json:"uri,omitempty"` 41 42 // URI arguments, aka query string of URI. 43 UriArguments string `json:"uri_arguments,omitempty"` 44 45 // Name of HTTP header 46 HeaderName string `json:"header_name,omitempty"` 47 48 // Value of HTTP header 49 HeaderValue string `json:"header_value,omitempty"` 50 51 // Name of cookie 52 CookieName string `json:"cookie_name,omitempty"` 53 54 // Value of cookie 55 CookieValue string `json:"cookie_value,omitempty"` 56 57 // HTTP request body 58 BodyValue string `json:"body_value,omitempty"` 59 }