Click or drag to resize

IWsCloudStorageSetCloudStorageAccountPricingType Method

By the method SetCloudStorageAccountPricingType You can specify the method of payment for the resources of an account CloudStorage, choosing between a prepaid tariff plan or a type to consumption

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

Parameters

cloudStorageAccountID
Type: SystemInt32
CloudStoragePricingTypeID
Type: SystemInt32

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