Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/stackit_mongodbflex.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ stackit mongodbflex [flags]

* [stackit](./stackit.md) - Manage STACKIT resources using the command line
* [stackit mongodbflex backup](./stackit_mongodbflex_backup.md) - Provides functionality for MongoDB Flex instance backups
* [stackit mongodbflex flavor](./stackit_mongodbflex_flavor.md) - Provides functionality for MongoDB Flex flavors
* [stackit mongodbflex instance](./stackit_mongodbflex_instance.md) - Provides functionality for MongoDB Flex instances
* [stackit mongodbflex options](./stackit_mongodbflex_options.md) - Lists MongoDB Flex options
* [stackit mongodbflex storage](./stackit_mongodbflex_storage.md) - Provides functionality for MongoDB Flex storages for a certain flavor
* [stackit mongodbflex user](./stackit_mongodbflex_user.md) - Provides functionality for MongoDB Flex users
* [stackit mongodbflex version](./stackit_mongodbflex_version.md) - Provides functionality for MongoDB Flex versions

34 changes: 34 additions & 0 deletions docs/stackit_mongodbflex_flavor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## stackit mongodbflex flavor

Provides functionality for MongoDB Flex flavors

### Synopsis

Provides functionality for MongoDB Flex flavors.

```
stackit mongodbflex flavor [flags]
```

### Options

```
-h, --help Help for "stackit mongodbflex flavor"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit mongodbflex](./stackit_mongodbflex.md) - Provides functionality for MongoDB Flex
* [stackit mongodbflex flavor list](./stackit_mongodbflex_flavor_list.md) - Lists MongoDB Flex flavors

41 changes: 41 additions & 0 deletions docs/stackit_mongodbflex_flavor_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## stackit mongodbflex flavor list

Lists MongoDB Flex flavors

### Synopsis

Lists MongoDB Flex flavors.

```
stackit mongodbflex flavor list [flags]
```

### Examples

```
List MongoDB Flex flavor
$ stackit mongodbflex flavor list
```

### Options

```
-h, --help Help for "stackit mongodbflex flavor list"
--limit int Maximum number of entries to list
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit mongodbflex flavor](./stackit_mongodbflex_flavor.md) - Provides functionality for MongoDB Flex flavors

23 changes: 9 additions & 14 deletions docs/stackit_mongodbflex_instance_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,25 @@ stackit mongodbflex instance create [flags]
### Examples

```
Create a MongoDB Flex instance with name "my-instance", ACL 0.0.0.0/0 (open access) and specify flavor by CPU and RAM. Other parameters are set to default values
$ stackit mongodbflex instance create --name my-instance --cpu 1 --ram 4 --acl 0.0.0.0/0
Create a MongoDB Flex instance with name "my-instance", ACL 0.0.0.0/0 (open access).
$ stackit mongodbflex instance create --name my-instance --flavor-id xxx --acl 0.0.0.0/0 --type Replica --storage-size 20 --version 8.0 --backup-schedule "6 6 * * *" --storage-size 10 --storage-class premium-perf2-mongodb

Create a MongoDB Flex instance with name "my-instance", ACL 0.0.0.0/0 (open access) and specify flavor by ID. Other parameters are set to default values
$ stackit mongodbflex instance create --name my-instance --flavor-id xxx --acl 0.0.0.0/0

Create a MongoDB Flex instance with name "my-instance", allow access to a specific range of IP addresses, specify flavor by CPU and RAM and set storage size to 20 GB. Other parameters are set to default values
$ stackit mongodbflex instance create --name my-instance --cpu 1 --ram 4 --acl 1.2.3.0/24 --storage-size 20
Create a MongoDB Flex instance with name "my-instance", allow access to a specific range of IP addresses.
$ stackit mongodbflex instance create --name my-instance --flavor-id xxx --acl 1.2.3.0/24 --type Replica --storage-size 20 --version 8.0 --backup-schedule "6 6 * * *" --storage-size 10 --storage-class premium-perf2-mongodb
```

### Options

```
--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 [])
--backup-schedule string Backup schedule (default "0 0/6 * * *")
--cpu int32 Number of CPUs
--flavor-id string ID of the flavor
--backup-schedule string Backup schedule. This flag will be required after 2027-03-07. (default "0 0/6 * * *")
--flavor-id string ID of the flavor. This flag will be required after 2027-03-07.
-h, --help Help for "stackit mongodbflex instance create"
-n, --name string Instance name
--ram int32 Amount of RAM (in GB)
--storage-class string Storage class (default "premium-perf2-mongodb")
--storage-size int Storage size (in GB) (default 10)
--storage-class string Storage class. This flag will be required after 2027-03-07. (default "premium-perf2-mongodb")
--storage-size int Storage size (in GB). This flag will be required after 2027-03-07. (default 10)
--type string Instance type, (one of: [Replica, Sharded, Single]) (default "Replica")
--version string MongoDB version. Defaults to the latest version available
--version string MongoDB version. Defaults to the latest version available. This flag will be required after 2027-03-07.
```

