-
Notifications
You must be signed in to change notification settings - Fork 477
Add ALTER EXTERNAL CONNECTION #20654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
9fc21a9
a7e63a7
a610087
88335d9
7c1f1e2
80b3db9
2d08322
601103e
285f772
565bf3d
a71e6a8
9bc3655
e160448
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,74 @@ | ||||||
| --- | ||||||
| title: ALTER EXTERNAL CONNECTION | ||||||
| summary: Use the ALTER EXTERNAL CONNECTION statement to update an external connection's URI. | ||||||
| toc: true | ||||||
| docs_area: reference.sql | ||||||
| --- | ||||||
|
|
||||||
| 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. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) URI that an external connection references. | ||||||
|
||||||
| 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. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) 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 can define a name for an external connection while passing the provider URI and query parameters. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) URI that an external connection references. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the other pages in this section begin like this "The ALTER EXTERNAL CONNECTION statement..." so for the sake of consistency I'd recommend following suit.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the "Supported external storage and sinks" table on this page is identical to the table on the "Create External Connection" page that you're linking to, I'd link instead to the table below, for the sake of keeping the reader on this page.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is long and confusing but I don't know enough about this functionality to recommend a specific change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the pages in this section use the following template to explain Examples: "To [desired effect], [thing you should do]". I'd recommend following that template, as it'll allow you to avoid an awkward usage of the second person.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's an awkward usage of the second person here, but it follows a precedent set in CREATE EXTERNAL CONNECTION , which is the most closely related page to this one. This page is effectively a continuation of that one for anyone actually using external connections, so I think it's best to leave it this way to maintain consistency over the two pages.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most pages in this section end with a "See also" header. I'd recommend following suit for consistency's sake.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,13 +9,16 @@ You can use external connections to specify and interact with resources that are | |
|
|
||
| `CREATE EXTERNAL CONNECTION` will validate the URI by writing, reading, and listing a test file to the external storage URI. If you're using a [KMS URI]({% link {{ page.version.version }}/take-and-restore-encrypted-backups.md %}), `CREATE EXTERNAL CONNECTION` will encrypt and decrypt a file. You'll find a `crdb_external_storage_location` file in your external storage as a result of this test. Each of the operations that access the external connection is aware of the raw URI that is parsed to configure, authenticate, and interact with the connection. | ||
|
|
||
| You may need to periodically rotate your authentication token for an external connection by updating the URI for the connection to use a new auth token before the old auth token expires. For information on how to do this, consult [`ALTER EXTERNAL CONNECTION`]({% link {{ page.version.version }}/alter-external-connection.md %}). | ||
|
||
|
|
||
| The [privilege model](#required-privileges) for external connections means that you can delegate the creation and usage of external connections to the necessary users or roles. | ||
|
|
||
| You can also use the following SQL statements to work with external connections: | ||
|
|
||
| - [`SHOW EXTERNAL CONNECTION`]({% link {{ page.version.version }}/show-external-connection.md %}) | ||
| - [`SHOW CREATE EXTERNAL CONNECTION`]({% link {{ page.version.version }}/show-create-external-connection.md %}) | ||
| - [`DROP EXTERNAL CONNECTION`]({% link {{ page.version.version }}/drop-external-connection.md %}) | ||
| - [`ALTER EXTERNAL CONNECTION`]({% link {{ page.version.version }}/alter-external-connection.md %}) | ||
|
|
||
| ## Required privileges | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something strange is happening in the sidebar on this page, and I'm not sure why. When I go to http://localhost:4000/docs/v25.4/alter-external-connection I see "ALTER EXTERNAL CONNECTION" in the sidebar, but then when I click a different page in that section (for example, "ALTER BACKUP") the "ALTER EXTERNAL CONNECTION link in the sidebar disappears. But randomly it'll appear again if you specifically navigate to the "ALTER DATABASE" page? I'm not sure why. I haven't tested all of the pages, so I'm not sure when/why it re-appears, but this link should never disappear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is just a weird anomaly with local builds. If you look at the preview build linked above, it doesn't have this same bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh strange, yeah you're right about that.