Click or drag to resize

IWsCloudStorageGetCloudStorageAccountFullVolume Method

By the method GetCloudStorageAccountBucketFullVolume you can show the statistics of occupation of space in your cloud storage account

Namespace:  Aruba.Cloud.WsCloudStorage
Assembly:  WsCloudStorage (in WsCloudStorage.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<List<UserFullVolume>> GetCloudStorageAccountFullVolume(
	int cloudStorageAccountID,
	Nullable<DateTime> fromTime
)

Parameters

cloudStorageAccountID
Type: SystemInt32
fromTime
Type: SystemNullableDateTime

Return Value

Type: WsResultListUserFullVolume
Examples
         //WsCloudStorage.GetCloudStorageAccountBucketFullVolume Method (c# .NET)
private static String GetCloudStorageAccountBucketFullVolume(WsCloudStorageClient 
    client, int cloudStoraceAccountId, DateTime fromTime)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "1234567890";

    StringBuilder stringBuilder = new StringBuilder();
    try
    {
        //call method GetCloudStorageAccountBucketFullVolume,
        //obtaining a WsResultOfArrayOfUserBucketFullVolume item
        WsResultOfArrayOfUserBucketFullVolume result =
        client.GetCloudStorageAccountBucketFullVolume(cloudStoraceAccountId, 
            fromTime);

        //if the call is not successful, re-run the error indicating the message
        if (result.Success)
        {
            UserBucketFullVolume[] arrayOfUserBucketFullVolume = result.Value;
            //browse the list and print the values
            foreach (UserBucketFullVolume userBucketFullVolume in 
                arrayOfUserBucketFullVolume)
            {
                String bucketName = userBucketFullVolume.BucketName;
                stringBuilder.Append(" bucketName: ");
                stringBuilder.Append(bucketName);
            }
        }
        else
        {
            throw new Exception(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        //re-run the error
        throw new Exception(ex.Message);
    }

    return stringBuilder.ToString();
}
}
See Also