IWsMonitoringGetMonitoringCheckNotifications Method |
Namespace: Aruba.Cloud.WsMonitoring
[OperationContractAttribute] WsResult<MonitoringCheckNotificationsEntity> GetMonitoringCheckNotifications( GetMonitoringCheckNotificationsEntity getMonitoringCheckNotificationsEntity )
/// 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(); }