Udostępnij za pośrednictwem


Smart Detector Alert Rules - Patch

Stosowanie poprawek określonej reguły alertu inteligentnego narzędzia do wykrywania.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}?api-version=2019-06-01

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
alertRuleName
path True

string

Nazwa reguły alertu.

resourceGroupName
path True

string

Nazwa grupy zasobów.

subscriptionId
path True

string

Identyfikator subskrypcji docelowej.

api-version
query True

string

Wersja interfejsu API klienta.

Treść żądania

Nazwa Typ Opis
properties.actionGroups

ActionGroupsInformation

Akcje reguły alertu.

properties.description

string

Opis reguły alertu.

properties.frequency

string

Częstotliwość reguł alertów w formacie ISO8601. Stopień szczegółowości czasu musi być wyrażony w minutach, a minimalna wartość to 5 minut.

properties.severity

Severity

Ważność reguły alertu.

properties.state

AlertRuleState

Stan reguły alertu.

properties.throttling

ThrottlingInformation

Informacje o ograniczaniu reguły alertu.

tags

object

Tagi zasobów.

Odpowiedzi

Nazwa Typ Opis
200 OK

AlertRule

Żądanie pomyślnego stosowania poprawek reguły alertu narzędzia Smart Detector.

Other Status Codes

SmartDetectorErrorResponse

Odpowiedź na błąd opisująca, dlaczego operacja nie powiodła się.

Zabezpieczenia

azure_auth

Przepływ OAuth2 usługi Azure Active Directory

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Nazwa Opis
user_impersonation personifikacja konta użytkownika

Przykłady

Patch alert rules

Sample Request

PATCH https://management.azure.com/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule?api-version=2019-06-01

{
  "tags": {
    "newKey": "newVal"
  },
  "properties": {
    "description": "New description for patching",
    "frequency": "PT1M"
  }
}

Sample Response

{
  "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule",
  "type": "Microsoft.AlertsManagement/smartDetectorAlertRules",
  "name": "MyAlertRule",
  "location": "global",
  "tags": {
    "newKey": "newVal"
  },
  "properties": {
    "description": "New description for patching",
    "state": "Enabled",
    "severity": "Sev3",
    "frequency": "PT1M",
    "detector": {
      "id": "VMMemoryLeak"
    },
    "scope": [
      "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1"
    ],
    "actionGroups": [
      {
        "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup"
      }
    ],
    "throttling": {
      "duration": "PT20M"
    }
  }
}

Definicje

Nazwa Opis
ActionGroupsInformation

Informacje o grupach akcji używane przez regułę alertu.

AlertRule

Informacje o regule alertu

AlertRulePatchObject

Informacje o poprawce reguły alertu

AlertRuleState

Stan reguły alertu.

Detector

Informacje o detektorze. Domyślnie ta wartość nie jest wypełniana, chyba że jest określona w obiekcie expandDetector

Severity

Ważność reguły alertu.

SmartDetectorErrorResponse

Opis formatu odpowiedzi na błąd.

ThrottlingInformation

Opcjonalne informacje o ograniczaniu przepływności dla reguły alertu.

ActionGroupsInformation

Informacje o grupach akcji używane przez regułę alertu.

Nazwa Typ Opis
customEmailSubject

string

Opcjonalny niestandardowy temat wiadomości e-mail, który ma być używany w powiadomieniach e-mail.

customWebhookPayload

string

Opcjonalny niestandardowy ładunek elementu web-hook do użycia w powiadomieniach web-hook.

groupIds

string[]

Identyfikatory zasobów grupy akcji.

AlertRule

Informacje o regule alertu

Nazwa Typ Wartość domyślna Opis
id

string

Identyfikator zasobu.

location

string

global

Lokalizacja zasobu.

name

string

Nazwa zasobu.

properties.actionGroups

ActionGroupsInformation

Akcje reguły alertu.

properties.description

string

Opis reguły alertu.

properties.detector

Detector

Detektor reguły alertu.

properties.frequency

string

Częstotliwość reguł alertów w formacie ISO8601. Stopień szczegółowości czasu musi być wyrażony w minutach, a minimalna wartość to 5 minut.

properties.scope

string[]

Zakres zasobów reguły alertu.

properties.severity

Severity

Ważność reguły alertu.

properties.state

AlertRuleState

Stan reguły alertu.

properties.throttling

ThrottlingInformation

Informacje o ograniczaniu reguły alertu.

tags

object

Tagi zasobów.

type

string

Typ zasobu.

AlertRulePatchObject

Informacje o poprawce reguły alertu

Nazwa Typ Opis
id

string

Identyfikator zasobu.

name

string

Nazwa zasobu.

properties.actionGroups

ActionGroupsInformation

Akcje reguły alertu.

properties.description

string

Opis reguły alertu.

properties.frequency

string

Częstotliwość reguł alertów w formacie ISO8601. Stopień szczegółowości czasu musi być wyrażony w minutach, a minimalna wartość to 5 minut.

properties.severity

Severity

Ważność reguły alertu.

properties.state

AlertRuleState

Stan reguły alertu.

properties.throttling

ThrottlingInformation

Informacje o ograniczaniu reguły alertu.

tags

object

Tagi zasobów.

type

string

Typ zasobu.

AlertRuleState

Stan reguły alertu.

Nazwa Typ Opis
Disabled

string

Enabled

string

Detector

Informacje o detektorze. Domyślnie ta wartość nie jest wypełniana, chyba że jest określona w obiekcie expandDetector

Nazwa Typ Opis
description

string

Opis inteligentnego detektora. Domyślnie ta wartość nie jest wypełniana, chyba że jest określona w obiekcie expandDetector

id

string

Identyfikator detektora.

imagePaths

string[]

Ścieżka obrazu inteligentnego narzędzia do wykrywania. Domyślnie ta wartość nie jest wypełniana, chyba że jest określona w obiekcie expandDetector

name

string

Nazwa inteligentnego detektora. Domyślnie ta wartość nie jest wypełniana, chyba że jest określona w obiekcie expandDetector

parameters

object

Parametry detektora.

supportedResourceTypes

string[]

Obsługiwane typy zasobów inteligentnego narzędzia do wykrywania. Domyślnie ta wartość nie jest wypełniana, chyba że jest określona w obiekcie expandDetector

Severity

Ważność reguły alertu.

Nazwa Typ Opis
Sev0

string

Sev1

string

Sev2

string

Sev3

string

Sev4

string

SmartDetectorErrorResponse

Opis formatu odpowiedzi na błąd.

Nazwa Typ Opis
code

string

Kod błędu

message

string

Komunikat o błędzie wskazujący, dlaczego operacja nie powiodła się.

ThrottlingInformation

Opcjonalne informacje o ograniczaniu przepływności dla reguły alertu.

Nazwa Typ Opis
duration

string

Wymagany czas trwania (w formacie ISO8601) oczekiwania przed ponownym powiadomieniem reguły alertu. Stopień szczegółowości czasu musi być wyrażony w minutach, a minimalna wartość to 0 minut