# Update a clean room

Launch stage: GA

`PATCH /api/2.0/clean-rooms/{name}`

Update a clean room.
 The caller must be the owner of the clean room, have **MODIFY_CLEAN_ROOM** privilege, or
 be metastore admin.

 When the caller is a metastore admin, only the __owner__ field can be updated.

API scopes: cleanrooms

## Path parameters

- `name` (string, required)
  Name of the clean room.
  Example: `test-clean-room1`

## Request body

- `clean_room` (object, optional)
  - `name` (string, optional, Immutable)
    The name of the clean room.
     It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements).
    Example: `test-clean-room1`
  - `remote_detailed_info` (object, optional)
    Central clean room details. During creation, users need to specify
     cloud_vendor, region, and collaborators.global_metastore_id.
     This field will not be filled in the ListCleanRooms call.
    - `cloud_vendor` (string, optional, Immutable)
      Cloud vendor (aws,azure,gcp) of the central clean room.
      Example: `aws`
    - `region` (string, optional, Immutable)
      Region of the central clean room.
      Example: `us-west-2`
    - `collaborators` (array of object, optional, Immutable)
      Collaborators in the central clean room. There should one and only one collaborator
       in the list that satisfies the owner condition:
      
       1. It has the creator's global_metastore_id (determined by caller of CreateCleanRoom).
      
       2. Its invite_recipient_email is empty.
      - `global_metastore_id` (string, optional)
        The global Unity Catalog metastore ID of the collaborator. The identifier is of format cloud:region:metastore-uuid.
        Example: `aws:us-west-2:aff56c64-a34e-4c1f-a24c-c2dd2889517a`
      - `invite_recipient_workspace_id` (int64, optional, Input only)
        Workspace ID of the user who is receiving the clean room "invitation". Must be specified if
         invite_recipient_email is specified.
         It should be empty when the collaborator is the creator of the clean room.
        Example: `6822898386300992`
      - `invite_recipient_email` (string, optional, Immutable)
        Email of the user who is receiving the clean room "invitation". It should be empty
         for the creator of the clean room, and non-empty for the invitees of the clean room.
         It is only returned in the output when clean room creator calls GET
        Example: `john.doe@databricks.com`
      - `collaborator_alias` (string, required, Immutable)
        Collaborator alias specified by the clean room creator. It is unique across all collaborators of this clean room, and used to derive
         multiple values internally such as catalog alias and clean room name for single metastore clean rooms.
         It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements).
        Example: `creator`
    - `egress_network_policy` (object, optional, Immutable)
      Egress network policy to apply to the central clean room workspace.
      - `internet_access` (object, optional)
        The access policy enforced for egress traffic to the internet.
        - `restriction_mode` (string, optional)
          Possible values:
          - `FULL_ACCESS`
          - `PRIVATE_ACCESS_ONLY`
          - `RESTRICTED_ACCESS`
        - `allowed_internet_destinations` (array of object, optional)
          - `destination` (string, optional)
          - `type` (string, optional)
            Possible values:
            - `FQDN`
          - `protocol` (string, optional)
            Possible values:
            - `TCP`
        - `allowed_storage_destinations` (array of object, optional)
          - `bucket_name` (string, optional)
          - `region` (string, optional)
          - `type` (string, optional)
            Possible values:
            - `AWS_S3`
            - `CLOUDFLARE_R2`
            - `AZURE_STORAGE`
            - `GOOGLE_CLOUD_STORAGE`
          - `azure_storage_account` (string, optional)
          - `allowed_paths` (array of string, optional)
          - `azure_storage_service` (string, optional)
          - `azure_dns_zone` (string, optional)
          - `azure_container` (string, optional)
        - `log_only_mode` (object, optional)
          Optional. If not specified, assume the policy is enforced for all workloads.
          - `log_only_mode_type` (string, optional)
            Possible values:
            - `ALL_SERVICES`
            - `SELECTED_SERVICES`
          - `workloads` (array of string, optional)
            Possible values:
            - `DBSQL`
            - `ML_SERVING`
    - `enable_shared_output` (boolean, optional, Public Preview, Immutable)
      Whether to enable shared output for the central clean room.
       When enabled, clean room task runs can write to the run-scoped shared output schema
       which is accessible by all collaborators.
      Example: `false`
    - `package_provider_collaborator_alias` (string, optional, Immutable)
      Alias of the provider collaborator. If set, packaged clean rooms mode is enabled.
       The consumer's experience is restricted: they can view notebook names and READMEs,
       add their own data assets, and trigger runs, but cannot view notebook code,
       provider data assets, or notebook run output.
  - `owner` (string, optional)
    This is the Databricks username of the owner of the local clean room securable for permission management.
    Example: `alice@example.com`
  - `comment` (string, optional)
    Example: `This is a clean room for demo`
    Constraints: `<= 1000 characters`
  - `enable_shared_output` (boolean, optional, Public Preview)
    Whether allow task to write to shared output schema.
     When enabled, clean room task runs triggered by the current collaborator
     can write to the run-scoped shared output schema which is accessible by all collaborators.
    Example: `false`

## Returns

Returns the CleanRoom object.

## Response

```json
{
  "name": "test-clean-room1",
  "remote_detailed_info": {
    "central_clean_room_id": "b5c8d856-ff41-4c5f-8ccd-2b13b44fec27",
    "cloud_vendor": "aws",
    "region": "us-west-2",
    "collaborators": [
      {}
    ],
    "creator": {},
    "egress_network_policy": {},
    "compliance_security_profile": {},
    "enable_shared_output": false,
    "package_provider_collaborator_alias": "string"
  },
  "owner": "alice@example.com",
  "comment": "This is a clean room for demo",
  "created_at": 1716424663321,
  "updated_at": 1716424663321,
  "status": "ACTIVE",
  "local_collaborator_alias": "creator",
  "output_catalog": {
    "status": "NOT_ELIGIBLE",
    "catalog_name": "string"
  },
  "access_restricted": "NO_RESTRICTION",
  "enable_shared_output": false
}
```

