November 23, 2017

Get the firewall associated to a VSI.

Important manual pages:

Author: SoftLayer Technologies, Inc. <>

import SoftLayer
import json

USERNAME = 'set me'
API_KEY = 'set me'

vsiIp = ""

client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
guestService = client['SoftLayer_Virtual_Guest']

    vsi = guestService.findByIpAddress(vsiIp)
    firewall = guestService.getFirewallServiceComponent(id=vsi['id'])
    print(json.dumps(firewall, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to get the firewall. faultCode=%s, faultString=%s" % (e.faultCode, e.faultString))


We would love to hear it
Open an issue