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 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
automation
|
path | True |
string |
自動化規則識別碼 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 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 版本。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
還行 |
|
| Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| 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
自動化規則動作的類型。
| 值 | Description |
|---|---|
| ModifyProperties |
修改物件的屬性 |
| RunPlaybook |
在物件上執行教戰手冊 |
| AddIncidentTask |
將任務新增至事件物件 |
AddIncidentTaskActionProperties
描述將工作新增至事件的自動化規則動作。
| 名稱 | 類型 | Description |
|---|---|---|
| description |
string |
工作的描述。 |
| title |
string |
工作的標題。 |
AutomationRule
| 名稱 | 類型 | Description |
|---|---|---|
| etag |
string |
Azure 資源的 Etag |
| id |
string (arm-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 Resource Manager 中繼資料。 |
|
| type |
string |
資源的類型。 例如「Microsoft.Compute/virtualMachines」或「Microsoft.Storage/storageAccounts」 |
AutomationRuleAddIncidentTaskAction
描述將任務新增至事件的自動化規則動作
| 名稱 | 類型 | Description |
|---|---|---|
| actionConfiguration |
描述將工作新增至事件的自動化規則動作。 |
|
| actionType |
string:
Add |
自動化規則動作的類型。 |
| order |
integer (int32) |
AutomationRuleBooleanCondition
描述具有布爾運算子的自動化規則條件。
| 名稱 | 類型 | Description |
|---|---|---|
| innerConditions | AutomationRuleCondition[]: |
描述自動化規則條件。 |
| operator |
描述布爾條件運算符。 |
AutomationRuleBooleanConditionSupportedOperator
描述布爾條件運算符。
| 值 | Description |
|---|---|
| And |
如果所有項目條件都評估為 true,則評估為 true |
| Or |
如果至少有一個項目條件評估為 true,則評估為 true |
AutomationRuleModifyPropertiesAction
描述修改物件屬性的自動化規則動作
| 名稱 | 類型 | Description |
|---|---|---|
| actionConfiguration | ||
| actionType |
string:
Modify |
自動化規則動作的類型。 |
| order |
integer (int32) |
AutomationRulePropertyArrayChangedConditionSupportedArrayType
| 值 | Description |
|---|---|
| Alerts |
評估警示的狀況 |
| Labels |
評估標籤上的狀況 |
| Tactics |
評估戰術的條件 |
| Comments |
評估註解上的條件 |
AutomationRulePropertyArrayChangedConditionSupportedChangeType
| 值 | Description |
|---|---|
| Added |
評估新增至陣列的專案的條件 |
AutomationRulePropertyArrayChangedValuesCondition
| 名稱 | 類型 | Description |
|---|---|---|
| arrayType |
Automation |
|
| changeType |
Automation |
AutomationRulePropertyArrayConditionSupportedArrayConditionType
描述陣列條件評估類型。
| 值 | Description |
|---|---|
| AnyItem |
如果任何項目滿足條件,則將條件評估為 true |
| AllItems |
如果所有專案都滿足條件,則將條件評估為 true |
AutomationRulePropertyArrayConditionSupportedArrayType
描述陣列條件評估的陣列類型。
| 值 | Description |
|---|---|
| CustomDetails |
評估自訂詳細資料索引鍵的條件 |
| CustomDetailValues |
評估自訂詳細資料值的條件 |
AutomationRulePropertyArrayValuesCondition
描述陣列屬性上的自動化規則條件。
| 名稱 | 類型 | Description |
|---|---|---|
| arrayConditionType |
Automation |
描述陣列條件評估類型。 |
| arrayType |
描述陣列條件評估的陣列類型。 |
|
| itemConditions | AutomationRuleCondition[]: |
描述自動化規則條件。 |
AutomationRulePropertyChangedConditionSupportedChangedType
| 值 | Description |
|---|---|
| ChangedFrom |
評估屬性先前值的條件 |
| ChangedTo |
評估屬性更新值的條件 |
AutomationRulePropertyChangedConditionSupportedPropertyType
| 值 | Description |
|---|---|
| IncidentSeverity |
評估事件嚴重性的狀況 |
| IncidentStatus |
評估事件狀態的狀況 |
| IncidentOwner |
評估事件擁有者的狀況 |
AutomationRulePropertyConditionSupportedOperator
| 值 | Description |
|---|---|
| Equals |
評估屬性是否至少等於其中一個條件值 |
| NotEquals |
評估屬性是否不等於任何條件值 |
| Contains |
評估屬性是否至少包含一個條件值 |
| NotContains |
評估屬性是否不包含任何條件值 |
| StartsWith |
評估屬性是否以任何條件值開頭 |
| NotStartsWith |
評估內容是否不以任何條件值開頭 |
| EndsWith |
評估屬性是否以任何條件值結尾 |
| NotEndsWith |
評估屬性是否不以任何條件值結尾 |
AutomationRulePropertyConditionSupportedProperty
在自動化規則屬性條件中評估的屬性。
| 值 | Description |
|---|---|
| IncidentTitle |
事件名稱 |
| IncidentDescription |
事件描述 |
| IncidentSeverity |
事件的嚴重性 |
| IncidentStatus |
事件的狀態 |
| IncidentRelatedAnalyticRuleIds |
事件的相關分析規則識別碼 |
| IncidentTactics |
事件的策略 |
| IncidentLabel |
事件的標籤 |
| IncidentProviderName |
事件的提供者名稱 |
| IncidentUpdatedBySource |
事件的更新來源 |
| IncidentCustomDetailsKey |
事件自訂詳細資料索引鍵 |
| IncidentCustomDetailsValue |
事件自訂詳細資料值 |
| AccountAadTenantId |
帳戶 Azure Active Directory 租用戶識別碼 |
| AccountAadUserId |
帳戶 Azure Active Directory 使用者識別碼 |
| AccountName |
帳戶名稱 |
| AccountNTDomain |
帳戶 NetBIOS 網域名稱 |
| AccountPUID |
帳戶 Azure Active Directory Passport 使用者識別碼 |
| AccountSid |
帳戶安全性識別碼 |
| AccountObjectGuid |
帳戶唯一識別碼 |
| AccountUPNSuffix |
帳戶使用者主體名稱尾碼 |
| AlertProductNames |
警示產品的名稱 |
| AlertAnalyticRuleIds |
警示的分析規則識別碼 |
| AzureResourceResourceId |
Azure 資源識別碼 |
| AzureResourceSubscriptionId |
Azure 資源訂用帳戶識別碼 |
| CloudApplicationAppId |
雲端應用程式識別碼 |
| CloudApplicationAppName |
雲端應用程式名稱 |
| DNSDomainName |
DNS 記錄網域名稱 |
| FileDirectory |
檔案目錄完整路徑 |
| FileName |
沒有路徑的檔案名稱 |
| FileHashValue |
檔案雜湊值 |
| HostAzureID |
主機 Azure 資源識別碼 |
| HostName |
沒有網域的主機名稱 |
| HostNetBiosName |
主機 NetBIOS 名稱 |
| HostNTDomain |
主機 NT 網域 |
| HostOSVersion |
主機作業系統 |
| IoTDeviceId |
“物聯網設備 ID |
| IoTDeviceName |
IoT 裝置名稱 |
| IoTDeviceType |
IoT 裝置類型 |
| IoTDeviceVendor |
物聯網設備供應商 |
| IoTDeviceModel |
IoT 裝置模型 |
| IoTDeviceOperatingSystem |
IoT 裝置作業系統 |
| IPAddress |
IP 位址 |
| MailboxDisplayName |
信箱顯示名稱 |
| MailboxPrimaryAddress |
信箱主要位址 |
| MailboxUPN |
信箱使用者主體名稱 |
| MailMessageDeliveryAction |
郵件訊息遞送動作 |
| MailMessageDeliveryLocation |
郵件訊息遞送位置 |
| MailMessageRecipient |
郵件收件者 |
| MailMessageSenderIP |
郵件訊息寄件者 IP 位址 |
| MailMessageSubject |
郵件主旨 |
| MailMessageP1Sender |
郵件訊息 P1 寄件者 |
| MailMessageP2Sender |
郵件訊息 P2 寄件者 |
| MalwareCategory |
惡意軟體類別 |
| MalwareName |
惡意軟體名稱 |
| ProcessCommandLine |
程序執行命令列 |
| ProcessId |
進程識別碼 |
| RegistryKey |
登錄機碼路徑 |
| RegistryValueData |
字串格式表示法中的登錄機碼值 |
| Url |
網址 |
AutomationRulePropertyValuesChangedCondition
| 名稱 | 類型 | Description |
|---|---|---|
| changeType | ||
| operator | ||
| propertyName | ||
| propertyValues |
string[] |
AutomationRulePropertyValuesCondition
| 名稱 | 類型 | Description |
|---|---|---|
| operator | ||
| propertyName |
在自動化規則屬性條件中評估的屬性。 |
|
| propertyValues |
string[] |
AutomationRuleRunPlaybookAction
描述執行教戰手冊的自動化規則動作
| 名稱 | 類型 | Description |
|---|---|---|
| actionConfiguration | ||
| actionType |
string:
Run |
自動化規則動作的類型。 |
| order |
integer (int32) |
AutomationRuleTriggeringLogic
描述自動化規則觸發邏輯。
| 名稱 | 類型 | Description |
|---|---|---|
| conditions | AutomationRuleCondition[]: |
要評估以判斷是否應該在指定物件上觸發自動化規則的條件。 |
| expirationTimeUtc |
string (date-time) |
判斷自動化規則何時應該自動過期並停用。 |
| isEnabled |
boolean |
判斷自動化規則是啟用還是停用。 |
| triggersOn | ||
| triggersWhen |
BooleanConditionProperties
描述將布林運算子 (例如 AND、OR) 套用至條件的自動化規則條件
| 名稱 | 類型 | Description |
|---|---|---|
| conditionProperties |
描述具有布爾運算子的自動化規則條件。 |
|
| conditionType |
string:
Boolean |
ClientInfo
有關執行某些動作的用戶端 (使用者或應用程式) 的資訊
| 名稱 | 類型 | Description |
|---|---|---|
|
string |
客戶的電子郵件。 |
|
| name |
string |
用戶端的名稱。 |
| objectId |
string (uuid) |
用戶端的物件識別碼。 |
| userPrincipalName |
string |
用戶端的使用者主體名稱。 |
CloudError
錯誤回應結構。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤資料 |
CloudErrorBody
錯誤詳細數據。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
錯誤的識別碼。 程序代碼是不變的,而且是要以程序設計方式取用。 |
| message |
string |
描述錯誤的訊息,適用於在使用者介面中顯示。 |
ConditionType
| 值 | Description |
|---|---|
| Property |
評估物件屬性值 |
| PropertyArray |
評估物件陣列屬性值 |
| PropertyChanged |
評估物件屬性變更值 |
| PropertyArrayChanged |
評估物件陣列屬性變更值 |
| Boolean |
將布林運算子(例如 AND、OR)應用於條件 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
IncidentClassification
事件關閉的原因
| 值 | Description |
|---|---|
| Undetermined |
事件分類尚未確定 |
| TruePositive |
事件是真正的積極因素 |
| BenignPositive |
事件呈良性陽性 |
| FalsePositive |
事件為誤報 |
IncidentClassificationReason
事件關閉的分類原因
| 值 | Description |
|---|---|
| SuspiciousActivity |
分類原因是可疑活動 |
| SuspiciousButExpected |
分類原因可疑,但意料之中 |
| IncorrectAlertLogic |
分類原因是警示邏輯不正確 |
| InaccurateData |
分類原因是數據不準確 |
IncidentLabel
代表事件標籤
| 名稱 | 類型 | Description |
|---|---|---|
| labelName |
string |
標籤名稱 |
| labelType |
標籤的類型 |
IncidentLabelType
標籤的類型
| 值 | Description |
|---|---|
| User |
使用者手動建立的標籤 |
| AutoAssigned |
系統自動建立的標籤 |
IncidentOwnerInfo
事件指派給使用者的相關信息
| 名稱 | 類型 | Description |
|---|---|---|
| assignedTo |
string |
事件指派給的用戶名稱。 |
|
string |
事件指派給之用戶的電子郵件。 |
|
| objectId |
string (uuid) |
事件指派給之使用者的物件標識符。 |
| ownerType |
事件指派給的擁有者類型。 |
|
| userPrincipalName |
string |
事件指派給之使用者的用戶主體名稱。 |
IncidentPropertiesAction
| 名稱 | 類型 | Description |
|---|---|---|
| classification |
事件關閉的原因 |
|
| classificationComment |
string |
描述事件關閉的原因。 |
| classificationReason |
事件關閉的分類原因 |
|
| labels |
要新增至事件的標籤清單。 |
|
| owner |
事件指派給使用者的相關信息 |
|
| severity |
事件的嚴重性 |
|
| status |
事件的狀態 |
IncidentSeverity
事件的嚴重性
| 值 | Description |
|---|---|
| High |
高嚴重性 |
| Medium |
中等嚴重性 |
| Low |
低嚴重性 |
| Informational |
資訊嚴重性 |
IncidentStatus
事件的狀態
| 值 | Description |
|---|---|
| New |
目前未處理的作用中事件 |
| Active |
正在處理的進行中事件 |
| Closed |
非作用中事件 |
OwnerType
事件指派給的擁有者類型。
| 值 | Description |
|---|---|
| Unknown |
事件擁有者類型未知 |
| User |
事件擁有者類型是 AAD 使用者 |
| Group |
事件擁有者類型是 AAD 群組 |
PlaybookActionProperties
| 名稱 | 類型 | Description |
|---|---|---|
| logicAppResourceId |
string (arm-id) |
劇本資源的資源標識碼。 |
| tenantId |
string (uuid) |
劇本資源的租用戶標識碼。 |
PropertyArrayChangedConditionProperties
描述評估陣列屬性值變更的自動化規則條件
| 名稱 | 類型 | Description |
|---|---|---|
| conditionProperties | ||
| conditionType |
string:
Property |
PropertyArrayConditionProperties
描述評估陣列屬性值的自動化規則條件
| 名稱 | 類型 | Description |
|---|---|---|
| conditionProperties |
描述陣列屬性上的自動化規則條件。 |
|
| conditionType |
string:
Property |
PropertyChangedConditionProperties
描述評估屬性值變更的自動化規則條件
| 名稱 | 類型 | Description |
|---|---|---|
| conditionProperties | ||
| conditionType |
string:
Property |
PropertyConditionProperties
描述評估屬性值的自動化規則條件
| 名稱 | 類型 | Description |
|---|---|---|
| conditionProperties | ||
| conditionType |
string:
Property |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |
triggersOn
| 值 | Description |
|---|---|
| Incidents |
事件觸發 |
| Alerts |
觸發警示 |
triggersWhen
| 值 | Description |
|---|---|
| Created |
在建立的物件上觸發 |
| Updated |
在更新的物件上觸發 |