Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

Load Balancer Resource

Main URI of the Resource

This class operates mainly over the Resource URI: /cloud/locations/{location}/devices/{device}/loadbalancers

Exposed Methods

Create a new load balancer

Define a new load balancer in the location, which may be assigned to a virtual datacenter.

When the operation returns a Load Balancer Media Type without a *providerId* it means the entity was successfuly stored in the Abiquo database but it is missing some information in order to properly create it in the provider. In this case, the load balancer will be created during a Modify an existing load balancer request, and the *providerId* will be added.

If the provider supports firewalls you should synchronize firewall rules when creating the load balancer inside a virtual datacenter, in order to properly assign a firewall to the load balancer. Otherwise a LOADBALANCER-21 error is raised "Firewall not found while importing load balancer, try to synchronize the firewalls before load balancer".

Synopsis: POST /cloud/locations/{location}/devices/{device}/loadbalancers
Roles required: MANAGE_LOADBALANCERS
Request headers: Accept: application/vnd.abiquo.loadbalancer+json; version=4.4; application/vnd.abiquo.loadbalancer+xml; version=4.4; Content-Type: application/vnd.abiquo.loadbalancer+json; version=4.4; application/vnd.abiquo.loadbalancer+xml; version=4.4;
Request parameters:

Create a new load balancer without assigning it to a virtual datacenter

Note the response does not contain the *providerId*

 Show/hide example
 
curl --verbose -u admin:xabiquo -X POST "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers" \
-H "Content-Type: application/vnd.abiquo.loadbalancer+json;version=3.8" -H "Accept: application/vnd.abiquo.loadbalancer+json;version=3.8" \
-d '{
  "name": "unassigned2",
  "routingRules": {
    "collection": [
      {
        "portIn": 80,
        "portOut": 80,
        "protocolIn": "HTTP",
        "protocolOut": "HTTP"
      }
    ]
  },
  "algorithm": "ROUND_ROBIN"
}'

Response: 201 created

 Show/hide example
{
    "links": [
        {
            "title": "unassigned2",
            "rel": "edit",
            "type": "application/vnd.abiquo.loadbalancer+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1"
        },
        {
            "title": "amazon-device",
            "rel": "device",
            "type": "application/vnd.abiquo.device+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
        },
        {
            "title": "addresses",
            "rel": "addresses",
            "type": "application/vnd.abiquo.loadbalanceraddresses+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/addresses"
        },
        {
            "title": "routingrules",
            "rel": "routingrules",
            "type": "application/vnd.abiquo.routingrules+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/routingrules"
        },
        {
            "title": "healthchecks",
            "rel": "healthchecks",
            "type": "application/vnd.abiquo.healthchecks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/healthchecks"
        },
        {
            "title": "virtual machines health state",
            "rel": "healthstates",
            "type": "application/vnd.abiquo.healthstates+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/healthstates"
        },
        {
            "title": "virtual machines",
            "rel": "virtualmachines",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/virtualmachines"
        }
    ],
    "name": "unassigned2",
    "algorithm": "ROUND_ROBIN"
}
Create a new load balancer assigned to a private network

This load balancer will receive incoming connections from the private network it is assigned to.

 Show/hide example
curl --verbose -u admin:xabiquo -X POST "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers" \
-H "Content-Type: application/vnd.abiquo.loadbalancer+json;version=3.8" -H "Accept: application/vnd.abiquo.loadbalancer+json;version=3.8" \ 
-d '{
  "links": [
    {
      "title": "a",
      "rel": "virtualdatacenter",
      "type": "application/vnd.abiquo.virtualdatacenter+json",
      "href": "http://localhost:80/api/cloud/virtualdatacenters/1"
    },
    {
      "title": "default_private_network",
      "rel": "privatenetwork",
      "type": "application/vnd.abiquo.vlan+json",
      "href": "http://localhost:80/api/cloud/virtualdatacenters/1/privatenetworks/1"
    }
  ],
  "routingRules": {
    "collection": [
      {
        "portIn": 80,
        "portOut": 80,
        "protocolIn": "HTTP",
        "protocolOut": "HTTP"
      }
    ]
  },
  "name": "simple",
  "algorithm": "ROUND_ROBIN",
  "loadBalancerAddresses": {
    "collection": [
      {
        "internal": false
      }
    ]
  }
}'

