# Update Accounts Metastore

Launch stage: GA

`PUT /api/2.0/accounts/{account_id}/metastores/{metastore_id}`

Updates an existing Unity Catalog metastore.

API scopes: unity-catalog

## Path parameters

- `account_id` (string, optional)
  <Databricks> account ID of any type. For non-E2 account types, get your account ID from the [Accounts Console](https://docs.databricks.com/administration-guide/account-settings/usage.html)
- `metastore_id` (string, optional)
  Unity Catalog metastore ID

## Request body

- `metastore_info` (object, optional)
  Properties of the metastore to change.
  - `name` (string, optional)
    The user-specified name of the metastore.
  - `storage_root` (string, optional)
    The storage root URL for metastore
  - `default_data_access_config_id` (string, optional)
    Unique identifier of the metastore's (Default) Data Access Configuration.
  - `storage_root_credential_id` (string, optional)
    UUID of storage credential to access the metastore storage_root.
  - `delta_sharing_scope` (string, optional)
    The scope of Delta Sharing enabled for the metastore.
    Possible values: `INTERNAL`, `INTERNAL_AND_EXTERNAL`
  - `delta_sharing_recipient_token_lifetime_in_seconds` (int64, optional)
    The lifetime of delta sharing recipient token in seconds.
  - `delta_sharing_organization_name` (string, optional)
    The organization name of a Delta Sharing entity, to be used in Databricks-to-Databricks Delta Sharing as the official name.
  - `owner` (string, optional)
    The owner of the metastore.
  - `privilege_model_version` (string, optional)
    Privilege model version of the metastore, of the form `major.minor` (e.g., `1.0`).
  - `region` (string, optional)
    Cloud region which the metastore serves (e.g., `us-west-2`, `westus`).
  - `metastore_id` (string, optional)
    Unique identifier of metastore.
  - `created_at` (int64, optional)
    Time at which this metastore was created, in epoch milliseconds.
  - `created_by` (string, optional)
    Username of metastore creator.
  - `updated_at` (int64, optional)
    Time at which the metastore was last modified, in epoch milliseconds.
  - `updated_by` (string, optional)
    Username of user who last modified the metastore.
  - `storage_root_credential_name` (string, optional)
    Name of the storage credential to access the metastore storage_root.
  - `cloud` (string, optional)
    Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`).
  - `global_metastore_id` (string, optional)
    Globally unique metastore ID across clouds and regions, of the form `cloud:region:metastore_id`.
  - `external_access_enabled` (boolean, optional)
    Whether to allow non-DBR clients to directly access entities under the metastore.

## Returns

- `metastore_info` (object, optional)
  - `name` (string, optional)
    The user-specified name of the metastore.
  - `storage_root` (string, optional)
    The storage root URL for metastore
  - `default_data_access_config_id` (string, optional)
    Unique identifier of the metastore's (Default) Data Access Configuration.
  - `storage_root_credential_id` (string, optional)
    UUID of storage credential to access the metastore storage_root.
  - `delta_sharing_scope` (string, optional)
    The scope of Delta Sharing enabled for the metastore.
    Possible values: `INTERNAL`, `INTERNAL_AND_EXTERNAL`
  - `delta_sharing_recipient_token_lifetime_in_seconds` (int64, optional)
    The lifetime of delta sharing recipient token in seconds.
  - `delta_sharing_organization_name` (string, optional)
    The organization name of a Delta Sharing entity, to be used in Databricks-to-Databricks Delta Sharing as the official name.
  - `owner` (string, optional)
    The owner of the metastore.
  - `privilege_model_version` (string, optional)
    Privilege model version of the metastore, of the form `major.minor` (e.g., `1.0`).
  - `region` (string, optional)
    Cloud region which the metastore serves (e.g., `us-west-2`, `westus`).
  - `metastore_id` (string, optional)
    Unique identifier of metastore.
  - `created_at` (int64, optional)
    Time at which this metastore was created, in epoch milliseconds.
  - `created_by` (string, optional)
    Username of metastore creator.
  - `updated_at` (int64, optional)
    Time at which the metastore was last modified, in epoch milliseconds.
  - `updated_by` (string, optional)
    Username of user who last modified the metastore.
  - `storage_root_credential_name` (string, optional)
    Name of the storage credential to access the metastore storage_root.
  - `cloud` (string, optional)
    Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`).
  - `global_metastore_id` (string, optional)
    Globally unique metastore ID across clouds and regions, of the form `cloud:region:metastore_id`.
  - `external_access_enabled` (boolean, optional)
    Whether to allow non-DBR clients to directly access entities under the metastore.

## Response

```json
{
  "metastore_info": {
    "name": "string",
    "storage_root": "string",
    "default_data_access_config_id": "string",
    "storage_root_credential_id": "string",
    "delta_sharing_scope": "string",
    "delta_sharing_recipient_token_lifetime_in_seconds": 0,
    "delta_sharing_organization_name": "string",
    "owner": "string",
    "privilege_model_version": "string",
    "region": "string",
    "metastore_id": "string",
    "created_at": 0,
    "created_by": "string",
    "updated_at": 0,
    "updated_by": "string",
    "storage_root_credential_name": "string",
    "cloud": "string",
    "global_metastore_id": "string",
    "external_access_enabled": true
  }
}
```

