Skip to main content

connection.proto

path mgmt/v1alpha1/connection.proto

package mgmt.v1alpha1


Messages

AwsS3ConnectionConfig

NameTypeDescription
bucket_arnstring
path_prefixoptional string
credentialsoptional AwsS3Credentials
regionoptional string
endpointoptional string
bucketstring

AwsS3Credentials

S3 Credentials that are used by the worker process. Note: this may be optionally provided if the worker that is being hosted has environment credentials to the S3 bucket instead.

NameTypeDescription
profileoptional string
access_key_idoptional string
secret_access_keyoptional string
session_tokenoptional string
from_ec2_roleoptional bool
role_arnoptional string
role_external_idoptional string

CheckConnectionConfigByIdRequest

NameTypeDescription
idstringThe connection id to validate

CheckConnectionConfigByIdResponse

NameTypeDescription
is_connectedboolWhether or not the API was able to ping the connection
connection_erroroptional stringThis is the error that was received if the API was unable to connect
privilegesrepeated ConnectionRolePrivilegeThe privileges the role has to the connection

CheckConnectionConfigRequest

NameTypeDescription
connection_configConnectionConfig

CheckConnectionConfigResponse

NameTypeDescription
is_connectedboolWhether or not the API was able to ping the connection
connection_erroroptional stringThis is the error that was received if the API was unable to connect
privilegesrepeated ConnectionRolePrivilege

CheckSqlQueryRequest

NameTypeDescription
idstringThe connection id that the query will be checked against
querystringThe full query that will be run through a PREPARE statement

CheckSqlQueryResponse

NameTypeDescription
is_validboolThe query is run through PREPARE. Returns valid if it correctly compiled
erorr_messageoptional stringThe error message returned by the sql client if the prepare did not return successfully

ClientTlsConfig

Config for providing client-side TLS certificates

NameTypeDescription
root_certoptional stringRoot Certificate in PEM Format
client_certoptional stringClient Certificate in PEM format. Must also provide key.
client_keyoptional stringClient Key in PEM format. Must also provide cert.

Connection

NameTypeDescription
idstringThe unique identifier of the connection
namestringThe unique, friendly name of the connection
connection_configConnectionConfigContains the connection configuration and connection type
created_by_user_idstringThe user id of the user that created the connection
created_atgoogle.protobuf.TimestampWhen the connection was created
updated_by_user_idstringWho last updated the connection
updated_atgoogle.protobuf.TimestampWhen the connection was last updated
account_idstringThe unique account that owns this connection

ConnectionConfig

Configuration for all of the supported Neosync connection types

NameTypeDescription
pg_configPostgresConnectionConfigConfigures a PostgreSQL connection
aws_s3_configAwsS3ConnectionConfigConfigures an AWS S3 Connection
mysql_configMysqlConnectionConfigConfigures a MySQL connection
local_dir_configLocalDirectoryConnectionConfigConfigures a connection to a directory available on the local file system
openai_configOpenAiConnectionConfigConnection config for an OpenAI (or compatible) Connection
mongo_configMongoConnectionConfigConfigures a MongoDB Connection
gcp_cloudstorage_configGcpCloudStorageConnectionConfigConfigures a GCP Cloud Storage Connection
dynamodb_configDynamoDBConnectionConfigConfigures a DynamoDB Connection
mssql_configMssqlConnectionConfigConfigures a Microsoft SQL Server (mssql) Connection

ConnectionRolePrivilege

NameTypeDescription
granteestringThe role that was given the permissions
schemastringThe database schema. Ex: public
tablestringThe name of the table in the schema
privilege_typerepeated stringThe privileges given to that role

CreateConnectionRequest

NameTypeDescription
account_idstring
namestringThe friendly name of the connection
connection_configConnectionConfig

CreateConnectionResponse

NameTypeDescription
connectionConnection

DeleteConnectionRequest

NameTypeDescription
idstring

DeleteConnectionResponse

NameTypeDescription

DynamoDBConnectionConfig

Configuration for a DynaomDB Connection

NameTypeDescription
credentialsoptional AwsS3CredentialsOptional credentials that may be provided and will be used to connect to the DynamoDB Instance. If self-hosting, this may be provided by the environment in lieu of specifying these here
regionoptional stringOptionally specify the region that the dynamodb instance lives in if not provided by the environment.
endpointoptional stringOptionally specify the endpoint that will be used by the AWS SDK.

GcpCloudStorageConnectionConfig

Configuration for GCP Cloud Storage Buckets

NameTypeDescription
bucketstringThe GCP Cloud Storage bucket that will be accessed.
path_prefixoptional stringThe path prefix that will be appended to each file
service_account_credentialsoptional stringstringified json of the service account credentials file

GetConnectionRequest

NameTypeDescription
idstring

GetConnectionResponse

NameTypeDescription
connectionConnection

GetConnectionsRequest

NameTypeDescription
account_idstring

GetConnectionsResponse

NameTypeDescription
connectionsrepeated Connection

IsConnectionNameAvailableRequest

NameTypeDescription
account_idstring
connection_namestring

IsConnectionNameAvailableResponse

NameTypeDescription
is_availablebool

LocalDirectoryConnectionConfig

Configures a connection to a directory available on the local file system

NameTypeDescription
pathstringThe absolute path to a directory that is available on the local file system to the API and Worker nodes

MongoConnectionConfig

NameTypeDescription
urlstringThe full mongo connection url
tunnelSSHTunnelProvide tunnel configuration that can be used to access a connection that is not publicly accessible to the internet
client_tlsClientTlsConfigProvide client-side TLS Certificates

