Click or drag to resize

IJsonpWsEndUserSetEnqueueServerPowerOff Method

This method execute forced shutdown of specified virtual server. By SetEnqueueServerPowerOff() method of Aruba WsEndUser it’s possible add power off operation (Job) of virtual server indicate in input parameter

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

Parameters

jsonp
Type: SystemString
ArubaCloud.Response.Server.call
userName
Type: SystemString
Value of type string that represents the account to use in the format XXXX-ARU​​.
token
Type: SystemString
Value of type string that represents a valid token for the specified account.
serverId
Type: SystemString
System.Int32 value to indicate server ID to forced shutdown

Return Value

Type: Stream
WsResult contain call information. For more information consult WsResult
Examples
In this example PowerOffVirtualServer call SetEnqueueServerPowerOff to shutdown virtual server
private void PowerOffVirtualServer()
{
  try
  {
    WsResult result = client.SetEnqueueServerPowerOff(685);

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