Поделиться через


Автоматизация Microsoft.SecurityInsightsRules 2025-03-01

Определение ресурсов Bicep

Тип ресурса automationRules можно развернуть с помощью операций, предназначенных для следующих операций:

Список измененных свойств в каждой версии API см. в журнала изменений.

Формат ресурса

Чтобы создать ресурс Microsoft.SecurityInsights/automationRules, добавьте следующий Bicep в шаблон.

resource symbolicname 'Microsoft.SecurityInsights/automationRules@2025-03-01' = {
  scope: resourceSymbolicName or scope
  etag: 'string'
  name: 'string'
  properties: {
    actions: [
      {
        order: int
        actionType: 'string'
        // For remaining properties, see AutomationRuleAction objects
      }
    ]
    displayName: 'string'
    order: int
    triggeringLogic: {
      conditions: [
        {
          conditionType: 'string'
          // For remaining properties, see AutomationRuleCondition objects
        }
      ]
      expirationTimeUtc: 'string'
      isEnabled: bool
      triggersOn: 'string'
      triggersWhen: 'string'
    }
  }
}

Объекты AutomationRuleCondition

Задайте свойство conditionType , чтобы указать тип объекта.

Для Boolean используйте:

{
  conditionProperties: {
    innerConditions: [
      {
        conditionType: 'string'
        // For remaining properties, see AutomationRuleCondition objects
      }
    ]
    operator: 'string'
  }
  conditionType: 'Boolean'
}

Для свойства используйте:

{
  conditionProperties: {
    operator: 'string'
    propertyName: 'string'
    propertyValues: [
      'string'
    ]
  }
  conditionType: 'Property'
}

Для PropertyArray используйте:

{
  conditionProperties: {
    arrayConditionType: 'string'
    arrayType: 'string'
    itemConditions: [
      {
        conditionType: 'string'
        // For remaining properties, see AutomationRuleCondition objects
      }
    ]
  }
  conditionType: 'PropertyArray'
}

Для PropertyArrayChanged используйте:

{
  conditionProperties: {
    arrayType: 'string'
    changeType: 'string'
  }
  conditionType: 'PropertyArrayChanged'
}

Для PropertyChanged используйте:

{
  conditionProperties: {
    changeType: 'string'
    operator: 'string'
    propertyName: 'string'
    propertyValues: [
      'string'
    ]
  }
  conditionType: 'PropertyChanged'
}

Объекты AutomationRuleAction

Задайте свойство actionType , чтобы указать тип объекта.

Для AddIncidentTask используйте:

{
  actionConfiguration: {
    description: 'string'
    title: 'string'
  }
  actionType: 'AddIncidentTask'
}

Для ModifyProperties используйте:

{
  actionConfiguration: {
    classification: 'string'
    classificationComment: 'string'
    classificationReason: 'string'
    labels: [
      {
        labelName: 'string'
      }
    ]
    owner: {
      assignedTo: 'string'
      email: 'string'
      objectId: 'string'
      ownerType: 'string'
      userPrincipalName: 'string'
    }
    severity: 'string'
    status: 'string'
  }
  actionType: 'ModifyProperties'
}

Для RunPlaybook используйте:

{
  actionConfiguration: {
    logicAppResourceId: 'string'
    tenantId: 'string'
  }
  actionType: 'RunPlaybook'
}

Значения свойств

Microsoft.SecurityInsights/automationRules

Name Description Value
etag Etag ресурса Azure string
name Имя ресурса строка (обязательно)
properties Свойства правила автоматизации AutomationRuleProperties (обязательно)
scope Используется при создании ресурса в области, отличной от области развертывания. Задайте для этого свойства символьное имя ресурса, чтобы применить ресурс расширения.

AddIncidentTaskActionProperties

Name Description Value
description Описание задачи. string
title Заголовок задачи. строка (обязательно)

AutomationRuleAction

Name Description Value
actionType Установите значение 'AddIncidentTask' для типа AutomationRuleAddIncidentTaskAction. Установите значение 'ModifyProperties' для типа AutomationRuleModifyPropertiesAction. Установите значение "RunPlaybook" для типа AutomationRuleRunPlaybookAction. 'AddIncidentTask'
'ModifyProperties'
RunPlaybook (обязательно)
order int (обязательный)

AutomationRuleAddIncidentTaskAction

Name Description Value
actionConfiguration Описывает действие правила автоматизации для добавления задачи в инцидент. AddIncidentTaskActionProperties
actionType Тип действия правила автоматизации. 'AddIncidentTask' (обязательно)

AutomationRuleBooleanCondition

