# Update a domain

Launch stage: Beta

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

`PATCH /api/discover/v1/{name=domains/*}`

Update a domain. `update_mask` selects which fields to modify; the domain
 is identified by its resource `name`.

API scopes: domains

## Path parameters

- `name` (string, required, ID, Immutable)
  Full resource name of the domain. The primary identifier for this resource.
   Format: `domains/{domain_id}`
   Identifies the domain on get, update, and delete. Not an input on
   create — to choose the id, set `CreateDomainRequest.domain_id`.

## Query parameters

- `update_mask` (string, required)

## Request body

- `tag_key` (string, required, Immutable)
  Governed tag key associated with this domain.
- `draft` (boolean, optional, Input only)
  Whether to mark the domain as a draft. If omitted on Create, the server
   applies a default; the resolved value is returned in `effective_draft`.
- `icon` (object, optional)
  Icon to display for the domain.
  - `name` (string, optional)
    Possible values:
    - `NAME_UNSPECIFIED`
    - `ADDRESS_BOOK`
    - `ALARM`
    - `ARROWS_IN`
    - `ATOM`
    - `BALLOON`
    - `BANK`
    - `BARRICADE`
    - `BASKET`
    - `BRIDGE`
    - `CACTUS`
    - `CALL_BELL`
    - `CARROT`
    - `CHART_PIE_SLICE`
    - `CITY`
    - `CLOUD`
    - `COINS`
    - `COMPASS_ROSE`
    - `CRANE_TOWER`
    - `CROWN`
    - `CUBE_TRANSPARENT`
    - `FADERS`
    - `FLAG_BANNER_FOLD`
    - `FLAG_CHECKERED`
    - `GAVEL`
    - `HAMBURGER`
    - `HEAD_CIRCUIT`
    - `HOURGLASS_HIGH`
    - `INTERSECT_THREE`
    - `MICROSCOPE`
    - `MOON_STARS`
    - `PACKAGE`
    - `PARACHUTE`
    - `PEPPER`
    - `PIGGY_BANK`
    - `PILL`
    - `PLANET`
    - `PLANT`
    - `PLUGS_CONNECTED`
    - `POPCORN`
    - `PRESENTATION_CHART`
    - `PUZZLE_PIECE`
    - `RAINBOW`
    - `RANKING`
    - `RECEIPT`
    - `ROCKET`
    - `RULER`
    - `SAILBOAT`
    - `SCALES`
    - `SCAN_SMILEY`
    - `SCROLL`
    - `SHIELD_CHECKERED`
    - `SNEAKER`
    - `SNOWFLAKE`
    - `SOLAR_ROOF`
    - `SPEEDOMETER`
    - `STAMP`
    - `STEPS`
    - `STRATEGY`
    - `SWORD`
    - `TELEVISION_SIMPLE`
    - `TENT`
    - `TICKET`
    - `TRACTOR`
    - `TRAFFIC_CONE`
    - `TRAIN`
    - `TREE_EVERGREEN`
    - `TREE_STRUCTURE`
    - `TROLLEY_SUITCASE`
    - `TROPHY`
    - `TRUCK_TRAILER`
    - `USERS_THREE`
    - `VECTOR_THREE`
  - `color` (string, optional)
    Hex color code with # prefix (e.g., "#FF5733").
- `subtitle` (string, optional)
  Short description (max 280 chars)
- `description` (string, optional)
  Full description (max 4096 chars)
- `technical_owner_ids` (array of int64, optional)
  Principal IDs of the technical owners (users, groups, or service principals).
- `business_owner_ids` (array of int64, optional)
  Principal IDs of the business owners (users, groups, or service principals).
- `parent_domain_id` (string, optional, Immutable)
  Domain ID of the parent. If absent, this is a top-level domain.
   If present, this domain is a subdomain of the specified parent.

## Returns

Returns the Domain object.

## Response

```json
{
  "domain_id": "string",
  "tag_key": "string",
  "effective_draft": true,
  "icon": {
    "name": "ADDRESS_BOOK",
    "color": "string"
  },
  "subtitle": "string",
  "description": "string",
  "create_time": "string",
  "technical_owner_ids": [
    0
  ],
  "business_owner_ids": [
    0
  ],
  "parent_domain_id": "string",
  "name": "string",
  "update_time": "string"
}
```

