diff --git a/pages/managed-mongodb-databases/api-cli/backup-and-restore.mdx b/pages/managed-mongodb-databases/api-cli/backup-and-restore.mdx index d83182d3a1..8c961c51d2 100644 --- a/pages/managed-mongodb-databases/api-cli/backup-and-restore.mdx +++ b/pages/managed-mongodb-databases/api-cli/backup-and-restore.mdx @@ -11,10 +11,6 @@ categories: - postgresql-and-mysql --- - -Managed MongoDB® is currently in private beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list. - - Managed MongoDB® provides fully-managed document Database Instances, with a MongoDB®-compatible API layer over a PostgreSQL engine to store and retrieve data. This means you can use MongoDB® command line tools to use and manage your MongoDB® Databases. diff --git a/pages/managed-mongodb-databases/concepts.mdx b/pages/managed-mongodb-databases/concepts.mdx index 8e4eeda9cc..044a40a719 100644 --- a/pages/managed-mongodb-databases/concepts.mdx +++ b/pages/managed-mongodb-databases/concepts.mdx @@ -10,10 +10,6 @@ categories: - managed-databases --- - -Managed MongoDB® is currently in private beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list. - - ## Block Storage Legacy Block Storage Legacy is a volume type that is decoupled from your compute resources. You can increase your storage space to up to 10 TB without changing your node type. @@ -60,10 +56,6 @@ Compared to traditional database management, which requires customers to provisi - - During the MongoDB® Private Beta, only the France region is available. - - ## Replica-set 1-node An Instance of MongoDB® that runs as a single server and does not provide redundancy or high availability. diff --git a/pages/managed-mongodb-databases/how-to/connect-database-instance.mdx b/pages/managed-mongodb-databases/how-to/connect-database-instance.mdx index f410af96f1..61110d9300 100644 --- a/pages/managed-mongodb-databases/how-to/connect-database-instance.mdx +++ b/pages/managed-mongodb-databases/how-to/connect-database-instance.mdx @@ -13,10 +13,6 @@ categories: - managed-databases --- - -Managed MongoDB® is currently in public beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list. - - - A Scaleway account logged into the [console](https://console.scaleway.com) diff --git a/pages/managed-mongodb-databases/how-to/create-a-database-instance.mdx b/pages/managed-mongodb-databases/how-to/create-a-database-instance.mdx index e4091eaa8c..dc55a32295 100644 --- a/pages/managed-mongodb-databases/how-to/create-a-database-instance.mdx +++ b/pages/managed-mongodb-databases/how-to/create-a-database-instance.mdx @@ -13,10 +13,6 @@ categories: - managed-databases --- - -Managed MongoDB® is currently in public beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list. - - Managed MongoDB® provides fully-managed document Database Instances, with MongoDB® as a database engine. Document databases enable users to store and retrieve data in a document format, such as `json`. Compared to traditional relational databases where data is stored in a table-like format, document-type storage supports storing multiple nested keys and values in each document key. @@ -41,7 +37,7 @@ Document databases enable users to store and retrieve data in a document format, - Configure storage settings. You can: - Choose the [IOPS](/block-storage/concepts/#iops) setting, between **5k** and **15k**. - Define your volume size. Block Storage volumes can increase up to 10 TB. - - Review the snapshot configuration. During the private beta, only manual snapshots are available. + - Review the snapshot configuration. 4. Configure your Network. Choose one or both of the options below: - **Attach to Private Network**: allows your databases to communicate in an isolated and secure network without requiring a public IP address. If you select this option, you must either: - Select and attach an existing Private Network and select the network from the drop-down list. diff --git a/pages/managed-mongodb-databases/how-to/delete-a-database-instance.mdx b/pages/managed-mongodb-databases/how-to/delete-a-database-instance.mdx index 8823f50750..4e2a62f686 100644 --- a/pages/managed-mongodb-databases/how-to/delete-a-database-instance.mdx +++ b/pages/managed-mongodb-databases/how-to/delete-a-database-instance.mdx @@ -13,10 +13,6 @@ categories: - managed-databases --- - -Managed MongoDB® is currently in public beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list. - - - A Scaleway account logged into the [console](https://console.scaleway.com) diff --git a/pages/managed-mongodb-databases/how-to/increase-volume.mdx b/pages/managed-mongodb-databases/how-to/increase-volume.mdx index 7039571823..19dbb7a216 100644 --- a/pages/managed-mongodb-databases/how-to/increase-volume.mdx +++ b/pages/managed-mongodb-databases/how-to/increase-volume.mdx @@ -13,10 +13,6 @@ categories: - managed-databases --- - -Managed MongoDB® is currently in public beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list. - - You can increase the Block Storage volume of your MongoDB® Database Instance in the Scaleway console anytime. diff --git a/pages/managed-mongodb-databases/how-to/manage-snapshots.mdx b/pages/managed-mongodb-databases/how-to/manage-snapshots.mdx index 8052071d9c..f1efdc5cfc 100644 --- a/pages/managed-mongodb-databases/how-to/manage-snapshots.mdx +++ b/pages/managed-mongodb-databases/how-to/manage-snapshots.mdx @@ -13,10 +13,6 @@ categories: - managed-databases --- - -Managed MongoDB® is currently in public beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list. - - [Snapshots](/managed-mongodb-databases/how-to/manage-snapshots/) allow you to restore data in a new Database Instance. You can have up to 100 snapshots per Instance and project (depending on quotas). diff --git a/pages/managed-mongodb-databases/how-to/manage-users.mdx b/pages/managed-mongodb-databases/how-to/manage-users.mdx index f5759c047e..c44f0c9971 100644 --- a/pages/managed-mongodb-databases/how-to/manage-users.mdx +++ b/pages/managed-mongodb-databases/how-to/manage-users.mdx @@ -13,20 +13,13 @@ categories: - managed-databases --- - -Managed MongoDB® is currently in public beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list. - - Users can connect to a database and access its data. - - During the MongoDB® private beta, you can have only one user per Instance. The default user has admin rights on the Database Instance. The name and password of this default user can be set upon Database Instance creation. - - - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/iam/how-to/create-api-keys/) - A [MongoDB® Database Instance](/managed-mongodb-databases/quickstart) ## How to change the password of your user @@ -37,3 +30,125 @@ Users can connect to a database and access its data. 4. Click **Change password** to do so. A pop-up appears. 5. Enter your new password and confirm. +## How to create multi-users via the API + +When you create your MongoDB® Database Instance, the first user is created by default and has admin rights. + +You can create more users and grant them pre-set roles via the [Scaleway Managed MongoDB® API](https://www.scaleway.com/en/developers/api/managed-database-mongodb/). + + + All users you create have at first administrator roles, which can be changed after creation with the [Apply user roles](https://www.scaleway.com/en/developers/api/managed-database-mongodb/#path-users-apply-user-roles) call. The default user's role cannot be changed. + + +### How to create a user + +1. Edit the POST request payload you will use to create your user. Replace the values of each parameter with your values of choice following the parameter descriptions below. + ``` + { + "name": "", + "password": "", + } + ``` + + | Parameter | Description | + | :--------------- | :----------------------------------------------------------------- | + | `name` | Set a name for the database user. | + | `password` | Set a password for the database user.| + +2. Run the following command to create a user. Make sure you include the payload you edited in the previous step. `{instance_id}` corresponds to the UUID of the Managed MongoDB®. + ``` + curl -X POST \ + -H "X-Auth-Token: $SCW_SECRET_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "password": "", + }' \ + "https://api.scaleway.com/mongodb/v1alpha1/regions/$SCW_REGION/par/instances/{instance_id}/users" + ``` + + You should get a response like the following: + ``` + { + "name": "", + "password": "", + "roles": [ + { + "role": "read_write", + "any_database": true + }, + { + "role": "db_admin", + "any_database": true + }, + { + "role": "sync", + "any_database": true + } + ] + } + ``` + +All users you create will have the `read_write`, `db_admin` and `sync` roles on all databases by default. + +You can follow the steps below to update a user's role(s) to the one(s) of your choice. + +### How to apply a role to a user + +1. Edit the POST request payload you will use to update the user role. Replace the values of each parameter with your values of choice following the parameter descriptions below. + + In this example, we define a single `read_write` role for the user. This role applies only in the `example-db` database. + + + To grant the user this role in all databases, you can set `any_database` to true. + + + ``` + { + "name": "", + "roles": [ + { + "role": "read_write", + "database": "example-db", + "any_database": false + } + ] + } + ``` + + | Role | Description | + | :--------------- | :----------------------------------------------------------------- | + | `read` | Read privileges on all non-system collections and the `system.js` collection. Refer to the [official MongoDB® documentation](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) for an extensive list of the privileges granted to this role. | + | `read_write` | Read and write privileges on all non-system collections and the `system.js` collection. Refer to the [official MongoDB® documentation](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) for an extensive list of the privileges granted to this role. | + | `db_admin` | Privileges to perform administrative tasks on the database, such as schema-related tasks, indexing, and gathering statistics. This role does not grant privileges for user and role management. Refer to the [official MongoDB® documentation](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) for an extensive list of the privileges granted to this role. | + | `sync` | Role that aggregates three MongoDB roles: | + | | `clusterMonitor` - Read-only access to monitoring tools. Refer to the [official MongoDB® documentation](https://www.mongodb.com/docs/upcoming/reference/built-in-roles/#mongodb-authrole-clusterMonitor) for an extensive list of the privileges granted to this role. | + | | `backup` - Grants the minimal privileges needed to back up data. Refer to the [official MongoDB® documentation](https://www.mongodb.com/docs/upcoming/reference/built-in-roles/#mongodb-authrole-backup) for an extensive list of the privileges granted to this role. | + | | `restore` - Grants the privileges needed to restore data from backups. Refer to the [official MongoDB® documentation](https://www.mongodb.com/docs/upcoming/reference/built-in-roles/#mongodb-authrole-restore) for an extensive list of the privileges granted to this role. | + +2. Run the following command to apply a new role to the user. Make sure you include the payload you edited in the previous step and that you replace the parameters in the call with your information. `{instance_id}` corresponds to the UUID of the Managed MongoDB®. + + ``` + curl -X PUT \ + -H "X-Auth-Token: $SCW_SECRET_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "roles": [ + { + "role": "read_write", + "database": "" + "any_database": false + } + ] + }' \ + "https://api.scaleway.com/mongodb/v1alpha1/regions/$SCW_REGION/instances/{instance_id}/roles" + ``` + + If the call was successful, you will get the payload with the new role(s) as a response. + + + Assigning roles upon user creation will be possible by the second half of 2025. Refer to the [Scaleway Changelog](/docs/changelog/?product=mongodb) to keep up with the latest Managed MongoDB® updates. + + + diff --git a/pages/managed-mongodb-databases/index.mdx b/pages/managed-mongodb-databases/index.mdx index 3cf417c287..e21d456478 100644 --- a/pages/managed-mongodb-databases/index.mdx +++ b/pages/managed-mongodb-databases/index.mdx @@ -15,10 +15,6 @@ content: label="Managed MongoDB® Quickstart" /> - -Managed MongoDB® is currently in public beta. [Fill out the form](https://www.scaleway.com/en/managed-mongodb-form/) to be notified of the General Availability or if you want to get in touch with our team about Managed MongoDB®. - - ## Getting Started diff --git a/pages/managed-mongodb-databases/quickstart.mdx b/pages/managed-mongodb-databases/quickstart.mdx index 71e005ccc3..ac603229d5 100644 --- a/pages/managed-mongodb-databases/quickstart.mdx +++ b/pages/managed-mongodb-databases/quickstart.mdx @@ -13,10 +13,6 @@ categories: - managed-databases --- - -Managed MongoDB® is currently in public beta. [Fill out the form](https://www.scaleway.com/en/managed-mongodb/) to be notified of the General Availability or if you want to get in touch with our team about Managed MongoDB®. - - Managed MongoDB® provides fully-managed document Database Instances, with MongoDB® as a database engine. MongoDB® databases enable users to store and retrieve data in a document format, such as `json`. Compared to traditional relational databases where data is stored in a table-like format, document-type storage supports storing multiple nested keys and values in each document key.