IJsonpWsEndUserSetEnqueueVirtualDiskManage Method
|
Performs an operation on a resource management type VirtualDisk.
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
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueVirtualDiskManage/{jsonp}/{userName}/{token}/{serverId}/{virtualDiskOperationType}/{virtualDiskType}/{size}?customVirtualDiskPath={customVirtualDiskPath}")]
Stream SetEnqueueVirtualDiskManage(
string jsonp,
string userName,
string token,
string serverId,
string virtualDiskOperationType,
string virtualDiskType,
string size,
string customVirtualDiskPath
)<OperationContractAttribute>
<WebGetAttribute(ResponseFormat := WebMessageFormat.Json, UriTemplate := "SetEnqueueVirtualDiskManage/{jsonp}/{userName}/{token}/{serverId}/{virtualDiskOperationType}/{virtualDiskType}/{size}?customVirtualDiskPath={customVirtualDiskPath}")>
Function SetEnqueueVirtualDiskManage (
jsonp As String,
userName As String,
token As String,
serverId As String,
virtualDiskOperationType As String,
virtualDiskType As String,
size As String,
customVirtualDiskPath As String
) As Stream[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat::Json, UriTemplate = L"SetEnqueueVirtualDiskManage/{jsonp}/{userName}/{token}/{serverId}/{virtualDiskOperationType}/{virtualDiskType}/{size}?customVirtualDiskPath={customVirtualDiskPath}")]
Stream^ SetEnqueueVirtualDiskManage(
String^ jsonp,
String^ userName,
String^ token,
String^ serverId,
String^ virtualDiskOperationType,
String^ virtualDiskType,
String^ size,
String^ customVirtualDiskPath
)[<OperationContractAttribute>]
[<WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueVirtualDiskManage/{jsonp}/{userName}/{token}/{serverId}/{virtualDiskOperationType}/{virtualDiskType}/{size}?customVirtualDiskPath={customVirtualDiskPath}")>]
abstract SetEnqueueVirtualDiskManage :
jsonp : string *
userName : string *
token : string *
serverId : string *
virtualDiskOperationType : string *
virtualDiskType : string *
size : string *
customVirtualDiskPath : string -> Stream
function SetEnqueueVirtualDiskManage(
jsonp : String,
userName : String,
token : String,
serverId : String,
virtualDiskOperationType : String,
virtualDiskType : String,
size : String,
customVirtualDiskPath : String
) : Stream
Parameters
- jsonp
- Type: SystemString
- userName
- Type: SystemString
- token
- Type: SystemString
- serverId
- Type: SystemString
Value of type System.Int32 that is the unique identifier of the virtual server on which to perform the management operation
the virtual disk.
- virtualDiskOperationType
- Type: SystemString
- virtualDiskType
- Type: SystemString
- size
- Type: SystemString
- customVirtualDiskPath
- Type: SystemString
Return Value
Type:
Stream
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
Remarks
The operation management of a virtual disk can only be completed if the virtual server is not in the stopped state,
stored or being deleted. Once queued operation, you can not append other operations up to which the first will not be completed.
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). |
Examples
In the following example describes a user-defined method, called ManageVirtualDisk (), that performs a
cancellation of the first virtual disk next to the primary of a virtual server with id 859.
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));
}
}
See Also