Click or drag to resize

IWsDBaaSGetDbaasAccounts Method

Get list of DBaaS Accounts for user

Namespace:  Aruba.Cloud.WsDBaaS
Assembly:  WsDBaaS (in WsDBaaS.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<List<DBaaSAccount>> GetDbaasAccounts()

Return Value

Type: WsResultListDBaaSAccount
Examples
The following example retrieve the DBaaS Account List for user.
private static void Test_WsDBaaS_GetDbaasAccounts()
{
    using (var client = new WsDBaaS.WsDBaaSClient())
    {
        client.ClientCredentials.UserName.UserName = ARU_0000;
        client.ClientCredentials.UserName.Password = ARU_PSW;

        var res = client.GetDbaasAccounts();

        if (res.Success)
        {
            foreach(var r in res.Value)
            {
                Console.WriteLine("Service name: {0}", r.ServiceName);
            }
        }
        else
        {
            throw new Exception(res.ResultMessage);
        }
    }
    Console.ReadLine();
}
See Also