Skip to main content
The ALTER EXTERNAL CONNECTION allows you to change the storage/sink URI that an external connection references. You can use external connections to specify and interact with resources that are external to CockroachDB. When creating an external connection, you must define a name for the external connection while passing the provider URI and query parameters. You can use ALTER EXTERNAL CONNECTION to update the connection string for an external connection to use a new authentication token. This allows you to rotate your auth token before the old token expires. You can also use the following SQL statements to work with external connections:

Required privileges

To update an external connection, a user must have the UPDATE privilege on that connection. For example:

Synopsis

alter_external_connection syntax diagram

Parameters

ParameterDescription
connection_nameThe name of the existing external connection.
connection_uriThe new storage/sink URI that the external connection will be updated to reference.

Supported external storage and sinks

Storage or sinkOperation support
Changefeeds
Backups, restores, imports, exports, changefeeds
Encrypted backups
Backups, restores, imports, exports, changefeeds
Changefeeds
Changefeeds
Changefeeds
Backups, restores, imports, exports, changefeeds
Encrypted backups
Changefeeds
Changefeeds
Backups, restores, imports, exports, changefeeds
connectionsPhysical cluster replication
Backups, restores, imports, exports, changefeeds
Changefeeds
For more information on authentication and forming the URI that an external connection will represent, refer to the storage or sink pages linked in the table.

Examples

Update the URI of an external connection

In this example, you update the backup_bucket external connection to a new Amazon S3 URI to rotate your auth token.

See also