Automation Rules - Get
获取自动化规则。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}?api-version=2025-09-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
automation
|
path | True |
string |
自动化规则 ID |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
workspace
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$ |
工作区的名称。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
Ok |
|
| Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
AutomationRules_Get
示例请求
GET https://management.azure.com/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/automationRules/73e01a99-5cd7-4139-a149-9f2736ff2ab5?api-version=2025-09-01
示例响应
{
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/automationRules/73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"name": "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
"type": "Microsoft.SecurityInsights/automationRules",
"properties": {
"displayName": "Suspicious user sign-in events",
"order": 1,
"triggeringLogic": {
"isEnabled": true,
"triggersOn": "Incidents",
"triggersWhen": "Created",
"conditions": [
{
"conditionType": "Property",
"conditionProperties": {
"propertyName": "IncidentRelatedAnalyticRuleIds",
"operator": "Contains",
"propertyValues": [
"/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/fab3d2d4-747f-46a7-8ef0-9c0be8112bf7",
"/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/8deb8303-e94d-46ff-96e0-5fd94b33df1a"
]
}
}
]
},
"actions": [
{
"order": 1,
"actionType": "AddIncidentTask",
"actionConfiguration": {
"title": "Reset user passwords",
"description": "Reset passwords for compromised users."
}
}
],
"lastModifiedTimeUtc": "2019-01-01T13:00:30Z",
"createdTimeUtc": "2019-01-01T13:00:00Z",
"lastModifiedBy": {
"objectId": "2046feea-040d-4a46-9e2b-91c2941bfa70",
"email": "john.doe@contoso.com",
"name": "john doe",
"userPrincipalName": "john@contoso.com"
},
"createdBy": {
"objectId": "2046feea-040d-4a46-9e2b-91c2941bfa70",
"email": "john.doe@contoso.com",
"name": "john doe",
"userPrincipalName": "john@contoso.com"
}
}
}
定义
ActionType
自动化规则操作的类型。
| 值 | 说明 |
|---|---|
| ModifyProperties |
修改对象的属性 |
| RunPlaybook |
对对象运行 playbook |
| AddIncidentTask |
将任务添加到事件对象 |
AddIncidentTaskActionProperties
描述将任务添加到事件的自动化规则作。
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string |
任务的说明。 |
| title |
string |
任务的标题。 |
AutomationRule
| 名称 | 类型 | 说明 |
|---|---|---|
| etag |
string |
Azure 资源的 Etag |
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
资源的名称 |
| properties.actions | AutomationRuleAction[]: |
触发自动化规则时要执行的操作。 |
| properties.createdBy |
有关执行某些作的客户端(用户或应用程序)的信息 |
|
| properties.createdTimeUtc |
string (date-time) |
创建自动化规则的时间。 |
| properties.displayName |
string maxLength: 500 |
自动化规则的显示名称。 |
| properties.lastModifiedBy |
有关执行某些作的客户端(用户或应用程序)的信息 |
|
| properties.lastModifiedTimeUtc |
string (date-time) |
上次更新自动化规则的时间。 |
| properties.order |
integer (int32) minimum: 1maximum: 1000 |
自动化规则的执行顺序。 |
| properties.triggeringLogic |
介绍自动化规则触发逻辑。 |
|
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| type |
string |
资源类型。 例如,“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
AutomationRuleAddIncidentTaskAction
描述用于将任务添加到事件的自动化规则作
| 名称 | 类型 | 说明 |
|---|---|---|
| actionConfiguration |
描述将任务添加到事件的自动化规则作。 |
|
| actionType |
string:
Add |
自动化规则操作的类型。 |
| order |
integer (int32) |
AutomationRuleBooleanCondition
描述包含布尔运算符的自动化规则条件。
| 名称 | 类型 | 说明 |
|---|---|---|
| innerConditions | AutomationRuleCondition[]: |
描述自动化规则条件。 |
| operator |
描述布尔条件运算符。 |
AutomationRuleBooleanConditionSupportedOperator
描述布尔条件运算符。
| 值 | 说明 |
|---|---|
| And |
如果所有项条件的计算结果都为 true,则计算为 true |
| Or |
如果至少一个项条件被评估为 true,则评估为 true |
AutomationRuleModifyPropertiesAction
描述用于修改对象属性的自动化规则作
| 名称 | 类型 | 说明 |
|---|---|---|
| actionConfiguration | ||
| actionType |
string:
Modify |
自动化规则操作的类型。 |
| order |
integer (int32) |
AutomationRulePropertyArrayChangedConditionSupportedArrayType
| 值 | 说明 |
|---|---|
| Alerts |
评估警报的条件 |
| Labels |
评估标签上的状况 |
| Tactics |
评估战术的条件 |
| Comments |
评估注释的条件 |
AutomationRulePropertyArrayChangedConditionSupportedChangeType
| 值 | 说明 |
|---|---|
| Added |
评估添加到数组的项的条件 |
AutomationRulePropertyArrayChangedValuesCondition
| 名称 | 类型 | 说明 |
|---|---|---|
| arrayType |
Automation |
|
| changeType |
Automation |
AutomationRulePropertyArrayConditionSupportedArrayConditionType
描述数组条件计算类型。
| 值 | 说明 |
|---|---|
| AnyItem |
如果任何项目满足条件,则将条件评估为 true |
| AllItems |
如果所有项目都满足条件,则将条件评估为 true |
AutomationRulePropertyArrayConditionSupportedArrayType
描述数组条件评估的数组类型。
| 值 | 说明 |
|---|---|
| CustomDetails |
评估自定义详细信息键的条件 |
| CustomDetailValues |
评估自定义详细信息值的条件 |
AutomationRulePropertyArrayValuesCondition
描述数组属性的自动化规则条件。
| 名称 | 类型 | 说明 |
|---|---|---|
| arrayConditionType |
Automation |
描述数组条件计算类型。 |
| arrayType |
描述数组条件评估的数组类型。 |
|
| itemConditions | AutomationRuleCondition[]: |
描述自动化规则条件。 |
AutomationRulePropertyChangedConditionSupportedChangedType
| 值 | 说明 |
|---|---|
| ChangedFrom |
评估属性先前值的条件 |
| ChangedTo |
评估属性更新值的条件 |
AutomationRulePropertyChangedConditionSupportedPropertyType
| 值 | 说明 |
|---|---|
| IncidentSeverity |
评估事件严重性的情况 |
| IncidentStatus |
评估事件状态的条件 |
| IncidentOwner |
评估事件所有者的状况 |
AutomationRulePropertyConditionSupportedOperator
| 值 | 说明 |
|---|---|
| Equals |
评估属性是否至少等于一个条件值 |
| NotEquals |
评估属性是否不等于任何条件值 |
| Contains |
评估属性是否至少包含一个条件值 |
| NotContains |
评估属性是否不包含任何条件值 |
| StartsWith |
评估属性是否以任何条件值开头 |
| NotStartsWith |
评估属性是否不以任何条件值开头 |
| EndsWith |
评估属性是否以任何条件值结尾 |
| NotEndsWith |
评估属性是否不以任何条件值结尾 |
AutomationRulePropertyConditionSupportedProperty
在自动化规则属性条件中计算的属性。
| 值 | 说明 |
|---|---|
| IncidentTitle |
事件的标题 |
| IncidentDescription |
事件的说明 |
| IncidentSeverity |
事件的严重性 |
| IncidentStatus |
事件的状态 |
| IncidentRelatedAnalyticRuleIds |
事件的相关分析规则 ID |
| IncidentTactics |
事件的策略 |
| IncidentLabel |
事件的标签 |
| IncidentProviderName |
事件的提供程序名称 |
| IncidentUpdatedBySource |
事件的更新源 |
| IncidentCustomDetailsKey |
事件自定义详细信息键 |
| IncidentCustomDetailsValue |
事件自定义详细信息值 |
| AccountAadTenantId |
帐户 Azure Active Directory 租户 ID |
| AccountAadUserId |
帐户 Azure Active Directory 用户 ID |
| AccountName |
帐户名称 |
| AccountNTDomain |
帐户 NetBIOS 域名 |
| AccountPUID |
帐户 Azure Active Directory Passport 用户 ID |
| AccountSid |
帐户安全标识符 |
| AccountObjectGuid |
帐户唯一标识符 |
| AccountUPNSuffix |
帐户用户主体名称后缀 |
| AlertProductNames |
警报产品的名称 |
| AlertAnalyticRuleIds |
警报的分析规则 ID |
| AzureResourceResourceId |
Azure 资源 ID |
| AzureResourceSubscriptionId |
Azure 资源订阅 ID |
| CloudApplicationAppId |
云应用程序标识符 |
| CloudApplicationAppName |
云应用程序名称 |
| DNSDomainName |
dns 记录域名 |
| FileDirectory |
文件目录完整路径 |
| FileName |
没有路径的文件名 |
| FileHashValue |
文件哈希值 |
| HostAzureID |
主机 Azure 资源 ID |
| HostName |
不带域的主机名 |
| HostNetBiosName |
主机 NetBIOS 名称 |
| HostNTDomain |
主机 NT 域 |
| HostOSVersion |
主机操作系统 |
| IoTDeviceId |
“物联网设备 ID |
| IoTDeviceName |
IoT 设备名称 |
| IoTDeviceType |
IoT 设备类型 |
| IoTDeviceVendor |
IoT 设备供应商 |
| IoTDeviceModel |
IoT 设备模型 |
| IoTDeviceOperatingSystem |
IoT 设备操作系统 |
| IPAddress |
IP 地址 |
| MailboxDisplayName |
邮箱显示名称 |
| MailboxPrimaryAddress |
邮箱主地址 |
| MailboxUPN |
邮箱用户主体名称 |
| MailMessageDeliveryAction |
邮件传递操作 |
| MailMessageDeliveryLocation |
邮件传递位置 |
| MailMessageRecipient |
邮件收件人 |
| MailMessageSenderIP |
邮件发件人 IP 地址 |
| MailMessageSubject |
邮件主题 |
| MailMessageP1Sender |
邮件消息 P1 发件人 |
| MailMessageP2Sender |
邮件消息 P2 发件人 |
| MalwareCategory |
恶意软件类别 |
| MalwareName |
恶意软件名称 |
| ProcessCommandLine |
进程执行命令行 |
| ProcessId |
进程 ID |
| RegistryKey |
注册表项路径 |
| RegistryValueData |
字符串格式表示形式的注册表项值 |
| Url |
URL |
AutomationRulePropertyValuesChangedCondition
| 名称 | 类型 | 说明 |
|---|---|---|
| changeType | ||
| operator | ||
| propertyName | ||
| propertyValues |
string[] |
AutomationRulePropertyValuesCondition
| 名称 | 类型 | 说明 |
|---|---|---|
| operator | ||
| propertyName |
在自动化规则属性条件中计算的属性。 |
|
| propertyValues |
string[] |
AutomationRuleRunPlaybookAction
描述用于运行 playbook 的自动化规则作
| 名称 | 类型 | 说明 |
|---|---|---|
| actionConfiguration | ||
| actionType |
string:
Run |
自动化规则操作的类型。 |
| order |
integer (int32) |
AutomationRuleTriggeringLogic
介绍自动化规则触发逻辑。
| 名称 | 类型 | 说明 |
|---|---|---|
| conditions | AutomationRuleCondition[]: |
要评估以确定是否应在给定对象上触发自动化规则的条件。 |
| expirationTimeUtc |
string (date-time) |
确定自动化规则何时自动过期并禁用。 |
| isEnabled |
boolean |
确定是启用或禁用自动化规则。 |
| triggersOn | ||
| triggersWhen |
BooleanConditionProperties
描述将布尔运算符(例如 AND、OR)应用于条件的自动化规则条件
| 名称 | 类型 | 说明 |
|---|---|---|
| conditionProperties |
描述包含布尔运算符的自动化规则条件。 |
|
| conditionType |
string:
Boolean |
ClientInfo
有关执行某些作的客户端(用户或应用程序)的信息
| 名称 | 类型 | 说明 |
|---|---|---|
|
string |
客户端的电子邮件。 |
|
| name |
string |
客户端的名称。 |
| objectId |
string (uuid) |
客户端的对象 ID。 |
| userPrincipalName |
string |
客户端的用户主体名称。 |
CloudError
错误响应结构。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误数据 |
CloudErrorBody
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
| message |
string |
描述错误的消息,旨在适合在用户界面中显示。 |
ConditionType
| 值 | 说明 |
|---|---|
| Property |
评估对象属性值 |
| PropertyArray |
计算对象数组属性值 |
| PropertyChanged |
评估对象属性更改值 |
| PropertyArrayChanged |
计算对象数组属性更改值 |
| Boolean |
将布尔运算符(例如 AND、OR)应用于条件 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
IncidentClassification
事件关闭的原因
| 值 | 说明 |
|---|---|
| Undetermined |
事件分类未确定 |
| TruePositive |
事件是真正的阳性 |
| BenignPositive |
事件为良性阳性 |
| FalsePositive |
事件为误报 |
IncidentClassificationReason
事件被关闭的分类原因
| 值 | 说明 |
|---|---|
| SuspiciousActivity |
分类原因是可疑活动 |
| SuspiciousButExpected |
分类原因可疑但意料之中 |
| IncorrectAlertLogic |
分类原因是警报逻辑不正确 |
| InaccurateData |
分类原因是数据不准确 |
IncidentLabel
表示事件标签
| 名称 | 类型 | 说明 |
|---|---|---|
| labelName |
string |
标签的名称 |
| labelType |
标签的类型 |
IncidentLabelType
标签的类型
| 值 | 说明 |
|---|---|
| User |
用户手动创建的标签 |
| AutoAssigned |
系统自动创建的标签 |
IncidentOwnerInfo
事件分配给用户的信息
| 名称 | 类型 | 说明 |
|---|---|---|
| assignedTo |
string |
事件分配给的用户的名称。 |
|
string |
事件分配给的用户的电子邮件。 |
|
| objectId |
string (uuid) |
事件分配给的用户的对象 ID。 |
| ownerType |
事件分配给的所有者的类型。 |
|
| userPrincipalName |
string |
事件分配给的用户的用户主体名称。 |
IncidentPropertiesAction
| 名称 | 类型 | 说明 |
|---|---|---|
| classification |
事件关闭的原因 |
|
| classificationComment |
string |
描述事件关闭的原因。 |
| classificationReason |
事件被关闭的分类原因 |
|
| labels |
要添加到事件的标签列表。 |
|
| owner |
事件分配给用户的信息 |
|
| severity |
事件的严重性 |
|
| status |
事件的状态 |
IncidentSeverity
事件的严重性
| 值 | 说明 |
|---|---|
| High |
高严重性 |
| Medium |
中等严重性 |
| Low |
低严重性 |
| Informational |
信息严重性 |
IncidentStatus
事件的状态
| 值 | 说明 |
|---|---|
| New |
当前未处理的活动事件 |
| Active |
正在处理的活动事件 |
| Closed |
非活动事件 |
OwnerType
事件分配给的所有者的类型。
| 值 | 说明 |
|---|---|
| Unknown |
事件所有者类型未知 |
| User |
事件所有者类型是 AAD 用户 |
| Group |
事件所有者类型是 AAD 组 |
PlaybookActionProperties
| 名称 | 类型 | 说明 |
|---|---|---|
| logicAppResourceId |
string (arm-id) |
playbook 资源的资源 ID。 |
| tenantId |
string (uuid) |
playbook 资源的租户 ID。 |
PropertyArrayChangedConditionProperties
描述评估数组属性的值更改的自动化规则条件
| 名称 | 类型 | 说明 |
|---|---|---|
| conditionProperties | ||
| conditionType |
string:
Property |
PropertyArrayConditionProperties
描述评估数组属性值的自动化规则条件
| 名称 | 类型 | 说明 |
|---|---|---|
| conditionProperties |
描述数组属性的自动化规则条件。 |
|
| conditionType |
string:
Property |
PropertyChangedConditionProperties
描述评估属性值更改的自动化规则条件
| 名称 | 类型 | 说明 |
|---|---|---|
| conditionProperties | ||
| conditionType |
string:
Property |
PropertyConditionProperties
描述评估属性值的自动化规则条件
| 名称 | 类型 | 说明 |
|---|---|---|
| conditionProperties | ||
| conditionType |
string:
Property |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
triggersOn
| 值 | 说明 |
|---|---|
| Incidents |
事件触发 |
| Alerts |
触发警报 |
triggersWhen
| 值 | 说明 |
|---|---|
| Created |
在创建的对象上触发 |
| Updated |
在更新的对象上触发 |