Список оповещений

Пространство имен: microsoft.graph.deviceManagement

Важно!

API версии /beta в Microsoft Graph могут быть изменены. Использование этих API в производственных приложениях не поддерживается. Чтобы определить, доступен ли API в версии 1.0, используйте селектор версий.

Получите список объектов alertRule и их свойств.

Этот API доступен в следующих национальных облачных развертываниях.

Глобальная служба Правительство США L4 Правительство США L5 (DOD) Китай управляется 21Vianet

Разрешения

Выберите разрешение или разрешения, помеченные как наименее привилегированные для этого API. Используйте более привилегированное разрешение или разрешения только в том случае, если это требуется приложению. Дополнительные сведения о делегированных разрешениях и разрешениях приложений см. в разделе Типы разрешений. Дополнительные сведения об этих разрешениях см. в справочнике по разрешениям.

Тип разрешения Разрешения с наименьшими привилегиями Более высокие привилегированные разрешения
Делегированные (рабочая или учебная учетная запись) CloudPC.Read.All CloudPC.ReadWrite.All
Делегированные (личная учетная запись Майкрософт) Не поддерживается. Не поддерживается.
Приложение CloudPC.Read.All CloudPC.ReadWrite.All

HTTP-запрос

GET /deviceManagement/monitoring/alertRules

Заголовки запросов

Имя Описание
Авторизация Bearer {token}. Обязательно. Дополнительные сведения о проверке подлинности и авторизации.

Текст запроса

Не указывайте текст запроса для этого метода.

Отклик

В случае успешного 200 OK выполнения этот метод возвращает код отклика и коллекцию объектов microsoft.graph.deviceManagement.alertRule в тексте ответа.

Примеры

Запрос

Ниже показан пример запроса.

GET https://graph.microsoft.com/beta/deviceManagement/monitoring/alertRules

Отклик

Ниже приводится пример отклика.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "@odata.context": "https://canary.graph.microsoft.com/testprodbeta_cpc_sh/$metadata#deviceManagement/monitoring/alertRules",
  "value": [
      {
          "id": "215c55cc-b1c9-4d36-a870-be5778101714",
          "displayName": "Azure network connection failure impacting Cloud PCs",
          "severity": "warning",
          "isSystemRule": true,
          "description": "Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs",
          "enabled": true,
          "alertRuleTemplate": "cloudPcOnPremiseNetworkConnectionCheckScenario",
          "threshold": {
              "aggregation": "count",
              "operator": "greaterOrEqual",
              "target": 90
          },
          "conditions": [
              {
                "relationshipType": "or",
                "conditionCategory": "azureNetworkConnectionCheckFailures",
                "aggregation": "count",
                "operator": "greaterOrEqual",
                "thresholdValue": "90"
              }
          ],
          "notificationChannels": [
              {
                "notificationChannelType": "portal",
                "notificationReceivers": []
              },
              {
                "notificationChannelType": "email",
                "notificationReceivers": [
                    {
                        "locale": "en-us",
                        "contactInformation": "serena.davis@contoso.com"
                    }
                ]
              }
          ]
      },
      {
          "id": "30070507-6514-443b-8fa5-06979cedacdf",
          "displayName": "Upload failure for Device Images",
          "severity": "warning",
          "isSystemRule": true,
          "description": "Device Image Uploads have failed and can delay the provisioning of new Cloud PCs.",
          "enabled": true,
          "alertRuleTemplate": "cloudPcImageUploadScenario",
          "threshold": {
              "aggregation": "count",
              "operator": "greaterOrEqual",
              "target": 2
          },
          "conditions": [
              {
                "relationshipType": "or",
                "conditionCategory": "imageUploadFailures",
                "aggregation": "count",
                "operator": "greaterOrEqual",
                "thresholdValue": "2"
              }
            ],
          "notificationChannels": [
              {
                "notificationChannelType": "portal",
                "notificationReceivers": []
              },
              {
                "notificationChannelType": "email",
                "notificationReceivers": [
                    {
                        "locale": "en-us",
                        "contactInformation": "serena.davis@contoso.com"
                    }
                ]
              }
          ]
      },
      {
          "id": "b43741fa-254a-445f-86cf-8def2c32571a",
          "displayName": "Provisioning Failure impacting Cloud PCs",
          "severity": "warning",
          "isSystemRule": true,
          "description": "Provisioning has failed and is delaying end users from connecting to their Cloud PCs.",
          "enabled": true,
          "alertRuleTemplate": "cloudPcProvisionScenario",
          "threshold": {
              "aggregation": "count",
              "operator": "greaterOrEqual",
              "target": 1
          },
          "conditions": [
              {
                "relationshipType": "or",
                "conditionCategory": "provisionFailures",
                "aggregation": "count",
                "operator": "greaterOrEqual",
                "thresholdValue": "1"
              }
          ],
          "notificationChannels": [
              {
                "notificationChannelType": "portal",
                "notificationReceivers": []
              },
              {
                "notificationChannelType": "email",
                "notificationReceivers": [
                    {
                        "locale": "en-us",
                        "contactInformation": "serena.davis@contoso.com"
                    }
                ]
              }
          ]
      }
  ]
}