November 23, 2017
Edit load balancer

The script edits the configuration of an existing load balancer,
it makes a single call to the
method. For more information please see below.

Important manual pages:

Author: SoftLayer Technologies, Inc. <>
import SoftLayer

# Your SoftLayer API username and key.
USERNAME = 'set me'
API_KEY = 'set me'

# Creating an skeleton object SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress
# which contains the configuration for our load balancer
templateObject = {
    'id': 35026,
    'virtualServers': [{
        'port': 30,
        'allocation': 100,
        'id': 83554,
        'virtualIpAddressId': 35026,
        'serviceGroups': [{
            'timeout': '',
            'notes': 'testhttp3',
            'id': 86554,
            'routingTypeId': 2,
            'routingMethodId': 10}],

client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
service = client['SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress']

    result = service.editObject(templateObject, id=35026)
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to edit the load balancer faultCode=%s, faultString=%s" % (e.faultCode, e.faultString))


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue