﻿---
title: cloud hosted deployments update-deployment cli command
description: Update Deployment 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/update-deployment
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# cloud hosted deployments update-deployment cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic cloud hosted deployments update-deployment \
  --deployment-id <deployment-id> \
  --prune-orphans \
  [options]
```

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

## Options

<definitions>
  <definition term="--deployment-id string required">
    Identifier for the Deployment
  </definition>
  <definition term="--prune-orphans required">
  </definition>
  <definition term="--hide-pruned-orphans">
    Whether or not to hide orphaned resources that were shut down (relevant if prune on the request is true)
  </definition>
  <definition term="--skip-snapshot">
    Whether or not to skip snapshots before shutting down orphaned resources (relevant if prune on the request is true)
  </definition>
  <definition term="--validate-only">
    If true, will just validate the Deployment definition but will not perform the update
  </definition>
  <definition term="--version string">
    If specified then checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)
  </definition>
  <definition term="--name string">
  </definition>
  <definition term="--resources string">
  </definition>
  <definition term="--settings string">
  </definition>
  <definition term="--metadata string">
  </definition>
  <definition term="--alias string">
  </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>