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
Successful response
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. |
Successful response
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. |
Successful response
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. |
Successful response
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. |
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
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: string
description: Required parameter for the connections resource.
- name: locationsId
value: string
description: Required parameter for the connections resource.
- name: organizationsId
value: string
description: Required parameter for the connections resource.
- name: connection
value: object
description: >
Required. The connection resource.
UPDATE
examples
- projects_locations_connections_patch
- organizations_locations_connections_patch
Update a Connection.
UPDATE google.dlp.connections
SET
data__connection = '{{ connection }}',
data__updateMask = '{{ updateMask }}'
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__connection = '{{ connection }}',
data__updateMask = '{{ updateMask }}'
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,
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}',
@filter='{{ filter }}';
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 }}';