Click or drag to resize

IWsDBaaSGetDbaasPricingTypes Method

Get list of DBaaS Pricing Types

Namespace:  Aruba.Cloud.WsDBaaS
Assembly:  WsDBaaS (in WsDBaaS.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<List<DbaasPricingType>> GetDbaasPricingTypes(
	GetDbaasPricingTypesRequest request
)

Parameters

request
Type: Aruba.Cloud.WsDBaaS.RequestsGetDbaasPricingTypesRequest
A GetDbaasPricingTypesRequest object, it defines the DbaasTypeCode or DbaasPricingTypeID to filter array

Return Value

Type: WsResultListDbaasPricingType
Examples
The following example retrieve a DBaaS pricing types.
private static void Test_WsDBaaS_GetDbaasPricingTypes()
{
    using (var client = new WsDBaaS.WsDBaaSClient())
    {
        client.ClientCredentials.UserName.UserName = ARU_0000;
        client.ClientCredentials.UserName.Password = ARU_PSW;

        var res = client.GetDbaasPricingTypes(new WsDBaaS.GetDbaasPricingTypesRequest()
        {
            DbaasPricingTypeID = null,
            DbaasTypeCode = null
        });

        if (res.Success)
        {
            foreach(var r in res.Value)
            {
                Console.WriteLine("{0} - {1} - {2}", 
                    r.DbaasTypeCode, 
                    r.ResourceType.Description, 
                    r.DbaasEngine?.DbaasEngineDescriptions.FirstOrDefault().Description);
            }
        }
        else
        {
            throw new Exception(res.ResultMessage);
        }
    }
    Console.ReadLine();
}
See Also