Name Description Value
innerConditions AutomationRuleCondition[]
operator Описывает логический оператор условия. 'And'
'Or'

AutomationRuleCondition

Name Description Value
conditionType Установите значение 'Boolean' для типа BooleanConditionProperties. Установите значение 'Property' для типа PropertyConditionProperties. Установите значение 'PropertyArray' для типа PropertyArrayConditionProperties. Установите значение 'PropertyArrayChanged' для типа PropertyArrayChangedConditionProperties. Установите значение 'PropertyChanged' для типа PropertyChangedConditionProperties. 'Boolean'
'Property'
'PropertyArray'
'PropertyArrayChanged'
PropertyChanged (обязательный)

AutomationRuleModifyPropertiesAction

Name Description Value
actionConfiguration IncidentPropertiesAction
actionType Тип действия правила автоматизации. "ModifyProperties" (обязательный)

AutomationRuleProperties

Name Description Value
actions Действия, выполняемые при активации правила автоматизации. AutomationRuleAction[] (обязательно)
displayName Отображаемое имя правила автоматизации. string

Constraints:
Максимальная длина = 500 (обязательно)
order Порядок выполнения правила автоматизации. int

Constraints:
Минимальное значение = 1
Максимальное значение = 1000 (обязательно)
triggeringLogic Описывает логику активации правила автоматизации. AutomationRuleTriggeringLogic (обязательно)

AutomationRulePropertyArrayChangedValuesCondition

Name Description Value
arrayType 'Alerts'
'Comments'
'Labels'
'Tactics'
changeType 'Added'

AutomationRulePropertyArrayValuesCondition

Name Description Value
arrayConditionType Описывает тип оценки условия массива. 'AnyItem'
arrayType Описывает вычисляемого типа массива условие массива. 'CustomDetails'
'CustomDetailValues'
itemConditions AutomationRuleCondition[]

AutomationRulePropertyValuesChangedCondition

Name Description Value
changeType 'ChangedFrom'
'ChangedTo'
operator 'Contains'
'EndsWith'
'Equals'
'NotContains'
'NotEndsWith'
'NotEquals'
'NotStartsWith'
'StartsWith'
propertyName 'IncidentOwner'
'IncidentSeverity'
'IncidentStatus'
propertyValues string[]

AutomationRulePropertyValuesCondition

Name Description Value
operator 'Contains'
'EndsWith'
'Equals'
'NotContains'
'NotEndsWith'
'NotEquals'
'NotStartsWith'
'StartsWith'
propertyName Свойство для оценки в условии свойства правила автоматизации. 'AccountAadTenantId'
'AccountAadUserId'
'AccountName'
'AccountNTDomain'
'AccountObjectGuid'
'AccountPUID'
'AccountSid'
'AccountUPNSuffix'
'AlertAnalyticRuleIds'
'AlertProductNames'
'AzureResourceResourceId'
'AzureResourceSubscriptionId'
'CloudApplicationAppId'
'CloudApplicationAppName'
'DNSDomainName'
'FileDirectory'
'FileHashValue'
'FileName'
'HostAzureID'
'HostName'
'HostNetBiosName'
'HostNTDomain'
'HostOSVersion'
'IncidentCustomDetailsKey'
'IncidentCustomDetailsValue'
'IncidentDescription'
'IncidentLabel'
'IncidentProviderName'
'IncidentRelatedAnalyticRuleIds'
'IncidentSeverity'
'IncidentStatus'
'IncidentTactics'
'IncidentTitle'
'IncidentUpdatedBySource'
'IoTDeviceId'
'IoTDeviceModel'
'IoTDeviceName'
'IoTDeviceOperatingSystem'
'IoTDeviceType'
'IoTDeviceVendor'
'IPAddress'
'MailboxDisplayName'
'MailboxPrimaryAddress'
'MailboxUPN'
'MailMessageDeliveryAction'
'MailMessageDeliveryLocation'
'MailMessageP1Sender'
'MailMessageP2Sender'
'MailMessageRecipient'
'MailMessageSenderIP'
'MailMessageSubject'
'MalwareCategory'
'MalwareName'
'ProcessCommandLine'
'ProcessId'
'RegistryKey'
'RegistryValueData'
'Url'
propertyValues string[]

AutomationRuleRunPlaybookAction

Name Description Value
actionConfiguration PlaybookActionProperties
actionType Тип действия правила автоматизации. RunPlaybook (обязательно)

AutomationRuleTriggeringLogic

