connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | google.dlp.connections |
Fields
The following fields are returned by SELECT queries:
- projects_locations_connections_get
- organizations_locations_connections_get
- projects_locations_connections_list
- organizations_locations_connections_list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Name of the connection: projects/{project}/locations/{location}/connections/{name}. |
cloudSql | object | Connect to a Cloud SQL instance. (id: GooglePrivacyDlpV2CloudSqlProperties) |
errors | array | Output only. Set if status == ERROR, to provide additional details. Will store the last 10 errors sorted with the most recent first. |
state | string | Required. The connection's state in its lifecycle. (CONNECTION_STATE_UNSPECIFIED, MISSING_CREDENTIALS, AVAILABLE, ERROR) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Name of the connection: projects/{project}/locations/{location}/connections/{name}. |
cloudSql | object | Connect to a Cloud SQL instance. (id: GooglePrivacyDlpV2CloudSqlProperties) |
errors | array | Output only. Set if status == ERROR, to provide additional details. Will store the last 10 errors sorted with the most recent first. |
state | string | Required. The connection's state in its lifecycle. (CONNECTION_STATE_UNSPECIFIED, MISSING_CREDENTIALS, AVAILABLE, ERROR) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Name of the connection: projects/{project}/locations/{location}/connections/{name}. |
cloudSql | object | Connect to a Cloud SQL instance. (id: GooglePrivacyDlpV2CloudSqlProperties) |
errors | array | Output only. Set if status == ERROR, to provide additional details. Will store the last 10 errors sorted with the most recent first. |
state | string | Required. The connection's state in its lifecycle. (CONNECTION_STATE_UNSPECIFIED, MISSING_CREDENTIALS, AVAILABLE, ERROR) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Name of the connection: projects/{project}/locations/{location}/connections/{name}. |
cloudSql | object | Connect to a Cloud SQL instance. (id: GooglePrivacyDlpV2CloudSqlProperties) |
errors | array | Output only. Set if status == ERROR, to provide additional details. Will store the last 10 errors sorted with the most recent first. |
state | string | Required. The connection's state in its lifecycle. (CONNECTION_STATE_UNSPECIFIED, MISSING_CREDENTIALS, AVAILABLE, ERROR) |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
connectionsId | string | |
locationsId | string | |
organizationsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- projects_locations_connections_get
- organizations_locations_connections_get
- projects_locations_connections_list
- organizations_locations_connections_list
Get a Connection by name.
SELECT
name,
cloudSql,
errors,
state
FROM google.dlp.connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
;
Get a Connection by name.
SELECT
name,
cloudSql,
errors,
state
FROM google.dlp.connections
WHERE organizationsId = '{{ organizationsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
;
Lists Connections in a parent. Use SearchConnections to see all connections within an organization.
SELECT
name,
cloudSql,
errors,
state
FROM google.dlp.connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
;
Lists Connections in a parent. Use SearchConnections to see all connections within an organization.
SELECT
name,
cloudSql,
errors,
state
FROM google.dlp.connections
WHERE organizationsId = '{{ organizationsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- projects_locations_connections_create
- organizations_locations_connections_create
- Manifest
Create a Connection to an external data source.
INSERT INTO google.dlp.connections (
data__connection,
projectsId,
locationsId
)
SELECT
'{{ connection }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
cloudSql,
errors,
state
;
Create a Connection to an external data source.
INSERT INTO google.dlp.connections (
data__connection,
organizationsId,
locationsId
)
SELECT
'{{ connection }}',
'{{ organizationsId }}',
'{{ locationsId }}'
RETURNING
name,
cloudSql,
errors,
state
;
# Description fields are for documentation purposes
- name: connections
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the connections resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the connections resource.
- name: organizationsId
value: "{{ organizationsId }}"
description: Required parameter for the connections resource.
- name: connection
description: |
A data connection to allow the DLP API to profile data in locations that require additional configuration.
value:
name: "{{ name }}"
errors:
- timestamps: "{{ timestamps }}"
extraInfo: "{{ extraInfo }}"
details:
message: "{{ message }}"
details: "{{ details }}"
code: {{ code }}
cloudSql:
connectionName: "{{ connectionName }}"
usernamePassword:
username: "{{ username }}"
passwordSecretVersionName: "{{ passwordSecretVersionName }}"
maxConnections: {{ maxConnections }}
cloudSqlIam: "{{ cloudSqlIam }}"
databaseEngine: "{{ databaseEngine }}"
state: "{{ state }}"
UPDATE examples
- projects_locations_connections_patch
- organizations_locations_connections_patch
Update a Connection.
UPDATE google.dlp.connections
SET
data__updateMask = '{{ updateMask }}',
data__connection = '{{ connection }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
RETURNING
name,
cloudSql,
errors,
state;
Update a Connection.
UPDATE google.dlp.connections
SET
data__updateMask = '{{ updateMask }}',
data__connection = '{{ connection }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
RETURNING
name,
cloudSql,
errors,
state;
DELETE examples
- projects_locations_connections_delete
- organizations_locations_connections_delete
Delete a Connection.
DELETE FROM google.dlp.connections
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
;
Delete a Connection.
DELETE FROM google.dlp.connections
WHERE organizationsId = '{{ organizationsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
;
Lifecycle Methods
- projects_locations_connections_search
- organizations_locations_connections_search
Searches for Connections in a parent.
EXEC google.dlp.connections.projects_locations_connections_search
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pageToken='{{ pageToken }}',
@filter='{{ filter }}',
@pageSize='{{ pageSize }}'
;
Searches for Connections in a parent.
EXEC google.dlp.connections.organizations_locations_connections_search
@organizationsId='{{ organizationsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}',
@filter='{{ filter }}'
;