IWsEndUserSetEnqueueServerRestart Method
|
Performs a reboot of the specified virtual server. Using the method SetEnqueueServerRestart() WsEndUser of Aruba,
you can append operation (Job) to reboot the virtual server specified by parameter ServerID.
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 SetEnqueueServerRestart(
int serverId
)
<OperationContractAttribute>
Function SetEnqueueServerRestart (
serverId As Integer
) As WsResult
[OperationContractAttribute]
WsResult^ SetEnqueueServerRestart(
int serverId
)
[<OperationContractAttribute>]
abstract SetEnqueueServerRestart :
serverId : int -> WsResult
function SetEnqueueServerRestart(
serverId : int
) : WsResult
Parameters
- serverId
- Type: SystemInt32
Value of type System.Int32 which is the unique identifier of the virtual server to restart.
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 RestartVirtualServer (),
or through a call to SetEnqueueServerRestart () to Aruba WsEndUser, restart the virtual server specified by parameter.
private void RestartVirtualServer()
{
try
{
WsResult result = client.SetEnqueueServerRestart(685);
if (!result.Success)
{
throw new ApplicationException(String.Format(
"An error has occurred while invoking SetEnqueueServerRestart(). {0}", result.ResultMessage));
}
}
catch (Exception ex)
{
throw new ApplicationException(String.Format(
"An error has occurred while restarting a virtual server. {0}", ex.Message));
}
}
See Also