Skip to content

Commit e7956de

Browse files
authored
Add sqlserverflex instance create/update commands (#346)
* Implement create command * Implement update command * Update docs * Fixes after review * Update docs
1 parent 57c463f commit e7956de

File tree

11 files changed

+2170
-5
lines changed

11 files changed

+2170
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,24 +139,22 @@ To specify a custom pager, use the `PAGER` environment variable.
139139
If the variable is not set, STACKIT CLI uses the `less` as default pager.
140140

141141
When using `less` as a pager, STACKIT CLI will automatically pass following options
142+
142143
- -F, --quit-if-one-screen - Less will automatically exit if the entire file can be displayed on the first screen.
143144
- -S, --chop-long-lines - Lines longer than the screen width will be chopped rather than being folded.
144145
- -w, --hilite-unread - Temporarily highlights the first "new" line after a forward movement of a full page.
145146
- -R, --RAW-CONTROL-CHARS - ANSI color and style sequences will be interpreted.
146147

147148
> These options will not be added automatically if a custom pager is defined.
148-
>
149+
>
149150
> In that case, users can define the parameters by using the specific environment variable required by the `PAGER` (if supported).
150151
151-
>
152152
> For example, if user sets the `PAGER` environment variable to `less` and would like to pass some arguments, `LESS` environment variable must be used as following:
153153
154-
>
155154
> export PAGER="less"
156-
>
155+
>
157156
> export LESS="-R"
158157
159-
160158
## Autocompletion
161159

162160
If you wish to set up command autocompletion in your shell for the STACKIT CLI, please refer to our [autocompletion guide](./AUTOCOMPLETION.md).

docs/stackit_sqlserverflex_instance.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@ stackit sqlserverflex instance [flags]
2929
### SEE ALSO
3030

3131
* [stackit sqlserverflex](./stackit_sqlserverflex.md) - Provides functionality for SQLServer Flex
32+
* [stackit sqlserverflex instance create](./stackit_sqlserverflex_instance_create.md) - Creates an SQLServer Flex instance
3233
* [stackit sqlserverflex instance list](./stackit_sqlserverflex_instance_list.md) - Lists all SQLServer Flex instances
34+
* [stackit sqlserverflex instance update](./stackit_sqlserverflex_instance_update.md) - Updates an SQLServer Flex instance
3335

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## stackit sqlserverflex instance create
2+
3+
Creates an SQLServer Flex instance
4+
5+
### Synopsis
6+
7+
Creates an SQLServer Flex instance.
8+
9+
```
10+
stackit sqlserverflex instance create [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Create an SQLServer Flex instance with name "my-instance" and specify flavor by CPU and RAM. Other parameters are set to default values
17+
$ stackit sqlserverflex instance create --name my-instance --cpu 1 --ram 4
18+
19+
Create an SQLServer Flex instance with name "my-instance" and specify flavor by ID. Other parameters are set to default values
20+
$ stackit sqlserverflex instance create --name my-instance --flavor-id xxx
21+
22+
Create an SQLServer Flex instance with name "my-instance", specify flavor by CPU and RAM, set storage size to 20 GB, and restrict access to a specific range of IP addresses. Other parameters are set to default values
23+
$ stackit sqlserverflex instance create --name my-instance --cpu 1 --ram 4 --storage-size 20 --acl 1.2.3.0/24
24+
```
25+
26+
### Options
27+
28+
```
29+
--acl strings The access control list (ACL). Must contain at least one valid subnet, for instance '0.0.0.0/0' for open access (discouraged), '1.2.3.0/24 for a public IP range of an organization, '1.2.3.4/32' for a single IP range, etc. (default [])
30+
--backup-schedule string Backup schedule
31+
--cpu int Number of CPUs
32+
--edition string Edition of the SQLServer instance
33+
--flavor-id string ID of the flavor
34+
-h, --help Help for "stackit sqlserverflex instance create"
35+
-n, --name string Instance name
36+
--ram int Amount of RAM (in GB)
37+
--retention-days int The days for how long the backup files should be stored before being cleaned up
38+
--storage-class string Storage class
39+
--storage-size int Storage size (in GB)
40+
--version string SQLServer version
41+
```
42+
43+
### Options inherited from parent commands
44+
45+
```
46+
-y, --assume-yes If set, skips all confirmation prompts
47+
--async If set, runs the command asynchronously
48+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
49+
-p, --project-id string Project ID
50+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
51+
```
52+
53+
### SEE ALSO
54+
55+
* [stackit sqlserverflex instance](./stackit_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances
56+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## stackit sqlserverflex instance update
2+
3+
Updates an SQLServer Flex instance
4+
5+
### Synopsis
6+
7+
Updates an SQLServer Flex instance.
8+
9+
```
10+
stackit sqlserverflex instance update INSTANCE_ID [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Update the name of an SQLServer Flex instance with ID "xxx"
17+
$ stackit sqlserverflex instance update xxx --name my-new-name
18+
19+
Update the backup schedule of an SQLServer Flex instance with ID "xxx"
20+
$ stackit sqlserverflex instance update xxx --backup-schedule "30 0 * * *"
21+
```
22+
23+
### Options
24+
25+
```
26+
--acl strings Lists of IP networks in CIDR notation which are allowed to access this instance (default [])
27+
--backup-schedule string Backup schedule
28+
--cpu int Number of CPUs
29+
--flavor-id string ID of the flavor
30+
-h, --help Help for "stackit sqlserverflex instance update"
31+
-n, --name string Instance name
32+
--ram int Amount of RAM (in GB)
33+
--version string Version
34+
```
35+
36+
### Options inherited from parent commands
37+
38+
```
39+
-y, --assume-yes If set, skips all confirmation prompts
40+
--async If set, runs the command asynchronously
41+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
42+
-p, --project-id string Project ID
43+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
44+
```
45+
46+
### SEE ALSO
47+
48+
* [stackit sqlserverflex instance](./stackit_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances
49+

0 commit comments

Comments
 (0)