Response:

 Show/hide example
{
    "links": [
        {
            "title": "simple",
            "rel": "edit",
            "type": "application/vnd.abiquo.loadbalancer+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/2"
        },
        {
            "title": "amazon-device",
            "rel": "device",
            "type": "application/vnd.abiquo.device+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
        },
        {
            "title": "addresses",
            "rel": "addresses",
            "type": "application/vnd.abiquo.loadbalanceraddresses+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/2/addresses"
        },
        {
            "title": "routingrules",
            "rel": "routingrules",
            "type": "application/vnd.abiquo.routingrules+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/2/routingrules"
        },
        {
            "title": "healthchecks",
            "rel": "healthchecks",
            "type": "application/vnd.abiquo.healthchecks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/2/healthchecks"
        },
        {
            "title": "virtual machines health state",
            "rel": "healthstates",
            "type": "application/vnd.abiquo.healthstates+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/2/healthstates"
        },
        {
            "title": "virtual machines",
            "rel": "virtualmachines",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/2/virtualmachines"
        },
        {
            "title": "awsvdc1",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
        },
        {
            "title": "default_private_network",
            "rel": "privatenetwork",
            "type": "application/vnd.abiquo.vlan+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/privatenetworks/1"
        },
        {
            "title": "simple-2133254991.eu-west-1.elb.amazonaws.com",
            "rel": "loadbalanceraddress",
            "type": "application/vnd.abiquo.loadbalanceraddress+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/1"
        },
        {
            "title": "default",
            "rel": "firewall",
            "type": "application/vnd.abiquo.firewallpolicy+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/1"
        }
    ],
    "name": "simple",
    "algorithm": "ROUND_ROBIN",
    "providerId": "simple"
}
Create a new load balancer reusing an existing load balancer address

Some providers allow the reuse of addresses being used in other load balancers, check this capability in the plugin constraint *LOADBALANCER_ADDRESSESS_REUSE*.
This is useful in Rackspace where HTTP/HTTPS its represented using two different load balancer configurations (which share the same entry point).
To use this functionality, send the link of the load balancer address instead of or in conjunction with the ''loadBalancerAddress'' element in the load balancer representation.

 

 Show/hide example
curl --verbose -XPOST http://admin:xabiquo@10.60.1.223/api/cloud/locations/2/loadbalancers  -H "Accept: application/vnd.abiquo.loadbalancer+json" -H "Content-Type: application/vnd.abiquo.loadbalancer+json" -d '{
  "links": [
    {
      "title": "rrr",
      "rel": "virtualdatacenter",
      "type": "application/vnd.abiquo.virtualdatacenter+json",
      "href": "http://localhost:80/api/cloud/virtualdatacenters/1"
    },
    {
        "title": "simple-2133254991.eu-west-1.elb.amazonaws.com",
        "rel": "loadbalanceraddress",
        "type": "application/vnd.abiquo.loadbalanceraddress+json",
        "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/1"
    }
  ],
  "routingRules": {
    "collection": [
      {
        "portIn": 82,
        "portOut": 82,
        "protocolIn": "HTTP",
        "protocolOut": "HTTP"
      }
    ]
  },
  "name": "rackspacereused",
  "algorithm": "ROUND_ROBIN"
}'

Response:

 Show/hide example
{
    "links": [
        {
            "title": "rackspacereused",
            "rel": "edit",
            "type": "application/vnd.abiquo.loadbalancer+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3"
        },
        {
            "title": "amazon-device",
            "rel": "device",
            "type": "application/vnd.abiquo.device+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
        },
        {
            "title": "addresses",
            "rel": "addresses",
            "type": "application/vnd.abiquo.loadbalanceraddresses+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/addresses"
        },
        {
            "title": "routingrules",
            "rel": "routingrules",
            "type": "application/vnd.abiquo.routingrules+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/routingrules"
        },
        {
            "title": "healthchecks",
            "rel": "healthchecks",
            "type": "application/vnd.abiquo.healthchecks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/healthchecks"
        },
        {
            "title": "virtual machines health state",
            "rel": "healthstates",
            "type": "application/vnd.abiquo.healthstates+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/healthstates"
        },
        {
            "title": "virtual machines",
            "rel": "virtualmachines",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/virtualmachines"
        },
        {
            "title": "awsvdc1",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
        },
        {
            "title": "simple-2133254991.eu-west-1.elb.amazonaws.com",
            "rel": "loadbalanceraddress",
            "type": "application/vnd.abiquo.loadbalanceraddress+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/1"
        }
    ],
    "name": "rackspacereused",
    "algorithm": "ROUND_ROBIN"
}
Create a new load balancer with SSL certificate

