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

Automation Rules - Get

获取自动化规则。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}?api-version=2024-03-01

URI 参数

名称 必需 类型 说明
automationRuleId
path True

string

自动化规则 ID

resourceGroupName
path True

string

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string

uuid

目标订阅的 ID。 该值必须是 UUID。

workspaceName
path True

string

工作区的名称。

正则表达式模式: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

api-version
query True

string

要用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

AutomationRule

正常

Other Status Codes

CloudError

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

安全性

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=2024-03-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

自动化规则操作的类型。

AddIncidentTaskActionProperties

介绍向事件添加任务的自动化规则操作。

AutomationRule
AutomationRuleAddIncidentTaskAction

介绍将任务添加到事件的自动化规则操作

AutomationRuleBooleanCondition

描述使用布尔运算符的自动化规则条件。

AutomationRuleBooleanConditionSupportedOperator

描述布尔条件运算符。

AutomationRuleModifyPropertiesAction

介绍用于修改对象属性的自动化规则操作

AutomationRulePropertyArrayChangedConditionSupportedArrayType
AutomationRulePropertyArrayChangedConditionSupportedChangeType
AutomationRulePropertyArrayChangedValuesCondition
AutomationRulePropertyArrayConditionSupportedArrayConditionType

描述数组条件计算类型。

AutomationRulePropertyArrayConditionSupportedArrayType

描述数组条件计算的数组类型。

AutomationRulePropertyArrayValuesCondition

描述数组属性上的自动化规则条件。

AutomationRulePropertyChangedConditionSupportedChangedType
AutomationRulePropertyChangedConditionSupportedPropertyType
AutomationRulePropertyConditionSupportedOperator
AutomationRulePropertyConditionSupportedProperty

在自动化规则属性条件中要计算的属性。

AutomationRulePropertyValuesChangedCondition
AutomationRulePropertyValuesCondition
AutomationRuleRunPlaybookAction

介绍用于运行 playbook 的自动化规则操作

AutomationRuleTriggeringLogic

介绍自动化规则触发逻辑。

BooleanConditionProperties

描述将布尔运算符 (例如 AND、OR) 应用于条件的自动化规则条件

ClientInfo

有关执行某些操作的客户端 (用户或应用程序) 的信息

CloudError

错误响应结构。

CloudErrorBody

错误详细信息。

ConditionType
createdByType

创建资源的标识类型。

IncidentClassification

事件被关闭的原因

IncidentClassificationReason

事件结束的分类原因

IncidentLabel

表示事件标签

IncidentLabelType

标签的类型

IncidentOwnerInfo

有关事件分配到的用户的信息

IncidentPropertiesAction
IncidentSeverity

事件的严重性

IncidentStatus

事件的状态

OwnerType

事件分配到的所有者的类型。

PlaybookActionProperties
PropertyArrayChangedConditionProperties

描述计算数组属性的值更改的自动化规则条件

PropertyArrayConditionProperties

介绍计算数组属性值的自动化规则条件

PropertyChangedConditionProperties

描述用于评估属性值更改的自动化规则条件

PropertyConditionProperties

描述计算属性值的自动化规则条件

systemData

与资源的创建和上次修改相关的元数据。

triggersOn
triggersWhen

ActionType

自动化规则操作的类型。

名称 类型 说明
AddIncidentTask

string

向事件对象添加任务

ModifyProperties

string

修改对象的属性

RunPlaybook

string

对对象运行 playbook

AddIncidentTaskActionProperties

介绍向事件添加任务的自动化规则操作。

名称 类型 说明
description

string

任务的描述。

title

string

任务的标题。

AutomationRule

名称 类型 说明
etag

string

Azure 资源的 Etag

id

string

资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

资源的名称

properties.actions AutomationRuleAction[]:

触发自动化规则时要执行的操作。

properties.createdBy

ClientInfo

有关执行某些操作的客户端 (用户或应用程序) 的信息

properties.createdTimeUtc

string

创建自动化规则的时间。

properties.displayName

string

自动化规则的显示名称。

properties.lastModifiedBy

ClientInfo

有关执行某些操作的客户端 (用户或应用程序) 的信息

properties.lastModifiedTimeUtc

string

上次更新自动化规则的时间。

properties.order

integer

自动化规则的执行顺序。