Name Description Value
conditions Условия, которые необходимо оценить, следует ли активировать правило автоматизации для заданного объекта. AutomationRuleCondition[]
expirationTimeUtc Определяет, когда правило автоматизации должно автоматически истекать и отключается. string
isEnabled Определяет, включено ли или отключено правило автоматизации. bool (обязательно)
triggersOn 'Alerts'
"Инциденты" (обязательно)
triggersWhen 'Created'
"Обновлено" (обязательно)

BooleanConditionProperties

Name Description Value
conditionProperties Описывает условие правила автоматизации с логическими операторами. AutomationRuleBooleanCondition
conditionType Boolean (обязательный)

IncidentLabel

Name Description Value
labelName Имя метки строка (обязательно)

IncidentOwnerInfo

Name Description Value
assignedTo Имя пользователя, которому назначен инцидент. string
email Адрес электронной почты пользователя, которому назначен инцидент. string
objectId Идентификатор объекта пользователя, которому назначен инцидент. string

Constraints:
Минимальная длина = 36
Максимальная длина = 36
Шаблон = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
ownerType Тип владельца инцидента назначается. 'Group'
'Unknown'
'User'
userPrincipalName Имя участника-пользователя, которому назначен инцидент. string

IncidentPropertiesAction

Name Description Value
classification Причина, по которой инцидент был закрыт 'BenignPositive'
'FalsePositive'
'TruePositive'
'Undetermined'
classificationComment Описывает причину закрытия инцидента. string
classificationReason Причина классификации инцидента была закрыта 'InaccurateData'
'IncorrectAlertLogic'
'SuspiciousActivity'
'SuspiciousButExpected'
labels Список меток для добавления в инцидент. IncidentLabel[]
owner Сведения о пользователе, которому назначен инцидент IncidentOwnerInfo
severity Серьезность инцидента 'High'
'Informational'
'Low'
'Medium'
status Состояние инцидента 'Active'
'Closed'
'New'

PlaybookActionProperties

Name Description Value
logicAppResourceId Идентификатор ресурса сборника схем. строка (обязательно)
tenantId Идентификатор клиента ресурса сборника схем. string

Constraints:
Минимальная длина = 36
Максимальная длина = 36
Шаблон = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$

PropertyArrayChangedConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyArrayChangedValuesCondition
conditionType PropertyArrayChanged (обязательно)

PropertyArrayConditionProperties

Name Description Value
conditionProperties Описывает условие правила автоматизации для свойств массива. AutomationRulePropertyArrayValuesCondition
conditionType PropertyArray (обязательный)

PropertyChangedConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyValuesChangedCondition
conditionType PropertyChanged (обязательный)

PropertyConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyValuesCondition
conditionType Свойство (обязательно)

Определение ресурса шаблона ARM

Тип ресурса automationRules можно развернуть с помощью операций, предназначенных для следующих операций:

Список измененных свойств в каждой версии API см. в журнала изменений.

Формат ресурса

Чтобы создать ресурс Microsoft.SecurityInsights/automationRules, добавьте следующий код JSON в шаблон.

{
  "type": "Microsoft.SecurityInsights/automationRules",
  "apiVersion": "2025-03-01",
  "name": "string",
  "etag": "string",
  "properties": {
    "actions": [ {
      "order": "int",
      "actionType": "string"
      // For remaining properties, see AutomationRuleAction objects
    } ],
    "displayName": "string",
    "order": "int",
    "triggeringLogic": {
      "conditions": [ {
        "conditionType": "string"
        // For remaining properties, see AutomationRuleCondition objects
      } ],
      "expirationTimeUtc": "string",
      "isEnabled": "bool",
      "triggersOn": "string",
      "triggersWhen": "string"
    }
  }
}

Объекты AutomationRuleCondition

Задайте свойство conditionType , чтобы указать тип объекта.

Для Boolean используйте:

{
  "conditionProperties": {
    "innerConditions": [ {
      "conditionType": "string"
      // For remaining properties, see AutomationRuleCondition objects
    } ],
    "operator": "string"
  },
  "conditionType": "Boolean"
}

Для свойства используйте:

{
  "conditionProperties": {
    "operator": "string",
    "propertyName": "string",
    "propertyValues": [ "string" ]
  },
  "conditionType": "Property"
}

Для PropertyArray используйте:

{
  "conditionProperties": {
    "arrayConditionType": "string",
    "arrayType": "string",
    "itemConditions": [ {
      "conditionType": "string"
      // For remaining properties, see AutomationRuleCondition objects
    } ]
  },
  "conditionType": "PropertyArray"
}

Для PropertyArrayChanged используйте:

{
  "conditionProperties": {
    "arrayType": "string",
    "changeType": "string"
  },
  "conditionType": "PropertyArrayChanged"
}

Для PropertyChanged используйте:

{
  "conditionProperties": {
    "changeType": "string",
    "operator": "string",
    "propertyName": "string",
    "propertyValues": [ "string" ]
  },
  "conditionType": "PropertyChanged"
}

Объекты AutomationRuleAction

Задайте свойство actionType , чтобы указать тип объекта.

Для AddIncidentTask используйте:

{
  "actionConfiguration": {
    "description": "string",
    "title": "string"
  },
  "actionType": "AddIncidentTask"
}

Для ModifyProperties используйте:

{
  "actionConfiguration": {
    "classification": "string",
    "classificationComment": "string",
    "classificationReason": "string",
    "labels": [
      {
        "labelName": "string"
      }
    ],
    "owner": {
      "assignedTo": "string",
      "email": "string",
      "objectId": "string",
      "ownerType": "string",
      "userPrincipalName": "string"
    },
    "severity": "string",
    "status": "string"
  },
  "actionType": "ModifyProperties"
}

Для RunPlaybook используйте:

{
  "actionConfiguration": {
    "logicAppResourceId": "string",
    "tenantId": "string"
  },
  "actionType": "RunPlaybook"
}

Значения свойств

Microsoft.SecurityInsights/automationRules

Name Description Value
apiVersion Версия API '2025-03-01'
etag Etag ресурса Azure string
name Имя ресурса строка (обязательно)
properties Свойства правила автоматизации AutomationRuleProperties (обязательно)
type Тип ресурса 'Microsoft.SecurityInsights/automationRules'

AddIncidentTaskActionProperties

Name Description Value
description Описание задачи. string
title Заголовок задачи. строка (обязательно)

AutomationRuleAction

Name Description Value
actionType Установите значение 'AddIncidentTask' для типа AutomationRuleAddIncidentTaskAction. Установите значение 'ModifyProperties' для типа AutomationRuleModifyPropertiesAction. Установите значение "RunPlaybook" для типа AutomationRuleRunPlaybookAction. 'AddIncidentTask'
'ModifyProperties'
RunPlaybook (обязательно)
order int (обязательный)

AutomationRuleAddIncidentTaskAction

Name Description Value
actionConfiguration Описывает действие правила автоматизации для добавления задачи в инцидент. AddIncidentTaskActionProperties
actionType Тип действия правила автоматизации. 'AddIncidentTask' (обязательно)

AutomationRuleBooleanCondition

Name Description Value
innerConditions AutomationRuleCondition[]
operator Описывает логический оператор условия. 'And'
'Or'

AutomationRuleCondition

Name Description Value
conditionType Установите значение 'Boolean' для типа BooleanConditionProperties. Установите значение 'Property' для типа PropertyConditionProperties. Установите значение 'PropertyArray' для типа PropertyArrayConditionProperties. Установите значение 'PropertyArrayChanged' для типа PropertyArrayChangedConditionProperties. Установите значение 'PropertyChanged' для типа PropertyChangedConditionProperties. 'Boolean'
'Property'
'PropertyArray'
'PropertyArrayChanged'
PropertyChanged (обязательный)

AutomationRuleModifyPropertiesAction

Name Description Value
actionConfiguration IncidentPropertiesAction
actionType Тип действия правила автоматизации. "ModifyProperties" (обязательный)

AutomationRuleProperties

Name Description Value
actions Действия, выполняемые при активации правила автоматизации. AutomationRuleAction[] (обязательно)
displayName Отображаемое имя правила автоматизации. string

Constraints:
Максимальная длина = 500 (обязательно)
order Порядок выполнения правила автоматизации. int

Constraints:
Минимальное значение = 1
Максимальное значение = 1000 (обязательно)
triggeringLogic Описывает логику активации правила автоматизации. AutomationRuleTriggeringLogic (обязательно)

AutomationRulePropertyArrayChangedValuesCondition

Name Description Value
arrayType 'Alerts'
'Comments'
'Labels'
'Tactics'
changeType 'Added'

AutomationRulePropertyArrayValuesCondition

Name Description Value
arrayConditionType Описывает тип оценки условия массива. 'AnyItem'
arrayType Описывает вычисляемого типа массива условие массива. 'CustomDetails'
'CustomDetailValues'
itemConditions AutomationRuleCondition[]

AutomationRulePropertyValuesChangedCondition

Name Description Value
changeType 'ChangedFrom'
'ChangedTo'
operator 'Contains'
'EndsWith'
'Equals'
'NotContains'
'NotEndsWith'
'NotEquals'
'NotStartsWith'
'StartsWith'
propertyName 'IncidentOwner'
'IncidentSeverity'
'IncidentStatus'
propertyValues string[]

AutomationRulePropertyValuesCondition