Note the sslcertificate is never stored or returned by the abiquo API, so the request requires all the information to actually create the loadbalancer in the provider (eg. AWS will need the ''privatenetwork'' link)
 

 Show/hide example
{
  "links": [
    {
      "title": "aaa",
      "rel": "virtualdatacenter",
      "type": "application/vnd.abiquo.virtualdatacenter+json",
      "href": "http://localhost:80/api/cloud/virtualdatacenters/1"
    },
    {
      "title": "default_private_network",
      "rel": "privatenetwork",
      "type": "application/vnd.abiquo.vlan+json",
      "href": "http://localhost:80/api/cloud/virtualdatacenters/1/privatenetworks/1"
    }
  ],
  "routingRules": {
    "collection": [
      {
        "value": "HTTPS",
        "portIn": 443,
        "portOut": 443,
        "protocolIn": "HTTPS",
        "protocolOut": "HTTPS",
        "sslCertificate": {
          "name": "sslcert3",
          "certificate": "-----BEGIN CERTIFICATE-----\n your certificate goes here \n-----END CERTIFICATE-----",
          "privateKey": "-----BEGIN RSA PRIVATE KEY-----\n your private key goes here \n-----END RSA PRIVATE KEY-----"
        }
      }
    ]
  },
  "healthChecks": {
    "collection": []
  },
  "name": "withssl",
  "algorithm": "ROUND_ROBIN",
  "loadBalancerAddresses": {
    "collection": [
      {
        "internal": false
      }
    ]
  }
}

 

 

Response:

 Show/hide example
{
    "links": [
        {
            "title": "withssl",
            "rel": "edit",
            "type": "application/vnd.abiquo.loadbalancer+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/6"
        },
        {
            "title": "amazon-device",
            "rel": "device",
            "type": "application/vnd.abiquo.device+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
        },
        {
            "title": "addresses",
            "rel": "addresses",
            "type": "application/vnd.abiquo.loadbalanceraddresses+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/6/addresses"
        },
        {
            "title": "routingrules",
            "rel": "routingrules",
            "type": "application/vnd.abiquo.routingrules+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/6/routingrules"
        },
        {
            "title": "healthchecks",
            "rel": "healthchecks",
            "type": "application/vnd.abiquo.healthchecks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/6/healthchecks"
        },
        {
            "title": "virtual machines health state",
            "rel": "healthstates",
            "type": "application/vnd.abiquo.healthstates+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/6/healthstates"
        },
        {
            "title": "virtual machines",
            "rel": "virtualmachines",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/6/virtualmachines"
        },
        {
            "title": "awsvdc1",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
        },
        {
            "title": "default_private_network",
            "rel": "privatenetwork",
            "type": "application/vnd.abiquo.vlan+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/privatenetworks/1"
        },
        {
            "title": "withssl-1288960017.eu-west-1.elb.amazonaws.com",
            "rel": "loadbalanceraddress",
            "type": "application/vnd.abiquo.loadbalanceraddress+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/4"
        },
        {
            "title": "default",
            "rel": "firewall",
            "type": "application/vnd.abiquo.firewallpolicy+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/1"
        }
    ],
    "name": "withssl",
    "algorithm": "ROUND_ROBIN",
    "providerId": "withssl"
}
Create a new load balancer with a health check configuration

