Click or drag to resize

IWsMonitoringSetActivateMonitoringService Method

By the method SetActivateMonitoringService you can activate a Monitoring Service that was disable from system
By the method SetActivateMonitoringService you can activate a Monitoring Service that was disable from system

Namespace:  Aruba.Cloud.WsMonitoring
Assembly:  Aruba.Cloud.WsMonitoring (in Aruba.Cloud.WsMonitoring.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult SetActivateMonitoringService(
	ModifyMonitoringServiceEntity modifyMonitoringServiceEntity
)

Parameters

modifyMonitoringServiceEntity
Type: Aruba.Cloud.Provisioning.Entities.MonitoringSLAModifyMonitoringServiceEntity
Type ModifyMonitoringServiceEntity: contain the monitoring service entity to activate.Type ModifyMonitoringServiceEntity: contain the monitoring service entity to activate.

Return Value

Type: WsResult
Examples
By the method SetActivateMonitoringService you can activate a Monitoring Service that was disable from system.
/// WsMonitoring.SetActivateMonitoringService Method (c# .NET)
public static string SetActivateMonitoringService(WsMonitoringClient client,
   ModifyMonitoringServiceEntity modifyMonitoringServiceEntity)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
 // call method SetActivateMonitoringService 
 // obtaining a WsResult item
 WsResult result = client.SetActivateMonitoringService 
           (modifyMonitoringServiceEntity);

 //if the call is Success print value
 if (result.Success)
 {
     // get Value returned from server
     stringBuilder.Append(" Operation 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();
}
See Also