Name Description Value
operator 'Contains'
'EndsWith'
'Equals'
'NotContains'
'NotEndsWith'
'NotEquals'
'NotStartsWith'
'StartsWith'
propertyName Свойство для оценки в условии свойства правила автоматизации. 'AccountAadTenantId'
'AccountAadUserId'
'AccountName'
'AccountNTDomain'
'AccountObjectGuid'
'AccountPUID'
'AccountSid'
'AccountUPNSuffix'
'AlertAnalyticRuleIds'
'AlertProductNames'
'AzureResourceResourceId'
'AzureResourceSubscriptionId'
'CloudApplicationAppId'
'CloudApplicationAppName'
'DNSDomainName'
'FileDirectory'
'FileHashValue'
'FileName'
'HostAzureID'
'HostName'
'HostNetBiosName'
'HostNTDomain'
'HostOSVersion'
'IncidentCustomDetailsKey'
'IncidentCustomDetailsValue'
'IncidentDescription'
'IncidentLabel'
'IncidentProviderName'
'IncidentRelatedAnalyticRuleIds'
'IncidentSeverity'
'IncidentStatus'
'IncidentTactics'
'IncidentTitle'
'IncidentUpdatedBySource'
'IoTDeviceId'
'IoTDeviceModel'
'IoTDeviceName'
'IoTDeviceOperatingSystem'
'IoTDeviceType'
'IoTDeviceVendor'
'IPAddress'
'MailboxDisplayName'
'MailboxPrimaryAddress'
'MailboxUPN'
'MailMessageDeliveryAction'
'MailMessageDeliveryLocation'
'MailMessageP1Sender'
'MailMessageP2Sender'
'MailMessageRecipient'
'MailMessageSenderIP'
'MailMessageSubject'
'MalwareCategory'
'MalwareName'
'ProcessCommandLine'
'ProcessId'
'RegistryKey'
'RegistryValueData'
'Url'
propertyValues string[]

AutomationRuleRunPlaybookAction

Name Description Value
actionConfiguration PlaybookActionProperties
actionType Тип действия правила автоматизации. RunPlaybook (обязательно)

AutomationRuleTriggeringLogic

Name Description Value
conditions Условия, которые необходимо оценить, следует ли активировать правило автоматизации для заданного объекта. AutomationRuleCondition[]
expirationTimeUtc Определяет, когда правило автоматизации должно автоматически истекать и отключается. string
isEnabled Определяет, включено ли или отключено правило автоматизации. bool (обязательно)
triggersOn 'Alerts'
"Инциденты" (обязательно)
triggersWhen 'Created'
"Обновлено" (обязательно)

BooleanConditionProperties

Name Description Value
conditionProperties Описывает условие правила автоматизации с логическими операторами. AutomationRuleBooleanCondition
conditionType Boolean (обязательный)

IncidentLabel

Name Description Value
labelName Имя метки строка (обязательно)

IncidentOwnerInfo

Name Description Value
assignedTo Имя пользователя, которому назначен инцидент. string
email Адрес электронной почты пользователя, которому назначен инцидент. string
objectId Идентификатор объекта пользователя, которому назначен инцидент. string

Constraints:
Минимальная длина = 36
Максимальная длина = 36
Шаблон = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
ownerType Тип владельца инцидента назначается. 'Group'
'Unknown'
'User'
userPrincipalName Имя участника-пользователя, которому назначен инцидент. string

IncidentPropertiesAction

Name Description Value
classification Причина, по которой инцидент был закрыт 'BenignPositive'
'FalsePositive'
'TruePositive'
'Undetermined'
classificationComment Описывает причину закрытия инцидента. string
classificationReason Причина классификации инцидента была закрыта 'InaccurateData'
'IncorrectAlertLogic'
'SuspiciousActivity'
'SuspiciousButExpected'
labels Список меток для добавления в инцидент. IncidentLabel[]
owner Сведения о пользователе, которому назначен инцидент IncidentOwnerInfo
severity Серьезность инцидента 'High'
'Informational'
'Low'
'Medium'
status Состояние инцидента 'Active'
'Closed'
'New'

PlaybookActionProperties

Name Description Value
logicAppResourceId Идентификатор ресурса сборника схем. строка (обязательно)
tenantId Идентификатор клиента ресурса сборника схем. string

Constraints:
Минимальная длина = 36
Максимальная длина = 36
Шаблон = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$

PropertyArrayChangedConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyArrayChangedValuesCondition
conditionType PropertyArrayChanged (обязательно)

PropertyArrayConditionProperties