AWS creates a default health check, but you can also create your own health checks.

 Show/hide example
{
  "links": [
    {
      "title": "aaa",
      "rel": "virtualdatacenter",
      "type": "application/vnd.abiquo.virtualdatacenter+json",
      "href": "http://localhost:80/api/cloud/virtualdatacenters/1"
    },
    {
      "title": "default_private_network",
      "rel": "privatenetwork",
      "type": "application/vnd.abiquo.vlan+json",
      "href": "http://localhost:80/api/cloud/virtualdatacenters/1/privatenetworks/1"
    }
  ],
  "routingRules": {
    "collection": [
      {
        "value": "HTTP",
        "portIn": 80,
        "portOut": 80,
        "protocolIn": "HTTP",
        "protocolOut": "HTTP"
      }
    ]
  },
  "healthChecks": {
    "collection": [
      {
        "value": "HTTP",
        "protocol": "HTTP",
        "port": 80,
        "name": "myhttpcheck",
        "path": "index.html",
        "intervalInMs": 6000,
        "timeoutInMs": 2000,
        "attempts": 2
      }
    ]
  },
  "name": "withHealthCheck",
  "algorithm": "ROUND_ROBIN",
  "loadBalancerAddresses": {
    "collection": [
      {
        "internal": false
      }
    ]
  }
}

Response:

 Show/hide example
{
    "links": [
        {
            "title": "withHealthCheck",
            "rel": "edit",
            "type": "application/vnd.abiquo.loadbalancer+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7"
        },
        {
            "title": "amazon-device",
            "rel": "device",
            "type": "application/vnd.abiquo.device+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
        },
        {
            "title": "addresses",
            "rel": "addresses",
            "type": "application/vnd.abiquo.loadbalanceraddresses+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/addresses"
        },
        {
            "title": "routingrules",
            "rel": "routingrules",
            "type": "application/vnd.abiquo.routingrules+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/routingrules"
        },
        {
            "title": "healthchecks",
            "rel": "healthchecks",
            "type": "application/vnd.abiquo.healthchecks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/healthchecks"
        },
        {
            "title": "virtual machines health state",
            "rel": "healthstates",
            "type": "application/vnd.abiquo.healthstates+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/healthstates"
        },
        {
            "title": "virtual machines",
            "rel": "virtualmachines",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/virtualmachines"
        },
        {
            "title": "awsvdc1",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
        },
        {
            "title": "default_private_network",
            "rel": "privatenetwork",
            "type": "application/vnd.abiquo.vlan+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/privatenetworks/1"
        },
        {
            "title": "withHealthCheck-937002113.eu-west-1.elb.amazonaws.com",
            "rel": "loadbalanceraddress",
            "type": "application/vnd.abiquo.loadbalanceraddress+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/5"
        },
        {
            "title": "default",
            "rel": "firewall",
            "type": "application/vnd.abiquo.firewallpolicy+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/1"
        }
    ],
    "name": "withHealthCheck",
    "algorithm": "ROUND_ROBIN",
    "providerId": "withHealthCheck"
}

Retrieve all the load balancers, which includes import/synchronize

You can also retrieve all load balancers for a virtual datacenter using the request: VirtualDatacenterResource#Get load balancers in the virtualdatacenter
Synopsis: GET /cloud/locations/{location}/devices/{device}/loadbalancers
Roles required: MANAGE_LOADBALANCERS
Request headers: Accept: application/vnd.abiquo.loadbalancers+json; version=4.4; application/vnd.abiquo.loadbalancers+xml; version=4.4;
Request parameters: (pagination)

Parameter

Required

Default Value

Description

source

false

LOCAL

where the load balancers exist: ''LOCAL'' = known by abiquo, ''REMOTE'' force synchronization with the provider, which then returns the updated load balancers

syncvms

false

false

requires source==REMOTE. Registered virtual machines of new or updated load balancers will be synchronized

vdcs

false

empty set

requires source==REMOTE. Comma separated list of virtual datacenters IDs, only import if the loadbalancer belongs to one of them

curl -XGET -uadmin:xabiquo http://10.60.1.223:/api/cloud/locations/2/loadbalancers

