﻿---
title: cloud hosted deployment-templates get-deployment-template-v2 cli command
description: Get deployment template 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/cloud/hosted/deployment-templates/get-deployment-template-v2
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

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

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

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

## Options

<definitions>
  <definition term="--template-id string required">
    The identifier for the deployment template.
  </definition>
  <definition term="--region string required">
    Region of the deployment template
  </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 template to be adapted to return only the elements allowed in that version.
  </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>