properties.triggeringLogic

AutomationRuleTriggeringLogic

介绍自动化规则触发逻辑。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

AutomationRuleAddIncidentTaskAction

介绍将任务添加到事件的自动化规则操作

名称 类型 说明
actionConfiguration

AddIncidentTaskActionProperties

介绍向事件添加任务的自动化规则操作。

actionType string:

AddIncidentTask

自动化规则操作的类型。

order

integer

AutomationRuleBooleanCondition

描述使用布尔运算符的自动化规则条件。

名称 类型 说明
innerConditions AutomationRuleCondition[]:

描述自动化规则条件。

operator

AutomationRuleBooleanConditionSupportedOperator

描述布尔条件运算符。

AutomationRuleBooleanConditionSupportedOperator

描述布尔条件运算符。

名称 类型 说明
And

string

如果所有项条件的计算结果均为 true,则计算结果为 true

Or

string

如果至少有一个项条件的计算结果为 true,则计算结果为 true

AutomationRuleModifyPropertiesAction

介绍用于修改对象属性的自动化规则操作

名称 类型 说明
actionConfiguration

IncidentPropertiesAction

actionType string:

ModifyProperties

自动化规则操作的类型。

order

integer

AutomationRulePropertyArrayChangedConditionSupportedArrayType

名称 类型 说明
Alerts

string

评估警报的条件

Comments

string

评估批注的条件

Labels

string

评估标签上的条件

Tactics

string

评估策略的条件

AutomationRulePropertyArrayChangedConditionSupportedChangeType

名称 类型 说明
Added

string

评估添加到数组的项的条件

AutomationRulePropertyArrayChangedValuesCondition

名称 类型 说明
arrayType

AutomationRulePropertyArrayChangedConditionSupportedArrayType

changeType

AutomationRulePropertyArrayChangedConditionSupportedChangeType

AutomationRulePropertyArrayConditionSupportedArrayConditionType

描述数组条件计算类型。

名称 类型 说明
AnyItem

string

如果有任何项满足条件,则将其评估为 true

AutomationRulePropertyArrayConditionSupportedArrayType

描述数组条件计算的数组类型。

名称 类型 说明
CustomDetailValues

string

根据自定义详细信息的值评估条件

CustomDetails

string

评估自定义详细信息键的条件

AutomationRulePropertyArrayValuesCondition

描述数组属性上的自动化规则条件。

名称 类型 说明
arrayConditionType

AutomationRulePropertyArrayConditionSupportedArrayConditionType

描述数组条件计算类型。

arrayType

AutomationRulePropertyArrayConditionSupportedArrayType

描述数组条件计算的数组类型。

itemConditions AutomationRuleCondition[]:

描述自动化规则条件。

AutomationRulePropertyChangedConditionSupportedChangedType

名称 类型 说明
ChangedFrom

string

根据属性的上一个值评估条件

ChangedTo

string

根据属性的更新值评估条件

AutomationRulePropertyChangedConditionSupportedPropertyType

名称 类型 说明
IncidentOwner

string

评估事件所有者的条件

IncidentSeverity

string

评估事件严重性的条件

IncidentStatus

string

评估事件状态的条件

AutomationRulePropertyConditionSupportedOperator

名称 类型 说明
Contains

string

计算属性是否至少包含一个条件值

EndsWith

string

计算属性是否以任何条件值结尾

Equals

string

计算属性是否至少等于一个条件值

NotContains

string

如果属性不包含任何条件值,则计算

NotEndsWith

string

计算属性是否未以任何条件值结尾

NotEquals

string

如果属性不等于任何条件值,则计算

NotStartsWith

string

计算属性是否不以任何条件值开头

StartsWith

string

计算属性是否以任何条件值开头

AutomationRulePropertyConditionSupportedProperty

在自动化规则属性条件中要计算的属性。

名称 类型 说明
AccountAadTenantId

string

帐户 Azure Active Directory 租户 ID

AccountAadUserId

string

帐户 Azure Active Directory 用户 ID

AccountNTDomain

string

帐户 NetBIOS 域名

AccountName

string

帐户名称

AccountObjectGuid

string

帐户唯一标识符

AccountPUID

string

帐户 Azure Active Directory Passport 用户 ID

AccountSid

string

帐户安全标识符

AccountUPNSuffix

