- [Resource: Connection](https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections#Connection)
  - [JSON representation](https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections#Connection.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections#METHODS_SUMMARY)

## Resource: Connection

A data connection to allow the DLP API to profile data in locations that require additional configuration.

| JSON representation |
|---|
| ``` { "name": string, "state": enum (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.locations.connections#Connection.ConnectionState`), "errors": [ { object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/Error`) } ], // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "cloudSql": { object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.locations.connections#Connection.CloudSqlProperties`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Name of the connection: `projects/{project}/locations/{location}/connections/{name}`. |
| `state` | ``enum (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.locations.connections#Connection.ConnectionState`)`` Required. The connection's state in its lifecycle. |
| `errors[]` | ``object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/Error`)`` Output only. Set if status == ERROR, to provide additional details. Will store the last 10 errors sorted with the most recent first. |
| Type of connection. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `cloudSql` | ``object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.locations.connections#Connection.CloudSqlProperties`)`` Connect to a Cloud SQL instance. |
| End of mutually exclusive fields. ||

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections/create` | Create a Connection to an external data source. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections/delete` | Delete a Connection. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections/get` | Get a Connection by name. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections/list` | Lists Connections in a parent. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections/patch` | Update a Connection. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.connections/search` | Searches for Connections in a parent. |