Response:

 Show/hide example
{
    "links": [
        {
            "rel": "first",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers?limit=25&by=name"
        },
        {
            "rel": "last",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers?startwith=0&limit=25&by=name"
        }
    ],
    "collection": [
        {
            "links": [
                {
                    "title": "rackspacereused",
                    "rel": "edit",
                    "type": "application/vnd.abiquo.loadbalancer+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3"
                },
                {
                    "title": "amazon-device",
                    "rel": "device",
                    "type": "application/vnd.abiquo.device+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
                },
                {
                    "title": "addresses",
                    "rel": "addresses",
                    "type": "application/vnd.abiquo.loadbalanceraddresses+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/addresses"
                },
                {
                    "title": "routingrules",
                    "rel": "routingrules",
                    "type": "application/vnd.abiquo.routingrules+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/routingrules"
                },
                {
                    "title": "healthchecks",
                    "rel": "healthchecks",
                    "type": "application/vnd.abiquo.healthchecks+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/healthchecks"
                },
                {
                    "title": "virtual machines health state",
                    "rel": "healthstates",
                    "type": "application/vnd.abiquo.healthstates+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/healthstates"
                },
                {
                    "title": "virtual machines",
                    "rel": "virtualmachines",
                    "type": "application/vnd.abiquo.links+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/3/virtualmachines"
                },
                {
                    "title": "awsvdc1",
                    "rel": "virtualdatacenter",
                    "type": "application/vnd.abiquo.virtualdatacenter+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
                },
                {
                    "title": "simple-2133254991.eu-west-1.elb.amazonaws.com",
                    "rel": "loadbalanceraddress",
                    "type": "application/vnd.abiquo.loadbalanceraddress+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/1"
                }
            ],
            "name": "rackspacereused",
            "algorithm": "ROUND_ROBIN"
        },
        {
            "links": [
                {
                    "title": "unassigned2",
                    "rel": "edit",
                    "type": "application/vnd.abiquo.loadbalancer+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1"
                },
                {
                    "title": "amazon-device",
                    "rel": "device",
                    "type": "application/vnd.abiquo.device+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
                },
                {
                    "title": "addresses",
                    "rel": "addresses",
                    "type": "application/vnd.abiquo.loadbalanceraddresses+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/addresses"
                },
                {
                    "title": "routingrules",
                    "rel": "routingrules",
                    "type": "application/vnd.abiquo.routingrules+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/routingrules"
                },
                {
                    "title": "healthchecks",
                    "rel": "healthchecks",
                    "type": "application/vnd.abiquo.healthchecks+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/healthchecks"
                },
                {
                    "title": "virtual machines health state",
                    "rel": "healthstates",
                    "type": "application/vnd.abiquo.healthstates+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/healthstates"
                },
                {
                    "title": "virtual machines",
                    "rel": "virtualmachines",
                    "type": "application/vnd.abiquo.links+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/1/virtualmachines"
                }
            ],
            "name": "unassigned2",
            "algorithm": "ROUND_ROBIN"
        },
        {
            "links": [
                {
                    "title": "withHealthCheck",
                    "rel": "edit",
                    "type": "application/vnd.abiquo.loadbalancer+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7"
                },
                {
                    "title": "amazon-device",
                    "rel": "device",
                    "type": "application/vnd.abiquo.device+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
                },
                {
                    "title": "addresses",
                    "rel": "addresses",
                    "type": "application/vnd.abiquo.loadbalanceraddresses+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/addresses"
                },
                {
                    "title": "routingrules",
                    "rel": "routingrules",
                    "type": "application/vnd.abiquo.routingrules+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/routingrules"
                },
                {
                    "title": "healthchecks",
                    "rel": "healthchecks",
                    "type": "application/vnd.abiquo.healthchecks+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/healthchecks"
                },
                {
                    "title": "virtual machines health state",
                    "rel": "healthstates",
                    "type": "application/vnd.abiquo.healthstates+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/healthstates"
                },
                {
                    "title": "virtual machines",
                    "rel": "virtualmachines",
                    "type": "application/vnd.abiquo.links+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/virtualmachines"
                },
                {
                    "title": "awsvdc1",
                    "rel": "virtualdatacenter",
                    "type": "application/vnd.abiquo.virtualdatacenter+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
                },
                {
                    "title": "default_private_network",
                    "rel": "privatenetwork",
                    "type": "application/vnd.abiquo.vlan+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/privatenetworks/1"
                },
                {
                    "title": "withHealthCheck-937002113.eu-west-1.elb.amazonaws.com",
                    "rel": "loadbalanceraddress",
                    "type": "application/vnd.abiquo.loadbalanceraddress+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/5"
                },
                {
                    "title": "default",
                    "rel": "firewall",
                    "type": "application/vnd.abiquo.firewallpolicy+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/1"
                }
            ],
            "name": "withHealthCheck",
            "algorithm": "ROUND_ROBIN",
            "providerId": "withHealthCheck"
        }
    ],
    "totalSize": 3
}

