Click or drag to resize

IWsEndUserGetDatacenterConfigurations Method

This method obtain available datacenter’s configuration. By GetDataCenterConfigurations() it’s possible to get available datacenter information about configuration setting.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: (
WsResult<DatacenterConfig[]> GetDatacenterConfigurations()

Return Value

Type: WsResultDatacenterConfig
This method return WsResult<DatacenterConfig>
It’s possible call method by follow notation:
private static String TestGetDatacenterConfigurations(WsEndUserClient client)

  String adminPanelUrl = String.Empty;

      //calling GetDatacenterConfigurations, obtaining a result of type WsResult<DatacenterConfig>
      WsResultOfArrayOfDatacenterConfig result = client.GetDatacenterConfigurations();
      if (result.Success)
        //selecting the datacenter named "DC1-Italia"
        DatacenterConfig dcconfig = result.Value.Where(p => p.Name == "DC1-Italia").SingleOrDefault();

        //returning the admin panel url for the selected datacenter
        if (dcconfig != null)
          adminPanelUrl = dcconfig.AdminPanelBaseUrl;
    catch (Exception ex)
      //rethrow exception
      throw new ApplicationException(String.Format("An error has occurred while gathering datacenter configuration . {0}", ex.Message));

    return adminPanelUrl;

See Also