Computing > 11 - Private Cloud > Modify private cloud

11.4 Modify private cloud

By the method SetModifyPrivateCloud you can change the name, the description, the telephone number and email for the private cloud.


Parametres
modifyPrivateCloud
Type: ModifyPrivateCloud
Hold the attributes to change of a Private Cloud

 
/// IWsEndUser.SetModifyPrivateCloud Method (c# .NET)
public static string SetModifyPrivateCloud(WsEndUserClient client,
    ModifyPrivateCloud modifyPrivateCloud)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {               
	// call method SetModifyPrivateCloud 
	// obtaining a WsResultOfint item
	WsResult result = client.SetModifyPrivateCloud(modifyPrivateCloud);

	//if the call is Success print value
	if (result.Success)
	{
	    // get Value returned from server
	    stringBuilder.Append(" Operation ends successfully. Result Code : ");
	    stringBuilder.Append(result.ResultCode);
	}
	else
	{
	    throw new ApplicationException(result.ResultMessage);
	}
    }
    catch (Exception ex)
    {
	// re-run the error
	throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
//IWsEndUser.SetModifyPrivateCloud Method (JAVA)
private static void SetModifyPrivateCloud(IWsEndUser client, 
        ModifyPrivateCloud modifyPrivateCloud)
{
     //specify the account login details 
    ((BindingProvider) client).getRequestContext()
	.put(BindingProvider.USERNAME_PROPERTY, "ARU-0000");
    ((BindingProvider) client).getRequestContext()
	.put(BindingProvider.PASSWORD_PROPERTY, "0123456789");
    
    try
    {
        // call method SetModifyPrivateCloud 
        // obtaining a WsResult item
        WsResult result = client.setModifyPrivateCloud(modifyPrivateCloud);

        //if the call fails, the exception is relaunched 
        //with the indication of the type of error 
        if (!result.isSuccess())
        {
            throw new Exception(result.getResultMessage());
        }
    }
    catch (Exception ex)
    {
        //print the error 
        System.out.println(ex);
    }
}
Version
API: v2.8 URL:https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl