November 23, 2017

Edit details of a Virtual Guest.
It edits a computing instance's properties

Important manual pages:

Author: SoftLayer Technologies, Inc. <>
import SoftLayer
# For nice debug output:
from pprint import pprint as pp

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

# Generate one at
API_KEY = 'set me'

serverId = 35747489

# Create an object template with data that you wish to edit.
# For example: I want to edit the "hostname" and "notes".
objectTemplate = {
    'hostname': 'myhostnameEdited',
    'notes': 'edited from api'

client = SoftLayer.create_client_from_env(

    # Edits an existing virtual Guest server
    # The expected result after executing the script is: true
    result = client['Virtual_Guest'].editObject(objectTemplate, id=serverId)
except SoftLayer.SoftLayerAPIError as e:
        pp('Unable to edit the virtual guest details faultCode=%s, faultString=%s'
            % (e.faultCode, e.faultString))


We would love to hear it
Open an issue