Skip to main content

connections

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

Overview

Nameconnections
TypeResource
Idconfluent.sql.connections

Fields

NameDatatypeDescription
namestringThe user provided name of the resource, unique within this environment.
_specobject
api_versionstringAPIVersion defines the schema version of this representation of a resource.
kindstringKind defines the object this REST resource represents.
metadata``ObjectMeta 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

NameAccessible byRequired ParamsDescription
get_sqlv1connectionSELECTconnection_name, environment_id, organization_idPreview Make a request to read a Connection.
list_sqlv1connectionsSELECTenvironment_id, organization_idPreview Retrieve a sorted, filtered and paginated list of all Connections.
create_sqlv1connectionINSERTenvironment_id, organization_idPreview Make a request to create a Connection.
delete_sqlv1connectionDELETEconnection_name, environment_id, organization_idPreview Make a request to delete a statement.
update_sqlv1connectionEXECconnection_name, environment_id, organization_idPreview Make a request to update a connection.

SELECT examples

Preview Retrieve a sorted, filtered and paginated list of all Connections.

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

INSERT example

Use the following StackQL query and manifest file to create a new connections resource.

/*+ create */
INSERT INTO confluent.sql.connections (
data__name,
data__spec,
environment_id,
organization_id
)
SELECT
'{{ name }}',
'{{ spec }}',
'{{ environment_id }}',
'{{ organization_id }}'
;

DELETE example

Deletes the specified connections resource.

/*+ delete */
DELETE FROM confluent.sql.connections
WHERE connection_name = '{{ connection_name }}'
AND environment_id = '{{ environment_id }}'
AND organization_id = '{{ organization_id }}';