October 6, 2015

Classes
Tags VirtualServer

List Instances
Shows how to use the ruby client's VirtualServer class

require 'softlayer_api'
require 'pp'

# Credentials to the API are read from a configuration file by default.
# See https://github.com/softlayer/softlayer-ruby/blob/master/lib/softlayer/Config.rb#L11-L44
SoftLayer::Client.default_client = SoftLayer::Client.new

pp SoftLayer::VirtualServer.find_servers

Feedback?

We would love to hear it
Open an issue

/ruby/list_instances/