﻿---
title: cloud hosted deployments restart-deployment-es-resource cli command
description: Restart Deployment Elasticsearch Resource Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4118/reference/elastic-cli/cli/cloud/hosted/deployments/restart-deployment-es-resource
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# cloud hosted deployments restart-deployment-es-resource cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic cloud hosted deployments restart-deployment-es-resource \
  --deployment-id <deployment-id> \
  --ref-id <ref-id> \
  [options]
```

Restart Deployment Elasticsearch Resource
**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="--ref-id string required">
    User-specified RefId for the Resource (or '_main' if there is only one).
  </definition>
  <definition term="--restore-snapshot">
    When set to true and restoring from shutdown, then will restore the cluster from the last snapshot (if available).
  </definition>
  <definition term="--skip-snapshot">
    If true, will not take a snapshot of the cluster before restarting.
  </definition>
  <definition term="--cancel-pending">
    If true, cancels any pending plans before restarting. If false and there are pending plans, returns an error.
  </definition>
  <definition term="--group-attribute string">
    Indicates the property or properties used to divide the list of instances to restart in groups. Valid options are: '__all__' (restart all at once), '__zone__' by logical zone, '__name__' one instance at a time, or a comma-separated list of attributes of the instances
  </definition>
  <definition term="--shard-init-wait-time number">
    The time, in seconds, to wait for shards that show no progress of initializing, before rolling the next group (default: 10 minutes)
  </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>