Name Description Value
conditionProperties Описывает условие правила автоматизации для свойств массива. AutomationRulePropertyArrayValuesCondition
conditionType PropertyArray (обязательный)

PropertyChangedConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyValuesChangedCondition
conditionType PropertyChanged (обязательный)

PropertyConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyValuesCondition
conditionType Свойство (обязательно)

Примеры использования

Шаблоны быстрого запуска Azure

Следующие шаблоны быстрого запуска Azure развертывают этот тип ресурса.

Template Description
Создает новое правило автоматизации Microsoft Sentinel

Развертывание в Azure
В этом примере показано, как создать новое правило автоматизации в Microsoft Sentinel

Определение ресурса Terraform (поставщик AzAPI)

Тип ресурса automationRules можно развернуть с помощью операций, предназначенных для следующих операций:

Список измененных свойств в каждой версии API см. в журнала изменений.

Формат ресурса

Чтобы создать ресурс Microsoft.SecurityInsights/automationRules, добавьте следующий объект Terraform в шаблон.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.SecurityInsights/automationRules@2025-03-01"
  name = "string"
  parent_id = "string"
  body = {
    etag = "string"
    properties = {
      actions = [
        {
          order = int
          actionType = "string"
          // For remaining properties, see AutomationRuleAction objects
        }
      ]
      displayName = "string"
      order = int
      triggeringLogic = {
        conditions = [
          {
            conditionType = "string"
            // For remaining properties, see AutomationRuleCondition objects
          }
        ]
        expirationTimeUtc = "string"
        isEnabled = bool
        triggersOn = "string"
        triggersWhen = "string"
      }
    }
  }
}

Объекты AutomationRuleCondition

Задайте свойство conditionType , чтобы указать тип объекта.

Для Boolean используйте:

{
  conditionProperties = {
    innerConditions = [
      {
        conditionType = "string"
        // For remaining properties, see AutomationRuleCondition objects
      }
    ]
    operator = "string"
  }
  conditionType = "Boolean"
}

Для свойства используйте:

{
  conditionProperties = {
    operator = "string"
    propertyName = "string"
    propertyValues = [
      "string"
    ]
  }
  conditionType = "Property"
}

Для PropertyArray используйте:

{
  conditionProperties = {
    arrayConditionType = "string"
    arrayType = "string"
    itemConditions = [
      {
        conditionType = "string"
        // For remaining properties, see AutomationRuleCondition objects
      }
    ]
  }
  conditionType = "PropertyArray"
}

Для PropertyArrayChanged используйте:

{
  conditionProperties = {
    arrayType = "string"
    changeType = "string"
  }
  conditionType = "PropertyArrayChanged"
}

Для PropertyChanged используйте:

{
  conditionProperties = {
    changeType = "string"
    operator = "string"
    propertyName = "string"
    propertyValues = [
      "string"
    ]
  }
  conditionType = "PropertyChanged"
}

Объекты AutomationRuleAction

Задайте свойство actionType , чтобы указать тип объекта.

Для AddIncidentTask используйте:

{
  actionConfiguration = {
    description = "string"
    title = "string"
  }
  actionType = "AddIncidentTask"
}

Для ModifyProperties используйте:

{
  actionConfiguration = {
    classification = "string"
    classificationComment = "string"
    classificationReason = "string"
    labels = [
      {
        labelName = "string"
      }
    ]
    owner = {
      assignedTo = "string"
      email = "string"
      objectId = "string"
      ownerType = "string"
      userPrincipalName = "string"
    }
    severity = "string"
    status = "string"
  }
  actionType = "ModifyProperties"
}

Для RunPlaybook используйте:

{
  actionConfiguration = {
    logicAppResourceId = "string"
    tenantId = "string"
  }
  actionType = "RunPlaybook"
}

Значения свойств

Microsoft.SecurityInsights/automationRules

Name Description Value
etag Etag ресурса Azure string
name Имя ресурса строка (обязательно)
parent_id Идентификатор ресурса для применения этого ресурса расширения. строка (обязательно)
properties Свойства правила автоматизации AutomationRuleProperties (обязательно)
type Тип ресурса "Microsoft.SecurityInsights/automationRules@2025-03-01"

AddIncidentTaskActionProperties

Name Description Value
description Описание задачи. string
title Заголовок задачи. строка (обязательно)

AutomationRuleAction

Name Description Value
actionType Установите значение 'AddIncidentTask' для типа AutomationRuleAddIncidentTaskAction. Установите значение 'ModifyProperties' для типа AutomationRuleModifyPropertiesAction. Установите значение "RunPlaybook" для типа AutomationRuleRunPlaybookAction. 'AddIncidentTask'
'ModifyProperties'
RunPlaybook (обязательно)
order int (обязательный)

