Click or drag to resize

IWsCloudStorageGetCloudStoragePricingTypes Method

By the method GetCloudStoragePricingTypes you can show the list of available pricing plans available

Namespace:  Aruba.Cloud.WsCloudStorage
Assembly:  WsCloudStorage (in WsCloudStorage.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<List<CloudStoragePricingType>> GetCloudStoragePricingTypes(
	int regionID
)

Parameters

regionID
Type: SystemInt32

Return Value

Type: WsResultListCloudStoragePricingType
Examples
        //WsCloudStorage.GetCloudStoragePricingTypes Method (c# .NET)
private static String GetCloudStoragePricingTypes(WsCloudStorageClient client)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "1234567890";

    StringBuilder stringBuilder = new StringBuilder();
    try
    {
        //call method GetCloudStoragePricingTypes,
        //obtaining a WsResultOfArrayOfCloudStoragePricingType item
        WsResultOfArrayOfCloudStoragePricingType result =
        client.GetCloudStoragePricingTypes();
        System.Console.WriteLine("result.Success " + result.Success);
        //if the call is not successful, re-run the error indicating the message
        if (result.Success)
        {
            CloudStoragePricingType[] arrayOfCloudStoragePricingType = result.Value;
            //browse the list and print the values
            foreach (CloudStoragePricingType cloudStoragePricingType 
                in arrayOfCloudStoragePricingType)
            {
                int id = cloudStoragePricingType.CloudStoragePricingTypeID;
                stringBuilder.Append("id: ");
                stringBuilder.Append(id);

            }
        }
        else
        {
            throw new Exception(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        //re-run the error
        throw new Exception(ex.Message);
    }
    System.Console.WriteLine("stringBuilder.ToString()" + stringBuilder.ToString());
    return stringBuilder.ToString();
}
See Also