你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Alerts - Update

更新警报。

PATCH https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleManagementAlerts/{alertId}?api-version=2022-08-01-preview

URI 参数

名称 必需 类型 说明
alertId
path True

string

要消除的警报的名称。

scope
path True

string

警报的范围。

api-version
query True

string

要用于此操作的 API 版本。

请求正文

名称 类型 说明
properties.isActive

boolean

默认情况下为 False;如果警报处于活动状态,则为 true。

响应

名称 类型 说明
204 No Content

NoContent - 已成功更新警报。

Other Status Codes

CloudError

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

DeactivateAlert

示例请求

PATCH https://management.azure.com/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyPermanentOwnersAssignedToResource?api-version=2022-08-01-preview

{
  "properties": {
    "isActive": false
  }
}

示例响应

定义

名称 说明
Alert

警报。

AlertConfiguration

警报配置。

AlertDefinition

警报定义

AlertIncident

警报事件

CloudError

来自服务的错误响应。

CloudErrorBody

来自服务的错误响应。

SeverityLevel

警报的严重级别。

Alert

警报。

名称 类型 说明
id

string

警报 ID。

name

string

警报名称。

properties.alertConfiguration

AlertConfiguration

警报配置。

properties.alertDefinition

AlertDefinition

警报定义。

properties.alertIncidents

AlertIncident[]

警报事件。

properties.incidentCount

integer

警报生成的事件数。

properties.isActive

boolean

默认情况下为 False;如果警报处于活动状态,则为 true。

properties.lastModifiedDateTime

string

更新警报配置或生成新事件的日期时间。

properties.lastScannedDateTime

string

上次扫描警报的日期时间。

properties.scope

string

警报范围。

type

string

警报类型。

AlertConfiguration

警报配置。

名称 类型 说明
id

string

警报配置 ID。

name

string

警报配置名称。

properties.alertConfigurationType

string

警报配置类型。

properties.alertDefinition

AlertDefinition

警报定义。

properties.alertDefinitionId

string

警报定义 ID。

properties.isEnabled

boolean

如果启用警报,则为 True,false 将禁用对特定警报的扫描。

properties.scope

string

警报范围。

type

string

警报配置类型。

AlertDefinition

警报定义

名称 类型 说明
id

string

警报定义 ID。

name

string

警报定义名称。

properties.description

string

警报说明。

properties.displayName

string

警报显示名称。

properties.howToPrevent

string

阻止警报的方法。

properties.isConfigurable

boolean

如果可以配置警报配置,则为 True;否则为 false。

properties.isRemediatable

boolean

如果可以修正警报,则为 True;否则为 false。

properties.mitigationSteps

string

缓解警报的方法。

properties.scope

string

警报范围。

properties.securityImpact

string

警报的安全影响。

properties.severityLevel

SeverityLevel

警报的严重级别。

type

string

警报定义类型。

AlertIncident

警报事件

名称 类型 说明
id

string

警报事件 ID。

name

string

警报事件名称。

properties.alertIncidentType

string

警报事件类型。

type

string

警报事件类型。

CloudError

来自服务的错误响应。

名称 类型 说明
error

CloudErrorBody

来自服务的错误响应。

CloudErrorBody

来自服务的错误响应。

名称 类型 说明
code

string

错误的标识符。 代码是固定的,旨在以编程方式使用。

message

string

描述错误的消息,该消息适用于在用户界面中显示。

SeverityLevel

警报的严重级别。

名称 类型 说明
High

string

Low

string

Medium

string