Dela via


Alerts Suppression Rules - Update

Uppdatera befintlig regel eller skapa en ny regel om den inte finns

PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}?api-version=2019-01-01-preview

URI-parametrar

Name I Obligatorisk Typ Description
alertsSuppressionRuleName
path True

string

Det unika namnet på regeln för undertryckningsavisering

subscriptionId
path True

string

pattern: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$

Azure-prenumerations-ID

api-version
query True

string

API-version för åtgärden

Begärandetext

Name Obligatorisk Typ Description
properties.alertType True

string

Typ av avisering som ska ignoreras automatiskt. Använd *för alla aviseringstyper

properties.reason True

string

Anledningen till att avvisa aviseringen

properties.state True

RuleState

Möjliga tillstånd för regeln

properties.comment

string

Eventuella kommentarer om regeln

properties.expirationDateUtc

string (date-time)

Förfallodatum för regeln, om värdet inte anges eller anges som null kommer det inte att upphöra att gälla alls

properties.suppressionAlertsScope

SuppressionAlertsScope

Undertryckningsvillkoren

Svar

Name Typ Description
200 OK

AlertsSuppressionRule

OKEJ

Other Status Codes

CloudError

Felsvar som beskriver varför åtgärden misslyckades.

Säkerhet

azure_auth

Azure Active Directory OAuth2 Flow

Typ: oauth2
Flow: implicit
Auktoriseringswebbadress: https://login.microsoftonline.com/common/oauth2/authorize

Omfattningar

Name Description
user_impersonation personifiera ditt användarkonto

Exempel

Update or create suppression rule for subscription

Exempelbegäran

PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/alertsSuppressionRules/dismissIpAnomalyAlerts?api-version=2019-01-01-preview

{
  "properties": {
    "alertType": "IpAnomaly",
    "expirationDateUtc": "2019-12-01T19:50:47.083633Z",
    "state": "Enabled",
    "reason": "FalsePositive",
    "comment": "Test VM",
    "suppressionAlertsScope": {
      "allOf": [
        {
          "field": "entities.ip.address",
          "in": [
            "104.215.95.187",
            "52.164.206.56"
          ]
        },
        {
          "field": "entities.process.commandline",
          "contains": "POWERSHELL.EXE"
        }
      ]
    }
  }
}

Exempelsvar

{
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/alertsSuppressionRules/dismissIpAnomalyAlerts",
  "name": "dismissIpAnomalyAlerts",
  "type": "Microsoft.Security/alertsSuppressionRules",
  "properties": {
    "alertType": "IpAnomaly",
    "lastModifiedUtc": "2019-07-31T19:50:47.083633Z",
    "expirationDateUtc": "2019-12-01T19:50:47.083633Z",
    "state": "Enabled",
    "reason": "FalsePositive",
    "comment": "Test VM",
    "suppressionAlertsScope": {
      "allOf": [
        {
          "field": "entities.ip.address",
          "in": [
            "104.215.95.187",
            "52.164.206.56"
          ]
        },
        {
          "field": "entities.process.commandline",
          "contains": "POWERSHELL.EXE"
        }
      ]
    }
  }
}

Definitioner

Name Description
AlertsSuppressionRule

Beskriver undertryckningsregeln

CloudError

Vanligt felsvar för alla Azure Resource Manager-API:er för att returnera felinformation för misslyckade åtgärder. (Detta följer även formatet för OData-felsvar.).

CloudErrorBody

Felinformationen.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

RuleState

Möjliga tillstånd för regeln

ScopeElement

Ett mer specifikt omfång som används för att identifiera aviseringarna som ska ignoreras.

SuppressionAlertsScope

AlertsSuppressionRule

Beskriver undertryckningsregeln

Name Typ Description
id

string

Resurs-ID

name

string

Resursnamn

properties.alertType

string

Typ av avisering som ska ignoreras automatiskt. Använd *för alla aviseringstyper

properties.comment

string

Eventuella kommentarer om regeln

properties.expirationDateUtc

string (date-time)

Förfallodatum för regeln, om värdet inte anges eller anges som null kommer det inte att upphöra att gälla alls

properties.lastModifiedUtc

string (date-time)

Senaste gången den här regeln ändrades

properties.reason

string

Anledningen till att avvisa aviseringen

properties.state

RuleState

Möjliga tillstånd för regeln

properties.suppressionAlertsScope

SuppressionAlertsScope

Undertryckningsvillkoren

type

string

Resurstyp

CloudError

Vanligt felsvar för alla Azure Resource Manager-API:er för att returnera felinformation för misslyckade åtgärder. (Detta följer även formatet för OData-felsvar.).

Name Typ Description
error.additionalInfo

ErrorAdditionalInfo[]

Ytterligare information om felet.

error.code

string

Felkoden.

error.details

CloudErrorBody[]

Felinformationen.

error.message

string

Felmeddelandet.

error.target

string

Felmålet.

CloudErrorBody

Felinformationen.

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Ytterligare information om felet.

code

string

Felkoden.

details

CloudErrorBody[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

Name Typ Description
info

object

Ytterligare information.

type

string

Ytterligare informationstyp.

RuleState

Möjliga tillstånd för regeln

Värde Description
Disabled
Enabled
Expired

ScopeElement

Ett mer specifikt omfång som används för att identifiera aviseringarna som ska ignoreras.

Name Typ Description
field

string

Den aviseringsentitetstyp som ska ignoreras av.

SuppressionAlertsScope

Name Typ Description
allOf

ScopeElement[]

Alla villkor inuti måste vara sanna för att förhindra aviseringen