Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save underscorephil/6994265 to your computer and use it in GitHub Desktop.
Save underscorephil/6994265 to your computer and use it in GitHub Desktop.
namespace SLAPI_TEST
{
class Program
{
static void Main(string[] args)
{
String username = "";
String apiKey = "";
authenticate authenticate = new authenticate();
authenticate.username = username;
authenticate.apiKey = apiKey;
SoftLayer_Virtual_GuestService guestService = new SoftLayer_Virtual_GuestService();
guestService.authenticateValue = authenticate;
SoftLayer_Virtual_Guest newGuest = new SoftLayer_Virtual_Guest();
newGuest.hostname = "host1";
newGuest.domain = "example.com";
newGuest.startCpus = 1;
newGuest.maxMemory = 2048;
newGuest.hourlyBillingFlag = true;
newGuest.localDiskFlag = false;
newGuest.blockDeviceTemplateGroup = new SoftLayer_Virtual_Guest_Block_Device_Template_Group();
// Image template GUID
newGuest.blockDeviceTemplateGroup.globalIdentifier = "";
newGuest.startCpusSpecified = true;
newGuest.maxMemorySpecified = true;
newGuest.hourlyBillingFlagSpecified = true;
newGuest.localDiskFlagSpecified = true;
SoftLayer_Virtual_Guest orderedGuest = guestService.createObject(newGuest);
Console.WriteLine(orderedGuest.id);
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment