Click or drag to resize

IWsCloudStorageSetCloudStorageAccountOverLimitBehavior Method

By the method SetCloudStorageAccountOverLimitBehavior You can specify the behavior to adopt exceeded the limit of your pricing plan, if you have one

Namespace:  Aruba.Cloud.WsCloudStorage
Assembly:  WsCloudStorage (in WsCloudStorage.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult SetCloudStorageAccountOverLimitBehavior(
	int cloudStorageAccountID,
	OverLimitBehavior overLimitBehavior
)

Parameters

cloudStorageAccountID
Type: SystemInt32
overLimitBehavior
Type: Aruba.Cloud.WsCloudStorage.EntitiesOverLimitBehavior

Return Value

Type: WsResult
Examples
         //WsCloudStorage.SetCloudStorageAccountPricingType Method (c# .NET)
private static void SetCloudStorageAccountPricingType(WsCloudStorageClient client, 
    int cloudStorageAccountId, int cloudStoracePricingTypeId)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "1234567890";

    try
    {
        //call method SetCloudStorageAccountPricingType, 
        //obtaining a WsResult item
        WsResult result = 
            client.SetCloudStorageAccountPricingType(cloudStorageAccountId, 
                cloudStoracePricingTypeId);

        //if the call is not successful, re-run the error indicating the message
        if (!result.Success)
        {
            throw new Exception(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        //re-run the error
        throw new Exception(ex.Message);
    }
}
See Also