AutomationRuleAddIncidentTaskAction

Name Description Value
actionConfiguration Описывает действие правила автоматизации для добавления задачи в инцидент. AddIncidentTaskActionProperties
actionType Тип действия правила автоматизации. 'AddIncidentTask' (обязательно)

AutomationRuleBooleanCondition

Name Description Value
innerConditions AutomationRuleCondition[]
operator Описывает логический оператор условия. 'And'
'Or'

AutomationRuleCondition

Name Description Value
conditionType Установите значение 'Boolean' для типа BooleanConditionProperties. Установите значение 'Property' для типа PropertyConditionProperties. Установите значение 'PropertyArray' для типа PropertyArrayConditionProperties. Установите значение 'PropertyArrayChanged' для типа PropertyArrayChangedConditionProperties. Установите значение 'PropertyChanged' для типа PropertyChangedConditionProperties. 'Boolean'
'Property'
'PropertyArray'
'PropertyArrayChanged'
PropertyChanged (обязательный)

AutomationRuleModifyPropertiesAction

Name Description Value
actionConfiguration IncidentPropertiesAction
actionType Тип действия правила автоматизации. "ModifyProperties" (обязательный)

AutomationRuleProperties

Name Description Value
actions Действия, выполняемые при активации правила автоматизации. AutomationRuleAction[] (обязательно)
displayName Отображаемое имя правила автоматизации. string

Constraints:
Максимальная длина = 500 (обязательно)
order Порядок выполнения правила автоматизации. int

Constraints:
Минимальное значение = 1
Максимальное значение = 1000 (обязательно)
triggeringLogic Описывает логику активации правила автоматизации. AutomationRuleTriggeringLogic (обязательно)

AutomationRulePropertyArrayChangedValuesCondition

Name Description Value
arrayType 'Alerts'
'Comments'
'Labels'
'Tactics'
changeType 'Added'

AutomationRulePropertyArrayValuesCondition

Name Description Value
arrayConditionType Описывает тип оценки условия массива. 'AnyItem'
arrayType Описывает вычисляемого типа массива условие массива. 'CustomDetails'
'CustomDetailValues'
itemConditions AutomationRuleCondition[]

AutomationRulePropertyValuesChangedCondition

Name Description Value
changeType 'ChangedFrom'
'ChangedTo'
operator 'Contains'
'EndsWith'
'Equals'
'NotContains'
'NotEndsWith'
'NotEquals'
'NotStartsWith'
'StartsWith'
propertyName 'IncidentOwner'
'IncidentSeverity'
'IncidentStatus'
propertyValues string[]

AutomationRulePropertyValuesCondition

Name Description Value
operator 'Contains'
'EndsWith'
'Equals'
'NotContains'
'NotEndsWith'
'NotEquals'
'NotStartsWith'
'StartsWith'
propertyName Свойство для оценки в условии свойства правила автоматизации. 'AccountAadTenantId'
'AccountAadUserId'
'AccountName'
'AccountNTDomain'
'AccountObjectGuid'
'AccountPUID'
'AccountSid'
'AccountUPNSuffix'
'AlertAnalyticRuleIds'
'AlertProductNames'
'AzureResourceResourceId'
'AzureResourceSubscriptionId'
'CloudApplicationAppId'
'CloudApplicationAppName'
'DNSDomainName'
'FileDirectory'
'FileHashValue'
'FileName'
'HostAzureID'
'HostName'
'HostNetBiosName'
'HostNTDomain'
'HostOSVersion'
'IncidentCustomDetailsKey'
'IncidentCustomDetailsValue'
'IncidentDescription'
'IncidentLabel'
'IncidentProviderName'
'IncidentRelatedAnalyticRuleIds'
'IncidentSeverity'
'IncidentStatus'
'IncidentTactics'
'IncidentTitle'
'IncidentUpdatedBySource'
'IoTDeviceId'
'IoTDeviceModel'
'IoTDeviceName'
'IoTDeviceOperatingSystem'
'IoTDeviceType'
'IoTDeviceVendor'
'IPAddress'
'MailboxDisplayName'
'MailboxPrimaryAddress'
'MailboxUPN'
'MailMessageDeliveryAction'
'MailMessageDeliveryLocation'
'MailMessageP1Sender'
'MailMessageP2Sender'
'MailMessageRecipient'
'MailMessageSenderIP'
'MailMessageSubject'
'MalwareCategory'
'MalwareName'
'ProcessCommandLine'
'ProcessId'
'RegistryKey'
'RegistryValueData'
'Url'
propertyValues string[]

AutomationRuleRunPlaybookAction

