IJsonPostWsEndUserSetEnqueueVirtualDiskManage Method |
Using the method SetEnqueueVirtualDiskManage () to Aruba WsEndUser you can queue a task (Job) management of a virtual disk. The operations that can be made are of different types, all shown in the following table:
| Create | Create a new virtual disk |
|---|---|
| Delete | Deletes an existing virtual disk |
| Resize | Assigns a new dimension to an existing virtual disk |
Namespace: Aruba.Cloud.WsEndUser
[OperationContractAttribute] [WebInvokeAttribute(Method = "POST", ResponseFormat = WebMessageFormat.Json)] Stream SetEnqueueVirtualDiskManage( SetEnqueueVirtualDiskManageRequest request )
Furthermore, there are additional conditions for which an operation can not be performed for the administration of a Virtual Disk:
| Operation | Condition |
|---|---|
| Delete | The virtual disk to be deleted is the primary disk of the virtual server |
| Resize | To resize the virtual disk size is less than or greater than the limits imposed by the template. |
| Create | To resize the virtual disk size is less than or greater than the limits imposed by the template. |
| Create | There is already a virtual disk of the same type (eg there is already a primary virtual disk). |
private static void ManageVirtualDisk() { try { VirtualDiskUpdate diskToDelete = new VirtualDiskUpdate() { VirtualDiskUpdateType = VirtualDiskOperationTypes.Delete, VirtualDiskType = VirtualDiskTypes.AdditionalVirtualDisk1 }; WsResult result = client.SetEnqueueVirtualDiskManage(859, diskToDelete); if (!result.Success) { throw new ApplicationException(String.Format( "An error has occurred while invoking SetEnqueueVirtualDiskManage(). {0}", result.ResultMessage)); } } catch (Exception ex) { throw new ApplicationException( String.Format("An error has occurred while deleting a virtual disk {0}", ex.Message)); } }