REST Resource: projects.locations.connections

Stay organized with collections Save and categorize content based on your preferences.

Resource: Connection

Configuration parameters to establish connection with an external data source, except the credential attributes.

JSON representation
{
  "name": string,
  "friendlyName": string,
  "description": string,
  "creationTime": string,
  "lastModifiedTime": string,
  "hasCredential": boolean,

  // Union field properties can be only one of the following:
  "cloudSql": {
    object (CloudSqlProperties)
  },
  "aws": {
    object (AwsProperties)
  },
  "azure": {
    object (AzureProperties)
  },
  "cloudSpanner": {
    object (CloudSpannerProperties)
  },
  "cloudResource": {
    object (CloudResourceProperties)
  }
  // End of list of possible types for union field properties.
}
Fields
name

string

The resource name of the connection in the form of: projects/{project_id}/locations/{locationId}/connections/{connectionId}

friendlyName

string

User provided display name for the connection.

description

string

User provided description.

creationTime

string (int64 format)

Output only. The creation timestamp of the connection.

lastModifiedTime

string (int64 format)

Output only. The last update timestamp of the connection.

hasCredential

boolean

Output only. True, if credential is configured for this connection.

Union field properties. Properties specific to the underlying data source. properties can be only one of the following:
cloudSql

object (CloudSqlProperties)

Cloud SQL properties.

aws

object (AwsProperties)

Amazon Web Services (AWS) properties.

azure

object (AzureProperties)

Azure properties.

cloudSpanner

object (CloudSpannerProperties)

Cloud Spanner properties.

cloudResource

object (CloudResourceProperties)

Cloud Resource properties.

CloudSqlProperties

Connection properties specific to the Cloud SQL.

JSON representation
{
  "instanceId": string,
  "database": string,
  "type": enum (DatabaseType),
  "credential": {
    object (CloudSqlCredential)
  },
  "serviceAccountId": string
}
Fields
instanceId

string

Cloud SQL instance ID in the form project:location:instance.

database

string

Database name.

type

enum (DatabaseType)

Type of the Cloud SQL database.

credential

object (CloudSqlCredential)

Input only. Cloud SQL credential.

serviceAccountId

string

Output only. The account ID of the service used for the purpose of this connection.

When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.

DatabaseType

Supported Cloud SQL database types.

Enums
DATABASE_TYPE_UNSPECIFIED Unspecified database type.
POSTGRES Cloud SQL for PostgreSQL.
MYSQL Cloud SQL for MySQL.

CloudSqlCredential

Credential info for the Cloud SQL.

JSON representation
{
  "username": string,
  "password": string
}
Fields
username

string

The username for the credential.

password

string

The password for the credential.

AwsProperties

Connection properties specific to Amazon Web Services (AWS).

JSON representation
{
  "accessRole": {
    object (AwsAccessRole)
  }
}
Fields
accessRole

object (AwsAccessRole)

Authentication using Google owned service account to assume into customer's AWS IAM Role.

AwsAccessRole

Authentication method for Amazon Web Services (AWS) that uses Google owned Google service account to assume into customer's AWS IAM Role.

JSON representation
{
  "iamRoleId": string,
  "identity": string
}
Fields
iamRoleId

string

The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection.

identity

string

A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role.

AzureProperties

Container for connection properties specific to Azure.

JSON representation
{
  "application": string,
  "clientId": string,
  "objectId": string,
  "customerTenantId": string,
  "redirectUri": string,
  "federatedApplicationClientId": string,
  "identity": string
}
Fields
application

string

Output only. The name of the Azure Active Directory Application.

clientId

string

Output only. The client id of the Azure Active Directory Application.

objectId

string

Output only. The object id of the Azure Active Directory Application.

customerTenantId

string

The id of customer's directory that host the data.

redirectUri

string

The URL user will be redirected to after granting consent during connection setup.

federatedApplicationClientId

string

The client ID of the user's Azure Active Directory Application used for a federated connection.

identity

string

Output only. A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application.

CloudSpannerProperties

Connection properties specific to Cloud Spanner.

JSON representation
{
  "database": string,
  "useParallelism": boolean,
  "useServerlessAnalytics": boolean
}
Fields
database

string

Cloud Spanner database in the form `project/instance/database'

useParallelism

boolean

If parallelism should be used when reading from Cloud Spanner

useServerlessAnalytics

boolean

If the serverless analytics service should be used to read data from Cloud Spanner. Note: useParallelism must be set when using serverless analytics.

CloudResourceProperties

Container for connection properties for delegation of access to GCP resources.

JSON representation
{
  "serviceAccountId": string
}
Fields
serviceAccountId

string

Output only. The account ID of the service created for the purpose of this connection.

The service account does not have any permissions associated with it when it is created. After creation, customers delegate permissions to the service account. When the connection is used in the context of an operation in BigQuery, the service account will be used to connect to the desired resources in GCP.

The account ID is in the form of: @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com

Methods

create

Creates a new connection.

delete

Deletes connection and associated credential.

get

Returns specified connection.

getIamPolicy

Gets the access control policy for a resource.

list

Returns a list of connections in the given project.

patch

Updates the specified connection.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.