Delete a load balancer

Deletes a load balancer and all its related entities (routing rules and health checks)
Synopsis: DELETE /cloud/locations/{location}/devices/{device}/loadbalancers/{loadbalancer}
Roles required: MANAGE_LOADBALANCERS
Request headers:
Request parameters:

curl --verbose -XDELETE -uadmin:xabiquo http://10.60.1.223:80/api/cloud/locations/2/devices/1/loadbalancers/1

Response:

HTTP/1.1 204

Retrieve a single load balancer

Synopsis: GET /cloud/locations/{location}/devices/{device}/loadbalancers/{loadbalancer}
Roles required: MANAGE_LOADBALANCERS
Request headers: Accept: application/vnd.abiquo.loadbalancer+json; version=4.4; application/vnd.abiquo.loadbalancer+xml; version=4.4;
Request parameters:

curl -XGET http://admin:xabiquo@10.60.1.223:80/api/cloud/locations/1/devices/1/loadbalancers/7

Response:

 Show/hide example
{
    "links": [
        {
            "title": "withHealthCheck",
            "rel": "edit",
            "type": "application/vnd.abiquo.loadbalancer+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7"
        },
        {
            "title": "amazon-device",
            "rel": "device",
            "type": "application/vnd.abiquo.device+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
        },
        {
            "title": "addresses",
            "rel": "addresses",
            "type": "application/vnd.abiquo.loadbalanceraddresses+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/addresses"
        },
        {
            "title": "routingrules",
            "rel": "routingrules",
            "type": "application/vnd.abiquo.routingrules+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/routingrules"
        },
        {
            "title": "healthchecks",
            "rel": "healthchecks",
            "type": "application/vnd.abiquo.healthchecks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/healthchecks"
        },
        {
            "title": "virtual machines health state",
            "rel": "healthstates",
            "type": "application/vnd.abiquo.healthstates+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/healthstates"
        },
        {
            "title": "virtual machines",
            "rel": "virtualmachines",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/7/virtualmachines"
        },
        {
            "title": "awsvdc1",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
        },
        {
            "title": "default_private_network",
            "rel": "privatenetwork",
            "type": "application/vnd.abiquo.vlan+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/privatenetworks/1"
        },
        {
            "title": "withHealthCheck-937002113.eu-west-1.elb.amazonaws.com",
            "rel": "loadbalanceraddress",
            "type": "application/vnd.abiquo.loadbalanceraddress+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/5"
        },
        {
            "title": "default",
            "rel": "firewall",
            "type": "application/vnd.abiquo.firewallpolicy+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/1"
        }
    ],
    "name": "withHealthCheck",
    "algorithm": "ROUND_ROBIN",
    "providerId": "withHealthCheck"
}

 

Modify a load balancer

Depending on the provider, some elements of the load balancer may not be changed. For example, in AWS you cannot change the name of the load balancer, whereas in RackSpace you can.

Synopsis: PUT /cloud/locations/{location}/devices/{device}/loadbalancers/{loadbalancer}
Roles required: MANAGE_LOADBALANCERS
Request headers: Accept: application/vnd.abiquo.loadbalancer+json; version=4.4; application/vnd.abiquo.loadbalancer+xml; version=4.4; Content-Type: application/vnd.abiquo.loadbalancer+json; version=4.4; application/vnd.abiquo.loadbalancer+xml; version=4.4;
Request parameters:

For example, change the firewall. In this case some aggregate links (e.g. /routingrules, /healthchecks ...) are omitted from the GET response

 Show/hide example