MssqlConnectionConfig

Configuration for a Mssql Connection

NameTypeDescription
urlstringThe URL with sqlserver scheme.
connection_optionsSqlConnectionOptions
tunnelSSHTunnelProvide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet

MysqlConnection

NameTypeDescription
userstring
passstring
protocolstring
hoststring
portint32
namestring

MysqlConnectionConfig

NameTypeDescription
urlstring
connectionMysqlConnection
tunnelSSHTunnelProvide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet
connection_optionsSqlConnectionOptions

OpenAiConnectionConfig

Configures a connection to OpenAI or OpenAI compatible API.

NameTypeDescription
api_keystringOpenAI Api Key
api_urlstringOpenAI URL

PostgresConnection

NameTypeDescription
hoststring
portint32
namestring
userstring
passstring
ssl_modeoptional string

PostgresConnectionConfig

NameTypeDescription
urlstring
connectionPostgresConnection
tunnelSSHTunnelProvide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet
connection_optionsSqlConnectionOptions
client_tlsClientTlsConfigProvide client-side TLS Certificates

SSHAuthentication

SSH Authentication

NameTypeDescription
passphraseSSHPassphrase
private_keySSHPrivateKey

SSHPassphrase

Contains the configuration needed to retrieve the SSH passphrase for the tunnel

NameTypeDescription
valuestringThe password to be used to connect to the SSH server eventually we can expand this to allow pulling from other sources.

SSHPrivateKey

Contains the configuration needed to retrieve the SSH private key for the tunnel

NameTypeDescription
valuestringThe private key in PEM format.
passphraseoptional stringIf the private key is encrypted, this value should decrypt it.

SSHTunnel

NameTypeDescription
hoststringThe host of the SSH server
portint32The port of the SSH server, typically 22
userstringThe user that will be used to authenticate
known_host_public_keyoptional stringOptionally provide the public key of the known host of the SSH tunnel that we are connecting to. If this is not provided, the server will blindly connect to the host with the given credentials. This is not recommended for production use!
authenticationSSHAuthenticationProvide the authentication required to successfully connect to the SSH server for tunneling

SqlConnectionOptions

NameTypeDescription
max_connection_limitoptional int32Sets the maximum number of open connections If this value is greater than 0, but less than the max_idle_connections, then max_idle_connections will be reduced to match the max_connection_limit If this value is less than or equal to 0, then there is no limit on the number of open connections. If not provided, the default is 0 (unlimited).
max_idle_connectionsoptional int32Sets the maximum number of connections in the idle connection pool. This value will be reduced at runtime to match the max_connection_limit if max_connection_limit is greater than 0 but less than this value. If this value is less than or equal to 0, then no idle connections are maintained. If not provided, the default is 2, which may change in a future release.
max_idle_durationoptional stringSets the maximum amount of time a connection may be idle. Expired connections may be closed lazily before reuse. if this value is less than or equal to 0, connections are not closed due to a connection's idle time. This value is parsed as a Go duration string (ex: 1s, 1m, 500ms)
max_open_durationoptional stringSets the maximum amount of time a connection may be reused. Expired connections may be closed lazily before reuse. If this value is less than or equal to 0, connections may not be closed due to a connection's age. This value is parsed as a Go duration string (ex: 1s, 1m, 500ms)

UpdateConnectionRequest

NameTypeDescription
idstring
namestring
connection_configConnectionConfig

UpdateConnectionResponse

NameTypeDescription
connectionConnection

Services

ConnectionService

Service for managing datasource connections. This is a primary data model in Neosync and is used in reference when hooking up Jobs to synchronize and generate data.

GetConnections

MethodGetConnections
RequestGetConnectionsRequest
ResponseGetConnectionsResponse
DescriptionReturns a list of connections associated with the account

GetConnection

MethodGetConnection
RequestGetConnectionRequest
ResponseGetConnectionResponse
DescriptionReturns a single connection

CreateConnection

MethodCreateConnection
RequestCreateConnectionRequest
ResponseCreateConnectionResponse
DescriptionCreates a new connection

UpdateConnection

MethodUpdateConnection
RequestUpdateConnectionRequest
ResponseUpdateConnectionResponse
DescriptionUpdates an existing connection

DeleteConnection

MethodDeleteConnection
RequestDeleteConnectionRequest
ResponseDeleteConnectionResponse
DescriptionRemoves a connection from the system.

IsConnectionNameAvailable

MethodIsConnectionNameAvailable
RequestIsConnectionNameAvailableRequest
ResponseIsConnectionNameAvailableResponse
DescriptionConnections have friendly names, this method checks if the requested name is available in the system based on the account

CheckConnectionConfig

MethodCheckConnectionConfig
RequestCheckConnectionConfigRequest
ResponseCheckConnectionConfigResponse
DescriptionChecks if the connection config is connectable by the backend. Used mostly to verify that a connection is valid prior to creating a Connection object.

CheckConnectionConfigById

MethodCheckConnectionConfigById
RequestCheckConnectionConfigByIdRequest
ResponseCheckConnectionConfigByIdResponse
DescriptionChecks if the connection id is connectable by the backend. Used to verify that a connection is still connectable.

CheckSqlQuery

MethodCheckSqlQuery
RequestCheckSqlQueryRequest
ResponseCheckSqlQueryResponse
DescriptionChecks a constructed SQL query against a sql-based connection to see if it's valid based on that connection's data schema This is useful when constructing subsets to see if the WHERE clause is correct