Skip to content

Commit 2a8203f

Browse files
committed
feat(storage-box): implement actions (#1145)
This PR implements actions for Storage Boxes.
1 parent dbdab66 commit 2a8203f

32 files changed

+1423
-15
lines changed

docs/reference/manual/hcloud_storage-box.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,18 @@ Manage Storage Boxes
2626

2727
* [hcloud](hcloud.md) - Hetzner Cloud CLI
2828
* [hcloud storage-box add-label](hcloud_storage-box_add-label.md) - Add a label to a Storage Box
29+
* [hcloud storage-box change-type](hcloud_storage-box_change-type.md) - Change type of a Storage Box
2930
* [hcloud storage-box create](hcloud_storage-box_create.md) - Create a new Storage Box
3031
* [hcloud storage-box delete](hcloud_storage-box_delete.md) - Delete a Storage Box
3132
* [hcloud storage-box describe](hcloud_storage-box_describe.md) - Describe a Storage Box
33+
* [hcloud storage-box disable-protection](hcloud_storage-box_disable-protection.md) - Disable resource protection for a Storage Box
34+
* [hcloud storage-box disable-snapshot-plan](hcloud_storage-box_disable-snapshot-plan.md) - Disable automatic snapshots for a Storage Box
35+
* [hcloud storage-box enable-protection](hcloud_storage-box_enable-protection.md) - Enable resource protection for a Storage Box
36+
* [hcloud storage-box enable-snapshot-plan](hcloud_storage-box_enable-snapshot-plan.md) - Enable automatic snapshots for a Storage Box
3237
* [hcloud storage-box folders](hcloud_storage-box_folders.md) - List folders of a Storage Box
3338
* [hcloud storage-box list](hcloud_storage-box_list.md) - List Storage Boxes
3439
* [hcloud storage-box remove-label](hcloud_storage-box_remove-label.md) - Remove a label from a Storage Box
40+
* [hcloud storage-box reset-password](hcloud_storage-box_reset-password.md) - Reset the password of a Storage Box
41+
* [hcloud storage-box rollback-snapshot](hcloud_storage-box_rollback-snapshot.md) - Rolls back the Storage Box to the given Snapshot
3542
* [hcloud storage-box update](hcloud_storage-box_update.md) - Update a Storage Box
43+
* [hcloud storage-box update-access-settings](hcloud_storage-box_update-access-settings.md) - Update access settings of the primary Storage Box account
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## hcloud storage-box change-type
2+
3+
Change type of a Storage Box
4+
5+
### Synopsis
6+
7+
Requests a Storage Box to be upgraded or downgraded to another Storage Box Type.
8+
Please note that it is not possible to downgrade to a Storage Box Type that offers less disk space than you are currently using.
9+
10+
```
11+
hcloud storage-box change-type <storage-box> <storage-box-type>
12+
```
13+
14+
### Options
15+
16+
```
17+
-h, --help help for change-type
18+
```
19+
20+
### Options inherited from parent commands
21+
22+
```
23+
--config string Config file path (default "~/.config/hcloud/cli.toml")
24+
--context string Currently active context
25+
--debug Enable debug output
26+
--debug-file string File to write debug output to
27+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
28+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
29+
--no-experimental-warnings If true, experimental warnings are not shown
30+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
31+
--quiet If true, only print error messages
32+
```
33+
34+
### SEE ALSO
35+
36+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes

docs/reference/manual/hcloud_storage-box_create.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ hcloud storage-box create [options] --name <name> --type <type> --location <loca
1010

1111
```
1212
--enable-protection strings Enable protection (delete) (default: none)
13-
--enable-samba Whether the Samba subsystem should be enabled
14-
--enable-ssh Whether the SSH subsystem should be enabled
15-
--enable-webdav Whether the WebDAV subsystem should be enabled
16-
--enable-zfs Whether the ZFS Snapshot folder should be visible
13+
--enable-samba Whether the Samba subsystem should be enabled (true, false)
14+
--enable-ssh Whether the SSH subsystem should be enabled (true, false)
15+
--enable-webdav Whether the WebDAV subsystem should be enabled (true, false)
16+
--enable-zfs Whether the ZFS Snapshot folder should be visible (true, false)
1717
-h, --help help for create
1818
--label stringToString User-defined labels ('key=value') (can be specified multiple times) (default [])
1919
--location string Location (ID or name) (required)
2020
--name string Storage Box name (required)
2121
-o, --output stringArray output options: json|yaml
2222
--password string The password that will be set for this Storage Box (required)
23-
--reachable-externally Whether the Storage Box should be accessible from outside the Hetzner network
23+
--reachable-externally Whether the Storage Box should be accessible from outside the Hetzner network (true, false)
2424
--ssh-key stringArray SSH public keys in OpenSSH format or as the ID or name of an existing SSH key
2525
--type string Storage Box Type (ID or name) (required)
2626
```
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## hcloud storage-box disable-protection
2+
3+
Disable resource protection for a Storage Box
4+
5+
```
6+
hcloud storage-box disable-protection <storage-box> delete
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for disable-protection
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--config string Config file path (default "~/.config/hcloud/cli.toml")
19+
--context string Currently active context
20+
--debug Enable debug output
21+
--debug-file string File to write debug output to
22+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
23+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
24+
--no-experimental-warnings If true, experimental warnings are not shown
25+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
26+
--quiet If true, only print error messages
27+
```
28+
29+
### SEE ALSO
30+
31+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## hcloud storage-box disable-snapshot-plan
2+
3+
Disable automatic snapshots for a Storage Box
4+
5+
```
6+
hcloud storage-box disable-snapshot-plan <storage-box>
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for disable-snapshot-plan
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--config string Config file path (default "~/.config/hcloud/cli.toml")
19+
--context string Currently active context
20+
--debug Enable debug output
21+
--debug-file string File to write debug output to
22+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
23+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
24+
--no-experimental-warnings If true, experimental warnings are not shown
25+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
26+
--quiet If true, only print error messages
27+
```
28+
29+
### SEE ALSO
30+
31+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## hcloud storage-box enable-protection
2+
3+
Enable resource protection for a Storage Box
4+
5+
```
6+
hcloud storage-box enable-protection <storage-box> delete
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for enable-protection
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--config string Config file path (default "~/.config/hcloud/cli.toml")
19+
--context string Currently active context
20+
--debug Enable debug output
21+
--debug-file string File to write debug output to
22+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
23+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
24+
--no-experimental-warnings If true, experimental warnings are not shown
25+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
26+
--quiet If true, only print error messages
27+
```
28+
29+
### SEE ALSO
30+
31+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## hcloud storage-box enable-snapshot-plan
2+
3+
Enable automatic snapshots for a Storage Box
4+
5+
### Synopsis
6+
7+
Enable automatic snapshots for a Storage Box
8+
9+
Allowed values for --day-of-week are:
10+
- Sunday, Sun, 0, 7
11+
- Monday, Mon, 1
12+
- Tuesday, Tue, 2
13+
- Wednesday, Wed, 3
14+
- Thursday, Thu, 4
15+
- Friday, Fri, 5
16+
- Saturday, Sat, 6
17+
18+
```
19+
hcloud storage-box enable-snapshot-plan [options] <storage-box>
20+
```
21+
22+
### Options
23+
24+
```
25+
--day-of-month int Day of the month the Snapshot Plan should be executed on. Not specified means every day
26+
--day-of-week string Day of the week the Snapshot Plan should be executed on. Not specified means every day
27+
-h, --help help for enable-snapshot-plan
28+
--hour int Hour the Snapshot Plan should be executed on (UTC). Not specified means every hour
29+
--max-snapshots int Maximum amount of Snapshots that should be created by this Snapshot Plan
30+
--minute int Minute the Snapshot Plan should be executed on (UTC). Not specified means every minute
31+
```
32+
33+
### Options inherited from parent commands
34+
35+
```
36+
--config string Config file path (default "~/.config/hcloud/cli.toml")
37+
--context string Currently active context
38+
--debug Enable debug output
39+
--debug-file string File to write debug output to
40+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
41+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
42+
--no-experimental-warnings If true, experimental warnings are not shown
43+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
44+
--quiet If true, only print error messages
45+
```
46+
47+
### SEE ALSO
48+
49+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## hcloud storage-box reset-password
2+
3+
Reset the password of a Storage Box
4+
5+
```
6+
hcloud storage-box reset-password --password <password> <storage-box>
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for reset-password
13+
--password string New password for the Storage Box
14+
```
15+
16+
### Options inherited from parent commands
17+
18+
```
19+
--config string Config file path (default "~/.config/hcloud/cli.toml")
20+
--context string Currently active context
21+
--debug Enable debug output
22+
--debug-file string File to write debug output to
23+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
24+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
25+
--no-experimental-warnings If true, experimental warnings are not shown
26+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
27+
--quiet If true, only print error messages
28+
```
29+
30+
### SEE ALSO
31+
32+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## hcloud storage-box rollback-snapshot
2+
3+
Rolls back the Storage Box to the given Snapshot
4+
5+
```
6+
hcloud storage-box rollback-snapshot --snapshot <snapshot> <storage-box>
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for rollback-snapshot
13+
--snapshot string The name or ID of the snapshot to roll back to
14+
```
15+
16+
### Options inherited from parent commands
17+
18+
```
19+
--config string Config file path (default "~/.config/hcloud/cli.toml")
20+
--context string Currently active context
21+
--debug Enable debug output
22+
--debug-file string File to write debug output to
23+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
24+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
25+
--no-experimental-warnings If true, experimental warnings are not shown
26+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
27+
--quiet If true, only print error messages
28+
```
29+
30+
### SEE ALSO
31+
32+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## hcloud storage-box update-access-settings
2+
3+
Update access settings of the primary Storage Box account
4+
5+
```
6+
hcloud storage-box update-access-settings [options] <storage-box>
7+
```
8+
9+
### Options
10+
11+
```
12+
--enable-samba Whether the Samba subsystem should be enabled (true, false)
13+
--enable-ssh Whether the SSH subsystem should be enabled (true, false)
14+
--enable-webdav Whether the WebDAV subsystem should be enabled (true, false)
15+
--enable-zfs Whether the ZFS Snapshot folder should be visible (true, false)
16+
-h, --help help for update-access-settings
17+
--reachable-externally Whether the Storage Box should be accessible from outside the Hetzner network (true, false)
18+
```
19+
20+
### Options inherited from parent commands
21+
22+
```
23+
--config string Config file path (default "~/.config/hcloud/cli.toml")
24+
--context string Currently active context
25+
--debug Enable debug output
26+
--debug-file string File to write debug output to
27+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
28+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
29+
--no-experimental-warnings If true, experimental warnings are not shown
30+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
31+
--quiet If true, only print error messages
32+
```
33+
34+
### SEE ALSO
35+
36+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes

0 commit comments

Comments
 (0)