Name Description Value
actionConfiguration PlaybookActionProperties
actionType Тип действия правила автоматизации. RunPlaybook (обязательно)

AutomationRuleTriggeringLogic

Name Description Value
conditions Условия, которые необходимо оценить, следует ли активировать правило автоматизации для заданного объекта. AutomationRuleCondition[]
expirationTimeUtc Определяет, когда правило автоматизации должно автоматически истекать и отключается. string
isEnabled Определяет, включено ли или отключено правило автоматизации. bool (обязательно)
triggersOn 'Alerts'
"Инциденты" (обязательно)
triggersWhen 'Created'
"Обновлено" (обязательно)

BooleanConditionProperties

Name Description Value
conditionProperties Описывает условие правила автоматизации с логическими операторами. AutomationRuleBooleanCondition
conditionType Boolean (обязательный)

IncidentLabel

Name Description Value
labelName Имя метки строка (обязательно)

IncidentOwnerInfo

Name Description Value
assignedTo Имя пользователя, которому назначен инцидент. string
email Адрес электронной почты пользователя, которому назначен инцидент. string
objectId Идентификатор объекта пользователя, которому назначен инцидент. string

Constraints:
Минимальная длина = 36
Максимальная длина = 36
Шаблон = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
ownerType Тип владельца инцидента назначается. 'Group'
'Unknown'
'User'
userPrincipalName Имя участника-пользователя, которому назначен инцидент. string

IncidentPropertiesAction

Name Description Value
classification Причина, по которой инцидент был закрыт 'BenignPositive'
'FalsePositive'
'TruePositive'
'Undetermined'
classificationComment Описывает причину закрытия инцидента. string
classificationReason Причина классификации инцидента была закрыта 'InaccurateData'
'IncorrectAlertLogic'
'SuspiciousActivity'
'SuspiciousButExpected'
labels Список меток для добавления в инцидент. IncidentLabel[]
owner Сведения о пользователе, которому назначен инцидент IncidentOwnerInfo
severity Серьезность инцидента 'High'
'Informational'
'Low'
'Medium'
status Состояние инцидента 'Active'
'Closed'
'New'

PlaybookActionProperties

Name Description Value
logicAppResourceId Идентификатор ресурса сборника схем. строка (обязательно)
tenantId Идентификатор клиента ресурса сборника схем. string

Constraints:
Минимальная длина = 36
Максимальная длина = 36
Шаблон = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$

PropertyArrayChangedConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyArrayChangedValuesCondition
conditionType PropertyArrayChanged (обязательно)

PropertyArrayConditionProperties

Name Description Value
conditionProperties Описывает условие правила автоматизации для свойств массива. AutomationRulePropertyArrayValuesCondition
conditionType PropertyArray (обязательный)

PropertyChangedConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyValuesChangedCondition
conditionType PropertyChanged (обязательный)

PropertyConditionProperties

Name Description Value
conditionProperties AutomationRulePropertyValuesCondition
conditionType Свойство (обязательно)

Примеры использования

Примеры Terraform

Простой пример развертывания правила автоматизации Sentinel.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "workspace" {
  type      = "Microsoft.OperationalInsights/workspaces@2022-10-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      features = {
        disableLocalAuth                            = false
        enableLogAccessUsingOnlyResourcePermissions = true
      }
      publicNetworkAccessForIngestion = "Enabled"
      publicNetworkAccessForQuery     = "Enabled"
      retentionInDays                 = 30
      sku = {
        name = "PerGB2018"
      }
      workspaceCapping = {
        dailyQuotaGb = -1
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "onboardingState" {
  type      = "Microsoft.SecurityInsights/onboardingStates@2023-06-01-preview"
  parent_id = azapi_resource.workspace.id
  name      = "default"
  body = {
    properties = {
      customerManagedKey = false
    }
  }
}

resource "azapi_resource" "automationRule" {
  type      = "Microsoft.SecurityInsights/automationRules@2022-10-01-preview"
  parent_id = azapi_resource.workspace.id
  name      = "3b862818-ad7b-409e-83be-8812f2a06d37"
  body = {
    properties = {
      actions = [
        {
          actionConfiguration = {
            classification        = ""
            classificationComment = ""
            classificationReason  = ""
            severity              = ""
            status                = "Active"
          }
          actionType = "ModifyProperties"
          order      = 1
        },
      ]
      displayName = "acctest-SentinelAutoRule-230630033910945846"
      order       = 1
      triggeringLogic = {
        isEnabled    = true
        triggersOn   = "Incidents"
        triggersWhen = "Created"
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
  depends_on                = [azapi_resource.onboardingState]
}