﻿---
title: stack kb security-exceptions-api duplicate-exception-list cli command
description: Duplicate an exception list Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4083/reference/elastic-cli/cli/stack/kb/security-exceptions-api/duplicate-exception-list
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb security-exceptions-api duplicate-exception-list cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-exceptions-api duplicate-exception-list \
  --list-id <list-id> \
  --namespace-type <namespace-type> \
  --include-expired-exceptions <include-expired-exceptions> \
  [options]
```

Duplicate an exception list
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--list-id string required">
    The `list_id` of the existing exception list to copy (source list).
  </definition>
  <definition term="--namespace-type enum required">
    Scope in which the source list is defined (`single` = current space, `agnostic` = all spaces).
    **Values:** agnostic, single
  </definition>
  <definition term="--include-expired-exceptions enum required">
    Determines whether to include expired exceptions in the duplicated list. Expiration date defined by `expire_time`.
    **Values:** true, false
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

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