Click or drag to resize

IWsEndUserGetPrivateCloudResourcesTypes Method

By the method GetPurchsedPrivateClouds you can retrieve the resources type for private cloud

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<List<PrivateCloudResurcesTypes>> GetPrivateCloudResourcesTypes(
	PrivateCloudResourcesTypesRequest request
)

Parameters

request
Type: PrivateCloudResourcesTypesRequest

Return Value

Type: WsResultListPrivateCloudResurcesTypes
Remarks
The WsEndUser, the user is authenticated, it calls the wcfPlatform that retrieves data in the table [ArubaCloud].[Dbo].[PrivateCloudResourcesProducts] on the DC filtering for individual ResourceTypes - privateCloud - PrivateCloudCPU - PrivateCloudDisk - PrivateCloudRAM - PrivateCloudVLan - PrivateCloudIP adding Ratio of the value that is returned by the table [ArubaCloud]. [dbo]. [ServiceConfigurations] for the key PrivateCloudMinimumCpuRamRatio.
Examples
/// IWsEndUser.GetPrivateCloudResourcesTypes Method (c# .NET)
private static void Test_WsEndUser_GetPrivateCloudResourcesTypes()
{
    using (var client = new WsEndUser.WsEndUserClient())
    {
        client.ClientCredentials.UserName.UserName = ARU_0000;
        client.ClientCredentials.UserName.Password = ARU_PSW;

        var res = client.GetPrivateCloudResourcesTypes(
            new WsEndUser.PrivateCloudResourcesTypesRequest()
            {
                LanguageID = null,
                PrivateCloudPricingTypeID = null
            });

        if (res.Success)
        {
            foreach(var p in res.Value)
                Console.WriteLine("PrivateCloudPricingTypeID: {0}, ResourceType.Description: {1}, TypeCode: {2}", 
                    p.PrivateCloudPricingTypeID, p.ResourceType.Description, p.TypeCode);
        }
        else
        {
            throw new Exception(res.ResultMessage);
        }
    }
    Console.ReadLine();
}
See Also