> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cli-ionosctl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cli-ionosctl/subcommands/database-as-a-service/mongo/cluster/create.md).

# create

## Usage

```
ionosctl dbaas mongo cluster create [flags]
```

## Aliases

For `mongo` command:

```
[m mdb mongodb mg]
```

For `cluster` command:

```
[c]
```

For `create` command:

```
[c]
```

## Description

Create DBaaS Mongo Replicaset or Sharded Clusters for your chosen edition

## Options

```
  -u, --api-url string            Override default host URL. Preferred over the config file override 'mongo' and env var 'IONOS_API_URL' (default "https://api.ionos.com")
      --backup-location string    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster
      --biconnector string        BI Connector host & port. The MongoDB Connector for Business Intelligence allows you to query a MongoDB database using SQL commands. Example: r1.m-abcdefgh1234.mongodb.de-fra.ionos.com:27015
      --biconnector-enabled       Enable or disable the biconnector. To disable it, use --biconnector-enabled=false (default true)
      --cidr strings              The list of IPs and subnet for your cluster. All IPs must be in a /24 network (required)
      --cols strings              Set of columns to be printed on output 
                                  Available columns: [ClusterId Name Edition Type URL Instances Shards Health State MongoVersion MaintenanceWindow Location DatacenterId LanId Cidr TemplateId Cores RAM StorageSize StorageType]
  -c, --config string             Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
      --cores int32               The total number of cores for the Server, e.g. 4. (required and only settable for enterprise edition) (default 1)
      --datacenter-id string      The datacenter to which your cluster will be connected. Must be in the same location as the cluster (required)
  -D, --depth int                 Level of detail for response objects (default 1)
  -e, --edition string            Cluster Edition. Can be one of: playground, business, enterprise (required)
  -F, --filters strings           Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
  -f, --force                     Force command to execute without user input
  -h, --help                      Print usage
      --instances int32           The total number of instances of the cluster (one primary and n-1 secondaries). Minimum of 3 for enterprise edition (default 1)
      --lan-id string             The numeric LAN ID with which you connect your cluster (required)
      --limit int                 Maximum number of items to return per request (default 50)
  -l, --location string           The physical location where the cluster will be created. (defaults to the location of the connected datacenter)
      --maintenance-day string    Day Of the Week for the MaintenanceWindows. The MaintenanceWindow is a weekly 4 hour-long windows, during which maintenance might occur. Defaults to a random day during Mon-Fri, during the hours 10:00-16:00 (default "Random (Mon-Fri 10:00-16:00)")
      --maintenance-time string   Time for the MaintenanceWindows. The MaintenanceWindow is a weekly 4 hour-long windows, during which maintenance might occur. e.g.: 16:30:59. Defaults to a random day during Mon-Fri, during the hours 10:00-16:00 (default "Random (Mon-Fri 10:00-16:00)")
  -n, --name string               The name of your cluster (required)
      --no-headers                Don't print table headers when table output is used
      --offset int                Number of items to skip before starting to collect the results
      --order-by string           Property to order the results by
  -o, --output string             Desired output format [text|json|api-json] (default "text")
      --query string              JMESPath query string to filter the output
  -q, --quiet                     Quiet output
      --ram string                Custom RAM: multiples of 1024. e.g. --ram 1024 or --ram 1024MB or --ram 4GB (required and only settable for enterprise edition) (default "2GB")
      --shards int32              The total number of shards in the sharded_cluster cluster. Setting this flag is only possible for enterprise clusters and infers a sharded_cluster type. Possible values: 2 - 32. (required for sharded_cluster enterprise clusters) (required) (default 1)
      --storage-size string       Custom Storage: Minimum of 5GB, Greater performance for values greater than 100 GB. (only settable for enterprise edition) (default "5GB")
      --storage-type string       Custom Storage Type. (only settable for enterprise edition) (default "\"SSD Standard\"")
      --template string           The ID of a Mongo Template, or a word contained in the name of one. Templates specify the number of cores, storage size, and memory. Business editions default to XS template. Playground editions default to playground template.
  -t, --timeout int               Timeout in seconds for --wait and other wait operations (default 600)
      --type string               Cluster Type. Required for enterprise clusters. Not required (inferred) if using --shards or --instances. Can be one of: replicaset, sharded-cluster (default "replicaset")
  -v, --verbose count             Increase verbosity level [-v, -vv, -vvv]
      --version string            The MongoDB version of your cluster (required) (default "7.0")
  -w, --wait                      Wait for the resource to reach AVAILABLE state after the command completes. No-op for list commands
```

## Examples

```
ionosctl dbaas mongo cluster create --edition playground --name NAME --datacenter-id DATACENTER_ID --lan-id LAN_ID --cidr CIDR 

ionosctl dbaas mongo cluster create --edition business --name NAME --datacenter-id DATACENTER_ID --lan-id LAN_ID --cidr CIDR --instances INSTANCES 

ionosctl dbaas mongo cluster create --edition enterprise --instances INSTANCES [--shards SHARDS] --name NAME --datacenter-id DATACENTER_ID --lan-id LAN_ID --cidr CIDR 

ionosctl dbaas mongo cluster create --edition enterprise --type replicaset --name NAME --datacenter-id DATACENTER_ID --lan-id LAN_ID --cidr CIDR --instances INSTANCES 

ionosctl dbaas mongo cluster create --edition enterprise --type sharded-cluster --name NAME --datacenter-id DATACENTER_ID --lan-id LAN_ID --cidr CIDR --shards SHARDS 
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cli-ionosctl/subcommands/database-as-a-service/mongo/cluster/create.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
