Click or drag to resize

IWsMonitoringGetMonitoringCheckNotifications Method

By the method GetMonitoringCheckNotifications you can retrieve the list of notifications about a specific monitoring check
By the method GetMonitoringCheckNotifications you can retrieve the list of notifications about a specific monitoring check

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<MonitoringCheckNotificationsEntity> GetMonitoringCheckNotifications(
	GetMonitoringCheckNotificationsEntity getMonitoringCheckNotificationsEntity
)

Parameters

getMonitoringCheckNotificationsEntity
Type: Aruba.Cloud.Provisioning.Entities.MonitoringSLAGetMonitoringCheckNotificationsEntity
Type GetMonitoringCheckNotificationsEntity: contains all the attributes of a notification.Type GetMonitoringCheckNotificationsEntity: contains all the attributes of a notification.

Return Value

Type: WsResultMonitoringCheckNotificationsEntity
Examples
By the method GetMonitoringCheckNotifications you can retrieve the list of notifications about a specific monitoring check.
/// WsMonitoring.GetMonitoringCheckNotifications Method (c# .NET)
public static string GetMonitoringCheckNotifications(WsMonitoringClient client,
   GetMonitoringCheckNotificationsEntity getMonitoringCheckNotificationsEntity)
{
    //specify the account login details
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
 // call method GetMonitoringCheckNotifications
 // obtaining a WsResultOfMonitoringCheckNotificationsEntity item
 WsResultOfMonitoringCheckNotificationsEntity result =
     client.GetMonitoringCheckNotifications
                (getMonitoringCheckNotificationsEntity);

 //if the call is Success print value
 if (result.Success)
 {
     stringBuilder.Append("Operation ends successfully\n");

     // get Value returned from server
     MonitoringCheckNotificationsEntity item= result.Value;

     stringBuilder.Append("\nmonitoringCheckId: ");
     stringBuilder.Append(item.MonitoringCheckID);
     stringBuilder.Append("\nmonitoringServiceId: ");
     stringBuilder.Append(item.MonitoringServiceID);

     foreach (CheckNotificationEntity item2 in item.CheckEvents)
     {
  stringBuilder.Append("\nNotificationEventType: ");
  stringBuilder.Append(item2.NotificationEventType);
  stringBuilder.Append("\nNotificationType: ");
  stringBuilder.Append(item2.NotificationType);
  stringBuilder.Append("\nProductID: ");
  stringBuilder.Append(item2.ProductID);
     }                   
 }
 else
 {
     throw new ApplicationException(result.ResultMessage);
 }
    }
    catch (Exception ex)
    {
 // re-run the error
 throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
See Also