NSX-T Data Center REST API

LBHttpRedirectAction (type)

{
  "additionalProperties": false,
  "description": "This action is used to redirect HTTP request messages to a new URL. The reply_status value specified in this action is used as the status code of HTTP response message which is sent back to client (Normally a browser). The HTTP status code for redirection is 3xx, for example, 301, 302, 303, 307, etc. The redirect_url is the new URL that the HTTP request message is redirected to. Normally browser will send another HTTP request to the new URL after receiving a redirection response message. Captured variables and built-in variables can be used in redirect_url field. For example, to redirect all HTTP requests to HTTPS requests for a virtual server. We create an LBRule without any conditions, add an LBHttpRedirectAction to the rule. Set the redirect_url field of the LBHttpRedirectAction to:   https://$_host$_request_uri And set redirect_status to \"302\", which means found. This rule will redirect all HTTP requests to HTTPS server port on the same host.",
  "extends": {
    "$ref": "LBRuleAction"
  },
  "id": "LBHttpRedirectAction",
  "module_id": "PolicyLoadBalancer",
  "polymorphic-type-descriptor": {
    "type-identifier": "LBHttpRedirectAction"
  },
  "properties": {
    "redirect_status": {
      "description": "HTTP response status code.",
      "required": true,
      "title": "HTTP response status code",
      "type": "string"
    },
    "redirect_url": {
      "description": "The URL that the HTTP request is redirected to.",
      "required": true,
      "title": "The URL that the HTTP request is redirected to",
      "type": "string"
    },
    "type": {
      "$ref": "LBRuleActionType",
      "description": "The property identifies the load balancer rule action type.",
      "required": true,
      "title": "Type of load balancer rule action"
    }
  },
  "title": "Action to redirect HTTP request messages",
  "type": "object"
}