Click or drag to resize

IWsEndUserSetEnqueueServerCreation Method

Performs a creation of a virtual server. By the method SetEnqueueServerCreation() of Aruba is WsEndUser can create a virtual server by specifying the characteristics of the various resources that make up. The method, in the case of a CREATION OF virtualMachine with a custom template or template Premium (generated by selling a template created by a director of a company) retrieves the image file required to create a car space FTP User that created it.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: (
WsResult SetEnqueueServerCreation(
	NewServer server,
	SurveyAnswer[] surveyanswers = null


Type: Aruba.Cloud.Provisioning.EntitiesNewServer
NewServer class object that represents the structure of the server to create. The class NewServer contains inside all the information needed to complete the task of creating the virtual server, and all related resources. To get more details, see the definition of the NewServer.
surveyanswers (Optional)
Type: Aruba.Cloud.Provisioning.EntitiesSurveyAnswer

Return Value

Type: WsResult
The method returns an object WsResult containing information on the outcome of the method call. For further details on the information returned by the method refer to the definition of the class WsResult.
If it is required to create a SmartVMWare virtual server it is necessary to set the property SmartVMWarePackageID, see the details of this property for more info.
In the following example in C# code, we create a new Virtual Machine Server. Notice the AdditionaLicenses field, that needs to be populated only when connecting an HD from FTP.
private static void CreateServer()
    NewServer serverToCreate = new NewServer()
      AdministratorPassword = "Passw@ord",
      CPUQuantity = 4,
      Name = "NewServer01",
      OSTemplateId = 5,
      RAMQuantity = 8 ,
          /* Additional licenses are used only when an existing HardDisk (loaded through FTP) is connected to VM 
               and the user must specify the licenses used in that template.
      AdditionalLicenses = new List<TemplateLicense>()
        new TemplateLicense(){TemplateLicenseID = 60, DefaultValue = 1 },
        new TemplateLicense(){TemplateLicenseID = 93, DefaultValue = 5 }
      VirtualDisks = new List<VirtualDiskDetails>()
        new VirtualDiskDetails (){ Size = 10, VirtualDiskType = VirtualDiskTypes.PrimaryVirtualDisk },
        new VirtualDiskDetails (){ Size = 50, VirtualDiskType = VirtualDiskTypes.AdditionalVirtualDisk1 },
      Note = "Server creato tramite chiamata a WSEndUser",
      NetworkAdaptersConfiguration = new List<NetworkAdapterConfiguration>()
        new NetworkAdapterConfiguration ()
          NetworkAdapterType = NetworkAdapterTypes.Ethernet0,
          PrivateVLan = new PrivateVLanDetails()
            Gateway = "",
            IPAddress = "",
            SubNetMask = "",
            PrivateVLanResourceId = 2647

    WsResult result = client.SetEnqueueServerCreation(serverToCreate);

    if (!result.Success)
      throw new ApplicationException(String.Format(
      "An error has occurred while invoking SetEnqueueServerCreation(). {0}", result.ResultMessage));
  catch (Exception ex)
    //rethrowing error
    throw new ApplicationException(String.Format("An error has occurred while taking a snapshot{0}", ex.Message));
See Also