Skip to content

Commit 63cac36

Browse files
authored
Add beta to sqlserverflex command examples (#350)
1 parent 3e14304 commit 63cac36

File tree

13 files changed

+85
-43
lines changed

13 files changed

+85
-43
lines changed

docs/stackit_beta_sqlserverflex_instance_create.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ stackit beta sqlserverflex instance create [flags]
1414

1515
```
1616
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
17+
$ stackit beta sqlserverflex instance create --name my-instance --cpu 1 --ram 4
1818
1919
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
20+
$ stackit beta sqlserverflex instance create --name my-instance --flavor-id xxx
2121
2222
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
23+
$ stackit beta sqlserverflex instance create --name my-instance --cpu 1 --ram 4 --storage-size 20 --acl 1.2.3.0/24
2424
```
2525

2626
### Options

docs/stackit_beta_sqlserverflex_instance_delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ stackit beta sqlserverflex instance delete INSTANCE_ID [flags]
1414

1515
```
1616
Delete an SQLServer Flex instance with ID "xxx"
17-
$ stackit sqlserverflex instance delete xxx
17+
$ stackit beta sqlserverflex instance delete xxx
1818
```
1919

2020
### Options

docs/stackit_beta_sqlserverflex_instance_describe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ stackit beta sqlserverflex instance describe INSTANCE_ID [flags]
1414

1515
```
1616
Get details of an SQLServer Flex instance with ID "xxx"
17-
$ stackit sqlserverflex instance describe xxx
17+
$ stackit beta sqlserverflex instance describe xxx
1818
1919
Get details of an SQLServer Flex instance with ID "xxx" in JSON format
20-
$ stackit sqlserverflex instance describe xxx --output-format json
20+
$ stackit beta sqlserverflex instance describe xxx --output-format json
2121
```
2222

2323
### Options

docs/stackit_beta_sqlserverflex_instance_list.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ stackit beta sqlserverflex instance list [flags]
1414

1515
```
1616
List all SQLServer Flex instances
17-
$ stackit sqlserverflex instance list
17+
$ stackit beta sqlserverflex instance list
1818
1919
List all SQLServer Flex instances in JSON format
20-
$ stackit sqlserverflex instance list --output-format json
20+
$ stackit beta sqlserverflex instance list --output-format json
2121
2222
List up to 10 SQLServer Flex instances
23-
$ stackit sqlserverflex instance list --limit 10
23+
$ stackit beta sqlserverflex instance list --limit 10
2424
```
2525

2626
### Options

docs/stackit_beta_sqlserverflex_instance_update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ stackit beta sqlserverflex instance update INSTANCE_ID [flags]
1414

1515
```
1616
Update the name of an SQLServer Flex instance with ID "xxx"
17-
$ stackit sqlserverflex instance update xxx --name my-new-name
17+
$ stackit beta sqlserverflex instance update xxx --name my-new-name
1818
1919
Update the backup schedule of an SQLServer Flex instance with ID "xxx"
20-
$ stackit sqlserverflex instance update xxx --backup-schedule "30 0 * * *"
20+
$ stackit beta sqlserverflex instance update xxx --backup-schedule "30 0 * * *"
2121
```
2222

2323
### Options

internal/cmd/beta/sqlserverflex/instance/create/create.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ func NewCmd(p *print.Printer) *cobra.Command {
6363
Example: examples.Build(
6464
examples.NewExample(
6565
`Create an SQLServer Flex instance with name "my-instance" and specify flavor by CPU and RAM. Other parameters are set to default values`,
66-
`$ stackit sqlserverflex instance create --name my-instance --cpu 1 --ram 4`),
66+
`$ stackit beta sqlserverflex instance create --name my-instance --cpu 1 --ram 4`),
6767
examples.NewExample(
6868
`Create an SQLServer Flex instance with name "my-instance" and specify flavor by ID. Other parameters are set to default values`,
69-
`$ stackit sqlserverflex instance create --name my-instance --flavor-id xxx`),
69+
`$ stackit beta sqlserverflex instance create --name my-instance --flavor-id xxx`),
7070
examples.NewExample(
7171
`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`,
72-
`$ stackit sqlserverflex instance create --name my-instance --cpu 1 --ram 4 --storage-size 20 --acl 1.2.3.0/24`),
72+
`$ stackit beta sqlserverflex instance create --name my-instance --cpu 1 --ram 4 --storage-size 20 --acl 1.2.3.0/24`),
7373
),
7474
RunE: func(cmd *cobra.Command, args []string) error {
7575
ctx := context.Background()
@@ -157,12 +157,14 @@ func parseInput(p *print.Printer, cmd *cobra.Command) (*inputModel, error) {
157157

158158
if flavorId == nil && (cpu == nil || ram == nil) {
159159
return nil, &cliErr.DatabaseInputFlavorError{
160-
Cmd: cmd,
160+
Cmd: cmd,
161+
Service: sqlserverflexUtils.ServiceCmd,
161162
}
162163
}
163164
if flavorId != nil && (cpu != nil || ram != nil) {
164165
return nil, &cliErr.DatabaseInputFlavorError{
165-
Cmd: cmd,
166+
Cmd: cmd,
167+
Service: sqlserverflexUtils.ServiceCmd,
166168
}
167169
}
168170

internal/cmd/beta/sqlserverflex/instance/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
3737
Example: examples.Build(
3838
examples.NewExample(
3939
`Delete an SQLServer Flex instance with ID "xxx"`,
40-
"$ stackit sqlserverflex instance delete xxx"),
40+
"$ stackit beta sqlserverflex instance delete xxx"),
4141
),
4242
RunE: func(cmd *cobra.Command, args []string) error {
4343
ctx := context.Background()

internal/cmd/beta/sqlserverflex/instance/describe/describe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ func NewCmd(p *print.Printer) *cobra.Command {
3838
Example: examples.Build(
3939
examples.NewExample(
4040
`Get details of an SQLServer Flex instance with ID "xxx"`,
41-
"$ stackit sqlserverflex instance describe xxx"),
41+
"$ stackit beta sqlserverflex instance describe xxx"),
4242
examples.NewExample(
4343
`Get details of an SQLServer Flex instance with ID "xxx" in JSON format`,
44-
"$ stackit sqlserverflex instance describe xxx --output-format json"),
44+
"$ stackit beta sqlserverflex instance describe xxx --output-format json"),
4545
),
4646
RunE: func(cmd *cobra.Command, args []string) error {
4747
ctx := context.Background()

internal/cmd/beta/sqlserverflex/instance/list/list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ func NewCmd(p *print.Printer) *cobra.Command {
3838
Example: examples.Build(
3939
examples.NewExample(
4040
`List all SQLServer Flex instances`,
41-
"$ stackit sqlserverflex instance list"),
41+
"$ stackit beta sqlserverflex instance list"),
4242
examples.NewExample(
4343
`List all SQLServer Flex instances in JSON format`,
44-
"$ stackit sqlserverflex instance list --output-format json"),
44+
"$ stackit beta sqlserverflex instance list --output-format json"),
4545
examples.NewExample(
4646
`List up to 10 SQLServer Flex instances`,
47-
"$ stackit sqlserverflex instance list --limit 10"),
47+
"$ stackit beta sqlserverflex instance list --limit 10"),
4848
),
4949
RunE: func(cmd *cobra.Command, args []string) error {
5050
ctx := context.Background()

internal/cmd/beta/sqlserverflex/instance/update/update.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ func NewCmd(p *print.Printer) *cobra.Command {
5656
Example: examples.Build(
5757
examples.NewExample(
5858
`Update the name of an SQLServer Flex instance with ID "xxx"`,
59-
"$ stackit sqlserverflex instance update xxx --name my-new-name"),
59+
"$ stackit beta sqlserverflex instance update xxx --name my-new-name"),
6060
examples.NewExample(
6161
`Update the backup schedule of an SQLServer Flex instance with ID "xxx"`,
62-
`$ stackit sqlserverflex instance update xxx --backup-schedule "30 0 * * *"`),
62+
`$ stackit beta sqlserverflex instance update xxx --backup-schedule "30 0 * * *"`),
6363
),
6464
Args: args.SingleArg(instanceIdArg, utils.ValidateUUID),
6565
RunE: func(cmd *cobra.Command, args []string) error {
@@ -152,8 +152,9 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
152152

153153
if flavorId != nil && (cpu != nil || ram != nil) {
154154
return nil, &cliErr.DatabaseInputFlavorError{
155-
Cmd: cmd,
156-
Args: inputArgs,
155+
Cmd: cmd,
156+
Service: sqlserverflexUtils.ServiceCmd,
157+
Args: inputArgs,
157158
}
158159
}
159160

0 commit comments

Comments
 (0)