---
title: "Patch a detection rule"
method: PATCH
path: "/api/detection_engine/rules"
tags: ["Security Detections API"]
---

# Patch a detection rule

`PATCH /api/detection_engine/rules`

**Spaces method and path for this operation:**

<div><span class="operation-verb patch">patch</span>&nbsp;<span class="operation-path">/s/{space_id}/api/detection_engine/rules</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Update specific fields of an existing detection rule using the `rule_id` or `id` field.

The difference between the `id` and `rule_id` is that the `id` is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas `rule_id` is a stable rule identifier that can be assigned during rule creation.
> warn
> When used with [API key](https://www.elastic.co/docs/deploy-manage/api-keys) authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.

> If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.

## Request body

- union
  - SecurityDetectionsAPIEqlRulePatchProps
    - `actions` SecurityDetectionsAPIRuleAction[] — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[] — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string — The rule’s description.
    - `enabled` boolean — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[]
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[] — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `id` string, uuid — A universally unique identifier
    - `interval` string — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[] — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[]
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` SecurityDetectionsAPIRequiredFieldInput[] — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[] — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_id` string — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[] — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[] — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[]
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string
    - `version` integer — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `language` 'eql'
    - `query` string — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `type` 'eql' — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `data_view_id` string
    - `event_category_override` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `tiebreaker_field` string — Sets a secondary field for sorting events
    - `timestamp_field` string — Specifies the name of the event timestamp field used for sorting a sequence of events. Not to be confused with `timestamp_override`, which specifies the more general field used for querying events within a range. Defaults to the @timestamp ECS field.
  - SecurityDetectionsAPIQueryRulePatchProps
    - `actions` SecurityDetectionsAPIRuleAction[] — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[] — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string — The rule’s description.
    - `enabled` boolean — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[]
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[] — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `id` string, uuid — A universally unique identifier
    - `interval` string — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[] — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[]
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` SecurityDetectionsAPIRequiredFieldInput[] — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[] — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_id` string — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[] — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[] — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[]
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string
    - `version` integer — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `type` 'query' — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `saved_id` string — Kibana [saved search](https://www.elastic.co/docs/explore-analyze/discover/search-sessions) used by the rule to create alerts.
    - `language` 'kuery' | 'lucene'
    - `query` string — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
  - SecurityDetectionsAPISavedQueryRulePatchProps
    - `actions` SecurityDetectionsAPIRuleAction[] — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[] — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string — The rule’s description.
    - `enabled` boolean — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[]
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[] — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `id` string, uuid — A universally unique identifier
    - `interval` string — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[] — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[]
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` SecurityDetectionsAPIRequiredFieldInput[] — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[] — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_id` string — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[] — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[] — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[]
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string
    - `version` integer — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `saved_id` string — Kibana [saved search](https://www.elastic.co/docs/explore-analyze/discover/search-sessions) used by the rule to create alerts.
    - `type` 'saved_query' — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `query` string — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `language` 'kuery' | 'lucene'
  - SecurityDetectionsAPIThresholdRulePatchProps
    - `actions` SecurityDetectionsAPIRuleAction[] — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[] — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string — The rule’s description.
    - `enabled` boolean — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[]
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[] — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `id` string, uuid — A universally unique identifier
    - `interval` string — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[] — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[]
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` SecurityDetectionsAPIRequiredFieldInput[] — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[] — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_id` string — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[] — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[] — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[]
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string
    - `version` integer — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `query` string — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `threshold` SecurityDetectionsAPIThreshold
      - `cardinality` object[] — The field on which the cardinality is applied.
        - `field` string, required — The field on which to calculate and compare the cardinality.
        - `value` integer, required — The threshold value from which an alert is generated based on unique number of values of cardinality.field.
      - `field` union, required — The field on which the threshold is applied. If you specify an empty array ([]), alerts are generated when the query returns at least the number of results specified in the value field.
        - string
        - string[]
      - `value` integer, required — The threshold value from which an alert is generated.
    - `type` 'threshold' — Rule type
    - `alert_suppression` SecurityDetectionsAPIThresholdAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration, required
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `saved_id` string — Kibana [saved search](https://www.elastic.co/docs/explore-analyze/discover/search-sessions) used by the rule to create alerts.
    - `language` 'kuery' | 'lucene'
  - SecurityDetectionsAPIThreatMatchRulePatchProps
    - `actions` SecurityDetectionsAPIRuleAction[] — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[] — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string — The rule’s description.
    - `enabled` boolean — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[]
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[] — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `id` string, uuid — A universally unique identifier
    - `interval` string — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[] — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[]
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` SecurityDetectionsAPIRequiredFieldInput[] — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[] — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_id` string — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[] — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[] — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[]
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string
    - `version` integer — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `query` string — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `threat_index` string[] — Elasticsearch indices used to check which field values generate alerts.
    - `threat_mapping` object[] — Array of entries objects that define mappings between the source event fields and the values in the Elasticsearch threat index. Each entries object must contain these fields: - field: field from the event indices on which the rule runs - type: must be mapping - value: field from the Elasticsearch threat index You can use Boolean and and or logic to define the conditions for when matching fields and values generate alerts. Sibling entries objects are evaluated using or logic, whereas multiple entries in a single entries object use and logic. See Example of Threat Match rule which uses both `and` and `or` logic.
      - `entries` SecurityDetectionsAPIThreatMappingEntry[], required
        - `field` string, nonempty, required — A string that does not contain only whitespace characters
        - `negate` boolean
        - `type` 'mapping', required
        - `value` string, nonempty, required — A string that does not contain only whitespace characters
    - `threat_query` string — Query used to determine which fields in the Elasticsearch index are used for generating alerts.
    - `type` 'threat_match' — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `concurrent_searches` integer
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `items_per_search` integer
    - `saved_id` string — Kibana [saved search](https://www.elastic.co/docs/explore-analyze/discover/search-sessions) used by the rule to create alerts.
    - `threat_filters` unknown[]
      - unknown
    - `threat_indicator_path` string — Defines the path to the threat indicator in the indicator documents (optional)
    - `threat_language` 'kuery' | 'lucene'
    - `language` 'kuery' | 'lucene'
  - SecurityDetectionsAPIMachineLearningRulePatchProps
    - `actions` SecurityDetectionsAPIRuleAction[] — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[] — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string — The rule’s description.
    - `enabled` boolean — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[]
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[] — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `id` string, uuid — A universally unique identifier
    - `interval` string — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[] — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[]
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` SecurityDetectionsAPIRequiredFieldInput[] — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[] — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_id` string — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[] — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[] — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[]
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string
    - `version` integer — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `anomaly_threshold` integer — Anomaly score threshold above which the rule creates an alert. Valid values are from 0 to 100.
    - `machine_learning_job_id` union — Machine learning job ID(s) the rule monitors for anomaly scores.
      - string
      - string[]
    - `type` 'machine_learning' — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
  - SecurityDetectionsAPINewTermsRulePatchProps
    - `actions` SecurityDetectionsAPIRuleAction[] — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[] — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string — The rule’s description.
    - `enabled` boolean — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[]
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[] — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `id` string, uuid — A universally unique identifier
    - `interval` string — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[] — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[]
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` SecurityDetectionsAPIRequiredFieldInput[] — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[] — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_id` string — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[] — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[] — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[]
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string
    - `version` integer — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `history_window_start` string, nonempty — Start date to use when checking if a term has been seen before. Supports relative dates – for example, now-30d will search the last 30 days of data when checking if a term is new. We do not recommend using absolute dates, which can cause issues with rule performance due to querying increasing amounts of data over time.
    - `new_terms_fields` string[] — Fields to monitor for new values.
    - `query` string — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `type` 'new_terms' — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `language` 'kuery' | 'lucene'
  - SecurityDetectionsAPIEsqlRulePatchProps
    - `actions` SecurityDetectionsAPIRuleAction[] — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[] — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string — The rule’s description.
    - `enabled` boolean — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[]
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[] — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `id` string, uuid — A universally unique identifier
    - `interval` string — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `language` 'esql'
    - `license` string — The rule's license.
    - `max_signals` integer — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `query` string — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `references` string[] — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[]
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` SecurityDetectionsAPIRequiredFieldInput[] — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[] — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_id` string — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[] — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[] — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[]
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string
    - `type` 'esql' — Rule type
    - `version` integer — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket

## Response `200`

Indicates a successful call.

- union
  - SecurityDetectionsAPIEqlRule
    - `actions` SecurityDetectionsAPIRuleAction[], required — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[], required — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string, required — The rule’s description.
    - `enabled` boolean, required — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[], required
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[], required — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math, required — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `interval` string, required — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer, required — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string, required — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[], required — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[], required
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` object[], required — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
      - `ecs` boolean, required — Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer, required — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[], required — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string, required — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[], required — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[], required — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[], required
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string, required
    - `version` integer, required — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `created_at` string, date-time, required
    - `created_by` string, required
    - `execution_summary` SecurityDetectionsAPIRuleExecutionSummary — Summary of the last execution of a rule. > info > This field is under development and its usage or schema may change
      - `last_execution` object, required
        - `date` string, date-time, required — Date of the last execution
        - `message` string, required
        - `metrics` SecurityDetectionsAPIRuleExecutionMetrics, required
          - `execution_gap_duration_s` integer — Duration in seconds of execution gap
          - `frozen_indices_queried_count` integer — Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.
          - `gap_range` object — Range of the execution gap
            - `gte` string, required — Start date of the execution gap
            - `lte` string, required — End date of the execution gap
          - `gap_reason` object — Detected reason for the execution gap
            - `type` 'rule_disabled' | 'rule_did_not_run', required — The type of reason for the gap (rule_disabled or rule_did_not_run)
          - `total_enrichment_duration_ms` integer — Total time spent enriching documents during current rule execution cycle
          - `total_indexing_duration_ms` integer — Total time spent indexing documents during current rule execution cycle
          - `total_search_duration_ms` integer — Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response
        - `status` 'going to run' | 'running' | 'partial failure' | 'failed' | 'succeeded', required — Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule. - going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes. - running - Rule execution started but not reached any intermediate or final status. - partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist. - failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function. - succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's "health". The rule might or might not generate any alerts despite of it.
        - `status_order` integer, required
    - `id` string, uuid, required — A universally unique identifier
    - `immutable` boolean, required — This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.
    - `revision` integer, required — The rule's revision number. It represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update. > info > Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.
    - `rule_id` string, required — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_source` union, required — Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.
      - SecurityDetectionsAPIExternalRuleSource — Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.
        - `customized_fields` object[], required — An array of customized field names — that is, fields that the user has modified from their base value. Defaults to an empty array.
          - `field_name` string, required — Name of a user-modified field in the rule object.
        - `has_base_version` boolean, required — Determines whether an external/prebuilt rule has its original, unmodified version present when the calculation of its customization status is performed (`rule_source.is_customized` and `rule_source.customized_fields`).
        - `is_customized` boolean, required — Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).
        - `type` 'external', required
      - SecurityDetectionsAPIInternalRuleSource — Type of rule source for internally sourced rules, i.e. created within the Kibana apps.
        - `type` 'internal', required
    - `updated_at` string, date-time, required
    - `updated_by` string, required
    - `language` 'eql', required
    - `query` string, required — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `type` 'eql', required — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `data_view_id` string
    - `event_category_override` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `tiebreaker_field` string — Sets a secondary field for sorting events
    - `timestamp_field` string — Specifies the name of the event timestamp field used for sorting a sequence of events. Not to be confused with `timestamp_override`, which specifies the more general field used for querying events within a range. Defaults to the @timestamp ECS field.
  - SecurityDetectionsAPIQueryRule
    - `actions` SecurityDetectionsAPIRuleAction[], required — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[], required — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string, required — The rule’s description.
    - `enabled` boolean, required — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[], required
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[], required — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math, required — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `interval` string, required — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer, required — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string, required — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[], required — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[], required
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` object[], required — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
      - `ecs` boolean, required — Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer, required — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[], required — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string, required — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[], required — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[], required — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[], required
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string, required
    - `version` integer, required — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `created_at` string, date-time, required
    - `created_by` string, required
    - `execution_summary` SecurityDetectionsAPIRuleExecutionSummary — Summary of the last execution of a rule. > info > This field is under development and its usage or schema may change
      - `last_execution` object, required
        - `date` string, date-time, required — Date of the last execution
        - `message` string, required
        - `metrics` SecurityDetectionsAPIRuleExecutionMetrics, required
          - `execution_gap_duration_s` integer — Duration in seconds of execution gap
          - `frozen_indices_queried_count` integer — Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.
          - `gap_range` object — Range of the execution gap
            - `gte` string, required — Start date of the execution gap
            - `lte` string, required — End date of the execution gap
          - `gap_reason` object — Detected reason for the execution gap
            - `type` 'rule_disabled' | 'rule_did_not_run', required — The type of reason for the gap (rule_disabled or rule_did_not_run)
          - `total_enrichment_duration_ms` integer — Total time spent enriching documents during current rule execution cycle
          - `total_indexing_duration_ms` integer — Total time spent indexing documents during current rule execution cycle
          - `total_search_duration_ms` integer — Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response
        - `status` 'going to run' | 'running' | 'partial failure' | 'failed' | 'succeeded', required — Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule. - going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes. - running - Rule execution started but not reached any intermediate or final status. - partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist. - failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function. - succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's "health". The rule might or might not generate any alerts despite of it.
        - `status_order` integer, required
    - `id` string, uuid, required — A universally unique identifier
    - `immutable` boolean, required — This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.
    - `revision` integer, required — The rule's revision number. It represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update. > info > Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.
    - `rule_id` string, required — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_source` union, required — Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.
      - SecurityDetectionsAPIExternalRuleSource — Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.
        - `customized_fields` object[], required — An array of customized field names — that is, fields that the user has modified from their base value. Defaults to an empty array.
          - `field_name` string, required — Name of a user-modified field in the rule object.
        - `has_base_version` boolean, required — Determines whether an external/prebuilt rule has its original, unmodified version present when the calculation of its customization status is performed (`rule_source.is_customized` and `rule_source.customized_fields`).
        - `is_customized` boolean, required — Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).
        - `type` 'external', required
      - SecurityDetectionsAPIInternalRuleSource — Type of rule source for internally sourced rules, i.e. created within the Kibana apps.
        - `type` 'internal', required
    - `updated_at` string, date-time, required
    - `updated_by` string, required
    - `type` 'query', required — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `saved_id` string — Kibana [saved search](https://www.elastic.co/docs/explore-analyze/discover/search-sessions) used by the rule to create alerts.
    - `language` 'kuery' | 'lucene', required
    - `query` string, required — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
  - SecurityDetectionsAPISavedQueryRule
    - `actions` SecurityDetectionsAPIRuleAction[], required — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[], required — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string, required — The rule’s description.
    - `enabled` boolean, required — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[], required
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[], required — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math, required — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `interval` string, required — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer, required — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string, required — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[], required — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[], required
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` object[], required — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
      - `ecs` boolean, required — Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer, required — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[], required — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string, required — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[], required — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[], required — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[], required
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string, required
    - `version` integer, required — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `created_at` string, date-time, required
    - `created_by` string, required
    - `execution_summary` SecurityDetectionsAPIRuleExecutionSummary — Summary of the last execution of a rule. > info > This field is under development and its usage or schema may change
      - `last_execution` object, required
        - `date` string, date-time, required — Date of the last execution
        - `message` string, required
        - `metrics` SecurityDetectionsAPIRuleExecutionMetrics, required
          - `execution_gap_duration_s` integer — Duration in seconds of execution gap
          - `frozen_indices_queried_count` integer — Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.
          - `gap_range` object — Range of the execution gap
            - `gte` string, required — Start date of the execution gap
            - `lte` string, required — End date of the execution gap
          - `gap_reason` object — Detected reason for the execution gap
            - `type` 'rule_disabled' | 'rule_did_not_run', required — The type of reason for the gap (rule_disabled or rule_did_not_run)
          - `total_enrichment_duration_ms` integer — Total time spent enriching documents during current rule execution cycle
          - `total_indexing_duration_ms` integer — Total time spent indexing documents during current rule execution cycle
          - `total_search_duration_ms` integer — Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response
        - `status` 'going to run' | 'running' | 'partial failure' | 'failed' | 'succeeded', required — Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule. - going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes. - running - Rule execution started but not reached any intermediate or final status. - partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist. - failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function. - succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's "health". The rule might or might not generate any alerts despite of it.
        - `status_order` integer, required
    - `id` string, uuid, required — A universally unique identifier
    - `immutable` boolean, required — This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.
    - `revision` integer, required — The rule's revision number. It represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update. > info > Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.
    - `rule_id` string, required — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_source` union, required — Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.
      - SecurityDetectionsAPIExternalRuleSource — Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.
        - `customized_fields` object[], required — An array of customized field names — that is, fields that the user has modified from their base value. Defaults to an empty array.
          - `field_name` string, required — Name of a user-modified field in the rule object.
        - `has_base_version` boolean, required — Determines whether an external/prebuilt rule has its original, unmodified version present when the calculation of its customization status is performed (`rule_source.is_customized` and `rule_source.customized_fields`).
        - `is_customized` boolean, required — Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).
        - `type` 'external', required
      - SecurityDetectionsAPIInternalRuleSource — Type of rule source for internally sourced rules, i.e. created within the Kibana apps.
        - `type` 'internal', required
    - `updated_at` string, date-time, required
    - `updated_by` string, required
    - `saved_id` string, required — Kibana [saved search](https://www.elastic.co/docs/explore-analyze/discover/search-sessions) used by the rule to create alerts.
    - `type` 'saved_query', required — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `query` string — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `language` 'kuery' | 'lucene', required
  - SecurityDetectionsAPIThresholdRule
    - `actions` SecurityDetectionsAPIRuleAction[], required — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[], required — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string, required — The rule’s description.
    - `enabled` boolean, required — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[], required
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[], required — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math, required — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `interval` string, required — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer, required — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string, required — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[], required — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[], required
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` object[], required — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
      - `ecs` boolean, required — Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer, required — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[], required — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string, required — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[], required — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[], required — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[], required
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string, required
    - `version` integer, required — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `created_at` string, date-time, required
    - `created_by` string, required
    - `execution_summary` SecurityDetectionsAPIRuleExecutionSummary — Summary of the last execution of a rule. > info > This field is under development and its usage or schema may change
      - `last_execution` object, required
        - `date` string, date-time, required — Date of the last execution
        - `message` string, required
        - `metrics` SecurityDetectionsAPIRuleExecutionMetrics, required
          - `execution_gap_duration_s` integer — Duration in seconds of execution gap
          - `frozen_indices_queried_count` integer — Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.
          - `gap_range` object — Range of the execution gap
            - `gte` string, required — Start date of the execution gap
            - `lte` string, required — End date of the execution gap
          - `gap_reason` object — Detected reason for the execution gap
            - `type` 'rule_disabled' | 'rule_did_not_run', required — The type of reason for the gap (rule_disabled or rule_did_not_run)
          - `total_enrichment_duration_ms` integer — Total time spent enriching documents during current rule execution cycle
          - `total_indexing_duration_ms` integer — Total time spent indexing documents during current rule execution cycle
          - `total_search_duration_ms` integer — Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response
        - `status` 'going to run' | 'running' | 'partial failure' | 'failed' | 'succeeded', required — Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule. - going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes. - running - Rule execution started but not reached any intermediate or final status. - partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist. - failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function. - succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's "health". The rule might or might not generate any alerts despite of it.
        - `status_order` integer, required
    - `id` string, uuid, required — A universally unique identifier
    - `immutable` boolean, required — This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.
    - `revision` integer, required — The rule's revision number. It represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update. > info > Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.
    - `rule_id` string, required — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_source` union, required — Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.
      - SecurityDetectionsAPIExternalRuleSource — Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.
        - `customized_fields` object[], required — An array of customized field names — that is, fields that the user has modified from their base value. Defaults to an empty array.
          - `field_name` string, required — Name of a user-modified field in the rule object.
        - `has_base_version` boolean, required — Determines whether an external/prebuilt rule has its original, unmodified version present when the calculation of its customization status is performed (`rule_source.is_customized` and `rule_source.customized_fields`).
        - `is_customized` boolean, required — Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).
        - `type` 'external', required
      - SecurityDetectionsAPIInternalRuleSource — Type of rule source for internally sourced rules, i.e. created within the Kibana apps.
        - `type` 'internal', required
    - `updated_at` string, date-time, required
    - `updated_by` string, required
    - `query` string, required — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `threshold` SecurityDetectionsAPIThreshold, required
      - `cardinality` object[] — The field on which the cardinality is applied.
        - `field` string, required — The field on which to calculate and compare the cardinality.
        - `value` integer, required — The threshold value from which an alert is generated based on unique number of values of cardinality.field.
      - `field` union, required — The field on which the threshold is applied. If you specify an empty array ([]), alerts are generated when the query returns at least the number of results specified in the value field.
        - string
        - string[]
      - `value` integer, required — The threshold value from which an alert is generated.
    - `type` 'threshold', required — Rule type
    - `alert_suppression` SecurityDetectionsAPIThresholdAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration, required
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `saved_id` string — Kibana [saved search](https://www.elastic.co/docs/explore-analyze/discover/search-sessions) used by the rule to create alerts.
    - `language` 'kuery' | 'lucene', required
  - SecurityDetectionsAPIThreatMatchRule
    - `actions` SecurityDetectionsAPIRuleAction[], required — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[], required — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string, required — The rule’s description.
    - `enabled` boolean, required — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[], required
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[], required — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math, required — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `interval` string, required — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer, required — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string, required — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[], required — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[], required
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` object[], required — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
      - `ecs` boolean, required — Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer, required — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[], required — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string, required — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[], required — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[], required — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[], required
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string, required
    - `version` integer, required — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `created_at` string, date-time, required
    - `created_by` string, required
    - `execution_summary` SecurityDetectionsAPIRuleExecutionSummary — Summary of the last execution of a rule. > info > This field is under development and its usage or schema may change
      - `last_execution` object, required
        - `date` string, date-time, required — Date of the last execution
        - `message` string, required
        - `metrics` SecurityDetectionsAPIRuleExecutionMetrics, required
          - `execution_gap_duration_s` integer — Duration in seconds of execution gap
          - `frozen_indices_queried_count` integer — Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.
          - `gap_range` object — Range of the execution gap
            - `gte` string, required — Start date of the execution gap
            - `lte` string, required — End date of the execution gap
          - `gap_reason` object — Detected reason for the execution gap
            - `type` 'rule_disabled' | 'rule_did_not_run', required — The type of reason for the gap (rule_disabled or rule_did_not_run)
          - `total_enrichment_duration_ms` integer — Total time spent enriching documents during current rule execution cycle
          - `total_indexing_duration_ms` integer — Total time spent indexing documents during current rule execution cycle
          - `total_search_duration_ms` integer — Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response
        - `status` 'going to run' | 'running' | 'partial failure' | 'failed' | 'succeeded', required — Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule. - going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes. - running - Rule execution started but not reached any intermediate or final status. - partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist. - failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function. - succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's "health". The rule might or might not generate any alerts despite of it.
        - `status_order` integer, required
    - `id` string, uuid, required — A universally unique identifier
    - `immutable` boolean, required — This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.
    - `revision` integer, required — The rule's revision number. It represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update. > info > Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.
    - `rule_id` string, required — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_source` union, required — Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.
      - SecurityDetectionsAPIExternalRuleSource — Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.
        - `customized_fields` object[], required — An array of customized field names — that is, fields that the user has modified from their base value. Defaults to an empty array.
          - `field_name` string, required — Name of a user-modified field in the rule object.
        - `has_base_version` boolean, required — Determines whether an external/prebuilt rule has its original, unmodified version present when the calculation of its customization status is performed (`rule_source.is_customized` and `rule_source.customized_fields`).
        - `is_customized` boolean, required — Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).
        - `type` 'external', required
      - SecurityDetectionsAPIInternalRuleSource — Type of rule source for internally sourced rules, i.e. created within the Kibana apps.
        - `type` 'internal', required
    - `updated_at` string, date-time, required
    - `updated_by` string, required
    - `query` string, required — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `threat_index` string[], required — Elasticsearch indices used to check which field values generate alerts.
    - `threat_mapping` object[], required — Array of entries objects that define mappings between the source event fields and the values in the Elasticsearch threat index. Each entries object must contain these fields: - field: field from the event indices on which the rule runs - type: must be mapping - value: field from the Elasticsearch threat index You can use Boolean and and or logic to define the conditions for when matching fields and values generate alerts. Sibling entries objects are evaluated using or logic, whereas multiple entries in a single entries object use and logic. See Example of Threat Match rule which uses both `and` and `or` logic.
      - `entries` SecurityDetectionsAPIThreatMappingEntry[], required
        - `field` string, nonempty, required — A string that does not contain only whitespace characters
        - `negate` boolean
        - `type` 'mapping', required
        - `value` string, nonempty, required — A string that does not contain only whitespace characters
    - `threat_query` string, required — Query used to determine which fields in the Elasticsearch index are used for generating alerts.
    - `type` 'threat_match', required — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `concurrent_searches` integer
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `items_per_search` integer
    - `saved_id` string — Kibana [saved search](https://www.elastic.co/docs/explore-analyze/discover/search-sessions) used by the rule to create alerts.
    - `threat_filters` unknown[]
      - unknown
    - `threat_indicator_path` string — Defines the path to the threat indicator in the indicator documents (optional)
    - `threat_language` 'kuery' | 'lucene'
    - `language` 'kuery' | 'lucene', required
  - SecurityDetectionsAPIMachineLearningRule
    - `actions` SecurityDetectionsAPIRuleAction[], required — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[], required — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string, required — The rule’s description.
    - `enabled` boolean, required — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[], required
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[], required — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math, required — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `interval` string, required — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer, required — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string, required — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[], required — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[], required
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` object[], required — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
      - `ecs` boolean, required — Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer, required — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[], required — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string, required — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[], required — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[], required — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[], required
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string, required
    - `version` integer, required — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `created_at` string, date-time, required
    - `created_by` string, required
    - `execution_summary` SecurityDetectionsAPIRuleExecutionSummary — Summary of the last execution of a rule. > info > This field is under development and its usage or schema may change
      - `last_execution` object, required
        - `date` string, date-time, required — Date of the last execution
        - `message` string, required
        - `metrics` SecurityDetectionsAPIRuleExecutionMetrics, required
          - `execution_gap_duration_s` integer — Duration in seconds of execution gap
          - `frozen_indices_queried_count` integer — Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.
          - `gap_range` object — Range of the execution gap
            - `gte` string, required — Start date of the execution gap
            - `lte` string, required — End date of the execution gap
          - `gap_reason` object — Detected reason for the execution gap
            - `type` 'rule_disabled' | 'rule_did_not_run', required — The type of reason for the gap (rule_disabled or rule_did_not_run)
          - `total_enrichment_duration_ms` integer — Total time spent enriching documents during current rule execution cycle
          - `total_indexing_duration_ms` integer — Total time spent indexing documents during current rule execution cycle
          - `total_search_duration_ms` integer — Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response
        - `status` 'going to run' | 'running' | 'partial failure' | 'failed' | 'succeeded', required — Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule. - going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes. - running - Rule execution started but not reached any intermediate or final status. - partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist. - failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function. - succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's "health". The rule might or might not generate any alerts despite of it.
        - `status_order` integer, required
    - `id` string, uuid, required — A universally unique identifier
    - `immutable` boolean, required — This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.
    - `revision` integer, required — The rule's revision number. It represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update. > info > Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.
    - `rule_id` string, required — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_source` union, required — Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.
      - SecurityDetectionsAPIExternalRuleSource — Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.
        - `customized_fields` object[], required — An array of customized field names — that is, fields that the user has modified from their base value. Defaults to an empty array.
          - `field_name` string, required — Name of a user-modified field in the rule object.
        - `has_base_version` boolean, required — Determines whether an external/prebuilt rule has its original, unmodified version present when the calculation of its customization status is performed (`rule_source.is_customized` and `rule_source.customized_fields`).
        - `is_customized` boolean, required — Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).
        - `type` 'external', required
      - SecurityDetectionsAPIInternalRuleSource — Type of rule source for internally sourced rules, i.e. created within the Kibana apps.
        - `type` 'internal', required
    - `updated_at` string, date-time, required
    - `updated_by` string, required
    - `anomaly_threshold` integer, required — Anomaly score threshold above which the rule creates an alert. Valid values are from 0 to 100.
    - `machine_learning_job_id` union, required — Machine learning job ID(s) the rule monitors for anomaly scores.
      - string
      - string[]
    - `type` 'machine_learning', required — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
  - SecurityDetectionsAPINewTermsRule
    - `actions` SecurityDetectionsAPIRuleAction[], required — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[], required — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string, required — The rule’s description.
    - `enabled` boolean, required — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[], required
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[], required — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math, required — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `interval` string, required — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer, required — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string, required — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[], required — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[], required
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` object[], required — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
      - `ecs` boolean, required — Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer, required — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[], required — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string, required — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[], required — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[], required — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[], required
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string, required
    - `version` integer, required — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `created_at` string, date-time, required
    - `created_by` string, required
    - `execution_summary` SecurityDetectionsAPIRuleExecutionSummary — Summary of the last execution of a rule. > info > This field is under development and its usage or schema may change
      - `last_execution` object, required
        - `date` string, date-time, required — Date of the last execution
        - `message` string, required
        - `metrics` SecurityDetectionsAPIRuleExecutionMetrics, required
          - `execution_gap_duration_s` integer — Duration in seconds of execution gap
          - `frozen_indices_queried_count` integer — Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.
          - `gap_range` object — Range of the execution gap
            - `gte` string, required — Start date of the execution gap
            - `lte` string, required — End date of the execution gap
          - `gap_reason` object — Detected reason for the execution gap
            - `type` 'rule_disabled' | 'rule_did_not_run', required — The type of reason for the gap (rule_disabled or rule_did_not_run)
          - `total_enrichment_duration_ms` integer — Total time spent enriching documents during current rule execution cycle
          - `total_indexing_duration_ms` integer — Total time spent indexing documents during current rule execution cycle
          - `total_search_duration_ms` integer — Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response
        - `status` 'going to run' | 'running' | 'partial failure' | 'failed' | 'succeeded', required — Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule. - going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes. - running - Rule execution started but not reached any intermediate or final status. - partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist. - failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function. - succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's "health". The rule might or might not generate any alerts despite of it.
        - `status_order` integer, required
    - `id` string, uuid, required — A universally unique identifier
    - `immutable` boolean, required — This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.
    - `revision` integer, required — The rule's revision number. It represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update. > info > Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.
    - `rule_id` string, required — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_source` union, required — Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.
      - SecurityDetectionsAPIExternalRuleSource — Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.
        - `customized_fields` object[], required — An array of customized field names — that is, fields that the user has modified from their base value. Defaults to an empty array.
          - `field_name` string, required — Name of a user-modified field in the rule object.
        - `has_base_version` boolean, required — Determines whether an external/prebuilt rule has its original, unmodified version present when the calculation of its customization status is performed (`rule_source.is_customized` and `rule_source.customized_fields`).
        - `is_customized` boolean, required — Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).
        - `type` 'external', required
      - SecurityDetectionsAPIInternalRuleSource — Type of rule source for internally sourced rules, i.e. created within the Kibana apps.
        - `type` 'internal', required
    - `updated_at` string, date-time, required
    - `updated_by` string, required
    - `history_window_start` string, nonempty, required — Start date to use when checking if a term has been seen before. Supports relative dates – for example, now-30d will search the last 30 days of data when checking if a term is new. We do not recommend using absolute dates, which can cause issues with rule performance due to querying increasing amounts of data over time.
    - `new_terms_fields` string[], required — Fields to monitor for new values.
    - `query` string, required — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `type` 'new_terms', required — Rule type
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `data_view_id` string
    - `filters` unknown[] — The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array. > info > This field is not supported for ES|QL rules.
      - unknown
    - `index` string[] — Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). > info > This field is not supported for ES|QL rules.
    - `language` 'kuery' | 'lucene', required
  - SecurityDetectionsAPIEsqlRule
    - `actions` SecurityDetectionsAPIRuleAction[], required — Array defining the automated actions (notifications) taken when alerts are generated.
      - `action_type_id` string, required — The action type used for sending notifications, can be: - `.slack` - `.slack_api` - `.email` - `.index` - `.pagerduty` - `.swimlane` - `.webhook` - `.servicenow` - `.servicenow-itom` - `.servicenow-sir` - `.jira` - `.resilient` - `.opsgenie` - `.teams` - `.torq` - `.tines` - `.d3security`
      - `alerts_filter` SecurityDetectionsAPIRuleActionAlertsFilter — Object containing an action’s conditional filters. - `timeframe` (object, optional): Object containing the time frame for when this action can be run. - `days` (array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between `1-7`, where `1` is Monday and `7` is Sunday. To select all days of the week, enter an empty array. - `hours` (object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the format `hh:mm` in `24` hour time. A start of `00:00` and an end of `24:00` means the action can run all day. - start (string, required): Start time in `hh:mm` format. - end (string, required): End time in `hh:mm` format. - `timezone` (string, required): An ISO timezone name, such as `Europe/Madrid` or `America/New_York`. Specific offsets such as `UTC` or `UTC+1` will also work, but lack built-in DST. - `query` (object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run. - `kql` (string, required): A KQL string. - `filters` (array of objects, required): Array of filter objects, as defined in the `kbn-es-query` package.
      - `frequency` SecurityDetectionsAPIRuleActionFrequency — The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
        - `notifyWhen` 'onActiveAlert' | 'onThrottleInterval' | 'onActionGroupChange', required — Defines how often rules run actions.
        - `summary` boolean, required — Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert
        - `throttle` union, required — Defines how often rule actions are taken.
          - 'no_actions' | 'rule'
          - string — Time interval in seconds, minutes, hours, or days.
      - `group` string — Optionally groups actions by use cases. Use `default` for alert notifications.
      - `id` string, required — The connector ID.
      - `params` SecurityDetectionsAPIRuleActionParams, required — Object containing the allowed connector fields, which varies according to the connector type. For Slack: - `message` (string, required): The notification message. For email: - `to`, `cc`, `bcc` (string): Email addresses to which the notifications are sent. At least one field must have a value. - `subject` (string, optional): Email subject line. - `message` (string, required): Email body text. For Webhook: - `body` (string, required): JSON payload. For PagerDuty: - `severity` (string, required): Severity of on the alert notification, can be: `Critical`, `Error`, `Warning` or `Info`. - `eventAction` (string, required): Event [action type](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action), which can be `trigger`, `resolve`, or `acknowledge`. - `dedupKey` (string, optional): Groups alert notifications with the same PagerDuty alert. - `timestamp` (DateTime, optional): ISO-8601 format [timestamp](https://v2.developer.pagerduty.com/docs/types#datetime). - `component` (string, optional): Source machine component responsible for the event, for example `security-solution`. - `group` (string, optional): Enables logical grouping of service components. - `source` (string, optional): The affected system. Defaults to the Kibana saved object ID of the action. - `summary` (string, options): Summary of the event. Defaults to `No summary provided`. Maximum length is 1024 characters. - `class` (string, optional): Value indicating the class/type of the event.
      - `uuid` string, nonempty — A string that does not contain only whitespace characters
    - `alias_purpose` 'savedObjectConversion' | 'savedObjectImport'
    - `alias_target_id` string
    - `author` string[], required — The rule’s author.
    - `building_block_type` string — Determines if the rule acts as a building block. If yes, the value must be `default`. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to [About building block rules](https://www.elastic.co/docs/solutions/security/detect-and-alert/about-building-block-rules).
    - `description` string, required — The rule’s description.
    - `enabled` boolean, required — Determines whether the rule is enabled. Defaults to true.
    - `exceptions_list` SecurityDetectionsAPIRuleExceptionList[], required
      - `id` string, nonempty, required — ID of the exception container
      - `list_id` string, nonempty, required — List ID of the exception container
      - `namespace_type` 'agnostic' | 'single', required — Determines the exceptions validity in rule's Kibana space
      - `type` 'detection' | 'rule_default' | 'endpoint' | 'endpoint_trusted_apps' | 'endpoint_trusted_devices' | 'endpoint_events' | 'endpoint_host_isolation_exceptions' | 'endpoint_blocklists' | 'endpoint_custom_yara_signatures', required — The exception type
    - `false_positives` string[], required — String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
    - `from` string, date-math, required — Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
    - `interval` string, required — Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
    - `investigation_fields` SecurityDetectionsAPIInvestigationFields — Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
      - `field_names` SecurityDetectionsAPINonEmptyString[], required
    - `license` string — The rule's license.
    - `max_signals` integer, required — Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run [advanced setting](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#rule-ui-advanced-params) value). > info > This setting can be superseded by the [Kibana configuration setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) `xpack.alerting.rules.run.alerts.max`, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, the rule can generate no more than 1000 alerts even if `max_signals` is set higher.
    - `meta` SecurityDetectionsAPIRuleMetadata — Placeholder for metadata about the rule. > info > This field is overwritten when you save changes to the rule’s settings.
    - `name` string, required — A human-readable name for the rule.
    - `namespace` string — Has no effect.
    - `note` string — Notes to help investigate alerts produced by the rule.
    - `outcome` 'exactMatch' | 'aliasMatch' | 'conflict'
    - `output_index` string — (deprecated) Has no effect.
    - `references` string[], required — Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
    - `related_integrations` SecurityDetectionsAPIRelatedIntegration[], required
      - `integration` string, nonempty — A string that does not contain only whitespace characters
      - `package` string, nonempty, required — A string that does not contain only whitespace characters
      - `version` string, nonempty, required — A string that does not contain only whitespace characters
    - `required_fields` object[], required — Elasticsearch fields and their types that need to be present for the rule to function. > info > The value of `required_fields` does not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Use `required_fields` as an informational property to document the fields that the rule expects to be present in the data.
      - `name` string, nonempty, required — Name of an Elasticsearch field
      - `type` string, nonempty, required — Type of the Elasticsearch field
      - `ecs` boolean, required — Indicates whether the field is ECS-compliant. This property is only present in responses. Its value is computed based on field’s name and type.
    - `response_actions` SecurityDetectionsAPIResponseAction[]
      - union
        - SecurityDetectionsAPIOsqueryResponseAction
          - `action_type_id` '.osquery', required
          - `params` SecurityDetectionsAPIOsqueryParams, required
            - `ecs_mapping` SecurityDetectionsAPIEcsMapping — Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
            - `pack_id` string — To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
            - `queries` SecurityDetectionsAPIOsqueryQuery[]
              - …
            - `query` string — To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
            - `saved_query_id` string — To run a saved query, use the saved_query_id field and specify the saved query ID. Example: "saved_query_id": "processes_elastic"
            - `timeout` number — A timeout period, in seconds, after which the query will stop running. Overwriting the default timeout allows you to support queries that require more time to complete. The default and minimum supported value is 60. The maximum supported value is 900. Example: "timeout": 120.
        - SecurityDetectionsAPIEndpointResponseAction
          - `action_type_id` '.endpoint', required
          - `params` union, required
            - SecurityDetectionsAPIDefaultParams
              - …
            - union
              - …
            - SecurityDetectionsAPIRunscriptParams — Run a script on the Elastic Defend host that triggered the alert.
              - …
    - `risk_score` integer, required — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
    - `risk_score_mapping` object[], required — Overrides generated alerts' risk_score with a value from the source event
      - `field` string, required — Source event field used to override the default `risk_score`.
      - `operator` 'equals', required
      - `risk_score` integer — A numerical representation of the alert's severity from 0 to 100, where: * `0` - `21` represents low severity * `22` - `47` represents medium severity * `48` - `73` represents high severity * `74` - `100` represents critical severity
      - `value` string, required
    - `rule_name_override` string — Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type.
    - `setup` string, required — Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
    - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
    - `severity_mapping` object[], required — Overrides generated alerts' severity with values from the source event
      - `field` string, required — Source event field used to override the default `severity`.
      - `operator` 'equals', required
      - `severity` 'low' | 'medium' | 'high' | 'critical', required — Severity level of alerts produced by the rule, which must be one of the following: * `low`: Alerts that are of interest but generally not considered to be security incidents * `medium`: Alerts that require investigation * `high`: Alerts that require immediate investigation * `critical`: Alerts that indicate it is highly likely a security incident has occurred
      - `value` string, required
    - `tags` string[], required — String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
    - `threat` SecurityDetectionsAPIThreat[], required
      - `framework` string, required — Relevant attack framework
      - `tactic` SecurityDetectionsAPIThreatTactic, required — Object containing information on the attack type
        - `id` string, required — Tactic ID
        - `name` string, required — Tactic name
        - `reference` string, required — Tactic reference
      - `technique` SecurityDetectionsAPIThreatTechnique[] — Array containing information on the attack techniques (optional)
        - `id` string, required — Technique ID
        - `name` string, required — Technique name
        - `reference` string, required — Technique reference
        - `subtechnique` SecurityDetectionsAPIThreatSubtechnique[] — Array containing more specific information on the attack technique.
          - `id` string, required — Subtechnique ID
          - `name` string, required — Subtechnique name
          - `reference` string, required — Subtechnique reference
    - `throttle` union — Defines how often rule actions are taken.
      - 'no_actions' | 'rule'
      - string — Time interval in seconds, minutes, hours, or days.
    - `timeline_id` string — Timeline template ID
    - `timeline_title` string — Timeline template title
    - `timestamp_override` string — Sets the time field used to query indices. When unspecified, rules query the `@timestamp` field. The source field must be an Elasticsearch date data type.
    - `timestamp_override_fallback_disabled` boolean — Disables the fallback to the event's @timestamp field
    - `to` string, required
    - `version` integer, required — The rule's version number. - For prebuilt rules it represents the version of the rule's content in the source [detection-rules](https://github.com/elastic/detection-rules) repository (and the corresponding `security_detection_engine` Fleet package that is used for distributing prebuilt rules). - For custom rules it is set to `1` when the rule is created. > info > It is not incremented on each update. Compare this to the `revision` field.
    - `created_at` string, date-time, required
    - `created_by` string, required
    - `execution_summary` SecurityDetectionsAPIRuleExecutionSummary — Summary of the last execution of a rule. > info > This field is under development and its usage or schema may change
      - `last_execution` object, required
        - `date` string, date-time, required — Date of the last execution
        - `message` string, required
        - `metrics` SecurityDetectionsAPIRuleExecutionMetrics, required
          - `execution_gap_duration_s` integer — Duration in seconds of execution gap
          - `frozen_indices_queried_count` integer — Count of frozen indices queried during the rule execution. These indices could not be entirely excluded after applying the time range filter.
          - `gap_range` object — Range of the execution gap
            - `gte` string, required — Start date of the execution gap
            - `lte` string, required — End date of the execution gap
          - `gap_reason` object — Detected reason for the execution gap
            - `type` 'rule_disabled' | 'rule_did_not_run', required — The type of reason for the gap (rule_disabled or rule_did_not_run)
          - `total_enrichment_duration_ms` integer — Total time spent enriching documents during current rule execution cycle
          - `total_indexing_duration_ms` integer — Total time spent indexing documents during current rule execution cycle
          - `total_search_duration_ms` integer — Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response
        - `status` 'going to run' | 'running' | 'partial failure' | 'failed' | 'succeeded', required — Custom execution status of Security rules that is different from the status used in the Alerting Framework. We merge our custom status with the Framework's status to determine the resulting status of a rule. - going to run - @deprecated Replaced by the 'running' status but left for backwards compatibility with rule execution events already written to Event Log in the prior versions of Kibana. Don't use when writing rule status changes. - running - Rule execution started but not reached any intermediate or final status. - partial failure - Rule can partially fail for various reasons either in the middle of an execution (in this case we update its status right away) or in the end of it. So currently this status can be both intermediate and final at the same time. A typical reason for a partial failure: not all the indices that the rule searches over actually exist. - failed - Rule failed to execute due to unhandled exception or a reason defined in the business logic of its executor function. - succeeded - Rule executed successfully without any issues. Note: this status is just an indication of a rule's "health". The rule might or might not generate any alerts despite of it.
        - `status_order` integer, required
    - `id` string, uuid, required — A universally unique identifier
    - `immutable` boolean, required — This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field.
    - `revision` integer, required — The rule's revision number. It represents the version of rule's object in Kibana. It is set to `0` when the rule is installed or created and then gets incremented on each update. > info > Not all updates to any rule fields will increment the revision. Only those fields that are considered static `rule parameters` can trigger revision increments. For example, an update to a rule's query or index fields will increment the rule's revision by `1`. However, changes to dynamic or technical fields like enabled or execution_summary will not cause revision increments.
    - `rule_id` string, required — A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same `rule_id`s.
    - `rule_source` union, required — Discriminated union that determines whether the rule is internally sourced (created within the Kibana app) or has an external source, such as the Elastic Prebuilt rules repo.
      - SecurityDetectionsAPIExternalRuleSource — Type of rule source for externally sourced rules, i.e. rules that have an external source, such as the Elastic Prebuilt rules repo.
        - `customized_fields` object[], required — An array of customized field names — that is, fields that the user has modified from their base value. Defaults to an empty array.
          - `field_name` string, required — Name of a user-modified field in the rule object.
        - `has_base_version` boolean, required — Determines whether an external/prebuilt rule has its original, unmodified version present when the calculation of its customization status is performed (`rule_source.is_customized` and `rule_source.customized_fields`).
        - `is_customized` boolean, required — Determines whether an external/prebuilt rule has been customized by the user (i.e. any of its fields have been modified and diverged from the base value).
        - `type` 'external', required
      - SecurityDetectionsAPIInternalRuleSource — Type of rule source for internally sourced rules, i.e. created within the Kibana apps.
        - `type` 'internal', required
    - `updated_at` string, date-time, required
    - `updated_by` string, required
    - `alert_suppression` SecurityDetectionsAPIAlertSuppression — Defines alert suppression configuration.
      - `duration` SecurityDetectionsAPIAlertSuppressionDuration
        - `unit` 's' | 'm' | 'h', required — Time unit
        - `value` integer, required
      - `group_by` string[], required
      - `missing_fields_strategy` 'doNotSuppress' | 'suppress' — Describes how alerts will be generated for documents with missing suppress by fields: doNotSuppress - per each document a separate alert will be created suppress - only alert will be created per suppress by bucket
    - `language` 'esql', required
    - `query` string, required — [Query](https://www.elastic.co/docs/explore-analyze/query-filter) used by the rule to create alerts. - For indicator match rules, only the query’s results are used to determine whether an alert is generated. - ES|QL rules have additional query requirements. Refer to [Create ES|QL](https://www.elastic.co/docs/solutions/security/detect-and-alert/create-detection-rule#create-esql-rule) rules for more information.
    - `type` 'esql', required — Rule type

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
