IJsonpWsEndUserSetEnqueueServerRestart 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]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueServerRestart/{jsonp}/{userName}/{token}/{serverId}")]
Stream SetEnqueueServerRestart(
string jsonp,
string userName,
string token,
string serverId
)<OperationContractAttribute>
<WebGetAttribute(ResponseFormat := WebMessageFormat.Json, UriTemplate := "SetEnqueueServerRestart/{jsonp}/{userName}/{token}/{serverId}")>
Function SetEnqueueServerRestart (
jsonp As String,
userName As String,
token As String,
serverId As String
) As Stream[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat::Json, UriTemplate = L"SetEnqueueServerRestart/{jsonp}/{userName}/{token}/{serverId}")]
Stream^ SetEnqueueServerRestart(
String^ jsonp,
String^ userName,
String^ token,
String^ serverId
)[<OperationContractAttribute>]
[<WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueServerRestart/{jsonp}/{userName}/{token}/{serverId}")>]
abstract SetEnqueueServerRestart :
jsonp : string *
userName : string *
token : string *
serverId : string -> Stream
function SetEnqueueServerRestart(
jsonp : String,
userName : String,
token : String,
serverId : String
) : Stream
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 restart.
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 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