string

帐户用户主体名称后缀

AlertAnalyticRuleIds

string

警报的分析规则 ID

AlertProductNames

string

警报的产品名称

AzureResourceResourceId

string

Azure 资源 ID

AzureResourceSubscriptionId

string

Azure 资源订阅 ID

CloudApplicationAppId

string

云应用程序标识符

CloudApplicationAppName

string

云应用程序名称

DNSDomainName

string

dns 记录域名

FileDirectory

string

文件目录完整路径

FileHashValue

string

文件哈希值

FileName

string

不带路径的文件名

HostAzureID

string

主机 Azure 资源 ID

HostNTDomain

string

主机 NT 域

HostName

string

不带域的主机名

HostNetBiosName

string

主机 NetBIOS 名称

HostOSVersion

string

主机操作系统

IPAddress

string

IP 地址

IncidentCustomDetailsKey

string

事件自定义详细信息键

IncidentCustomDetailsValue

string

事件自定义详细信息值

IncidentDescription

string

事件的说明

IncidentLabel

string

事件的标签

IncidentProviderName

string

事件的提供程序名称

IncidentRelatedAnalyticRuleIds

string

事件的相关分析规则 ID

IncidentSeverity

string

事件的严重性

IncidentStatus

string

事件的状态

IncidentTactics

string

事件的战术

IncidentTitle

string

事件的标题

IncidentUpdatedBySource

string

事件的更新源

IoTDeviceId

string

“IoT 设备 ID

IoTDeviceModel

string

IoT 设备模型

IoTDeviceName

string

IoT 设备名称

IoTDeviceOperatingSystem

string

IoT 设备操作系统

IoTDeviceType

string

IoT 设备类型

IoTDeviceVendor

string

IoT 设备供应商

MailMessageDeliveryAction

string

邮件传递操作

MailMessageDeliveryLocation

string

邮件传递位置

MailMessageP1Sender

string

邮件 P1 发件人

MailMessageP2Sender

string

邮件 P2 发件人

MailMessageRecipient

string

邮件收件人

MailMessageSenderIP

string

邮件发件人 IP 地址

MailMessageSubject

string

邮件主题

MailboxDisplayName

string

邮箱显示名称

MailboxPrimaryAddress

string

邮箱主地址

MailboxUPN

string

邮箱用户主体名称

MalwareCategory

string

恶意软件类别

MalwareName

string

恶意软件名称

ProcessCommandLine

string

进程执行命令行

ProcessId

string

进程 ID

RegistryKey

string

注册表项路径

RegistryValueData

string

字符串格式表示形式的注册表项值

Url

string

URL

AutomationRulePropertyValuesChangedCondition

名称 类型 说明
changeType

AutomationRulePropertyChangedConditionSupportedChangedType

operator

AutomationRulePropertyConditionSupportedOperator

propertyName

AutomationRulePropertyChangedConditionSupportedPropertyType

propertyValues

string[]

AutomationRulePropertyValuesCondition

名称 类型 说明
operator

AutomationRulePropertyConditionSupportedOperator

propertyName

AutomationRulePropertyConditionSupportedProperty

在自动化规则属性条件中要评估的属性。

propertyValues

string[]

AutomationRuleRunPlaybookAction

介绍用于运行 playbook 的自动化规则操作

名称 类型 说明
actionConfiguration

PlaybookActionProperties

actionType string:

RunPlaybook

自动化规则操作的类型。

order

integer

AutomationRuleTriggeringLogic

介绍自动化规则触发逻辑。

名称 类型 说明
conditions AutomationRuleCondition[]:

要评估的条件,以确定是否应在给定对象上触发自动化规则。

expirationTimeUtc

string

确定自动化规则何时自动过期并被禁用。

isEnabled

boolean

确定是启用或禁用自动化规则。

triggersOn

triggersOn

triggersWhen

triggersWhen

BooleanConditionProperties

描述将布尔运算符 (例如 AND、OR) 应用于条件的自动化规则条件

名称 类型 说明
conditionProperties

AutomationRuleBooleanCondition

描述使用布尔运算符的自动化规则条件。

conditionType string:

Boolean

ClientInfo

有关执行某些操作的客户端 (用户或应用程序) 的信息

名称 类型 说明
email

string

客户端的电子邮件。

