Skip to main content
You can use external connections to specify and interact with resources that are external from CockroachDB. When creating an external connection, you define a name for an external connection while passing the provider URI and query parameters. SHOW EXTERNAL CONNECTION displays the connection name, URI, and the type of connection. You can also use the following SQL statements to work with external connections:

Required privileges

Users with the can view all external connections with SHOW EXTERNAL CONNECTION. Without the admin role, users can view the external connections that they own. Users own external connections that they have created with CREATE EXTERNAL CONNECTION.

Synopsis

show_external_connections syntax diagram

Parameters

string_or_placeholder is the name of the created external connection.

Responses

ResponseDescription
connection_nameThe user-specified name of the external connection.
connection_uriThe URI that the external connection references.
connection_typePossible values are:
  • STORAGE applies to and .
  • KMS applies to .
  • FOREIGNDATA applies to .
.
.

Examples

Show all external connections in the cluster

SHOW EXTERNAL CONNECTIONS;
  connection_name |                                                                                                                                    connection_uri                                                                                                                                     | connection_type
------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------
  msk             | kafka://boot-vzq1qitx.c1.kafka-serverless.us-east-1.amazonaws.com:9098/?sasl_aws_iam_role_arn={ARN}&sasl_aws_iam_session_name={session name}t&sasl_aws_region=us-east-1&sasl_enabled=true&sasl_mechanism=AWS_MSK_IAM&tls_enabled=true                                                 | STORAGE
  s3_bucket       | s3://bucket name?AWS_ACCESS_KEY_ID={access key}&AWS_SECRET_ACCESS_KEY=redacted                                                                                                                                                                                                        | STORAGE

Show an external connection

SHOW EXTERNAL CONNECTION s3_bucket;
  connection_name |                                       connection_uri                                       | connection_type
------------------+--------------------------------------------------------------------------------------------+------------------
  s3_bucket       | s3://bucket name?AWS_ACCESS_KEY_ID={access key}&AWS_SECRET_ACCESS_KEY=redacted             | STORAGE
(1 row)

See also