﻿---
title: cloud hosted deployments search-deployments cli command
description: Search Deployments 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/deployments/search-deployments
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# cloud hosted deployments search-deployments cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic cloud hosted deployments search-deployments [options]
```

Search Deployments
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--minimal-metadata string">
    Comma separated list of attributes to include in response for deployments found. Useful for reducing response size when retrieving many deployments. Use of this parameter moves the result to the minimal_metadata section of the response.
  </definition>
  <definition term="--from number">
  </definition>
  <definition term="--cursor string">
  </definition>
  <definition term="--size number">
  </definition>
  <definition term="--query string">
  </definition>
  <definition term="--sort string[]">
    **Repeatable:** pass `--sort` multiple times to supply more than one value
  </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>
  <definition term="--yes">
    confirm destructive action without prompting
  </definition>
</definitions>


## Global Options

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