# Update Sandbox

### Usage

```sh-session
$ sfp sandbox:update [flags]
$ sfp org:update:sandbox [flags]
```

### Flags

| Flag                                 | Required                    | Description                               |
| ------------------------------------ | --------------------------- | ----------------------------------------- |
| `-v, --targetdevhubusername=<value>` | No                          | Username or alias of the production org   |
| `-n, --name=<value>`                 | Yes (if no definition file) | Name of the sandbox to update             |
| `-f, --definition-file=<value>`      | No                          | Path to a sandbox definition file         |
| `--json`                             | No                          | Format output as JSON                     |
| `--loglevel=<option>`                | No                          | Logging level for this command invocation |

### Examples

```sh-session
$ sfp sandbox:update -o MyDevHub -n my-sandbox
$ sfp sandbox:update -o MyDevHub -f config/sandbox-def.json
```

### Sandbox Definition File

If using a definition file, create a JSON file (default location: `config/sandbox-def.json`) with the following structure:

```json
{
  "sandboxName": "MySandbox",
  "description": "Updated sandbox description",
  "apexClassId": "01p...",
  "autoActivate": true,
  "copyChatter": true,
  "historyDays": 0,
  "licenseType": "DEVELOPER",
  "templateId": "0TT..."
}
```

Note: When using a definition file, the `--name` flag is ignored.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/sfp-community/environment-management/sandbox/update-sandbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
