Microsoft. SecurityInsights automationRules 2022-12-01-preview

Определение ресурса Bicep

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

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

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

Примеры Bicep

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

param resourceName string = 'acctest0001'
param location string = 'westeurope'

resource workspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
  name: resourceName
  location: location
  properties: {
    features: {
      disableLocalAuth: false
      enableLogAccessUsingOnlyResourcePermissions: true
    }
    publicNetworkAccessForIngestion: 'Enabled'
    publicNetworkAccessForQuery: 'Enabled'
    retentionInDays: 30
    sku: {
      name: 'PerGB2018'
    }
    workspaceCapping: {
      dailyQuotaGb: -1
    }
  }
}

resource onboardingState 'Microsoft.SecurityInsights/onboardingStates@2023-06-01-preview' = {
  name: 'default'
  scope: workspace
  properties: {
    customerManagedKey: false
  }
}

resource automationRule 'Microsoft.SecurityInsights/automationRules@2022-10-01-preview' = {
  name: '3b862818-ad7b-409e-83be-8812f2a06d37'
  scope: workspace
  dependsOn: [
    onboardingState
  ]
  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'
    }
  }
}

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

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

resource symbolicname 'Microsoft.SecurityInsights/automationRules@2022-12-01-preview' = {
  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, чтобы указать тип объекта.

Для логическихиспользуйте:

{
  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 Идентификатор ресурса сборника схем. string
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 см. в журнала изменений.

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

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

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

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

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

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

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

{
  "type": "Microsoft.SecurityInsights/automationRules",
  "apiVersion": "2022-12-01-preview",
  "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, чтобы указать тип объекта.

Для логическихиспользуйте:

{
  "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 '2022-12-01-preview'
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 Идентификатор ресурса сборника схем. string
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 (поставщик AzAPI)

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

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

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

Примеры 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]
}

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

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.SecurityInsights/automationRules@2022-12-01-preview"
  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, чтобы указать тип объекта.

Для логическихиспользуйте:

{
  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@2022-12-01-preview»

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 Идентификатор ресурса сборника схем. string
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 Свойство (обязательно)