Skip to main content

connections

Creates, updates, deletes, gets or lists a connections resource.

Overview

Nameconnections
TypeResource
Idconfluent.sql.connections

Fields

The following fields are returned by SELECT queries:

Connection.

NameDatatypeDescription
namestringThe user provided name of the resource, unique within this environment. (example: my-openai-connection, pattern: [a-z0-9]([-a-z0-9][a-z0-9])?(.[a-z0-9]([-a-z0-9][a-z0-9])?)*)
api_versionstringAPIVersion defines the schema version of this representation of a resource. (sql/v1) (example: sql/v1)
kindstringKind defines the object this REST resource represents. (Connection)
metadataobjectObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
specobjectEncapsulates the model provider access details
statusobjectThe status of the Connection

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_sqlv1_connectionselectorganization_id, environment_id, connection_nameMake a request to read a Connection.
list_sqlv1_connectionsselectorganization_id, environment_idspec.connection_type, page_size, page_tokenRetrieve a sorted, filtered and paginated list of all Connections.
create_sqlv1_connectioninsertorganization_id, environment_id, spec, nameMake a request to create a Connection.
update_sqlv1_connectionreplaceorganization_id, environment_id, connection_name, spec, name, metadataMake a request to update a connection.
delete_sqlv1_connectiondeleteorganization_id, environment_id, connection_nameMake a request to delete a statement.

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.

NameDatatypeDescription
connection_namestringThe unique identifier for the connection.
environment_idstringThe unique identifier for the environment.
organization_idstring (uuid)The unique identifier for the organization.
page_sizeintegerA pagination size for collection requests.
page_tokenstringAn opaque pagination token for collection requests.
spec.connection_typestringFilter the results by exact match for spec.connection_type

SELECT examples

Make a request to read a Connection.

SELECT
name,
api_version,
kind,
metadata,
spec,
status
FROM confluent.sql.connections
WHERE organization_id = '{{ organization_id }}' -- required
AND environment_id = '{{ environment_id }}' -- required
AND connection_name = '{{ connection_name }}' -- required
;

INSERT examples

Make a request to create a Connection.

INSERT INTO confluent.sql.connections (
name,
spec,
organization_id,
environment_id
)
SELECT
'{{ name }}' /* required */,
'{{ spec }}' /* required */,
'{{ organization_id }}',
'{{ environment_id }}'
RETURNING
name,
api_version,
kind,
metadata,
spec,
status
;

REPLACE examples

Make a request to update a connection.

REPLACE confluent.sql.connections
SET
name = '{{ name }}',
spec = '{{ spec }}'
WHERE
organization_id = '{{ organization_id }}' --required
AND environment_id = '{{ environment_id }}' --required
AND connection_name = '{{ connection_name }}' --required
AND spec = '{{ spec }}' --required
AND name = '{{ name }}' --required;

DELETE examples

Make a request to delete a statement.

DELETE FROM confluent.sql.connections
WHERE organization_id = '{{ organization_id }}' --required
AND environment_id = '{{ environment_id }}' --required
AND connection_name = '{{ connection_name }}' --required
;