﻿---
title: cloud hosted deployment-templates get-deployment-templates-v2 cli command
description: Get deployment templates Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://docs-v3-preview.elastic.dev/elastic/cli/tree/main/cli/cloud/hosted/deployment-templates/get-deployment-templates-v2
---

# cloud hosted deployment-templates get-deployment-templates-v2 cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic cloud hosted deployment-templates get-deployment-templates-v2 \
  --region <region> \
  [options]
```

Get deployment templates
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--region string required">
    Region of the deployment templates
  </definition>
  <definition term="--metadata string">
    An optional key/value pair in the form of (key:value) that will act as a filter and exclude any templates that do not have a matching metadata item associated.
  </definition>
  <definition term="--show-instance-configurations">
    If true, will return details for each instance configuration referenced by the template.
  </definition>
  <definition term="--show-max-zones">
    If true, will populate the max_zones field in the instance configurations. Only relevant if show_instance_configurations=true.
  </definition>
  <definition term="--stack-version string">
    If present, it will cause the returned deployment templates to be adapted to return only the elements allowed in that version.
  </definition>
  <definition term="--hide-deprecated">
    If true, templates flagged as deprecated will NOT be returned.
  </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>