Click or drag to resize

IWsEndUserGetJobs Method

Get a list of Job and income associated with the account indicated. By the method GetJobs () of Aruba WsEndUser, you can get a list of objects of class Job representing the operations currently in the Running state and Waiting and going to work on the different resources in the datacenter.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: (
WsResult<Job[]> GetJobs()

Return Value

Type: WsResultJob
The method returns an object WsResult<Job[]> containing information on the Job in the Running state or Wainting. For further details on the information returned by the method see the class definition
private String TestGetJobs(WsEndUserClient client)
  String lastJob = String.Empty;

    WsResultOfArrayOfJob result = client.GetJobs();

    if (result.Success)
      Job job = result.Value.Where(p => p.ServerId == 1001).OrderByDescending(p=>p.CreationDate).FirstOrDefault();

      StringBuilder sb = new StringBuilder();
      sb.AppendLine("Creation date" + job.CreationDate.ToString ());
      sb.AppendLine ("Id: " + job.JobId.ToString ());
      sb.AppendLine ("Progress: " + job.Progress.ToString ());
      lastJob = sb.ToString();
  catch (Exception ex)
    throw new ApplicationException(
      String.Format("An error has occurred while active or running Jobs. {0}", ex.Message));

  return lastJob;
See Also