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
Successful response
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) |
Successful response
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__friendlyName,
data__description,
data__cloudSql,
data__aws,
data__azure,
data__cloudSpanner,
data__cloudResource,
data__spark,
data__salesforceDataCloud,
data__configuration,
data__kmsKeyName,
projectsId,
locationsId,
connectionId
)
SELECT
'{{ friendlyName }}',
'{{ description }}',
'{{ cloudSql }}',
'{{ aws }}',
'{{ azure }}',
'{{ cloudSpanner }}',
'{{ cloudResource }}',
'{{ spark }}',
'{{ salesforceDataCloud }}',
'{{ configuration }}',
'{{ kmsKeyName }}',
'{{ 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: string
description: Required parameter for the connections resource.
- name: locationsId
value: string
description: Required parameter for the connections resource.
- name: friendlyName
value: string
description: >
User provided display name for the connection.
- name: description
value: string
description: >
User provided description.
- name: cloudSql
value: object
description: >
Cloud SQL properties.
- name: aws
value: object
description: >
Amazon Web Services (AWS) properties.
- name: azure
value: object
description: >
Azure properties.
- name: cloudSpanner
value: object
description: >
Cloud Spanner properties.
- name: cloudResource
value: object
description: >
Cloud Resource properties.
- name: spark
value: object
description: >
Spark properties.
- name: salesforceDataCloud
value: object
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.
- name: configuration
value: object
description: >
Optional. Connector configuration.
- name: kmsKeyName
value: string
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: connectionId
value: string
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__friendlyName = '{{ friendlyName }}',
data__description = '{{ description }}',
data__cloudSql = '{{ cloudSql }}',
data__aws = '{{ aws }}',
data__azure = '{{ azure }}',
data__cloudSpanner = '{{ cloudSpanner }}',
data__cloudResource = '{{ cloudResource }}',
data__spark = '{{ spark }}',
data__salesforceDataCloud = '{{ salesforceDataCloud }}',
data__configuration = '{{ configuration }}',
data__kmsKeyName = '{{ kmsKeyName }}'
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;