fbpx
POSThttps://api.spotinst.io/loadBalancer/balancer?accountId={ACCOUNT_ID}

Create a new balancer.

URL Parameters

Parameter Type Description
ACCOUNT_ID String

Account ID from Spotinst Console

Example: act-12345
Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "balancer": {
    "name": "bestLoadBalancerInTheWorld",
    "timeouts": {
      "draining": 300,
      "idle": 60
    },
    "tags": [
      {
        "key": "Environment",
        "value": "Production"
      }
    ]
  }
}

Body Attributes


  • balancer.name * String
    balancer name. must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
  • balancer.timeout.draining * Integer
    The time for the load balancer to keep connections alive before reporting the target as de-registered, in seconds (range: 1 - 3600).
  • balancer.timeout.idle * Integer
    The idle timeout value, in seconds. (range: 1 - 3600).
  • balancer.tags.key String
    The tag’s key
  • balancer.tags.value String
    The tag’s value
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "status": {
    "code": 200,
    "message": "OK"
  },
  "kind": "spotinst:lb:balancer",
  "items": [
    {
      "id": "lb-12345",
      "name": "bestLoadBalancerInTheWorld",
      "timeouts": {
        "draining": 300,
        "idle": 60
      },
      "dnsCnameAliases": [],
      "dnsRrType": "A",
      "dnsRrName": "bestloadbalancerintheworld.lb-380283967edf.dev.lb1.spotinst.io",
      "tags": [
        {
          "key": "Environment",
          "value": "Production"
        }
      ]
    }
  ]
}