Storage > 2 - Account Management > Delete Account

2.7 Delete Account

By the method SetDeleteCloudStorageAccount you can delete a Cloud Storage Account.
 
Parameters
cloudStoraceAccountId
Type: int
Int type item which contain the account id to be deleted.
 
Returns
The method returns a WsResult item with information on the result of the call to the method.
 
//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);
    }
}
//IWsCloudStorage.SetDeleteCloudStorageAccount Method Method (JAVA)
private static void SetDeleteCloudStorageAccount(IWsCloudStorage client, 
    Integer cloudStoraceAccountId) {
    try {
        // call method setDeleteCloudStorageAccount,
        // obtaining a WsResult item
        WsResult result = 
            client.setDeleteCloudStorageAccount(cloudStoraceAccountId);

        //if the call is not successful, re-run the error indicating the message
        if (!result.isSuccess()) {
            throw new Exception(result.getResultMessage().getValue());
        }
    } catch (Exception ex) {
        //show result
        System.out.println(ex);
    }
}
Versione
API: v2.8 URL: https://api.services.cloud.it/wsCloudStorage/v2.8/WsCloudStorage.svc?wsdl