connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | google.bigqueryconnection.connections |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The resource name of the connection in the form of: projects/{project_id}/locations/{location_id}/connections/{connection_id} |
aws | object | Amazon Web Services (AWS) properties. (id: AwsProperties) |
azure | object | Azure properties. (id: AzureProperties) |
cloudResource | object | Cloud Resource properties. (id: CloudResourceProperties) |
cloudSpanner | object | Cloud Spanner properties. (id: CloudSpannerProperties) |
cloudSql | object | Cloud SQL properties. (id: CloudSqlProperties) |
configuration | object | Optional. Connector configuration. (id: ConnectorConfiguration) |
creationTime | string (int64) | Output only. The creation timestamp of the connection. |
description | string | User provided description. |
friendlyName | string | User provided display name for the connection. |
hasCredential | boolean | Output only. True, if credential is configured for this connection. |
kmsKeyName | string | Optional. The Cloud KMS key that is used for credentials encryption. If omitted, internal Google owned encryption keys are used. Example: projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key] |
lastModifiedTime | string (int64) | Output only. The last update timestamp of the connection. |
salesforceDataCloud | object | Optional. Salesforce DataCloud properties. This field is intended for use only by Salesforce partner projects. This field contains properties for your Salesforce DataCloud connection. (id: SalesforceDataCloudProperties) |
spark | object | Spark properties. (id: SparkProperties) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The resource name of the connection in the form of: projects/{project_id}/locations/{location_id}/connections/{connection_id} |
aws | object | Amazon Web Services (AWS) properties. (id: AwsProperties) |
azure | object | Azure properties. (id: AzureProperties) |
cloudResource | object | Cloud Resource properties. (id: CloudResourceProperties) |
cloudSpanner | object | Cloud Spanner properties. (id: CloudSpannerProperties) |
cloudSql | object | Cloud SQL properties. (id: CloudSqlProperties) |
configuration | object | Optional. Connector configuration. (id: ConnectorConfiguration) |
creationTime | string (int64) | Output only. The creation timestamp of the connection. |
description | string | User provided description. |
friendlyName | string | User provided display name for the connection. |
hasCredential | boolean | Output only. True, if credential is configured for this connection. |
kmsKeyName | string | Optional. The Cloud KMS key that is used for credentials encryption. If omitted, internal Google owned encryption keys are used. Example: projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key] |
lastModifiedTime | string (int64) | Output only. The last update timestamp of the connection. |
salesforceDataCloud | object | Optional. Salesforce DataCloud properties. This field is intended for use only by Salesforce partner projects. This field contains properties for your Salesforce DataCloud connection. (id: SalesforceDataCloudProperties) |
spark | object | Spark properties. (id: SparkProperties) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, connectionsId | Returns specified connection. | |
list | select | projectsId, locationsId | pageSize, pageToken | Returns a list of connections in the given project. |
create | insert | projectsId, locationsId | connectionId | Creates a new connection. |
patch | update | projectsId, locationsId, connectionsId | updateMask | Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask. |
delete | delete | projectsId, locationsId, connectionsId | Deletes connection and associated credential. |
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 | |
projectsId | string | |
connectionId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Returns specified connection.
SELECT
name,
aws,
azure,
cloudResource,
cloudSpanner,
cloudSql,
configuration,
creationTime,
description,
friendlyName,
hasCredential,
kmsKeyName,
lastModifiedTime,
salesforceDataCloud,
spark
FROM google.bigqueryconnection.connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
;
Returns a list of connections in the given project.
SELECT
name,
aws,
azure,
cloudResource,
cloudSpanner,
cloudSql,
configuration,
creationTime,
description,
friendlyName,
hasCredential,
kmsKeyName,
lastModifiedTime,
salesforceDataCloud,
spark
FROM google.bigqueryconnection.connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a new connection.
INSERT INTO google.bigqueryconnection.connections (
data__aws,
data__description,
data__spark,
data__kmsKeyName,
data__configuration,
data__cloudResource,
data__cloudSql,
data__salesforceDataCloud,
data__cloudSpanner,
data__azure,
data__friendlyName,
projectsId,
locationsId,
connectionId
)
SELECT
'{{ aws }}',
'{{ description }}',
'{{ spark }}',
'{{ kmsKeyName }}',
'{{ configuration }}',
'{{ cloudResource }}',
'{{ cloudSql }}',
'{{ salesforceDataCloud }}',
'{{ cloudSpanner }}',
'{{ azure }}',
'{{ friendlyName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectionId }}'
RETURNING
name,
aws,
azure,
cloudResource,
cloudSpanner,
cloudSql,
configuration,
creationTime,
description,
friendlyName,
hasCredential,
kmsKeyName,
lastModifiedTime,
salesforceDataCloud,
spark
;
# 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: aws
description: |
Amazon Web Services (AWS) properties.
value:
accessRole:
identity: "{{ identity }}"
iamRoleId: "{{ iamRoleId }}"
- name: description
value: "{{ description }}"
description: |
User provided description.
- name: spark
description: |
Spark properties.
value:
serviceAccountId: "{{ serviceAccountId }}"
sparkHistoryServerConfig:
dataprocCluster: "{{ dataprocCluster }}"
metastoreServiceConfig:
metastoreService: "{{ metastoreService }}"
- name: kmsKeyName
value: "{{ kmsKeyName }}"
description: |
Optional. The Cloud KMS key that is used for credentials encryption. If omitted, internal Google owned encryption keys are used. Example: `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key]`
- name: configuration
description: |
Optional. Connector configuration.
value:
connectorId: "{{ connectorId }}"
asset:
database: "{{ database }}"
googleCloudResource: "{{ googleCloudResource }}"
endpoint:
hostPort: "{{ hostPort }}"
authentication:
parameters: "{{ parameters }}"
usernamePassword:
password:
plaintext: "{{ plaintext }}"
secretType: "{{ secretType }}"
username: "{{ username }}"
serviceAccount: "{{ serviceAccount }}"
network:
privateServiceConnect:
networkAttachment: "{{ networkAttachment }}"
parameters: "{{ parameters }}"
- name: cloudResource
description: |
Cloud Resource properties.
value:
serviceAccountId: "{{ serviceAccountId }}"
- name: cloudSql
description: |
Cloud SQL properties.
value:
instanceId: "{{ instanceId }}"
database: "{{ database }}"
serviceAccountId: "{{ serviceAccountId }}"
type: "{{ type }}"
credential:
username: "{{ username }}"
password: "{{ password }}"
- name: salesforceDataCloud
description: |
Optional. Salesforce DataCloud properties. This field is intended for use only by Salesforce partner projects. This field contains properties for your Salesforce DataCloud connection.
value:
instanceUri: "{{ instanceUri }}"
identity: "{{ identity }}"
tenantId: "{{ tenantId }}"
- name: cloudSpanner
description: |
Cloud Spanner properties.
value:
databaseRole: "{{ databaseRole }}"
database: "{{ database }}"
useServerlessAnalytics: {{ useServerlessAnalytics }}
useParallelism: {{ useParallelism }}
maxParallelism: {{ maxParallelism }}
useDataBoost: {{ useDataBoost }}
- name: azure
description: |
Azure properties.
value:
federatedApplicationClientId: "{{ federatedApplicationClientId }}"
identity: "{{ identity }}"
clientId: "{{ clientId }}"
objectId: "{{ objectId }}"
application: "{{ application }}"
redirectUri: "{{ redirectUri }}"
customerTenantId: "{{ customerTenantId }}"
- name: friendlyName
value: "{{ friendlyName }}"
description: |
User provided display name for the connection.
- name: connectionId
value: "{{ connectionId }}"
UPDATE examples
- patch
Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.
UPDATE google.bigqueryconnection.connections
SET
data__aws = '{{ aws }}',
data__description = '{{ description }}',
data__spark = '{{ spark }}',
data__kmsKeyName = '{{ kmsKeyName }}',
data__configuration = '{{ configuration }}',
data__cloudResource = '{{ cloudResource }}',
data__cloudSql = '{{ cloudSql }}',
data__salesforceDataCloud = '{{ salesforceDataCloud }}',
data__cloudSpanner = '{{ cloudSpanner }}',
data__azure = '{{ azure }}',
data__friendlyName = '{{ friendlyName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
aws,
azure,
cloudResource,
cloudSpanner,
cloudSql,
configuration,
creationTime,
description,
friendlyName,
hasCredential,
kmsKeyName,
lastModifiedTime,
salesforceDataCloud,
spark;
DELETE examples
- delete
Deletes connection and associated credential.
DELETE FROM google.bigqueryconnection.connections
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
;