# Update a sandbox

Launch stage: Beta

`PATCH /api/2.0/{name=sandboxes/*}`

Updates mutable fields on an existing Sandbox. Allowlisted update_mask
 paths today: display_name, spec.compute.inactivity_timeout.
 Returns INVALID_PARAMETER_VALUE for empty masks or unknown paths;
 NOT_FOUND if the sandbox does not exist.

API scopes: sandbox

## Path parameters

- `name` (string, required)
  Resource name of the sandbox to update, in the form `sandboxes/{sandbox_id}`.

## Query parameters

- `update_mask` (string, required)
  Field paths to update. Must be a non-empty subset of:
     - display_name
     - spec.compute.inactivity_timeout
   Any other path returns INVALID_PARAMETER_VALUE.

## Request body

The Sandbox resource carrying new field values. Only fields named in
 `update_mask` are read; unmasked fields are ignored.
- `spec` (object, optional)
  The desired configuration of the sandbox, supplied by the caller at creation time.
  - `compute` (object, optional)
    Compute configuration (size, inactivity timeout) requested for the sandbox.
    - `inactivity_timeout` (string, optional)
      Idle duration after which the sandbox is automatically terminated.
- `name` (string, optional, ID, Immutable)
  The sandbox resource name, in the form `sandboxes/{sandbox_id}`. Derived from
   `sandbox_id`; any value supplied in a create or update request body is ignored.
- `display_name` (string, optional)
  Human-readable display label for the sandbox. At most 256 characters.

## Returns

Returns the Sandbox object.

## Response

```json
{
  "spec": {
    "compute": {}
  },
  "status": {
    "state": "SANDBOX_STATE_PENDING"
  },
  "name": "string",
  "create_time": "string",
  "update_time": "string",
  "display_name": "string"
}
```

