你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Alert Configurations - Update
更新警报配置。
PATCH https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleManagementAlertConfigurations/{alertId}?api-version=2022-08-01-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
alert
|
path | True |
string |
要更新的警报配置的名称。 |
scope
|
path | True |
string |
警报配置的范围。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
properties.alertConfigurationType | True |
string |
警报配置类型。 |
properties.isEnabled |
boolean |
如果启用警报,则为 True,false 将禁用对特定警报的扫描。 |
响应
名称 | 类型 | 说明 |
---|---|---|
204 No Content |
NoContent - 已成功更新警报。 |
|
Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
UpdateAlertConfiguration
示例请求
PATCH https://management.azure.com/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyOwnersAssignedToResource?api-version=2022-08-01-preview
{
"properties": {
"isEnabled": true,
"thresholdNumberOfOwners": 2,
"alertConfigurationType": "TooManyOwnersAssignedToResourceAlertConfiguration"
}
}
示例响应
定义
名称 | 说明 |
---|---|
Alert |
警报配置。 |
Alert |
警报定义 |
Cloud |
来自服务的错误响应。 |
Cloud |
来自服务的错误响应。 |
Severity |
警报的严重级别。 |
AlertConfiguration
警报配置。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
警报配置 ID。 |
name |
string |
警报配置名称。 |
properties.alertConfigurationType |
string |
警报配置类型。 |
properties.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 |
警报的严重级别。 |
|
type |
string |
警报定义类型。 |
CloudError
来自服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
来自服务的错误响应。 |
CloudErrorBody
来自服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
message |
string |
描述错误的消息,该消息适用于在用户界面中显示。 |
SeverityLevel
警报的严重级别。
名称 | 类型 | 说明 |
---|---|---|
High |
string |
|
Low |
string |
|
Medium |
string |