Click or drag to resize

IWsEndUserSetRenameServer 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]
WsResult SetRenameServer(
	int serverId,
	string serverName
)

Parameters

serverId
Type: SystemInt32
Value of type System.Int32 which is the unique identifier of the virtual server you want to rename.
serverName
Type: SystemString
Value of type System.String that represents the new name for the virtual server.

Return Value

Type: WsResult
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 static void Test_WsEndUser_SetRenameServer()
{
    using (var client = new WsEndUser.WsEndUserClient())
    {
        client.ClientCredentials.UserName.UserName = "ARU-0000";
        client.ClientCredentials.UserName.Password = "0123456789";

        string ServerName = "NewName";
        int ServerId = 1901;

        var res = client.SetRenameServer(ServerId, ServerName);

        if (res.Success)
        {
            Console.WriteLine("ServerId: {0} successfully renamed", ServerId);
        }
        else
        {
            throw new Exception(res.ResultMessage);
        }
    }
    Console.ReadLine();
}
An example of response:
SetRenameServerResponse: {
   SetRenameServerResult: {
      ExceptionInfo: [System.String],
      ResultCode: 0,
      ResultMessage: [System.String],
      Success: true,
      },
      },
      },
See Also