EdgeVirtualServiceHttpResponseRule
Defines a HTTP response 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.
{
"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"
],
"cookieMatch": {
"matchCriteria": "string",
"key": "string",
"value": "string"
},
"locationHeaderMatch": {
"matchCriteria": "string",
"value": [
"string"
]
},
"requestHeaderMatch": [
{
"matchCriteria": "string",
"value": [
"string"
],
"key": "string"
}
],
"responseHeaderMatch": [
{
"matchCriteria": "string",
"value": [
"string"
],
"key": "string"
}
],
"statusCodeMatch": {
"matchCriteria": "string",
"statusCodes": [
"200",
"302",
"400-450"
]
}
},
"headerActions": [
{
"action": "string",
"name": "string",
"value": "string"
}
],
"rewriteLocationHeaderAction": {
"protocol": "string",
"host": "string",
"port": 0,
"path": "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 response match criteria. If multiple matches are configured, it is treated as logically AND operation. All match types must be true for the response match criteria to be satisfied.
HTTP header rewrite action. It can be configured in combination with rewrite location header action.
Defines the action to rewrite location header in the HTTP response.