curl --verbose -XPUT https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8 -H "Accept: application/vnd.abiquo.loadbalancer+json" -H "Content-Type: application/vnd.abiquo.loadbalancer+json" -d '{
  "links": [
    {
      "title": "simple",
      "rel": "edit",
      "type": "application/vnd.abiquo.loadbalancer+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8"
    },
    {
      "title": "amazon-device",
      "rel": "device",
      "type": "application/vnd.abiquo.device+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
    },
    {
      "title": "addresses",
      "rel": "addresses",
      "type": "application/vnd.abiquo.loadbalanceraddresses+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/addresses"
    },
    {
      "title": "routingrules",
      "rel": "routingrules",
      "type": "application/vnd.abiquo.routingrules+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/routingrules"
    },
    {
      "title": "healthchecks",
      "rel": "healthchecks",
      "type": "application/vnd.abiquo.healthchecks+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/healthchecks"
    },
    {
      "title": "virtual machines health state",
      "rel": "healthstates",
      "type": "application/vnd.abiquo.healthstates+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/healthstates"
    },
    {
      "title": "virtual machines",
      "rel": "virtualmachines",
      "type": "application/vnd.abiquo.links+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/virtualmachines"
    },
    {
      "title": "awsvdc1",
      "rel": "virtualdatacenter",
      "type": "application/vnd.abiquo.virtualdatacenter+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
    },
    {
      "title": "default_private_network",
      "rel": "privatenetwork",
      "type": "application/vnd.abiquo.vlan+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/privatenetworks/1"
    },
    {
      "title": "simple-1410994259.eu-west-1.elb.amazonaws.com",
      "rel": "loadbalanceraddress",
      "type": "application/vnd.abiquo.loadbalanceraddress+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/6"
    },
    {
      "title": "default",
      "rel": "firewall",
      "type": "application/vnd.abiquo.firewallpolicy+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/1"
    },
    {
      "title": "ssh",
      "rel": "firewall",
      "type": "application/vnd.abiquo.firewallpolicy+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/2"
    }
  ],
  "name": "simple",
  "algorithm": "ROUND_ROBIN",
  "providerId": "simple"
}'

Response:

 Show/hide example
{
    "links": [
        {
            "title": "simple",
            "rel": "edit",
            "type": "application/vnd.abiquo.loadbalancer+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8"
        },
        {
            "title": "amazon-device",
            "rel": "device",
            "type": "application/vnd.abiquo.device+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1"
        },
        {
            "title": "addresses",
            "rel": "addresses",
            "type": "application/vnd.abiquo.loadbalanceraddresses+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/addresses"
        },
        {
            "title": "routingrules",
            "rel": "routingrules",
            "type": "application/vnd.abiquo.routingrules+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/routingrules"
        },
        {
            "title": "healthchecks",
            "rel": "healthchecks",
            "type": "application/vnd.abiquo.healthchecks+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/healthchecks"
        },
        {
            "title": "virtual machines health state",
            "rel": "healthstates",
            "type": "application/vnd.abiquo.healthstates+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/healthstates"
        },
        {
            "title": "virtual machines",
            "rel": "virtualmachines",
            "type": "application/vnd.abiquo.links+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/8/virtualmachines"
        },
        {
            "title": "awsvdc1",
            "rel": "virtualdatacenter",
            "type": "application/vnd.abiquo.virtualdatacenter+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1"
        },
        {
            "title": "default_private_network",
            "rel": "privatenetwork",
            "type": "application/vnd.abiquo.vlan+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/privatenetworks/1"
        },
        {
            "title": "simple-1410994259.eu-west-1.elb.amazonaws.com",
            "rel": "loadbalanceraddress",
            "type": "application/vnd.abiquo.loadbalanceraddress+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/loadbalancers/addresses/6"
        },
        {
            "title": "ssh",
            "rel": "firewall",
            "type": "application/vnd.abiquo.firewallpolicy+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/2"
        },
        {
            "title": "default",
            "rel": "firewall",
            "type": "application/vnd.abiquo.firewallpolicy+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/2/devices/1/firewalls/1"
        }
    ],
    "name": "simple",
    "algorithm": "ROUND_ROBIN",
    "providerId": "simple"
}