# Update a connection

Launch stage: GA

`PATCH /api/2.1/unity-catalog/connections/{name_arg}`

Updates the connection that matches the supplied name.

API scopes: unity-catalog

## Path parameters

- `name_arg` (string, required)
  Name of the connection.

## Request body

- `new_name` (string, optional)
  New name for the connection.
- `name` (string, optional)
  Name of the connection.
- `connection_type` (string, optional)
  The type of connection.
  Possible values:
  - `UNKNOWN_CONNECTION_TYPE`
  - `MYSQL`
  - `POSTGRESQL`
  - `SNOWFLAKE`
  - `REDSHIFT`
  - `SQLDW`
  - `SQLSERVER`
  - `DATABRICKS`
  - `SALESFORCE`
  - `BIGQUERY`
  - `NETSUITE`
  - `WORKDAY_RAAS`
  - `HIVE_METASTORE`
  - `GA4_RAW_DATA`
  - `SERVICENOW`
  - `SALESFORCE_DATA_CLOUD`
  - `GLUE`
  - `ORACLE`
  - `TERADATA`
  - `HTTP`
  - `POWER_BI`
  - `DYNAMICS365`
  - `CONFLUENCE`
  - `JDBC` — Public Preview
  - `META_MARKETING`
  - `TIKTOK_ADS` — Beta
  - `HUBSPOT`
  - `ZENDESK`
  - `AWS_SECRETS_MANAGER` — Beta
  - `AZURE_KEY_VAULT` — Beta
  - `GITHUB` — Beta
  - `OUTLOOK` — Beta
  - `SMARTSHEET`
- `owner` (string, optional)
  Username of current owner of the connection.
- `read_only` (boolean, optional)
  If the connection is read only.
- `comment` (string, optional)
  User-provided free-form text description.
- `environment_settings` (object, optional, Public Preview)
  [Create,Update:OPT] Connection environment settings as EnvironmentSettings object.
  - `java_dependencies` (array of string, optional, Public Preview)
  - `environment_version` (string, optional, Public Preview)
- `full_name` (string, optional)
  Full name of connection.
- `url` (string, optional)
  URL of the remote data source, extracted from options.
- `credential_type` (string, optional)
  The type of credential.
  Possible values:
  - `UNKNOWN_CREDENTIAL_TYPE`
  - `USERNAME_PASSWORD`
  - `OAUTH_U2M`
  - `OAUTH_M2M`
  - `OAUTH_REFRESH_TOKEN`
  - `OAUTH_ACCESS_TOKEN`
  - `OAUTH_RESOURCE_OWNER_PASSWORD`
  - `SERVICE_CREDENTIAL`
  - `BEARER_TOKEN`
  - `OIDC_TOKEN`
  - `PEM_PRIVATE_KEY`
  - `OAUTH_U2M_MAPPING`
  - `ANY_STATIC_CREDENTIAL`
  - `OAUTH_MTLS`
  - `SSWS_TOKEN`
  - `EDGEGRID_AKAMAI`
- `connection_id` (string, optional)
  Unique identifier of the Connection.
- `metastore_id` (string, optional)
  Unique identifier of parent metastore.
- `created_at` (int64, optional)
  Time at which this connection was created, in epoch milliseconds.
- `created_by` (string, optional)
  Username of connection creator.
- `updated_at` (int64, optional)
  Time at which this connection was updated, in epoch milliseconds.
- `updated_by` (string, optional)
  Username of user who last modified connection.
- `securable_type` (string, optional)
  Possible values:
  - `CATALOG`
  - `SCHEMA`
  - `TABLE`
  - `STORAGE_CREDENTIAL`
  - `EXTERNAL_LOCATION`
  - `FUNCTION`
  - `SHARE`
  - `PROVIDER`
  - `RECIPIENT`
  - `CLEAN_ROOM`
  - `METASTORE`
  - `PIPELINE`
  - `VOLUME`
  - `CONNECTION`
  - `CREDENTIAL`
  - `EXTERNAL_METADATA`
  - `STAGING_TABLE`
  - `MODEL`
  - `MODEL_SERVICE`
  - `MCP_SERVICE`
  - `MODEL_PROVIDER_SERVICE`
  - `AGENT_SERVICE` — Beta
  - `SKILL` — Beta
  - `FEATURE`
  Default: `CONNECTION`
- `provisioning_info` (object, optional)
  - `state` (string, optional)
    The provisioning state of the resource.
    Possible values:
    - `PROVISIONING`
    - `ACTIVE`
    - `FAILED`
    - `DELETING`
    - `UPDATING`
    - `DEGRADED`
- `options` (object, optional)
  A map of key-value properties attached to the securable.
- `properties` (object, required)
  A map of key-value properties attached to the securable.

## Returns

Returns the ConnectionInfo object.

## Response

```json
{
  "name": "string",
  "connection_type": "UNKNOWN_CONNECTION_TYPE",
  "owner": "string",
  "read_only": true,
  "comment": "string",
  "environment_settings": {
    "java_dependencies": [
      "string"
    ],
    "environment_version": "string"
  },
  "full_name": "string",
  "url": "string",
  "credential_type": "UNKNOWN_CREDENTIAL_TYPE",
  "connection_id": "string",
  "metastore_id": "string",
  "created_at": 0,
  "created_by": "string",
  "updated_at": 0,
  "updated_by": "string",
  "securable_type": "CONNECTION",
  "provisioning_info": {
    "state": "PROVISIONING"
  },
  "options": {},
  "properties": {}
}
```

