connections
Creates, updates, deletes, gets or lists a connections
resource.
Overview
Name | connections |
Type | Resource |
Id | google.dlp.connections |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Name of the connection: projects/{project}/locations/{location}/connections/{name} . |
cloudSql | object | Cloud SQL connection properties. |
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
Name | Accessible by | Required Params | Description |
---|---|---|---|
organizations_locations_connections_get | SELECT | connectionsId, locationsId, organizationsId | Get a Connection by name. |
organizations_locations_connections_list | SELECT | locationsId, organizationsId | Lists Connections in a parent. Use SearchConnections to see all connections within an organization. |
projects_locations_connections_get | SELECT | connectionsId, locationsId, projectsId | Get a Connection by name. |
projects_locations_connections_list | SELECT | locationsId, projectsId | Lists Connections in a parent. Use SearchConnections to see all connections within an organization. |
organizations_locations_connections_create | INSERT | locationsId, organizationsId | Create a Connection to an external data source. |
projects_locations_connections_create | INSERT | locationsId, projectsId | Create a Connection to an external data source. |
organizations_locations_connections_delete | DELETE | connectionsId, locationsId, organizationsId | Delete a Connection. |
projects_locations_connections_delete | DELETE | connectionsId, locationsId, projectsId | Delete a Connection. |
organizations_locations_connections_patch | UPDATE | connectionsId, locationsId, organizationsId | Update a Connection. |
projects_locations_connections_patch | UPDATE | connectionsId, locationsId, projectsId | Update a Connection. |
organizations_locations_connections_search | EXEC | locationsId, organizationsId | Searches for Connections in a parent. |
projects_locations_connections_search | EXEC | locationsId, projectsId | Searches 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.dlp.connections (
locationsId,
projectsId,
connection
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ connection }}'
;
- name: your_resource_model_name
props:
- name: connection
value:
- name: cloudSql
value:
- name: cloudSqlIam
value: []
- name: databaseEngine
value: string
- name: connectionName
value: string
- name: maxConnections
value: integer
- name: usernamePassword
value:
- name: passwordSecretVersionName
value: string
- name: username
value: string
- name: state
value: string
- name: name
value: string
- name: errors
value:
- - name: details
value:
- name: details
value:
- object
- name: code
value: integer
- name: message
value: string
- name: timestamps
value:
- string
- name: extraInfo
value: string
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 }}';