Skip to main content

connection.proto

path mgmt/v1alpha1/connection.proto

package mgmt.v1alpha1


Messages

AwsS3ConnectionConfig

NameTypeDescription
path_prefixoptional stringThe bucket path prefix that will be appended to each file
credentialsoptional AwsS3CredentialsThe credentials to use for the S3 bucket
regionoptional stringThe region of the S3 bucket
endpointoptional stringThe endpoint of the S3 bucket (if using a custom endpoint like region specific endpoints or S3-compatible APIs)
bucketstringThe name of the S3 bucket

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 stringThe profile to use for the S3 credentials
access_key_idoptional stringThe access key id to use for the S3 credentials
secret_access_keyoptional stringThe secret access key to use for the S3 credentials
session_tokenoptional stringThe session token to use for the S3 credentials
from_ec2_roleoptional boolWhether or not the credentials are from an EC2 role
role_arnoptional stringThe ARN of the role to use for the S3 credentials
role_external_idoptional stringThe role's external ID to use for the S3 credentials

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_configConnectionConfigThe connection configuration to validate

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.
server_nameoptional stringProvide the expected server name. Depending on the driver or encryption mode, this may be required In order to fully validate the server certificate.

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_idstringThe unique identifier of the account to create the connection for
namestringThe friendly name of the connection
connection_configConnectionConfigThe connection configuration to use for the connection

CreateConnectionResponse

NameTypeDescription
connectionConnectionThe created connection

DeleteConnectionRequest

NameTypeDescription
idstringThe unique identifier of the connection to delete

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
idstringThe unique identifier of the connection to get

GetConnectionResponse

NameTypeDescription
connectionConnectionThe connection

GetConnectionsRequest

NameTypeDescription
account_idstringThe unique identifier of the account to get connections for

GetConnectionsResponse

NameTypeDescription
connectionsrepeated ConnectionThe connections

IsConnectionNameAvailableRequest

NameTypeDescription
account_idstringThe unique identifier of the account to check the connection name for
connection_namestringThe connection name to check for availability

IsConnectionNameAvailableResponse

NameTypeDescription
is_availableboolWhether or not the connection name is available

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.
url_from_envstringSource a url from an environment variable. The value is expected to be in the same format as the "url" field above. The key is the name of the environment variable to source. It must contain a prefix of "USER_DEFINED_"
connection_optionsSqlConnectionOptionsProvide connection options that can be used to further fine-tune the connection
tunnelSSHTunnelProvide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet
client_tlsClientTlsConfigProvide client-side TLS Certificates

MysqlConnection

NameTypeDescription
userstringThe user to use for the connection
passstringThe password to use for the connection
protocolstringThe protocol to use for the connection
hoststringThe host to use for the connection
portint32The port to use for the connection
namestringThe name of the database to use for the connection

MysqlConnectionConfig

NameTypeDescription
urlstringA raw string url that will be used to construct the connection. DSN format. URI format also supported but more limited.
connectionMysqlConnectionA structured representation of the connection that will be used to construct the url
url_from_envstringSource a url from an environment variable. The value is expected to be in the same format as the "url" field above. The key is the name of the environment variable to source. It must contain a prefix of "USER_DEFINED_"
tunnelSSHTunnelProvide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet
connection_optionsSqlConnectionOptionsProvide connection options that can be used to further fine-tune the connection
client_tlsClientTlsConfigProvide client-side TLS Certificates

OpenAiConnectionConfig

Configures a connection to OpenAI or OpenAI compatible API.

NameTypeDescription
api_keystringOpenAI Api Key
api_urlstringOpenAI URL (if using a custom endpoint)

PostgresConnection

NameTypeDescription
hoststringThe host to use for the connection
portint32The port to use for the connection
namestringThe name of the database to use for the connection
userstringThe user to use for the connection
passstringThe password to use for the connection
ssl_modeoptional stringThe SSL mode to use for the connection

PostgresConnectionConfig

NameTypeDescription
urlstringA raw string url that will be used to construct the connection. Must be URI format.
connectionPostgresConnectionA structured representation of the connection that will be used to construct the url
url_from_envstringSource a url from an environment variable. The value is expected to be in the same format as the "url" field above. The key is the name of the environment variable to source. It must contain a prefix of "USER_DEFINED_"
tunnelSSHTunnelProvide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet
connection_optionsSqlConnectionOptionsProvide connection options that can be used to further fine-tune the connection
client_tlsClientTlsConfigProvide client-side TLS Certificates

SSHAuthentication

SSH Authentication

NameTypeDescription
passphraseSSHPassphrasePassword authentication
private_keySSHPrivateKeyPrivate key authentication

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
idstringThe unique identifier of the connection to update
namestringThe friendly name of the connection
connection_configConnectionConfigThe connection configuration to use for the connection

UpdateConnectionResponse

NameTypeDescription
connectionConnectionThe updated connection

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