IWsEndUserGetPagedServersList Method |
Namespace: Aruba.Cloud.WsEndUser
[OperationContractAttribute] WsResult<PagedList<ServerBase>> GetPagedServersList( GetPagedServersListRequest operationRequest )
private WsEndUser.PagedServersResponse Test_WsEndUser_GetPagedServersList() { using (var client = new WsEndUser.WsEndUserClient()) { var res = client.GetPagedServersList( new WsEndUser.GetPagedServersListRequest() { ServerStatuses = new Liststring() { "Running" },// a list of ServerStatus enum elements ServerName = "Server1", // the initial part of the name (like "xxx%") Os = "CentOs", // the os (like "%xxx%") HypervisorTypes = new Liststring() { "SmartVmWare", "OpenStackVPS", "OpenStackVPSLowCost" }, // a list of HypervisorTypes enum elements, in this // example smart machines values Pagination = new Pagination() { Skip = 0, Take = 20 }, Sorting = new Sorting() { ByProperty = "", Descending = false } } ); if (result.Success) return result.Value; else throw new Exception(GetErrorCode(result.ResultCode), result.ResultMessage); } }