﻿---
title: stack kb security-detections-api update-rule cli command
description: Update a detection rule Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://docs-v3-preview.elastic.dev/elastic/cli/pull/472/cli/stack/kb/security-detections-api/update-rule
---

# stack kb security-detections-api update-rule cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-detections-api update-rule [options]
```

Update a detection rule
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--[no-]dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--[no-]json">
    output as JSON
  </definition>
</definitions>