connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | confluent.sql.connections |
Fields
The following fields are returned by SELECT queries:
- get_sqlv1_connection
- list_sqlv1_connections
Connection.
| Name | Datatype | Description |
|---|---|---|
name | string | The 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_version | string | APIVersion defines the schema version of this representation of a resource. (sql/v1) (example: sql/v1) |
kind | string | Kind defines the object this REST resource represents. (Connection) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
spec | object | Encapsulates the model provider access details |
status | object | The status of the Connection |
Connections.
| Name | Datatype | Description |
|---|---|---|
name | string | The 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_version | string | APIVersion defines the schema version of this representation of a resource. (sql/v1) (example: sql/v1) |
kind | string | Kind defines the object this REST resource represents. (Connection) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
spec | object | Encapsulates the model provider access details |
status | object | The status of the Connection |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_sqlv1_connection | select | organization_id, environment_id, connection_name | Make a request to read a Connection. | |
list_sqlv1_connections | select | organization_id, environment_id | spec.connection_type, page_size, page_token | Retrieve a sorted, filtered and paginated list of all Connections. |
create_sqlv1_connection | insert | organization_id, environment_id, spec, name | Make a request to create a Connection. | |
update_sqlv1_connection | replace | organization_id, environment_id, connection_name, spec, name, metadata | Make a request to update a connection. | |
delete_sqlv1_connection | delete | organization_id, environment_id, connection_name | Make 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.
| Name | Datatype | Description |
|---|---|---|
connection_name | string | The unique identifier for the connection. |
environment_id | string | The unique identifier for the environment. |
organization_id | string (uuid) | The unique identifier for the organization. |
page_size | integer | A pagination size for collection requests. |
page_token | string | An opaque pagination token for collection requests. |
spec.connection_type | string | Filter the results by exact match for spec.connection_type |
SELECT examples
- get_sqlv1_connection
- list_sqlv1_connections
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
;
Retrieve a sorted, filtered and paginated list of all Connections.
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 spec.connection_type = '{{ spec.connection_type }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create_sqlv1_connection
- Manifest
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
;
# Description fields are for documentation purposes
- name: connections
props:
- name: organization_id
value: "{{ organization_id }}"
description: Required parameter for the connections resource.
- name: environment_id
value: "{{ environment_id }}"
description: Required parameter for the connections resource.
- name: name
value: "{{ name }}"
description: |
The user provided name of the resource, unique within this environment.
- name: spec
description: |
Encapsulates the model provider access details
value:
connection_type: "{{ connection_type }}"
endpoint: "{{ endpoint }}"
auth_data:
kind: "{{ kind }}"
data: "{{ data }}"
REPLACE examples
- update_sqlv1_connection
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
- delete_sqlv1_connection
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
;