PATCH
/
v1
/
instances
/
{instance}
:updateDataSource
{
  "title": "<string>",
  "engine": "ENGINE_UNSPECIFIED",
  "activation": true,
  "version": "<string>",
  "externalLink": "<string>",
  "dataSources": [
    {
      "id": "<string>",
      "type": "DATA_SOURCE_UNSPECIFIED",
      "username": "<string>",
      "password": "<string>",
      "obfuscatedPassword": "<string>",
      "useSsl": true,
      "sslCa": "<string>",
      "obfuscatedSslCa": "<string>",
      "sslCert": "<string>",
      "obfuscatedSslCert": "<string>",
      "sslKey": "<string>",
      "obfuscatedSslKey": "<string>",
      "verifyTlsCertificate": true,
      "host": "<string>",
      "port": "<string>",
      "database": "<string>",
      "srv": true,
      "authenticationDatabase": "<string>",
      "replicaSet": "<string>",
      "sid": "<string>",
      "serviceName": "<string>",
      "sshHost": "<string>",
      "sshPort": "<string>",
      "sshUser": "<string>",
      "sshPassword": "<string>",
      "obfuscatedSshPassword": "<string>",
      "sshPrivateKey": "<string>",
      "obfuscatedSshPrivateKey": "<string>",
      "authenticationPrivateKey": "<string>",
      "obfuscatedAuthenticationPrivateKey": "<string>",
      "externalSecret": {
        "secretType": "SAECRET_TYPE_UNSPECIFIED",
        "url": "<string>",
        "authType": "AUTH_TYPE_UNSPECIFIED",
        "appRole": {
          "type": "SECRET_TYPE_UNSPECIFIED",
          "mountPath": "<string>"
        },
        "token": "<string>",
        "engineName": "<string>",
        "secretName": "<string>",
        "passwordKeyName": "<string>"
      },
      "authenticationType": "AUTHENTICATION_UNSPECIFIED",
      "azureCredential": {
        "tenantId": "<string>",
        "clientId": "<string>"
      },
      "awsCredential": {},
      "gcpCredential": {},
      "saslConfig": {
        "krbConfig": {
          "primary": "<string>",
          "instance": "<string>",
          "realm": "<string>",
          "keytab": "<string>",
          "kdcHost": "<string>",
          "kdcPort": "<string>",
          "kdcTransportProtocol": "<string>"
        }
      },
      "additionalAddresses": [
        {
          "host": "<string>",
          "port": "<string>"
        }
      ],
      "directConnection": true,
      "region": "<string>",
      "warehouseId": "<string>",
      "masterName": "<string>",
      "masterUsername": "<string>",
      "masterPassword": "<string>",
      "obfuscatedMasterPassword": "<string>",
      "redisType": "REDIS_TYPE_UNSPECIFIED",
      "cluster": "<string>",
      "extraConnectionParameters": {}
    }
  ],
  "syncInterval": "<string>",
  "maximumConnections": 123,
  "syncDatabases": [
    "<string>"
  ],
  "mysqlLowerCaseTableNames": 123,
  "lastSyncTime": "2023-11-07T05:31:56Z",
  "roles": [
    {
      "name": "<string>",
      "connectionLimit": 123,
      "validUntil": "<string>",
      "attribute": "<string>"
    }
  ]
}

Path Parameters

instance
string
required

The instance id.

Query Parameters

updateMask
string<field-mask>

The list of fields to update.

validateOnly
boolean

Validate only also tests the data source connection.

allowMissing
boolean

If set to true, and the data source is not found, a new data source will be created. In this situation, update_mask is ignored.

Body

application/json
id
string
type
enum<string>
Available options:
DATA_SOURCE_UNSPECIFIED,
ADMIN,
READ_ONLY
username
string
password
string
obfuscatedPassword
string
useSsl
boolean

Use SSL to connect to the data source. By default, we use system default SSL configuration.

sslCa
string
obfuscatedSslCa
string
sslCert
string
obfuscatedSslCert
string
sslKey
string
obfuscatedSslKey
string
verifyTlsCertificate
boolean

verify_tls_certificate enables TLS certificate verification for SSL connections. Default is false (no verification) for backward compatibility. Set to true for secure connections (recommended for production). Only set to false for development or when certificates cannot be properly validated (e.g., self-signed certs, VPN environments).

host
string
port
string
database
string
srv
boolean

srv, authentication_database and replica_set are used for MongoDB. srv is a boolean flag that indicates whether the host is a DNS SRV record.

authenticationDatabase
string

authentication_database is the database name to authenticate against, which stores the user credentials.

replicaSet
string

replica_set is used for MongoDB replica set.

sid
string

sid and service_name are used for Oracle.

serviceName
string
sshHost
string

SSH related The hostname of the SSH server agent.

sshPort
string

The port of the SSH server agent. It's 22 typically.

sshUser
string

The user to login the server.

sshPassword
string

The password to login the server. If it's empty string, no password is required.

obfuscatedSshPassword
string
sshPrivateKey
string

The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK").

obfuscatedSshPrivateKey
string
authenticationPrivateKey
string

PKCS#8 private key in PEM format. If it's empty string, no private key is required. Used for authentication when connecting to the data source.

obfuscatedAuthenticationPrivateKey
string
externalSecret
object
authenticationType
enum<string>
Available options:
AUTHENTICATION_UNSPECIFIED,
PASSWORD,
GOOGLE_CLOUD_SQL_IAM,
AWS_RDS_IAM,
AZURE_IAM
azureCredential
object
awsCredential
object
gcpCredential
object
saslConfig
object
additionalAddresses
object[]

additional_addresses is used for MongoDB replica set.

directConnection
boolean

direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.

region
string

region is the location of where the DB is, works for AWS RDS. For example, us-east-1.

warehouseId
string

warehouse_id is used by Databricks.

masterName
string

master_name is the master name used by connecting redis-master via redis sentinel.

masterUsername
string

master_username and master_obfuscated_password are master credentials used by redis sentinel mode.

masterPassword
string
obfuscatedMasterPassword
string
redisType
enum<string>
Available options:
REDIS_TYPE_UNSPECIFIED,
STANDALONE,
SENTINEL,
CLUSTER
cluster
string

Cluster is the cluster name for the data source. Used by CockroachDB.

extraConnectionParameters
object

Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write

Response

OK

Instance is the proto for instances.

title
string
engine
enum<string>
Available options:
ENGINE_UNSPECIFIED,
CLICKHOUSE,
MYSQL,
POSTGRES,
SNOWFLAKE,
SQLITE,
TIDB,
MONGODB,
REDIS,
ORACLE,
SPANNER,
MSSQL,
REDSHIFT,
MARIADB,
OCEANBASE,
STARROCKS,
DORIS,
HIVE,
ELASTICSEARCH,
BIGQUERY,
DYNAMODB,
DATABRICKS,
COCKROACHDB,
COSMOSDB,
TRINO,
CASSANDRA
activation
boolean
version
string
dataSources
object[]
syncInterval
string

How often the instance is synced.

maximumConnections
integer

The maximum number of connections. The default is 10 if the value is unset or zero.

syncDatabases
string[]

Enable sync for following databases. Default empty, means sync all schemas & databases.

mysqlLowerCaseTableNames
integer

The lower_case_table_names config for MySQL instances. It is used to determine whether the table names and database names are case sensitive.

lastSyncTime
string<date-time>
roles
object[]