Click or drag to resize

IWsEndUserGetPagedServersList Method

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<PagedList<ServerBase>> GetPagedServersList(
	GetPagedServersListRequest operationRequest
)

Parameters

operationRequest
Type: GetPagedServersListRequest

Return Value

Type: WsResultPagedListServerBase
Examples
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);
    }
}
See Also