IJsonpWsEndUserSetEnqueueServerRestore Method
|
Performs a restore operation of the specified virtual server. By the method SetEnqueueServerArchiviation () of Aruba WsEndUser,
you can append operation (Job) to restore a virtual server stored, bringing in fact the group of active servers.
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 = "SetEnqueueServerRestore/{jsonp}/{userName}/{token}/{serverId}/{cpuQuantity}/{ramQuantity}")]
Stream SetEnqueueServerRestore(
string jsonp,
string userName,
string token,
string serverId,
string cpuQuantity,
string ramQuantity
)<OperationContractAttribute>
<WebGetAttribute(ResponseFormat := WebMessageFormat.Json, UriTemplate := "SetEnqueueServerRestore/{jsonp}/{userName}/{token}/{serverId}/{cpuQuantity}/{ramQuantity}")>
Function SetEnqueueServerRestore (
jsonp As String,
userName As String,
token As String,
serverId As String,
cpuQuantity As String,
ramQuantity As String
) As Stream[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat::Json, UriTemplate = L"SetEnqueueServerRestore/{jsonp}/{userName}/{token}/{serverId}/{cpuQuantity}/{ramQuantity}")]
Stream^ SetEnqueueServerRestore(
String^ jsonp,
String^ userName,
String^ token,
String^ serverId,
String^ cpuQuantity,
String^ ramQuantity
)[<OperationContractAttribute>]
[<WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueServerRestore/{jsonp}/{userName}/{token}/{serverId}/{cpuQuantity}/{ramQuantity}")>]
abstract SetEnqueueServerRestore :
jsonp : string *
userName : string *
token : string *
serverId : string *
cpuQuantity : string *
ramQuantity : string -> Stream
function SetEnqueueServerRestore(
jsonp : String,
userName : String,
token : String,
serverId : String,
cpuQuantity : String,
ramQuantity : 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 you want to restore.
- cpuQuantity
- Type: SystemString
- ramQuantity
- Type: SystemString
Return Value
Type:
Stream
The method returns an object WsResult containing information on the outcome of the method call.
Examples
In the following example describes a user-defined method, called RestoreVirtualServerFromArchive (), which via a call
the method SetEnqueueServerRestore () to Aruba WsEndUser, reports the virtual server with code 685, previously set was stored,
in the group of active machines.
private void RestoreVirtualServerFromArchive()
{
try
{
WsResult result = client.SetEnqueueServerRestore(685);
if (!result.Success)
{
throw new ApplicationException(String.Format(
"An error has occurred while invoking SetEnqueueServerRestore(). {0}", result.ResultMessage));
}
}
catch (Exception ex)
{
throw new ApplicationException(
String.Format("An error has occurred while restoring a virtual server. {0}", ex.Message));
}
}
See Also