# Update default warehouse override

Launch stage: Beta

`PATCH /api/warehouses/v1/{name=default-warehouse-overrides/*}`

Updates an existing default warehouse override for a user.
 Users can update their own override. Admins can update overrides for any user.

API scopes: sql

## Path parameters

- `name` (string, required, ID, Immutable)
  The resource name of the default warehouse override.
   Format: default-warehouse-overrides/{default_warehouse_override_id}

## Query parameters

- `update_mask` (string, required)
  Required. Field mask specifying which fields to update.
   Only the fields specified in the mask will be updated.
   Use "*" to update all fields.
   When allow_missing is true, this field is ignored and all fields are applied.
- `allow_missing` (boolean, optional)
  If set to true, and the override is not found, a new override will be created.
   In this situation, `update_mask` is ignored and all fields are applied.
   Defaults to false.

## Request body

Required. The default warehouse override to update.
 The name field must be set in the format: default-warehouse-overrides/{default_warehouse_override_id}
 The default_warehouse_override_id can be a numeric user ID or the literal string "me" for the current user.
- `type` (string, required)
  The type of override behavior.
  Possible values:
  - `LAST_SELECTED`
  - `CUSTOM`
- `warehouse_id` (string, optional)
  The specific warehouse ID when type is CUSTOM.
   Not set for LAST_SELECTED type.

## Returns

Returns the DefaultWarehouseOverride object.

## Response

```json
{
  "name": "string",
  "default_warehouse_override_id": "string",
  "type": "LAST_SELECTED",
  "warehouse_id": "string"
}
```

