Click or drag to resize

IWsMonitoringGetMonitoringClassOfServices Method

By the method GetMonitoringClassOfServices you can retrieve the list of Class of services available
By the method GetMonitoringClassOfServices you can retrieve the list of Class of services available

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<List<MonitoringClassOfServiceEntity>> GetMonitoringClassOfServices()

Return Value

Type: WsResultListMonitoringClassOfServiceEntity
Examples
By the method GetMonitoringClassOfServices you can retrieve the list of Class of services available.
/// WsMonitoring.GetMonitoringClassOfServices Method (c# .NET)
public static string GetMonitoringClassOfServices(WsMonitoringClient client)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
 // call method GetMonitoringClassOfServices 
 // obtaining a WsResultOfArrayOfMonitoringClassOfServiceEntity item
 WsResultOfArrayOfMonitoringClassOfServiceEntity result = 
     client.GetMonitoringClassOfServices();

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

     // get Value returned from server
     MonitoringClassOfServiceEntity[] items = result.Value;

     // for each items print the information
     foreach (MonitoringClassOfServiceEntity item in items)
     {
  stringBuilder.Append("\nProductID: ");
  stringBuilder.Append(item.ProductID);
  stringBuilder.Append("\nDescription: ");
  stringBuilder.Append(item.Description);                        
     }
 }
 else
 {
     throw new ApplicationException(result.ResultMessage);
 }
    }
    catch (Exception ex)
    {
 // re-run the error
 throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
GetMonitoringClassOfServicesResponse: {
 GetMonitoringClassOfServicesResult: {
    ExceptionInfo: [System.String],
    ResultCode: 0,
    ResultMessage: [System.String],
    Success: true,
    Value: {
       MonitoringClassOfServiceEntity: {
          ClassNum: 1,
          Description: Free,
          Enable: true,
          Free: true,
          MaxChecks: 1,
          MaxRegions: 1,
          MaxTimeout: 10,
          MinFrequency: 600,
          MonitoringCheckTypes: {
             MonitoringCheckTypeEntity: {
                Description: PING,
                MonitoringCheckTypeID: 10,
                },
             MonitoringCheckTypeEntity: {
                Description: HTTP,
                MonitoringCheckTypeID: 4,
                },
             MonitoringCheckTypeEntity: {
                Description: HTTPS,
                MonitoringCheckTypeID: 5,
                },
                },
          MonitoringClassOfServiceID: 1,
          NotificationTypes: {
             NotificationTypeEntity: {
                Description: Email,
                MonitoringNotificationTypeID: 1,
                },
             NotificationTypeEntity: {
                Description: SMS,
                MonitoringNotificationTypeID: 2,
                },
                },
          ProductID: 284,
          ResourceTypeID: 27,
          },
       MonitoringClassOfServiceEntity: {
          ClassNum: 2,
          Description: Base,
          Enable: true,
          Free: false,
          MaxChecks: 5,
          MaxRegions: 3,
          MaxTimeout: 10,
          MinFrequency: 300,
          MonitoringCheckTypes: {
             MonitoringCheckTypeEntity: {
                Description: PING,
                MonitoringCheckTypeID: 10,
                },
             MonitoringCheckTypeEntity: {
                Description: HTTP,
                MonitoringCheckTypeID: 4,
                },
             MonitoringCheckTypeEntity: {
                Description: HTTPS,
                MonitoringCheckTypeID: 5,
                },
             MonitoringCheckTypeEntity: {
                Description: DNS,
                MonitoringCheckTypeID: 2,
                },
             MonitoringCheckTypeEntity: {
                Description: FTP,
                MonitoringCheckTypeID: 3,
                },
             MonitoringCheckTypeEntity: {
                Description: IMAP,
                MonitoringCheckTypeID: 6,
                },
             MonitoringCheckTypeEntity: {
                Description: POP3,
                MonitoringCheckTypeID: 11,
                },
             MonitoringCheckTypeEntity: {
                Description: SMTP,
                MonitoringCheckTypeID: 13,
                },
             MonitoringCheckTypeEntity: {
                Description: Certificate SSL,
                MonitoringCheckTypeID: 17,
                },
                },
          MonitoringClassOfServiceID: 2,
          NotificationTypes: {
             NotificationTypeEntity: {
                Description: Email,
                MonitoringNotificationTypeID: 1,
                },
             NotificationTypeEntity: {
                Description: SMS,
                MonitoringNotificationTypeID: 2,
                },
                },
          ProductID: 285,
          ResourceTypeID: 27,
          },
       MonitoringClassOfServiceEntity: {
          ClassNum: 3,
          Description: Advanced,
          Enable: true,
          Free: false,
          MaxChecks: 10,
          MaxRegions: 3,
          MaxTimeout: 20,
          MinFrequency: 180,
          MonitoringCheckTypes: {
             MonitoringCheckTypeEntity: {
                Description: PING,
                MonitoringCheckTypeID: 10,
                },
             MonitoringCheckTypeEntity: {
                Description: HTTP,
                MonitoringCheckTypeID: 4,
                },
             MonitoringCheckTypeEntity: {
                Description: HTTPS,
                MonitoringCheckTypeID: 5,
                },
             MonitoringCheckTypeEntity: {
                Description: DNS,
                MonitoringCheckTypeID: 2,
                },
             MonitoringCheckTypeEntity: {
                Description: FTP,
                MonitoringCheckTypeID: 3,
                },
             MonitoringCheckTypeEntity: {
                Description: IMAP,
                MonitoringCheckTypeID: 6,
                },
             MonitoringCheckTypeEntity: {
                Description: POP3,
                MonitoringCheckTypeID: 11,
                },
             MonitoringCheckTypeEntity: {
                Description: SMTP,
                MonitoringCheckTypeID: 13,
                },
             MonitoringCheckTypeEntity: {
                Description: TCP,
                MonitoringCheckTypeID: 15,
                },
             MonitoringCheckTypeEntity: {
                Description: Certificate SSL,
                MonitoringCheckTypeID: 17,
                },
             MonitoringCheckTypeEntity: {
                Description: MySQL,
                MonitoringCheckTypeID: 7,
                },
             MonitoringCheckTypeEntity: {
                Description: Microsoft SQL Server,
                MonitoringCheckTypeID: 8,
                },
             MonitoringCheckTypeEntity: {
                Description: Oracle,
                MonitoringCheckTypeID: 9,
                },
             MonitoringCheckTypeEntity: {
                Description: PostgreSQL,
                MonitoringCheckTypeID: 12,
                },
             MonitoringCheckTypeEntity: {
                Description: SSH,
                MonitoringCheckTypeID: 14,
                },
             MonitoringCheckTypeEntity: {
                Description: Telnet,
                MonitoringCheckTypeID: 16,
                },
                },
          MonitoringClassOfServiceID: 3,
          NotificationTypes: {
             NotificationTypeEntity: {
                Description: Email,
                MonitoringNotificationTypeID: 1,
                },
             NotificationTypeEntity: {
                Description: SMS,
                MonitoringNotificationTypeID: 2,
                },
                },
          ProductID: 286,
          ResourceTypeID: 27,
          },
       MonitoringClassOfServiceEntity: {
          ClassNum: 4,
          Description: Premium,
          Enable: true,
          Free: false,
          MaxChecks: 30,
          MaxRegions: 3,
          MaxTimeout: 30,
          MinFrequency: 60,
          MonitoringCheckTypes: {
             MonitoringCheckTypeEntity: {
                Description: PING,
                MonitoringCheckTypeID: 10,
                },
             MonitoringCheckTypeEntity: {
                Description: HTTP,
                MonitoringCheckTypeID: 4,
                },
             MonitoringCheckTypeEntity: {
                Description: HTTPS,
                MonitoringCheckTypeID: 5,
                },
             MonitoringCheckTypeEntity: {
                Description: DNS,
                MonitoringCheckTypeID: 2,
                },
             MonitoringCheckTypeEntity: {
                Description: FTP,
                MonitoringCheckTypeID: 3,
                },
             MonitoringCheckTypeEntity: {
                Description: IMAP,
                MonitoringCheckTypeID: 6,
                },
             MonitoringCheckTypeEntity: {
                Description: POP3,
                MonitoringCheckTypeID: 11,
                },
             MonitoringCheckTypeEntity: {
                Description: SMTP,
                MonitoringCheckTypeID: 13,
                },
             MonitoringCheckTypeEntity: {
                Description: TCP,
                MonitoringCheckTypeID: 15,
                },
             MonitoringCheckTypeEntity: {
                Description: Certificate SSL,
                MonitoringCheckTypeID: 17,
                },
             MonitoringCheckTypeEntity: {
                Description: MySQL,
                MonitoringCheckTypeID: 7,
                },
             MonitoringCheckTypeEntity: {
                Description: Microsoft SQL Server,
                MonitoringCheckTypeID: 8,
                },
             MonitoringCheckTypeEntity: {
                Description: Oracle,
                MonitoringCheckTypeID: 9,
                },
             MonitoringCheckTypeEntity: {
                Description: PostgreSQL,
                MonitoringCheckTypeID: 12,
                },
             MonitoringCheckTypeEntity: {
                Description: SSH,
                MonitoringCheckTypeID: 14,
                },
             MonitoringCheckTypeEntity: {
                Description: Telnet,
                MonitoringCheckTypeID: 16,
                },
                },
          MonitoringClassOfServiceID: 4,
          NotificationTypes: {
             NotificationTypeEntity: {
                Description: Email,
                MonitoringNotificationTypeID: 1,
                },
             NotificationTypeEntity: {
                Description: SMS,
                MonitoringNotificationTypeID: 2,
                },
                },
          ProductID: 287,
          ResourceTypeID: 27,
          },
          },
          },
          },
          },
          }
See Also