Click or drag to resize

IWsEndUserSetEnqueueLoadBalancerRemoveInstances Method

By the method SetEnqueueLoadBalancerRemoveInstances you can remove the IP addresses from load balancer. The method require to specify the LoadBalancerID and the IP addresses to add.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: (
WsResult SetEnqueueLoadBalancerRemoveInstances(
	LoadBalancerInstancesRequest request


Type: Aruba.Cloud.Provisioning.Entities.LoadBalancerLoadBalancerInstancesRequest

Return Value

Type: WsResult
        /// IWsEndUser.SetEnqueueLoadBalancerRemoveInstances Method (c# .NET)
public static string SetEnqueueLoadBalancerRemoveInstances(WsEndUserClient client,
        int loadBalancerID, string[] ipAddresses)
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

        // create the request object
        LoadBalancerInstancesRequest request = new LoadBalancerInstancesRequest();
        request.LoadBalancerID = loadBalancerID;
        request.Instances = new LoadBalancerInstance[ipAddresses.Length];
        for (int i = 0; i < ipAddresses.Length; i++)
            LoadBalancerInstance item = new LoadBalancerInstance();
            item.IPAddress = ipAddresses[i];
            request.Instances[i] = item;

        // call method SetEnqueueLoadBalancerRemoveInstances 
        // obtaining a WsResult item
        WsResult result = client.SetEnqueueLoadBalancerRemoveInstances(request);

        //if the call is Success print value
        if (result.Success)
            // get Value returned from server
            stringBuilder.Append(" Operation ends successfully. Result Code : ");
            throw new ApplicationException(result.ResultMessage);
    catch (Exception ex)
        // re-run the error
        throw new ApplicationException(ex.Message);

    return stringBuilder.ToString();
See Also