Click or drag to resize

IJsonpWsEndUserSetEnqueueServerDeletion Method

Performs a delete operation of the specified virtual server. By the method SetEnqueueServerDeletion() of Aruba WsEndUser, you can append operation (Job) cancellation of the virtual server specified by parameter ServerID. this operation will remove the virtual server from the virtual datacenter associated with the specified account.

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 = "SetEnqueueServerDeletion/{jsonp}/{userName}/{token}/{serverId}")]
Stream SetEnqueueServerDeletion(
	string jsonp,
	string userName,
	string token,
	string serverId
)

Parameters

jsonp
Type: SystemString
userName
Type: SystemString
token
Type: SystemString
serverId
Type: SystemString
Value of type System.Int32 which is the unique identifier of the virtual server to be removed.

Return Value

Type: Stream
The method returns an object WsResult containing information on the outcome of the method call.
Examples
The following example shows a user-defined method, called DeleteVirtualServer(), which means a call to SetEnqueueServerDeletion() to Aruba WsEndUser, delete the virtual server specified by parameter.
private void DeleteVirtualServer()
{
  try
  {
    WsResult result = client.SetEnqueueServerDeletion(685);

    if (!result.Success)
    {
      throw new ApplicationException(String.Format(
        "An error has occurred while invoking SetEnqueueServerDeletion(). {0}", result.ResultMessage));
    }
  }
  catch (Exception ex)
  {
    throw new ApplicationException(String.Format(
      "An error has occurred while deleting a virtual server. {0}", ex.Message));
  }
}
See Also