﻿---
title: cloud hosted deployments reset-elasticsearch-user-password cli command
description: Reset 'elastic' user password Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4097/reference/elastic-cli/cli/cloud/hosted/deployments/reset-elasticsearch-user-password
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# cloud hosted deployments reset-elasticsearch-user-password cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic cloud hosted deployments reset-elasticsearch-user-password \
  --deployment-id <deployment-id> \
  --ref-id <ref-id> \
  [options]
```

Reset 'elastic' user password
**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="--check-completion">
    If true, will not reset elastic user password and instead will return a status code signaling whether or not the current credentials are ready to use (eg from creation or the last call to _reset_password)
  </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>