Click or drag to resize

IWsDBaaSGetDbaasRegion Method

Get List of Region for DBaaS Account

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

Return Value

Type: WsResultListDbaasRegion
Examples
The following example retrieve the list of DBaaS regions.
using (var client = new WsDBaaS.WsDBaaSClient())
{
    client.ClientCredentials.UserName.UserName = ARU_0000;
    client.ClientCredentials.UserName.Password = ARU_PSW;

    var res = client.GetDbaasRegion();

    if (res.Success)
    {
        foreach(var r in res.Value)
        {
            Console.WriteLine("{0} - {1} - {2}", r.RegionID, r.RegionCode, r.Description);
        }
    }
    else
    {
        throw new Exception(res.ResultMessage);
    }
}
Console.ReadLine();
See Also