Click or drag to resize

IWsCloudStorageSetDeleteCloudStorageAccount Method

By the method SetDeleteCloudStorageAccount you can delete a Cloud Storage Account

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

Parameters

cloudStorageAccountID
Type: SystemInt32

Return Value

Type: WsResult
Examples
         //WsCloudStorage.SetDeleteCloudStorageAccount Method (c# .NET)
private static void SetDeleteCloudStorageAccount(WsCloudStorageClient client, 
    int cloudStorageAccountId)
{

    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "1234567890";
    try
    {

        //call method SetDeleteCloudStorageAccount, 
        //obtaining a WsResult item
        WsResult result = 
            client.SetDeleteCloudStorageAccount(cloudStorageAccountId);

        //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