POST /load-balancer/{id}/service

Path parameters

  • id string(uuid) Required
application/json

Body Required

  • name string Required

    Load Balancer Service name

    Minimum length is 1, maximum length is 255.

  • description string

    Load Balancer Service description

    Maximum length is 255.

  • instance-pool object Required

    Instance Pool

    Hide instance-pool attributes Show instance-pool attributes object
    • application-consistent-snapshot-enabled boolean

      Enable application consistent snapshots

    • anti-affinity-groups array[object]

      Instance Pool Anti-affinity Groups

      Anti-affinity group reference

      Hide anti-affinity-groups attribute Show anti-affinity-groups attribute object
      • id string(uuid)

        Anti-affinity group ID

    • description string

      Instance Pool description

      Minimum length is 1, maximum length is 255.

    • public-ip-assignment string

      Values are inet4, dual, or none.

    • labels object
      Hide labels attribute Show labels attribute object
      • * string Additional properties
    • security-groups array[object]

      Instance Pool Security Groups

      Security group reference

      Hide security-groups attribute Show security-groups attribute object
      • id string(uuid)

        Security group ID

    • elastic-ips array[object]

      Instances Elastic IPs

      Elastic IP reference

      Hide elastic-ips attribute Show elastic-ips attribute object
      • id string(uuid)

        Elastic IP ID

    • name string

      Instance Pool name

      Minimum length is 1, maximum length is 255.

    • instance-type object

      Instance type reference

      Hide instance-type attribute Show instance-type attribute object
      • id string(uuid)

        Instance type ID

    • min-available integer(int64)

      Minimum number of running instances

      Minimum value is 0.

    • private-networks array[object]

      Instance Pool Private Networks

      Private network reference

      Hide private-networks attribute Show private-networks attribute object
      • id string(uuid)

        Private network ID

    • template object

      Template reference

      Hide template attribute Show template attribute object
      • id string(uuid)

        Template ID

    • size integer(int64)

      Number of instances

      Minimum value is 0.

    • ssh-key object

      SSH key reference

      Hide ssh-key attribute Show ssh-key attribute object
      • name string

        SSH key name

        Minimum length is 1, maximum length is 255.

    • instance-prefix string

      The instances created by the Instance Pool will be prefixed with this value (default: pool)

      Minimum length is 1, maximum length is 30.

    • user-data string

      Instances Cloud-init user-data

      Minimum length is 1.

    • manager object

      Resource manager

      Hide manager attributes Show manager attributes object
      • id string(uuid)

        Manager ID

      • type string

        Manager type

        Values are sks-nodepool or instance-pool.

    • deploy-target object

      Deploy target reference

      Hide deploy-target attribute Show deploy-target attribute object
      • id string(uuid)

        Deploy target ID

    • ipv6-enabled boolean

      Enable IPv6 for instances

    • disk-size integer(int64)

      Instances disk size in GiB

      Minimum value is 10, maximum value is 51200.

    • ssh-keys array[object]

      Instances SSH keys

      SSH key reference

      Hide ssh-keys attribute Show ssh-keys attribute object
      • name string

        SSH key name

        Minimum length is 1, maximum length is 255.

  • protocol string Required

    Network traffic protocol

    Values are tcp or udp.

  • strategy string Required

    Load balancing strategy

    Values are round-robin, maglev-hash, or source-hash.

  • port integer(int64) Required

    Port exposed on the Load Balancer's public IP

    Minimum value is 1, maximum value is 65535.

  • target-port integer(int64) Required

    Port on which the network traffic will be forwarded to on the receiving instance

    Minimum value is 1, maximum value is 65535.

  • healthcheck object Required

    Load Balancer Service healthcheck

    Hide healthcheck attributes Show healthcheck attributes object
    • mode string

      Healthcheck mode

      Values are tcp, http, or https.

    • interval integer(int64)

      Healthcheck interval (default: 10). Must be greater than or equal to Timeout

      Minimum value is 5, maximum value is 300.

    • uri string

      An endpoint to use for the HTTP healthcheck, e.g. '/status'

      Minimum length is 1, maximum length is 255.

    • port integer(int64)

      Healthcheck port

      Minimum value is 1, maximum value is 65535.

    • timeout integer(int64)

      Healthcheck timeout value (default: 2). Must be lower than or equal to Interval

      Minimum value is 2, maximum value is 60.

    • retries integer(int64)

      Number of retries before considering a Service failed

      Minimum value is 1, maximum value is 20.

    • tls-sni string

      SNI domain for HTTPS healthchecks

      Minimum length is 1, maximum length is 255.

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • id string(uuid)

      Operation ID

    • reason string

      Operation failure reason

      Values are incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, or conflict.

    • reference object

      Related resource reference

      Hide reference attributes Show reference attributes object
      • id string(uuid)

        Reference ID

      • command string

        Command name

    • message string

      Operation message

    • state string

      Operation status

      Values are failure, pending, success, or timeout.

POST /load-balancer/{id}/service
curl \
 --request POST 'https://api-ch-gva-2.exoscale.com/v2/load-balancer/{id}/service' \
 --header "Content-Type: application/json" \
 --data '{"name":"string","description":"string","instance-pool":{"application-consistent-snapshot-enabled":true,"anti-affinity-groups":[{"id":"string"}],"description":"string","public-ip-assignment":"inet4","labels":{"additionalProperty1":"string","additionalProperty2":"string"},"security-groups":[{"id":"string"}],"elastic-ips":[{"id":"string"}],"name":"string","instance-type":{"id":"string"},"min-available":42,"private-networks":[{"id":"string"}],"template":{"id":"string"},"size":42,"ssh-key":{"name":"string"},"instance-prefix":"string","user-data":"string","manager":{"id":"string","type":"sks-nodepool"},"deploy-target":{"id":"string"},"ipv6-enabled":true,"disk-size":42,"ssh-keys":[{"name":"string"}]},"protocol":"tcp","strategy":"round-robin","port":42,"target-port":42,"healthcheck":{"mode":"tcp","interval":42,"uri":"string","port":42,"timeout":42,"retries":42,"tls-sni":"string"}}'
Request examples
{
  "name": "string",
  "description": "string",
  "instance-pool": {
    "application-consistent-snapshot-enabled": true,
    "anti-affinity-groups": [
      {
        "id": "string"
      }
    ],
    "description": "string",
    "public-ip-assignment": "inet4",
    "labels": {
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "security-groups": [
      {
        "id": "string"
      }
    ],
    "elastic-ips": [
      {
        "id": "string"
      }
    ],
    "name": "string",
    "instance-type": {
      "id": "string"
    },
    "min-available": 42,
    "private-networks": [
      {
        "id": "string"
      }
    ],
    "template": {
      "id": "string"
    },
    "size": 42,
    "ssh-key": {
      "name": "string"
    },
    "instance-prefix": "string",
    "user-data": "string",
    "manager": {
      "id": "string",
      "type": "sks-nodepool"
    },
    "deploy-target": {
      "id": "string"
    },
    "ipv6-enabled": true,
    "disk-size": 42,
    "ssh-keys": [
      {
        "name": "string"
      }
    ]
  },
  "protocol": "tcp",
  "strategy": "round-robin",
  "port": 42,
  "target-port": 42,
  "healthcheck": {
    "mode": "tcp",
    "interval": 42,
    "uri": "string",
    "port": 42,
    "timeout": 42,
    "retries": 42,
    "tls-sni": "string"
  }
}
Response examples (200)
{
  "id": "string",
  "reason": "incorrect",
  "reference": {
    "id": "string",
    "link": "string",
    "command": "string"
  },
  "message": "string",
  "state": "failure"
}