stack kb security-detections-api perform-rules-bulk-action cli command
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Preview
Preview
Stack
Preview
Preview
elastic stack kb security-detections-api perform-rules-bulk-action \
--action <action> \
[options]
Apply a bulk action to detection rules
--actionenumrequired-
Values: edit
--dry-run-
Enables dry run mode for the request call. Enable dry run mode to verify that bulk actions can be applied to specified rules. Certain rules, such as prebuilt Elastic rules on a Basic subscription, can’t be edited and will return errors in the request response. Error details will contain an explanation, the rule name and/or ID, and additional troubleshooting information. To enable dry run mode on a request, add the query parameter
dry_run=trueto the end of the request URL. Rules specified in the request will be temporarily updated. These updates won’t be written to Elasticsearch.info Dry run mode is not supported for the
exportbulk action. A 400 error will be returned in the request response. --gap-auto-fill-scheduler-idstring- Gap auto fill scheduler ID used to determine gap fill status for rules
--gap-fill-statusesstring[]-
Gap fill statuses to filter rules with gaps by status (used together with gaps_range_*).
Repeatable: pass
--gap-fill-statusesmultiple times to supply more than one value --gaps-range-endstring- Gaps range end, valid only when query is provided
--gaps-range-startstring- Gaps range start, valid only when query is provided
--idsstring[]-
Array of rule
ids to which a bulk action will be applied. Do not use rule'srule_idhere. Only valid when query property is undefined.Repeatable: pass
--idsmultiple times to supply more than one value --querystring- Query to filter rules.
--duplicatestring- Duplicate object that describes applying an update action.
--runstring- Object that describes applying a manual rule run action.
--fill-gapsstring- Object that describes applying a manual gap fill action for the specified time range.
--editstring[]-
Array of objects containing the edit operations
Repeatable: pass
--editmultiple times to supply more than one value --input-filestring- path to a JSON file to use as command input
--no-validate- skip input validation and send the request as-is
--output-fieldsstring- comma-separated list of fields to include in output (dot-notation supported)
--output-templatestring- Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
--json-
output as JSON