name

string

客户端的名称。

objectId

string

客户端的对象 ID。

userPrincipalName

string

客户端的用户主体名称。

CloudError

错误响应结构。

名称 类型 说明
error

CloudErrorBody

错误数据

CloudErrorBody

错误详细信息。

名称 类型 说明
code

string

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

message

string

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

ConditionType

名称 类型 说明
Boolean

string

将布尔运算符 (例如 AND、OR) 应用于条件

Property

string

评估对象属性值

PropertyArray

string

计算对象数组属性值

PropertyArrayChanged

string

评估对象数组属性更改的值

PropertyChanged

string

评估对象属性更改的值

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

IncidentClassification

事件被关闭的原因

名称 类型 说明
BenignPositive

string

事件为良性正

FalsePositive

string

事件为误报

TruePositive

string

事件为真正

Undetermined

string

事件分类未确定

IncidentClassificationReason

事件结束的分类原因

名称 类型 说明
InaccurateData

string

分类原因是数据不准确

IncorrectAlertLogic

string

分类原因为不正确的警报逻辑

SuspiciousActivity

string

分类原因为可疑活动

SuspiciousButExpected

string

分类原因可疑,但预期

IncidentLabel

表示事件标签

名称 类型 说明
labelName

string

标签的名称

labelType

IncidentLabelType

标签的类型

IncidentLabelType

标签的类型

名称 类型 说明
AutoAssigned

string

系统自动创建的标签

User

string

用户手动创建的标签

IncidentOwnerInfo

有关事件分配到的用户的信息

名称 类型 说明
assignedTo

string

事件分配到的用户的名称。

email

string

事件分配到的用户的电子邮件。

objectId

string

事件分配到的用户的对象 ID。

ownerType

OwnerType

事件分配到的所有者的类型。

userPrincipalName

string

事件分配到的用户的用户主体名称。

IncidentPropertiesAction

名称 类型 说明
classification

IncidentClassification

事件被关闭的原因

classificationComment

string

描述事件关闭的原因。

classificationReason

IncidentClassificationReason

事件被关闭的分类原因

labels

IncidentLabel[]

要添加到事件的标签列表。

owner

IncidentOwnerInfo

有关事件分配到的用户的信息

severity

IncidentSeverity

事件的严重性

status

IncidentStatus

事件的状态

IncidentSeverity

事件的严重性

名称 类型 说明
High

string

高严重性

Informational

string

信息严重性

Low

string

低严重性

Medium

string

中等严重性

IncidentStatus

事件的状态

名称 类型 说明
Active

string

正在处理的活动事件

Closed

string

非活动事件

New

string

当前未处理的活动事件

OwnerType

事件分配到的所有者的类型。

名称 类型 说明
Group

string

事件所有者类型是 AAD 组

Unknown

string

事件所有者类型未知

User

string

事件所有者类型是 AAD 用户

PlaybookActionProperties

名称 类型 说明
logicAppResourceId

string

playbook 资源的资源 ID。

tenantId

string

playbook 资源的租户 ID。

PropertyArrayChangedConditionProperties

描述计算数组属性的值更改的自动化规则条件

名称 类型 说明
conditionProperties

AutomationRulePropertyArrayChangedValuesCondition

conditionType string:

PropertyArrayChanged

PropertyArrayConditionProperties

介绍计算数组属性值的自动化规则条件

名称 类型 说明
conditionProperties

AutomationRulePropertyArrayValuesCondition

描述数组属性上的自动化规则条件。

conditionType string:

PropertyArray

PropertyChangedConditionProperties

描述用于评估属性值更改的自动化规则条件

名称 类型 说明
conditionProperties

AutomationRulePropertyValuesChangedCondition

conditionType string:

PropertyChanged

PropertyConditionProperties

描述计算属性值的自动化规则条件

名称 类型 说明
conditionProperties

AutomationRulePropertyValuesCondition

conditionType string:

Property

systemData

与资源的创建和上次修改相关的元数据。

名称 类型 说明
createdAt

string

资源的创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

资源上次修改的时间戳 (UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识类型。

triggersOn

名称 类型 说明
Alerts

string

在警报上触发

Incidents

string

事件触发

triggersWhen

名称 类型 说明
Created

string

对创建的对象触发

Updated

string

对更新的对象触发