fbpx
PUThttps://api.spotinst.io/loadBalancer/middleware/{MIDDLEWARE_ID}?accountId={ACCOUNT_ID}

Update one or more parameters in your middleware. Only the specified fields will be affected. For more information on what parameters you can update in the body of this request check out Middleware/Create documenation

Parameter Type Description
MIDDLEWARE_ID * String

The middleware id you want to update

Example: mw-12345
ACCOUNT_ID String

Account ID from Spotinst console

Example: act-12345
Request - Update Priority and Spec

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "middleware": {
    "type": "ACL",
    "priority": 5,
    "spec": {
      "action": "ALLOW",
      "conditions": [
        {
          "type": "HTTP_REQUEST_IP",
          "values": [
            "1.2.3.34",
            "1.2.3.35"
          ]
        }
      ]
    }
  }
}

Body Attributes


  • middleware.priority Integer
    The priority of the Middleware on the RoutingRule middleware chain.
  • middleware.type String
    Middleware type can be one of the following:

    ACL:
    An Access Control List (ACL) is a security enhancement available for Multai Load Balancer. An ACL provides the ability to selectively permit, deny or limit traffic for Balancer’s Routing Rule.

    LUA:
    Lua is a powerful and fast programming language that is easy to learn and use and to embed into your Balancer. Lua is designed to be a lightweight embeddable scripting language. It is used for all sorts of applications, from games to web applications and image processing
  • middleware.spec String
    The spec of the Middleware. The spec should be according to the middleware type as above.
  • middleware.tags.key String
    The tag’s key
  • middleware.tags.value String
    The tag’s value
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "status": {
        "code": 200,
        "message": "OK"
    }
}