Skip to content

Commit ebc9c34

Browse files
authored
Docs rr removal part5 (#34366)
1 parent cb0f075 commit ebc9c34

File tree

99 files changed

+1779
-2561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1779
-2561
lines changed

doc/user/content/security/cloud/access-control/manage-roles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ object and is automatically granted all [applicable
638638
privileges](/security/appendix/appendix-privileges/) for the object. To
639639
transfer ownership (and privileges) to another role (another user role/service
640640
account role/functional role), you can use the [ALTER ... OWNER
641-
TO](/sql/alter-owner/) command:
641+
TO](/sql/#rbac) commands:
642642

643643
{{< annotation type="Privilege(s) required to run the command" >}}
644644

doc/user/content/security/self-managed/access-control/manage-roles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ object and is automatically granted all [applicable
642642
privileges](/security/appendix/appendix-privileges/) for the object. To
643643
transfer ownership (and privileges) to another role (another user role/service
644644
account role/functional role), you can use the [ALTER ... OWNER
645-
TO](/sql/alter-owner/) command:
645+
TO](/sql/#rbac) command:
646646

647647
{{< annotation type="Privilege(s) required to run the command" >}}
648648

doc/user/content/sql/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ menu:
77
identifier: "commands"
88
parent: "reference"
99
weight: 100
10-
10+
aliases:
11+
- /sql/alter-owner/
1112
---
1213

1314
## Create/Alter/Drop Objects
@@ -23,11 +24,10 @@ sources, and tables:
2324

2425
## RBAC
2526

26-
Commands to manage roles and privileges:
27+
Commands to manage roles and privileges and owners:
2728

2829
{{< yaml-table data="sql_commands_rbac" noHeader=true >}}
2930

30-
3131
## Query Introspection (`Explain`)
3232

3333
{{< yaml-list data="sql_commands_all" label="explain" numColumns="1" >}}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: "ALTER CLUSTER REPLICA"
3+
description: "`ALTER CLUSTER REPLICA` changes properties of a cluster replica."
4+
menu:
5+
main:
6+
parent: 'commands'
7+
---
8+
9+
Use `ALTER CLUSTER REPLICA` to:
10+
- Rename a cluster replica.
11+
- Change owner of a cluster replica.
12+
13+
## Syntax
14+
15+
{{< tabs >}}
16+
{{< tab "Rename" >}}
17+
18+
### Rename
19+
20+
To rename a cluster replica:
21+
22+
{{% include-syntax file="examples/alter_cluster_replica" example="syntax-rename" %}}
23+
24+
{{< note >}}
25+
You cannot rename replicas in system clusters.
26+
{{< /note >}}
27+
28+
{{< /tab >}}
29+
{{< tab "Change owner" >}}
30+
31+
### Change owner
32+
33+
To change the owner of a cluster replica:
34+
35+
{{% include-syntax file="examples/alter_cluster_replica" example="syntax-change-owner" %}}
36+
37+
{{< /tab >}}
38+
39+
{{< /tabs >}}
40+
41+
## Privileges
42+
43+
The privileges required to execute this statement are:
44+
45+
{{< include-md
46+
file="shared-content/sql-command-privileges/alter-cluster-replica.md" >}}
47+
48+
## Example
49+
50+
The following changes the owner of the cluster replica `production.r1` to
51+
`admin`. The user running the command must:
52+
- Be the current owner;
53+
- Be a member of `admin`; and
54+
- Have `CREATE` privilege on the `production` cluster.
55+
56+
```mzsql
57+
ALTER CLUSTER REPLICA production.r1 OWNER TO admin;
58+
```

doc/user/content/sql/alter-cluster.md

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ menu:
66
parent: 'commands'
77
---
88

9-
`ALTER CLUSTER` changes the configuration of a cluster, such as the `SIZE` or
9+
Use `ALTER CLUSTER` to:
10+
11+
- Change configuration of a cluster, such as the `SIZE` or
1012
`REPLICATON FACTOR`.
13+
- Rename a cluster.
14+
- Change owner of a cluster.
15+
16+
For completeness, the syntax for `SWAP WITH` operation is provided. However, in
17+
general, you will not need to manually perform this operation.
1118

1219
## Syntax
1320

@@ -16,58 +23,47 @@ menu:
1623
{{< tabs >}}
1724
{{< tab "Set a configuration" >}}
1825

26+
### Set a configuration
27+
1928
To set a cluster configuration:
2029

21-
```mzsql
22-
ALTER CLUSTER <cluster_name>
23-
SET (
24-
SIZE = <text>,
25-
REPLICATION FACTOR = <int>,
26-
MANAGED = <bool>,
27-
SCHEDULE = { MANUAL | ON REFRESH (...) }
28-
)
29-
[WITH ({ WAIT UNTIL READY({TIMEOUT | ON TIMEOUT {COMMIT|ROLLBACK}}) | WAIT FOR <duration> })]
30-
;
31-
```
30+
{{% include-syntax file="examples/alter_cluster" example="syntax-set-configuration" %}}
3231

3332
{{< /tab >}}
3433
{{< tab "Reset to default" >}}
3534

35+
### Reset to default
36+
3637
To reset a cluster configuration back to its default value:
3738

38-
```mzsql
39-
ALTER CLUSTER <cluster_name>
40-
RESET (
41-
REPLICATION FACTOR,
42-
MANAGED,
43-
SCHEDULE
44-
)
45-
;
46-
```
39+
{{% include-syntax file="examples/alter_cluster" example="syntax-reset-to-default" %}}
4740

4841
{{< /tab >}}
49-
{{< tab "Rename cluster" >}}
42+
{{< tab "Rename" >}}
43+
44+
### Rename
5045

5146
To rename a cluster:
5247

53-
```mzsql
54-
ALTER CLUSTER <cluster_name> RENAME TO <new_cluster_name>;
55-
```
48+
{{% include-syntax file="examples/alter_cluster" example="syntax-rename" %}}
49+
50+
{{< note >}}
51+
You cannot rename system clusters, such as `mz_system` and `mz_catalog_server`.
52+
{{< /note >}}
5653

5754
{{< /tab >}}
58-
{{< tab "Change owner to" >}}
55+
{{< tab "Change owner" >}}
5956

60-
To change the owner of a cluster:
57+
### Change owner
6158

62-
```mzsql
63-
ALTER CLUSTER <cluster_name> OWNER TO <new_owner_role>;
64-
```
59+
To change the owner of a cluster:
6560

66-
To rename a cluster, you must have ownership of the cluster and membership in
67-
the `<new_owner_role>`. See also [Required privileges](#required-privileges).
61+
{{% include-syntax file="examples/alter_cluster" example="syntax-change-owner" %}}
6862

6963
{{< /tab >}}
70-
{{< tab "Swap names with" >}}
64+
{{< tab "Swap with" >}}
65+
66+
### Swap with
7167

7268
{{< important >}}
7369

@@ -79,9 +75,7 @@ not need to manually perform this operation.
7975

8076
To swap the name of this cluster with another cluster:
8177

82-
```mzsql
83-
ALTER CLUSTER <cluster1> SWAP WITH <cluster2>;
84-
```
78+
{{% include-syntax file="examples/alter_cluster" example="syntax-swap-with" %}}
8579

8680
{{< /tab >}}
8781
{{< /tabs >}}
@@ -266,6 +260,11 @@ See also:
266260
- [Access control (Materialize
267261
Self-Managed)](/security/self-managed/access-control/)
268262

263+
### Rename restrictions
264+
265+
You cannot rename system clusters, such as `mz_system` and `mz_catalog_server`.
266+
267+
269268
## Examples
270269

271270
### Replication factor
@@ -350,7 +349,6 @@ compute-specific settings. If needed, these can be set explicitly.
350349

351350
## See also
352351

353-
- [`ALTER ... RENAME`](/sql/alter-rename/)
354352
- [`CREATE CLUSTER`](/sql/create-cluster/)
355353
- [`CREATE SINK`](/sql/create-sink/)
356354
- [`SHOW SINKS`](/sql/show-sinks)

doc/user/content/sql/alter-connection.md

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,63 @@
11
---
22
title: "ALTER CONNECTION"
3-
description: "`ALTER CONNECTION` allows modifying the value of connection options and rotating secrets associated with connections"
3+
description: "`ALTER CONNECTION` allows you to modify the value of connection options; rotate secrets associated with connections; rename a connection; and change owner of a connection."
44
menu:
55
main:
66
parent: 'commands'
77
---
88

9-
`ALTER CONNECTION` allows modifying the value of connection options and rotating
10-
secrets associated with connections. In particular, you can use this command
11-
to:
9+
Use `ALTER CONNECTION` to:
1210

13-
- Modify the parameters of a connection, such as the hostname to which it
14-
points.
15-
- Rotate the key pairs associated with an [SSH tunnel connection].
11+
- Modify the parameters of a connection, such as the hostname to which it
12+
points.
13+
- Rotate the key pairs associated with an [SSH tunnel connection].
14+
- Rename a connection.
15+
- Change owner of a connection.
1616

1717
## Syntax
1818

19-
{{< diagram "alter-connection.svg" >}}
19+
{{< tabs >}}
20+
{{< tab "SET/DROP/RESET options" >}}
2021

21-
| Field | Use |
22-
| ------------------------- | --------------------------------------------------- |
23-
| _name_ | The identifier of the connection you want to alter. |
24-
| **SET**... | Sets the option to the specified value. |
25-
| **DROP**..., **RESET**... | Resets the specified option to its default value. |
26-
| **ROTATE KEYS** | Rotates the key pairs. |
22+
### SET/DROP/RESET options
2723

28-
#### `WITH` options
24+
To modify connection parameters:
2925

30-
| Field | Value | Description |
31-
| ---------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
32-
| `VALIDATE` | `boolean` | Whether [connection validation](/sql/create-connection#connection-validation) should be performed. Not available with **ROTATE KEYS**.<br><br>Defaults to `true`. |
26+
{{% include-syntax file="examples/alter_connection" example="syntax-set-drop-reset" %}}
3327

34-
## Description
28+
{{< /tab >}}
29+
{{< tab "ROTATE KEYS" >}}
30+
31+
### ROTATE KEYS
32+
33+
To rotate SSH tunnel connection key pairs:
34+
35+
{{% include-syntax file="examples/alter_connection" example="syntax-rotate-keys" %}}
36+
37+
38+
{{< /tab >}}
39+
40+
{{< tab "Rename" >}}
41+
42+
### Rename
43+
44+
To rename a connection
45+
46+
{{% include-syntax file="examples/alter_connection" example="syntax-rename" %}}
47+
48+
{{< /tab >}}
49+
{{< tab "Change owner" >}}
50+
51+
### Change owner
52+
53+
To change the owner of a connection:
54+
55+
{{% include-syntax file="examples/alter_connection" example="syntax-change-owner" %}}
56+
57+
{{< /tab >}}
58+
{{< /tabs >}}
59+
60+
## Details
3561

3662
### `SET`, `RESET`, `DROP`
3763

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: "ALTER DATABASE"
3+
description: "`ALTER DATABASE` changes properties of a database."
4+
menu:
5+
main:
6+
parent: 'commands'
7+
---
8+
9+
Use `ALTER DATABASE` to:
10+
- Rename a database.
11+
- Change owner of a database.
12+
13+
## Syntax
14+
15+
{{< tabs >}}
16+
{{< tab "Rename" >}}
17+
18+
### Rename
19+
20+
To rename a database:
21+
22+
{{% include-syntax file="examples/alter_database" example="syntax-rename" %}}
23+
24+
{{< /tab >}}
25+
{{< tab "Change owner" >}}
26+
27+
### Change owner
28+
29+
To change the owner of a database:
30+
31+
{{% include-syntax file="examples/alter_database" example="syntax-change-owner" %}}
32+
33+
{{< /tab >}}
34+
35+
{{< /tabs >}}
36+
37+
## Privileges
38+
39+
The privileges required to execute this statement are:
40+
41+
{{< include-md
42+
file="shared-content/sql-command-privileges/alter-database.md" >}}

0 commit comments

Comments
 (0)