Click or drag to resize

IJsonpWsEndUserSetRenameServer Method

Performs an update operation the name of the specified virtual server. By the method SetRenameServer () of Aruba WsEndUser you can change the name by which the server is displayed. This will not change in any so the server identity code (serverID), ie the progressive code with which the server is identified in such a way unique within the system.

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

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 rename.
newName
Type: SystemString

Return Value

Type: Stream
The method returns a WsResult object containing information about the result of the method call.
Examples
The following example shows a user-defined method, called UpdateVirtualServerName (), or through a call to SetRenameServer () to Aruba WsEndUser, rename the virtual server with code 685.
private void RestoreVirtualServerFromArchive()
{
  try
  {
    WsResult result = client.SetEnqueueServerRestore(685, "NewName");

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