Skip to main content

connections

Creates, updates, deletes, gets or lists a connections resource.

Overview

Nameconnections
TypeResource
Idgoogle.dlp.connections

Fields

NameDatatypeDescription
namestringOutput only. Name of the connection: projects/{project}/locations/{location}/connections/{name}.
cloudSqlobjectCloud SQL connection properties.
errorsarrayOutput only. Set if status == ERROR, to provide additional details. Will store the last 10 errors sorted with the most recent first.
statestringRequired. The connection's state in its lifecycle.

Methods

NameAccessible byRequired ParamsDescription
organizations_locations_connections_getSELECTconnectionsId, locationsId, organizationsIdGet a Connection by name.
organizations_locations_connections_listSELECTlocationsId, organizationsIdLists Connections in a parent. Use SearchConnections to see all connections within an organization.
projects_locations_connections_getSELECTconnectionsId, locationsId, projectsIdGet a Connection by name.
projects_locations_connections_listSELECTlocationsId, projectsIdLists Connections in a parent. Use SearchConnections to see all connections within an organization.
organizations_locations_connections_createINSERTlocationsId, organizationsIdCreate a Connection to an external data source.
projects_locations_connections_createINSERTlocationsId, projectsIdCreate a Connection to an external data source.
organizations_locations_connections_deleteDELETEconnectionsId, locationsId, organizationsIdDelete a Connection.
projects_locations_connections_deleteDELETEconnectionsId, locationsId, projectsIdDelete a Connection.
organizations_locations_connections_patchUPDATEconnectionsId, locationsId, organizationsIdUpdate a Connection.
projects_locations_connections_patchUPDATEconnectionsId, locationsId, projectsIdUpdate a Connection.
organizations_locations_connections_searchEXEClocationsId, organizationsIdSearches for Connections in a parent.
projects_locations_connections_searchEXEClocationsId, projectsIdSearches for Connections in a parent.

SELECT examples

Lists Connections in a parent. Use SearchConnections to see all connections within an organization.

SELECT
name,
cloudSql,
errors,
state
FROM google.dlp.connections
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new connections resource.

/*+ create */
INSERT INTO google.dlp.connections (
locationsId,
projectsId,
connection
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ connection }}'
;

UPDATE example

Updates a connections resource.

/*+ update */
UPDATE google.dlp.connections
SET
connection = '{{ connection }}',
updateMask = '{{ updateMask }}'
WHERE
connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified connections resource.

/*+ delete */
DELETE FROM google.dlp.connections
WHERE connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';