EdgeVirtualServiceHttpRequestRule
Defines a HTTP request rule. It consists of a match criteria along with the actions to execute once the criteria is satisfied. If the match criteria is not set, defined actions will be be executed for all requests. Multiple header actions are supported which can be configured in combination with rewrite URL action. Redirect action can only be configured alone.
{
"name": "string",
"active": false,
"logging": false,
"matchCriteria": {
"clientIpMatch": {
"matchCriteria": "string",
"addresses": [
"string"
]
},
"servicePortMatch": {
"matchCriteria": "string",
"ports": [
0
]
},
"methodMatch": {
"matchCriteria": "string",
"methods": [
"string"
]
},
"protocol": "string",
"pathMatch": {
"matchCriteria": "string",
"matchStrings": [
"string"
]
},
"queryMatch": [
"string"
],
"headerMatch": [
{
"matchCriteria": "string",
"value": [
"string"
],
"key": "string"
}
],
"cookieMatch": {
"matchCriteria": "string",
"key": "string",
"value": "string"
}
},
"headerActions": [
{
"action": "string",
"name": "string",
"value": "string"
}
],
"redirectAction": {
"statusCode": 0
},
"rewriteUrlAction": {
"host": "string",
"path": "string",
"query": "string",
"keepQuery": false
}
}
Name of the rule. Must be non-blank and fewer than 1000 characters.
Whether the rule is active or not.
Whether to enable logging with headers on rule match or not.
Defines a HTTP request match criteria. If multiple matches are configured, it is treated as logically AND operation. All match types must be true for the request match criteria to be satisfied.
HTTP header rewrite action. It can be configured in combination with rewrite URL action.
Defines the action to redirect the HTTP request.
Defines the action to rewrite the HTTP request URL.