# UPDATE SCHEMA\_REGISTRY

## Syntax <a href="#synopsis" id="synopsis"></a>

```sql
UPDATE SCHEMA_REGISTRY
    schema_registry_name
WITH (schema_registry_parameter = value [, ... ]);
```

### Description

Updates a [schema registry](https://docs.deltastream.io/overview/core-concepts/store#schema-registry) with new parameters.

### Arguments

#### schema\_registry\_name

Specifies the name of the new schema registry. If the name is case sensitive you must wrap it in double quotes; otherwise the system uses the lower case name.

#### WITH (schema\_registry\_parameter = value \[, …​ ])

This clause specifies schema registry parameters; see [schema registry parameters](#schema-registry-parameters) below for more information.

### Schema Registry Parameters

| Parameter Name    | Description                                                                                                                                                                          |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `type`            | <p>Type of schema registry.<br><br>Type: <code>SCHEMA\_REGISTRY\_TYPE</code><br>Valid values: <code>CONFLUENT</code>, <code>CONFLUENT\_CLOUD</code></p>                              |
| `access_region`   | <p>Region in which the schema registry resides.<br><br>Type: String<br>Valid values: See <a href="broken-reference">LIST REGIONS</a></p>                                             |
| `uris`            | <p>List of comma-separated <code>host:port</code> URIs to connect to the schema registry.<br><br>Type: String</p>                                                                    |
| `properties.file` | <p>The file path to a .yaml file containing other schema registry parameters.<br><br>Default value: None<br>Type: String<br>Valid values: File path in current user's filesystem</p> |

### Confluent Cloud Schema Registry Specific Parameters

| Parameter Name           | Description                                                                                             |
| ------------------------ | ------------------------------------------------------------------------------------------------------- |
| `confluent_cloud.key`    | <p>Credentials key for the Confluent Cloud schema registry.<br><br>Default: None<br>Type: String</p>    |
| `confluent_cloud.secret` | <p>Credentials secret for the Confluent Cloud schema registry.<br><br>Default: None<br>Type: String</p> |

### Confluent Platform Schema Registry-Specific Parameters

| Parameter Name         | Description                                                                                                                  |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `confluent.username`   | <p>Login username for the Confluent Platform schema registry.<br><br>Default: None<br>Type: String</p>                       |
| `confluent.password`   | <p>Login password for the Confluent Platform schema registry.<br><br>Default: None<br>Type: String</p>                       |
| `tls.client.cert_file` | <p>File path to client certificate for mutual TLS authentication in PEM format.<br><br>Default: None<br>Type: String</p>     |
| `tls.client.key_file`  | <p>File path to client certificate key for mutual TLS authentication in PEM format.<br><br>Default: None<br>Type: String</p> |

## Examples

#### Update a Confluent Cloud schema registry with new credentials

The following updates a `CONFLUENT_CLOUD` schema registry named `ConfluentCloudSR` with new credential keys:

```sh
demodb.public/demostore#
UPDATE SCHEMA_REGISTRY "ConfluentCloudSR" WITH (
    'confluent_cloud.key' = 'fake_key',
    'confluent_cloud.secret' = 'fake_secret'
);
+-----------------+------------------+------------+------------------------------------------+
|  Type           |  Name            |  Command   |  Summary                                 |
+=================+==================+============+==========================================+
| schema registry | ConfluentCloudSR | UPDATE     | schema registry "ConfluentCloudSR" was   |
|                 |                  |            | successfully updated                     |
+-----------------+------------------+------------+------------------------------------------+
```

#### Update a Confluent Platform schema registry with new credentials

The following updates a `CONFLUENT` schema registry named `ConfluentPlatformSR` with new credential keys:

```sh
demodb.public/demostore# UPDATE SCHEMA_REGISTRY "ConfluentPlatformSR" WITH (
    'confluent.username' = 'fake_username',
    'confluent.password' = 'fake_password'
);
+-----------------+---------------------+------------+------------------------------------------+
|  Type           |  Name               |  Command   |  Summary                                 |
+=================+=====================+============+==========================================+
| schema registry | ConfluentPlatformSR | UPDATE     | schema registry "ConfluentPlatformSR"    |
|                 |                     |            | was successfully updated                 |
+-----------------+---------------------+------------+------------------------------------------+
```
