EdgeVirtualServiceHttpRequestRule

EdgeVirtualServiceHttpRequestRule
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.

JSON Example
{
    "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
    }
}
string As ^(?!\s+$).+
name
Required

Name of the rule. Must be non-blank and fewer than 1000 characters.

boolean
active
Optional

Whether the rule is active or not.

boolean
logging
Optional

Whether to enable logging with headers on rule match or not.

matchCriteria
Optional

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.

headerActions
Optional

HTTP header rewrite action. It can be configured in combination with rewrite URL action.

redirectAction
Optional

Defines the action to redirect the HTTP request.

rewriteUrlAction
Optional

Defines the action to rewrite the HTTP request URL.

Availability
Added in 38.0