Click or drag to resize

IWsEndUserSetEnqueueServerDeletion 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]
WsResult SetEnqueueServerDeletion(
	int serverId,
	bool removeIP = false,
	bool now = false,
	Nullable<bool> migrateIP = null,
	SurveyAnswer[] surveyanswers = null
)

Parameters

serverId
Type: SystemInt32
Value of type System.Int32 which is the unique identifier of the virtual server to be removed.
removeIP (Optional)
Type: SystemBoolean
now (Optional)
Type: SystemBoolean
migrateIP (Optional)
Type: SystemNullableBoolean
[Obsolete] This input is deprecated.
surveyanswers (Optional)
Type: Aruba.Cloud.Provisioning.EntitiesSurveyAnswer

Return Value

Type: WsResult
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