### Options inherited from parent commands
Expand Down
4 changes: 1 addition & 3 deletions docs/stackit_mongodbflex_instance_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ stackit mongodbflex instance update INSTANCE_ID [flags]
$ stackit mongodbflex instance update xxx --name my-new-name

Update the version of a MongoDB Flex instance
$ stackit mongodbflex instance update xxx --version 6.0
$ stackit mongodbflex instance update xxx --version 8.0
```

### Options

```
--acl strings Lists of IP networks in CIDR notation which are allowed to access this instance (default [])
--backup-schedule string Backup schedule
--cpu int32 Number of CPUs
--flavor-id string ID of the flavor
-h, --help Help for "stackit mongodbflex instance update"
-n, --name string Instance name
--ram int32 Amount of RAM (in GB)
--storage-class string Storage class
--storage-size int Storage size (in GB)
--type string Instance type, (one of: [Replica, Sharded, Single])
Expand Down
51 changes: 0 additions & 51 deletions docs/stackit_mongodbflex_options.md

This file was deleted.

34 changes: 34 additions & 0 deletions docs/stackit_mongodbflex_storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## stackit mongodbflex storage

Provides functionality for MongoDB Flex storages for a certain flavor

### Synopsis

Provides functionality for MongoDB Flex storages for a certain flavor.

```
stackit mongodbflex storage [flags]
```

### Options

```
-h, --help Help for "stackit mongodbflex storage"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit mongodbflex](./stackit_mongodbflex.md) - Provides functionality for MongoDB Flex
* [stackit mongodbflex storage list](./stackit_mongodbflex_storage_list.md) - Lists MongoDB Flex storages for a certain flavor

48 changes: 48 additions & 0 deletions docs/stackit_mongodbflex_storage_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## stackit mongodbflex storage list

Lists MongoDB Flex storages for a certain flavor

### Synopsis

Lists MongoDB Flex storages for a certain flavor.

```
stackit mongodbflex storage list [flags]
```

### Examples

```
List MongoDB Flex storages for flavor with ID "xxx"
$ stackit mongodbflex storage list --flavor-id xxx

List MongoDB Flex storages for flavor with ID "xxx" in JSON format
$ stackit mongodbflex storage list --flavor-id xxx --output-format json

List up to 10 storages for flavor with ID "xxx"
$ stackit mongodbflex storage list --flavor-id xxx --limit 10
```

### Options

```
--flavor-id string Flavor ID
-h, --help Help for "stackit mongodbflex storage list"
--limit int Maximum number of entries to list
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit mongodbflex storage](./stackit_mongodbflex_storage.md) - Provides functionality for MongoDB Flex storages for a certain flavor

34 changes: 34 additions & 0 deletions docs/stackit_mongodbflex_version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## stackit mongodbflex version

Provides functionality for MongoDB Flex versions

### Synopsis

Provides functionality for MongoDB Flex versions.

```
stackit mongodbflex version [flags]
```

### Options

```
-h, --help Help for "stackit mongodbflex version"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit mongodbflex](./stackit_mongodbflex.md) - Provides functionality for MongoDB Flex
* [stackit mongodbflex version list](./stackit_mongodbflex_version_list.md) - Lists MongoDB Flex versions

40 changes: 40 additions & 0 deletions docs/stackit_mongodbflex_version_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## stackit mongodbflex version list

Lists MongoDB Flex versions

### Synopsis

Lists MongoDB Flex versions.

```
stackit mongodbflex version list [flags]
```

### Examples

```
List MongoDB Flex version options
$ stackit mongodbflex version list
```

### Options

```
-h, --help Help for "stackit mongodbflex version list"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit mongodbflex version](./stackit_mongodbflex_version.md) - Provides functionality for MongoDB Flex versions

26 changes: 26 additions & 0 deletions internal/cmd/mongodbflex/flavor/flavor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package flavor

import (
"github.com/stackitcloud/stackit-cli/internal/cmd/mongodbflex/flavor/list"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"

"github.com/spf13/cobra"
)

func NewCmd(params *types.CmdParams) *cobra.Command {
cmd := &cobra.Command{
Use: "flavor",
Short: "Provides functionality for MongoDB Flex flavors",
Long: "Provides functionality for MongoDB Flex flavors.",
Args: args.NoArgs,
Run: utils.CmdHelp,
}
addSubcommands(cmd, params)
return cmd
}

func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
cmd.AddCommand(list.NewCmd(params))
}
Loading