Using Aruba's WsEndUser
SetEnqueueServerArchiviation method you can queue an archiving of the virtual server operation (Job) indicated by the parameter serverId.
Parameters
serverId
Type: int
System.Int32 type value which represents the unique identifier for the virtual server.
Let's look at the example of a method that archives a virtual server.
//IWsEndUser.SetEnqueueServerArchiviation Method (c# .NET)
private void ArchiveVirtualServer(WsEndUserClient client, int serverId)
{
try
{
//calls the SetEnqueueServerArchiviation method,
//getting a WsResult object
WsResult result = client.SetEnqueueServerArchiviation(serverId);
//if the call fails, the exception is relaunched
//with the indication of the type of error
if (!result.Success)
throw new ApplicationException(result.ResultMessage);
}
catch (Exception ex)
{
//relaunches the generic error
throw new ApplicationException(ex.Message);
}
}
//IWsEndUser.setEnqueueServerArchiviation Method (JAVA)
private void ArchiveVirtualServer(IWsEndUser client, int serverId)
{
try
{
//calls the setEnqueueServerArchiviation method,
//getting a WsResult object
WsResult result = client.setEnqueueServerArchiviation(serverId);
//if the call fails, the exception is relaunched
//with the indication of the type of error
if (!result.isSuccess())
{
throw new Exception(result.getResultMessage());
}
}
catch (Exception ex)
{
//prints the error
System.out.println(ex);
}
}
Version
API: v2.8 URL: https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl
API: v2.8 URL: https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl